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

Commit a65b989c authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 20218

* changes:
  Correct the backup manager's identity around wakelock use
parents 7b38f73a aa93b041
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1476,10 +1476,12 @@ class BackupManagerService extends IBackupManager.Stub {
                if (DEBUG) Log.v(TAG, "Found the app - running clear process");
                // found it; fire off the clear request
                synchronized (mQueueLock) {
                    long oldId = Binder.clearCallingIdentity();
                    mWakelock.acquire();
                    Message msg = mBackupHandler.obtainMessage(MSG_RUN_CLEAR,
                            new ClearParams(getTransport(mCurrentTransport), info));
                    mBackupHandler.sendMessage(msg);
                    Binder.restoreCallingIdentity(oldId);
                }
                break;
            }
@@ -1705,10 +1707,12 @@ class BackupManagerService extends IBackupManager.Stub {

            for (int i = 0; i < mRestoreSets.length; i++) {
                if (token == mRestoreSets[i].token) {
                    long oldId = Binder.clearCallingIdentity();
                    mWakelock.acquire();
                    Message msg = mBackupHandler.obtainMessage(MSG_RUN_RESTORE);
                    msg.obj = new RestoreParams(mRestoreTransport, observer, token);
                    mBackupHandler.sendMessage(msg);
                    Binder.restoreCallingIdentity(oldId);
                    return 0;
                }
            }