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

Commit 9463476b authored by Toni Heidenreich's avatar Toni Heidenreich Committed by Mohammed Althaf T
Browse files

Do not propagate WIU/BFSL for MediaController.sendCommand

This call is just for exchanging technical information and
shouldn't be used to grant another app permission to start a
foreground service or gain while-in-use permissions.

Manual cherry-pick of ag/33211646

Bug: 339637822
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:37de99f4813e3dd027412720a99721bb43828154)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e4c59cb5110d47e3f93488c1a684f5ca22a40c8b)
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:17b2a2efa243311b5cee9d4a51029d292d7e2483
Merged-In: I7cedaa5a17501b8e5d4517cf2080d3cb3f4ee8ea
Change-Id: I7cedaa5a17501b8e5d4517cf2080d3cb3f4ee8ea
parent 3f935b25
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -1246,9 +1246,6 @@ public class MediaSessionRecord implements IBinder.DeathRecipient, MediaSessionR
        public void sendCommand(String packageName, int pid, int uid, String command, Bundle args,
        public void sendCommand(String packageName, int pid, int uid, String command, Bundle args,
                ResultReceiver cb) {
                ResultReceiver cb) {
            try {
            try {
                final String reason = TAG + ":" + command;
                mService.tempAllowlistTargetPkgIfPossible(getUid(), getPackageName(),
                        pid, uid, packageName, reason);
                mCb.onCommand(packageName, pid, uid, command, args, cb);
                mCb.onCommand(packageName, pid, uid, command, args, cb);
            } catch (RemoteException e) {
            } catch (RemoteException e) {
                Log.e(TAG, "Remote failure in sendCommand.", e);
                Log.e(TAG, "Remote failure in sendCommand.", e);