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

Commit 489c5067 authored by Svet Ganov's avatar Svet Ganov Committed by Android Git Automerger
Browse files

am db6dab35: Merge "Clear binder identity before dispatching ap op mode changes." into mnc-dev

* commit 'db6dab35':
  Clear binder identity before dispatching ap op mode changes.
parents b6abdacc db6dab35
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -408,12 +408,20 @@ public class AppOpsService extends IAppOpsService.Stub {
            }
        }
        if (repCbs != null) {
            // There are components watching for mode changes such as window manager
            // and location manager which are in our process. The callbacks in these
            // components may require permissions our remote caller does not have.
            final long identity = Binder.clearCallingIdentity();
            try {
                for (int i = 0; i < repCbs.size(); i++) {
                    try {
                        repCbs.get(i).mCallback.opChanged(code, packageName);
                    } catch (RemoteException e) {
                    }
                }
            } finally {
                Binder.restoreCallingIdentity(identity);
            }
        }
    }