LocalAndroidVirtualDevice

public class LocalAndroidVirtualDevice
extends RemoteAndroidDevice implements ITestLoggerReceiver

java.lang.Object
   ↳ com.android.tradefed.device.NativeDevice
     ↳ com.android.tradefed.device.TestDevice
       ↳ com.android.tradefed.device.RemoteAndroidDevice
         ↳ com.android.tradefed.device.LocalAndroidVirtualDevice


The class for local virtual devices running on TradeFed host.

Summary

Public constructors

LocalAndroidVirtualDevice(IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

Public methods

boolean adbTcpConnect(String host, String port)
boolean adbTcpDisconnect(String host, String port)
void postInvocationTearDown(Throwable exception)

Execute common tear-down procedure and stop the virtual device.

void preInvocationSetup(IBuildInfo info, MultiMap<String, String> attributes)

Execute common setup procedure and launch the virtual device.

void setTestLogger(ITestLogger testLogger)

Injects the ITestLogger instance

void shutdown()

Shutdown the device.

Public constructors

LocalAndroidVirtualDevice

public LocalAndroidVirtualDevice (IDevice device, 
                IDeviceStateMonitor stateMonitor, 
                IDeviceMonitor allocationMonitor)

Parameters
device IDevice

stateMonitor IDeviceStateMonitor

allocationMonitor IDeviceMonitor

Public methods

adbTcpConnect

public boolean adbTcpConnect (String host, 
                String port)

Parameters
host String

port String

Returns
boolean

adbTcpDisconnect

public boolean adbTcpDisconnect (String host, 
                String port)

Parameters
host String

port String

Returns
boolean

postInvocationTearDown

public void postInvocationTearDown (Throwable exception)

Execute common tear-down procedure and stop the virtual device.

Parameters
exception Throwable: if any, the final exception raised by the invocation failure.

preInvocationSetup

public void preInvocationSetup (IBuildInfo info, 
                MultiMap<String, String> attributes)

Execute common setup procedure and launch the virtual device.

Parameters
info IBuildInfo: The IBuildInfo of the device.

attributes MultiMap: The attributes stored in the invocation context

Throws
DeviceNotAvailableException
TargetSetupError

setTestLogger

public void setTestLogger (ITestLogger testLogger)

Injects the ITestLogger instance

Parameters
testLogger ITestLogger

shutdown

public void shutdown ()

Shutdown the device.