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

Commit aa93b041 authored by Christopher Tate's avatar Christopher Tate
Browse files

Correct the backup manager's identity around wakelock use

parent 9d1a3149
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;
                }
            }