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

Commit f498dabc authored by Richard Uhler's avatar Richard Uhler
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: Ic364778c253ff59af8206824a66df72569ab1307
parent 482c2c99
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ import android.content.IntentSender;
interface IRollbackManager {

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

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

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

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

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

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