Package org.robolectric.shadows
Class PackageRollbackInfoBuilder
java.lang.Object
org.robolectric.shadows.PackageRollbackInfoBuilder
public final class PackageRollbackInfoBuilder extends Object
Builder for
PackageRollbackInfo
as PackageRollbackInfo has hidden constructors, this
builder class has been added as a way to make custom PackageRollbackInfo objects when needed.-
Method Summary
Modifier and Type Method Description PackageRollbackInfoBuilder
addInstalledUser(int installedUser)
Adds installed user.PackageRollbackInfoBuilder
addPendingBackup(int pendingBackup)
Adds pending backup.PackageRollbackInfoBuilder
addPendingRestore(int userId, int appId, String seInfo)
Adds pending restores.PackageRollbackInfoBuilder
addSnapshottedUser(int snapshottedUser)
Adds snapshotted user.android.content.rollback.PackageRollbackInfo
build()
Returns aPackageRollbackInfo
with the data that was given.static PackageRollbackInfoBuilder
newBuilder()
Start building a new PackageRollbackInfoPackageRollbackInfoBuilder
setCeSnapshotInodes(SparseLongArray ceSnapshotInodes)
Sets ce snapshot inodes.PackageRollbackInfoBuilder
setIsApex(boolean isApex)
Sets is apex.PackageRollbackInfoBuilder
setIsApkInApex(boolean isApkInApex)
Sets is apk in apex.PackageRollbackInfoBuilder
setPackageRolledBackFrom(VersionedPackage packageRolledBackFrom)
Sets the version packaged rolled back from.PackageRollbackInfoBuilder
setPackageRolledBackTo(VersionedPackage packageRolledBackTo)
Sets the version packaged rolled back to.
-
Method Details
-
newBuilder
Start building a new PackageRollbackInfo- Returns:
- a new instance of
PackageRollbackInfoBuilder
.
-
setPackageRolledBackFrom
Sets the version packaged rolled back from. -
setPackageRolledBackTo
Sets the version packaged rolled back to. -
addPendingBackup
Adds pending backup. We choose this API because IntArray is not publicly available. -
addPendingRestore
Adds pending restores. We choose this API because RestoreInfo is not publicly available. -
setIsApex
Sets is apex. -
setIsApkInApex
Sets is apk in apex. -
addInstalledUser
Adds installed user. We choose this API because IntArray is not publicly available. -
addSnapshottedUser
Adds snapshotted user. We choose this API because IntArray is not publicly available. -
setCeSnapshotInodes
Sets ce snapshot inodes. -
build
public android.content.rollback.PackageRollbackInfo build()Returns aPackageRollbackInfo
with the data that was given.
-