DeviceSnapshotHandler

public class DeviceSnapshotHandler
extends Object

java.lang.Object
   ↳ com.android.tradefed.device.internal.DeviceSnapshotHandler


Utility handling Cuttlefish snapshot. This is meant to only be used internally to the test harness. This shouldn't be called during a test.

Summary

Public constructors

DeviceSnapshotHandler()

Public methods

void restoreSnapshotDevice(ITestDevice device, String snapshotId)

Calls restore snapshot of the given device.

void snapshotDevice(ITestDevice device, String snapshotId)

Calls snapshot of the given device.

Public constructors

DeviceSnapshotHandler

public DeviceSnapshotHandler ()

Public methods

restoreSnapshotDevice

public void restoreSnapshotDevice (ITestDevice device, 
                String snapshotId)

Calls restore snapshot of the given device.

Parameters
device ITestDevice: The device to restore.

snapshotId String: Snapshot ID for the device to be restored to.

Returns
void True if restore was successful, false otherwise.

Throws
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

snapshotDevice

public void snapshotDevice (ITestDevice device, 
                String snapshotId)

Calls snapshot of the given device.

Parameters
device ITestDevice: The device to snapshot.

snapshotId String: Snapshot ID for the device to be saved to.

Returns
void True if snapshot was successful, false otherwise.

Throws
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException