RunConfigDeviceRecovery

public class RunConfigDeviceRecovery
extends Object implements IMultiDeviceRecovery

java.lang.Object
   ↳ com.android.tradefed.device.recovery.RunConfigDeviceRecovery


Generic base IMultiDeviceRecovery to run a tradefed configuration to do the recovery step.

Summary

Public constructors

RunConfigDeviceRecovery()

Public methods

List<String> getExtraArguments(ITestDevice device)

Get the list of extra arguments to be passed to the configuration.

void recoverDevices(List<IManagedTestDevice> managedDevices)

Recovers offline devices on host.

boolean shouldSkip(IManagedTestDevice device)

Extra chance to skip the recovery on a given device by doing extra checks.

Protected methods

ICommandScheduler getCommandScheduler()

Returns a ICommandScheduler instance.

IDeviceManager getDeviceManager()

Returns a IDeviceManager instance.

Public constructors

RunConfigDeviceRecovery

public RunConfigDeviceRecovery ()

Public methods

getExtraArguments

public List<String> getExtraArguments (ITestDevice device)

Get the list of extra arguments to be passed to the configuration. If null is returned something went wrong and recovery should be attempted.

Parameters
device ITestDevice: The ITestDevice to run recovery against

Returns
List<String> The list of extra arguments to be used. Or null if something went wrong.

recoverDevices

public void recoverDevices (List<IManagedTestDevice> managedDevices)

Recovers offline devices on host.

Parameters
managedDevices List: a list of ITestDevices.

shouldSkip

public boolean shouldSkip (IManagedTestDevice device)

Extra chance to skip the recovery on a given device by doing extra checks.

Parameters
device IManagedTestDevice: The IManagedTestDevice considered for recovery.

Returns
boolean True if recovery should be skipped.

Protected methods

getCommandScheduler

protected ICommandScheduler getCommandScheduler ()

Returns a ICommandScheduler instance. Exposed for testing.

Returns
ICommandScheduler

getDeviceManager

protected IDeviceManager getDeviceManager ()

Returns a IDeviceManager instance. Exposed for testing.

Returns
IDeviceManager