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

boolean restoreSnapshotDevice(ITestDevice device, String snapshotId)

Calls restore snapshot of the given device.

boolean snapshotDevice(ITestDevice device, String snapshotId)

Calls snapshot of the given device.

Public constructors

DeviceSnapshotHandler

public DeviceSnapshotHandler ()

Public methods

restoreSnapshotDevice

public boolean 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
boolean True if restore was successful, false otherwise.

Throws
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

snapshotDevice

public boolean 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
boolean True if snapshot was successful, false otherwise.

Throws
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException