StorageDomain.CustomData


class StorageDomain.CustomData : StorageDomain


Targets data that device actions of your own seed and verify, such as a restore credential that only the app's code can create and read.

The flow runs populateAction with populateArgs before the backup. After the restore, it runs verifyAction with verifyArgs and the data that populateAction returned, except its status and error. That data replaces the values of verifyArgs with the same keys. The flow fails if either action fails, or if populateAction returns a key that the runner reserves.

Summary

Public constructors

CustomData(populateAction: String, verifyAction: String)

Targets custom data whose actions take no arguments.

CustomData(
    populateAction: String,
    verifyAction: String,
    populateArgs: Map<String, String>,
    verifyArgs: Map<String, String>
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

String

class name of the androidx.test.backup.BackupDeviceAction that seeds the data

Map<String, String>

arguments for populateAction, as BackupRestoreController.runOnDevice takes them.

String

class name of the androidx.test.backup.BackupDeviceAction that verifies the data after the restore

Map<String, String>

arguments for verifyAction.

Public constructors

CustomData

Added in 1.0.0-alpha06
CustomData(populateAction: String, verifyAction: String)

Targets custom data whose actions take no arguments.

CustomData

Added in 1.0.0-alpha06
CustomData(
    populateAction: String,
    verifyAction: String,
    populateArgs: Map<String, String>,
    verifyArgs: Map<String, String>
)
Parameters
populateAction: String

class name of the androidx.test.backup.BackupDeviceAction that seeds the data

verifyAction: String

class name of the androidx.test.backup.BackupDeviceAction that verifies the data after the restore

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

populateAction

Added in 1.0.0-alpha06
val populateAction: String

class name of the androidx.test.backup.BackupDeviceAction that seeds the data

populateArgs

Added in 1.0.0-alpha06
val populateArgs: Map<String, String>

arguments for populateAction, as BackupRestoreController.runOnDevice takes them. The keys actionClass, argsFile, debug and redirect_dir are reserved for the runner; with one of them, construction fails with an IllegalArgumentException. The domain keeps a copy of it.

verifyAction

Added in 1.0.0-alpha06
val verifyAction: String

class name of the androidx.test.backup.BackupDeviceAction that verifies the data after the restore

verifyArgs

Added in 1.0.0-alpha06
val verifyArgs: Map<String, String>

arguments for verifyAction. The same keys are reserved; with one of them, construction fails with an IllegalArgumentException. The domain keeps a copy of it.