Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dca7beb7 authored by Richard Uhler's avatar Richard Uhler
Browse files

Rename PACKAGE_ROLLBACK_EXECUTED to ROLLBACK_COMMITTED.

Because there's no need to distinguish between package and other kinds
of rollbacks, and for rollback of staged installs, committed is a more
appropriate name than executed.

Bug: 112431924
Test: atest RollbackTest
Change-Id: I2a409de29ba82a7a3df2fd0b17f939795caa61d5
parent 65f9717b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1303,13 +1303,13 @@ package android.content {
    field public static final String ACTION_MANAGE_PERMISSION_APPS = "android.intent.action.MANAGE_PERMISSION_APPS";
    field @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public static final String ACTION_MANAGE_SPECIAL_APP_ACCESSES = "android.intent.action.MANAGE_SPECIAL_APP_ACCESSES";
    field public static final String ACTION_MASTER_CLEAR_NOTIFICATION = "android.intent.action.MASTER_CLEAR_NOTIFICATION";
    field public static final String ACTION_PACKAGE_ROLLBACK_EXECUTED = "android.intent.action.PACKAGE_ROLLBACK_EXECUTED";
    field public static final String ACTION_PRE_BOOT_COMPLETED = "android.intent.action.PRE_BOOT_COMPLETED";
    field public static final String ACTION_QUERY_PACKAGE_RESTART = "android.intent.action.QUERY_PACKAGE_RESTART";
    field public static final String ACTION_RESOLVE_INSTANT_APP_PACKAGE = "android.intent.action.RESOLVE_INSTANT_APP_PACKAGE";
    field @RequiresPermission(android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS) public static final String ACTION_REVIEW_APP_PERMISSION_USAGE = "android.intent.action.REVIEW_APP_PERMISSION_USAGE";
    field public static final String ACTION_REVIEW_PERMISSIONS = "android.intent.action.REVIEW_PERMISSIONS";
    field public static final String ACTION_REVIEW_PERMISSION_USAGE = "android.intent.action.REVIEW_PERMISSION_USAGE";
    field public static final String ACTION_ROLLBACK_COMMITTED = "android.intent.action.ROLLBACK_COMMITTED";
    field public static final String ACTION_SHOW_SUSPENDED_APP_DETAILS = "android.intent.action.SHOW_SUSPENDED_APP_DETAILS";
    field @Deprecated public static final String ACTION_SIM_STATE_CHANGED = "android.intent.action.SIM_STATE_CHANGED";
    field public static final String ACTION_SPLIT_CONFIGURATION_CHANGED = "android.intent.action.SPLIT_CONFIGURATION_CHANGED";
+3 −4
Original line number Diff line number Diff line
@@ -2375,8 +2375,7 @@ public class Intent implements Parcelable, Cloneable {
    public static final String ACTION_PACKAGE_ENABLE_ROLLBACK =
            "android.intent.action.PACKAGE_ENABLE_ROLLBACK";
    /**
     * Broadcast Action: An existing version of an application package has been
     * rolled back to a previous version.
     * Broadcast Action: A rollback has been committed.
     *
     * <p class="note">This is a protected intent that can only be sent
     * by the system.
@@ -2385,8 +2384,8 @@ public class Intent implements Parcelable, Cloneable {
     */
    @SystemApi
    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    public static final String ACTION_PACKAGE_ROLLBACK_EXECUTED =
            "android.intent.action.PACKAGE_ROLLBACK_EXECUTED";
    public static final String ACTION_ROLLBACK_COMMITTED =
            "android.intent.action.ROLLBACK_COMMITTED";
    /**
     * @hide
     * Broadcast Action: Ask system services if there is any reason to
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@
    <protected-broadcast android:name="android.intent.action.PACKAGE_FULLY_REMOVED" />
    <protected-broadcast android:name="android.intent.action.PACKAGE_CHANGED" />
    <protected-broadcast android:name="android.intent.action.PACKAGE_ENABLE_ROLLBACK" />
    <protected-broadcast android:name="android.intent.action.PACKAGE_ROLLBACK_EXECUTED" />
    <protected-broadcast android:name="android.intent.action.ROLLBACK_COMMITTED" />
    <protected-broadcast android:name="android.intent.action.PACKAGE_RESTARTED" />
    <protected-broadcast android:name="android.intent.action.PACKAGE_DATA_CLEARED" />
    <protected-broadcast android:name="android.intent.action.PACKAGE_FIRST_LAUNCH" />
+1 −1
Original line number Diff line number Diff line
@@ -353,7 +353,7 @@ class RollbackManagerServiceImpl extends IRollbackManager.Stub {
                            addRecentlyExecutedRollback(rollback);
                            sendSuccess(statusReceiver);

                            Intent broadcast = new Intent(Intent.ACTION_PACKAGE_ROLLBACK_EXECUTED);
                            Intent broadcast = new Intent(Intent.ACTION_ROLLBACK_COMMITTED);

                            // TODO: This call emits the warning "Calling a method in the
                            // system process without a qualified user". Fix that.
+2 −2
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ import java.util.concurrent.TimeUnit;

/**
 * A broadcast receiver that can be used to get
 * ACTION_PACKAGE_ROLLBACK_EXECUTED broadcasts.
 * ACTION_ROLLBACK_COMMITTED broadcasts.
 */
class RollbackBroadcastReceiver extends BroadcastReceiver {

@@ -43,7 +43,7 @@ class RollbackBroadcastReceiver extends BroadcastReceiver {
     */
    RollbackBroadcastReceiver() {
        IntentFilter filter = new IntentFilter();
        filter.addAction(Intent.ACTION_PACKAGE_ROLLBACK_EXECUTED);
        filter.addAction(Intent.ACTION_ROLLBACK_COMMITTED);
        InstrumentationRegistry.getContext().registerReceiver(this, filter);
    }

Loading