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 args before the backup. After the restore, it runs verifyAction with args and the data that populateAction returned, except its status and error. That data replaces the values of args 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,
    args: Map<String, String>
)

Public functions

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

Public properties

Map<String, String>

arguments for both actions, as BackupRestoreController.runOnDevice takes them.

String

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

String

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

Public constructors

CustomData

Added in 1.0.0-alpha04
CustomData(
    populateAction: String,
    verifyAction: String,
    args: Map<String, String> = emptyMap()
)

Public functions

equals

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

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

args

Added in 1.0.0-alpha04
val args: Map<String, String>

arguments for both actions, 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.

populateAction

Added in 1.0.0-alpha04
val populateAction: String

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

verifyAction

Added in 1.0.0-alpha04
val verifyAction: String

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