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

Commit d1b14091 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Clear/restore calling identity for ChooserTargetService"

parents cae06274 cb95ae2a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -139,6 +139,7 @@ public abstract class ChooserTargetService extends Service {
        public void getChooserTargets(ComponentName targetComponentName,
                IntentFilter matchedFilter, IChooserTargetResult result) throws RemoteException {
            List<ChooserTarget> targets = null;
            final long id = clearCallingIdentity();
            try {
                if (DEBUG) {
                    Log.d(TAG, "getChooserTargets calling onGetChooserTargets; "
@@ -146,6 +147,7 @@ public abstract class ChooserTargetService extends Service {
                }
                targets = onGetChooserTargets(targetComponentName, matchedFilter);
            } finally {
                restoreCallingIdentity(id);
                result.sendResult(targets);
                if (DEBUG) Log.d(TAG, "Sent results");
            }