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