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

Commit d85c85f9 authored by Peter Visontay's avatar Peter Visontay Committed by Android (Google) Code Review
Browse files

Merge "In backup/restore code wrap Binder.restoreCallingIdentity() in finally{}."

parents a544f25b a9565cb4
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
@@ -158,6 +158,7 @@ public class ActiveRestoreSession extends IRestoreSession.Stub {
                            MSG_RESTORE_SESSION_TIMEOUT);

                    long oldId = Binder.clearCallingIdentity();
                    try {
                        backupManagerService.getWakelock().acquire();
                        if (MORE_DEBUG) {
                            Slog.d(TAG, "restoreAll() kicking off");
@@ -167,7 +168,9 @@ public class ActiveRestoreSession extends IRestoreSession.Stub {
                        msg.obj = new RestoreParams(mRestoreTransport, dirName,
                                observer, monitor, token);
                        backupManagerService.getBackupHandler().sendMessage(msg);
                    } finally {
                        Binder.restoreCallingIdentity(oldId);
                    }
                    return 0;
                }
            }