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

Commit bcc1a887 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 0a0be77a f498dabc
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
@@ -325,7 +325,7 @@ class RollbackManagerServiceImpl extends IRollbackManager.Stub {
    }

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

        synchronized (mLock) {
@@ -344,7 +344,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);
@@ -690,8 +690,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) {