管理遠程設備
public class ManagedRemoteDevice
extends TestDevice
implements ITestLoggerReceiver
java.lang.Object | |||
↳ | com.android.tradefed.device.NativeDevice | ||
↳ | com.android.tradefed.device.TestDevice | ||
↳ | com.android.tradefed.device.cloud.ManagedRemoteDevice |
在虛擬機內運行的設備,我們通過虛擬機內的 Tradefed 實例進行遠程管理。
概括
公共構造函數 | |
---|---|
ManagedRemoteDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor) 創建一個 |
公共方法 | |
---|---|
TestDeviceOptions | getOptions () 在嘗試進行遠程設置之前,覆蓋基本 getter 以便能夠解析動態選項。 |
void | postInvocationTearDown (Throwable exception) 設備特定所需清理的額外步驟將在調用完成後執行。 |
void | preInvocationSetup ( IBuildInfo info, MultiMap <String, String> attributes) 設備特定所需設置的額外步驟將在調用流程之前在設備上執行。 |
公共構造函數
管理遠程設備
public ManagedRemoteDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)
創建一個ManagedRemoteDevice
。
參數 | |
---|---|
device | IDevice :關聯的IDevice |
stateMonitor | IDeviceStateMonitor :要使用的IDeviceStateMonitor 機制 |
allocationMonitor | IDeviceMonitor :通知分配狀態更改的IDeviceMonitor 。 |
公共方法
獲取選項
public TestDeviceOptions getOptions ()
在嘗試進行遠程設置之前,覆蓋基本 getter 以便能夠解析動態選項。
退貨 | |
---|---|
TestDeviceOptions | TestDeviceOptions 與被測設備相關。 |
調用後拆卸
public void postInvocationTearDown (Throwable exception)
設備特定所需清理的額外步驟將在調用完成後執行。
參數 | |
---|---|
exception | Throwable :如果有的話,調用失敗引發的最終異常。 |
調用前設置
public void preInvocationSetup (IBuildInfo info, MultiMap<String, String> attributes)
設備特定所需設置的額外步驟將在調用流程之前在設備上執行。
參數 | |
---|---|
info | IBuildInfo :設備的IBuildInfo 。 |
attributes | MultiMap :存儲在調用上下文中的屬性 |
投擲 | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |