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 PackageRollbackInfoBuilderaddInstalledUser(int installedUser)Adds installed user.PackageRollbackInfoBuilderaddPendingBackup(int pendingBackup)Adds pending backup.PackageRollbackInfoBuilderaddPendingRestore(int userId, int appId, String seInfo)Adds pending restores.PackageRollbackInfoBuilderaddSnapshottedUser(int snapshottedUser)Adds snapshotted user.android.content.rollback.PackageRollbackInfobuild()Returns aPackageRollbackInfowith the data that was given.static PackageRollbackInfoBuildernewBuilder()Start building a new PackageRollbackInfoPackageRollbackInfoBuildersetCeSnapshotInodes(SparseLongArray ceSnapshotInodes)Sets ce snapshot inodes.PackageRollbackInfoBuildersetIsApex(boolean isApex)Sets is apex.PackageRollbackInfoBuildersetIsApkInApex(boolean isApkInApex)Sets is apk in apex.PackageRollbackInfoBuildersetPackageRolledBackFrom(VersionedPackage packageRolledBackFrom)Sets the version packaged rolled back from.PackageRollbackInfoBuildersetPackageRolledBackTo(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 aPackageRollbackInfowith the data that was given.
-