Package org.robolectric.shadows
Class PackageRollbackInfoBuilder
java.lang.Object
org.robolectric.shadows.PackageRollbackInfoBuilder
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 TypeMethodDescriptionaddInstalledUser
(int installedUser) Adds installed user.addPendingBackup
(int pendingBackup) Adds pending backup.addPendingRestore
(int userId, int appId, String seInfo) Adds pending restores.addSnapshottedUser
(int snapshottedUser) Adds snapshotted user.android.content.rollback.PackageRollbackInfo
build()
Returns aPackageRollbackInfo
with the data that was given.static PackageRollbackInfoBuilder
Start building a new PackageRollbackInfosetCeSnapshotInodes
(SparseLongArray ceSnapshotInodes) Sets ce snapshot inodes.setIsApex
(boolean isApex) Sets is apex.setIsApkInApex
(boolean isApkInApex) Sets is apk in apex.setPackageRolledBackFrom
(VersionedPackage packageRolledBackFrom) Sets the version packaged rolled back from.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.
-