IManagedTestDevice

public interface IManagedTestDevice
implements ITestDevice

com.android.tradefed.device.IManagedTestDevice


生命週期受管理的 ITestDevice。

摘要

巢狀類別

class IManagedTestDevice.DeviceEventResponse

回應 IManagedTestDevice.handleAllocationEvent(DeviceEvent) 呼叫的容器 

公用方法

abstract DeviceInspectionResult debugDeviceNotAvailable()

檢查裝置,並在裝置無法使用時傳回詳細資訊。

abstract String getAdbPath()

傳回所用 adb 二進位檔的路徑。

abstract DeviceAllocationState getAllocationState()

傳回裝置的目前分配狀態

abstract Process getEmulatorProcess()

傳回與這個模擬器對應的 Process

abstract String getFastbootPath()

傳回所用快速啟動二進位檔的路徑。

abstract String getFastbootVersion()

傳回所用 Fastboot 二進位檔的版本字串。

abstract String getMacAddress()

傳回裝置的 MAC 位址,如果無法從裝置查詢,則傳回空值。

abstract IDeviceStateMonitor getMonitor()

傳回與裝置相關聯的 IDeviceStateMonitor

abstract String getSimOperator()

如果無法使用或裝置無法使用,則傳回 SIM 卡業者或空值。

abstract String getSimState()

傳回 SIM 卡狀態,如果無法使用或裝置無法使用,則傳回空值。

abstract IManagedTestDevice.DeviceEventResponse handleAllocationEvent(DeviceEvent event)

Process the given DeviceEvent.

abstract boolean isFastbootEnabled()

傳回裝置是否支援 Fastboot。

abstract boolean recoverDevice()

在裝置上叫用復原功能。

abstract void setAdbPath(String fastbootPath)

設定要使用的 adb 二進位檔路徑。

abstract void setDeviceState(TestDeviceState deviceState)

更新裝置的狀態。

abstract void setEmulatorProcess(Process p)

設定 Process,前提是這部裝置為模擬器。

abstract void setFastbootEnabled(boolean fastbootEnabled)

設定裝置的 Fastboot 選項。

abstract void setFastbootPath(String fastbootPath)

設定要使用的 fastboot 二進位檔路徑。

abstract void setIDevice(IDevice device)

更新與這個 ITestDevice 相關聯的 IDevice。

公用方法

debugDeviceNotAvailable

public abstract DeviceInspectionResult debugDeviceNotAvailable ()

檢查裝置,並在裝置無法使用時傳回詳細資訊。

傳回
DeviceInspectionResult

getAdbPath

public abstract String getAdbPath ()

傳回所用 adb 二進位檔的路徑。

傳回
String

getAllocationState

public abstract DeviceAllocationState getAllocationState ()

傳回裝置的目前分配狀態

傳回
DeviceAllocationState

getEmulatorProcess

public abstract Process getEmulatorProcess ()

傳回與這個模擬器對應的 Process

傳回
Process Processnull

getFastbootPath

public abstract String getFastbootPath ()

傳回所用快速啟動二進位檔的路徑。 仍須將 isFastbootEnabled() 設為 True,才能啟用 Fastboot 函式。

傳回
String

getFastbootVersion

public abstract String getFastbootVersion ()

傳回所用 Fastboot 二進位檔的版本字串。如果發生錯誤,則為空值。

傳回
String

getMacAddress

public abstract String getMacAddress ()

傳回裝置的 MAC 位址,如果無法從裝置查詢,則傳回空值。

傳回
String

getMonitor

public abstract IDeviceStateMonitor getMonitor ()

傳回與裝置相關聯的 IDeviceStateMonitor

傳回
IDeviceStateMonitor

getSimOperator

public abstract String getSimOperator ()

如果無法使用或裝置無法使用,則傳回 SIM 卡業者或空值。

傳回
String

getSimState

public abstract String getSimState ()

傳回 SIM 卡狀態,如果無法使用或裝置無法使用,則傳回空值。

傳回
String

handleAllocationEvent

public abstract IManagedTestDevice.DeviceEventResponse handleAllocationEvent (DeviceEvent event)

處理指定的 DeviceEvent。可能將裝置轉換為新狀態。會通知 IDeviceMonitor 所有狀態轉換。

參數
event DeviceEvent

傳回
IManagedTestDevice.DeviceEventResponse

isFastbootEnabled

public abstract boolean isFastbootEnabled ()

傳回裝置是否支援 Fastboot。

傳回
boolean

recoverDevice

public abstract boolean recoverDevice ()

在裝置上叫用復原功能。

傳回
boolean 如果嘗試復原且成功,則傳回 True;如果略過復原,則傳回 False

擲回
DeviceNotAvailableException 如果復原作業未成功

setAdbPath

public abstract void setAdbPath (String fastbootPath)

設定要使用的 adb 二進位檔路徑。

參數
fastbootPath String

setDeviceState

public abstract void setDeviceState (TestDeviceState deviceState)

更新裝置狀態。

參數
deviceState TestDeviceStateTestDeviceState

setEmulatorProcess

public abstract void setEmulatorProcess (Process p)

如果這部裝置是模擬器,則設定 Process

參數
p Process

setFastbootEnabled

public abstract void setFastbootEnabled (boolean fastbootEnabled)

設定裝置的 Fastboot 選項。應在首次分配裝置時設定。

參數
fastbootEnabled boolean:裝置是否支援 Fastboot

setFastbootPath

public abstract void setFastbootPath (String fastbootPath)

設定要使用的 fastboot 二進位檔路徑。仍須將 isFastbootEnabled() 設為 True,才能啟用 Fastboot 函式。

參數
fastbootPath String

setIDevice

public abstract void setIDevice (IDevice device)

更新與這個 ITestDevice 相關聯的 IDevice。

新的 IDevice 必須參照與目前參照相同的實體裝置。如果 DDMS 已分配新的 IDevice,系統就會呼叫這個方法

參數
device IDeviceIDevice