Google is committed to advancing racial equity for Black communities. See how.

ManagedRemoteDevice

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


A device running inside a virtual machine that we manage remotely via a Tradefed instance inside the VM.

Summary

Public constructors

ManagedRemoteDevice(IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

Creates a ManagedRemoteDevice.

Public methods

TestDeviceOptions getOptions()

Override the base getter to be able to resolve dynamic options before attempting to do the remote setup.

GceAvdInfo getRemoteAvdInfo()

Returns the GceAvdInfo describing the remote instance.

void postInvocationTearDown(Throwable exception)

void preInvocationSetup(IBuildInfo info)

void setTestLogger(ITestLogger testLogger)

Protected methods

long getCurrentTime()

Returns the current system time.

void launchGce()

Launch the actual gce device based on the build info.

Public constructors

ManagedRemoteDevice

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

Creates a ManagedRemoteDevice.

Parameters
device IDevice: the associated IDevice

stateMonitor IDeviceStateMonitor: the IDeviceStateMonitor mechanism to use

allocationMonitor IDeviceMonitor: the IDeviceMonitor to inform of allocation state changes.

Public methods

getOptions

public TestDeviceOptions getOptions ()

Override the base getter to be able to resolve dynamic options before attempting to do the remote setup.

Returns
TestDeviceOptions

getRemoteAvdInfo

public GceAvdInfo getRemoteAvdInfo ()

Returns the GceAvdInfo describing the remote instance.

Returns
GceAvdInfo

postInvocationTearDown

public void postInvocationTearDown (Throwable exception)

Parameters
exception Throwable

preInvocationSetup

public void preInvocationSetup (IBuildInfo info)

Parameters
info IBuildInfo

Throws
DeviceNotAvailableException
TargetSetupError

setTestLogger

public void setTestLogger (ITestLogger testLogger)

Parameters
testLogger ITestLogger

Protected methods

getCurrentTime

protected long getCurrentTime ()

Returns the current system time. Exposed for testing.

Returns
long

launchGce

protected void launchGce ()

Launch the actual gce device based on the build info.

Throws
TargetSetupError