Stay organized with collections Save and categorize content based on your preferences.

OxygenClient

public class OxygenClient
extends Object

java.lang.Object
   ↳ com.android.tradefed.device.cloud.OxygenClient


A class that manages the use of Oxygen client binary to lease or release Oxygen device.

Summary

Fields

public static final sGceDeviceParamsToOxygenMap

Public constructors

OxygenClient(File clientBinary, IRunUtil runUtil)
OxygenClient(File clientBinary)

The constructor of OxygenClient class.

Public methods

CommandResult leaseDevice(IBuildInfo b, TestDeviceOptions deviceOptions)

Attempt to lease a device by calling Oxygen client binary.

CommandResult leaseMultipleDevices( buildInfos, TestDeviceOptions deviceOptions)

Attempt to lease multiple devices by calling Oxygen client binary.

boolean release(GceAvdInfo gceAvdInfo, TestDeviceOptions deviceOptions)

Attempt to release a device by using Oxygen client binary.

Fields

sGceDeviceParamsToOxygenMap

public static final  sGceDeviceParamsToOxygenMap

Public constructors

OxygenClient

public OxygenClient (File clientBinary, 
                IRunUtil runUtil)

Parameters
clientBinary File

runUtil IRunUtil

OxygenClient

public OxygenClient (File clientBinary)

The constructor of OxygenClient class.

Parameters
clientBinary File: the executable Oxygen client binary file.

Public methods

leaseDevice

public CommandResult leaseDevice (IBuildInfo b, 
                TestDeviceOptions deviceOptions)

Attempt to lease a device by calling Oxygen client binary.

Parameters
b IBuildInfo: IBuildInfo

deviceOptions TestDeviceOptions: TestDeviceOptions

Returns
CommandResult a CommandResult that Oxygen binary returned.

leaseMultipleDevices

public CommandResult leaseMultipleDevices ( buildInfos, 
                TestDeviceOptions deviceOptions)

Attempt to lease multiple devices by calling Oxygen client binary.

Parameters
buildInfos : ERROR(/List)

deviceOptions TestDeviceOptions: TestDeviceOptions

Returns
CommandResult CommandResult that Oxygen binary returned.

release

public boolean release (GceAvdInfo gceAvdInfo, 
                TestDeviceOptions deviceOptions)

Attempt to release a device by using Oxygen client binary.

Parameters
gceAvdInfo GceAvdInfo: GceAvdInfo

deviceOptions TestDeviceOptions: TestDeviceOptions

Returns
boolean a boolean which indicate whether the device release is successful.