Make RollbackManager @SystemApi.
Require callers hold a new MANAGE_ROLLBACKS permission to interact with
the RollbackManager.
Bug: 112431924
Test: atest RollbackTest, with new test for permissions added,
and with selinux in permissive mode.
Test: atest CtsPermission2TestCases:PermissionPolicyTest
Change-Id: I73f4f3457d85be580670cd69c89066d2cc348186
diff --git a/core/java/android/content/rollback/RollbackInfo.java b/core/java/android/content/rollback/RollbackInfo.java
index 5fa4e57..66df4fe 100644
--- a/core/java/android/content/rollback/RollbackInfo.java
+++ b/core/java/android/content/rollback/RollbackInfo.java
@@ -16,7 +16,7 @@
package android.content.rollback;
-import android.annotation.TestApi;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -24,9 +24,9 @@
* Information about a set of packages that can be, or already have been
* rolled back together.
*
- * @hide TODO: hidden, @TestApi until we decide on public vs. @SystemApi.
+ * @hide
*/
-@TestApi
+@SystemApi
public final class RollbackInfo implements Parcelable {
/**
@@ -39,6 +39,7 @@
// TODO: Add a flag to indicate if reboot is required, when rollback of
// staged installs is supported.
+ /** @hide */
public RollbackInfo(PackageRollbackInfo targetPackage) {
this.targetPackage = targetPackage;
}