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

Commit fcf64e8d authored by Richard Uhler's avatar Richard Uhler Committed by Bill Lin
Browse files

Use "commit" for rollbacks instead of "execute".

Fix a couple lingering references to "executing" rollbacks. We've long
since switched to the terminology "commit", to highlight that a staged
rollback that has been committed will not take effect until the device
reboots.

Fixes: 136044234
Test: atest RollbackTest
Change-Id: If548b0340101db13f4fdce7c2de3fe1e8283a260
Merged-In: Ic364778c253ff59af8206824a66df72569ab1307
parent 0c48af84
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -24,7 +24,7 @@ import android.content.IntentSender;
interface IRollbackManager {
interface IRollbackManager {


    ParceledListSlice getAvailableRollbacks();
    ParceledListSlice getAvailableRollbacks();
    ParceledListSlice getRecentlyExecutedRollbacks();
    ParceledListSlice getRecentlyCommittedRollbacks();


    void commitRollback(int rollbackId, in ParceledListSlice causePackages,
    void commitRollback(int rollbackId, in ParceledListSlice causePackages,
            String callerPackageName, in IntentSender statusReceiver);
            String callerPackageName, in IntentSender statusReceiver);
+1 −1
Original line number Original line Diff line number Diff line
@@ -114,7 +114,7 @@ public final class RollbackManager {
    })
    })
    public @NonNull List<RollbackInfo> getRecentlyCommittedRollbacks() {
    public @NonNull List<RollbackInfo> getRecentlyCommittedRollbacks() {
        try {
        try {
            return mBinder.getRecentlyExecutedRollbacks().getList();
            return mBinder.getRecentlyCommittedRollbacks().getList();
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
            throw e.rethrowFromSystemServer();
        }
        }
+3 −4
Original line number Original line Diff line number Diff line
@@ -325,7 +325,7 @@ class RollbackManagerServiceImpl extends IRollbackManager.Stub {
    }
    }


    @Override
    @Override
    public ParceledListSlice<RollbackInfo> getRecentlyExecutedRollbacks() {
    public ParceledListSlice<RollbackInfo> getRecentlyCommittedRollbacks() {
        enforceManageRollbacks("getRecentlyCommittedRollbacks");
        enforceManageRollbacks("getRecentlyCommittedRollbacks");


        synchronized (mLock) {
        synchronized (mLock) {
@@ -344,7 +344,7 @@ class RollbackManagerServiceImpl extends IRollbackManager.Stub {
    @Override
    @Override
    public void commitRollback(int rollbackId, ParceledListSlice causePackages,
    public void commitRollback(int rollbackId, ParceledListSlice causePackages,
            String callerPackageName, IntentSender statusReceiver) {
            String callerPackageName, IntentSender statusReceiver) {
        enforceManageRollbacks("executeRollback");
        enforceManageRollbacks("commitRollback");


        final int callingUid = Binder.getCallingUid();
        final int callingUid = Binder.getCallingUid();
        AppOpsManager appOps = mContext.getSystemService(AppOpsManager.class);
        AppOpsManager appOps = mContext.getSystemService(AppOpsManager.class);
@@ -690,8 +690,7 @@ class RollbackManagerServiceImpl extends IRollbackManager.Stub {


    /**
    /**
     * Load rollback data from storage if it has not already been loaded.
     * Load rollback data from storage if it has not already been loaded.
     * After calling this funciton, mAvailableRollbacks and
     * After calling this function, mRollbacks will be non-null.
     * mRecentlyExecutedRollbacks will be non-null.
     */
     */
    private void ensureRollbackDataLoaded() {
    private void ensureRollbackDataLoaded() {
        synchronized (mLock) {
        synchronized (mLock) {