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

Commit cb95ae2a authored by Adam Powell's avatar Adam Powell
Browse files

Clear/restore calling identity for ChooserTargetService

Bug 26604668

Change-Id: I60a8be72bf43cec802697af3b06579453af2d5dc
parent a0a58365
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");
            }