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

Commit a2ab2772 authored by shubang's avatar shubang
Browse files

TIF: fix issue of using caller-aware methods after clearCallingIdentity()

Bug: 189824175
Test: atest android.media.tv.cts.TvInputManagerTest
Change-Id: Iced6c2245c0099bc4bcdaceb51f8cce4dbc0a392
parent 6c675a3a
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2304,10 +2304,9 @@ public final class TvInputManagerService extends SystemService {
        public void requestChannelBrowsable(Uri channelUri, int userId)
                throws RemoteException {
            final String callingPackageName = getCallingPackageName();
            final int resolvedUserId = resolveCallingUserId(Binder.getCallingPid(),
                    Binder.getCallingUid(), userId, "requestChannelBrowsable");
            final long identity = Binder.clearCallingIdentity();
            final int callingUid = Binder.getCallingUid();
            final int resolvedUserId = resolveCallingUserId(Binder.getCallingPid(), callingUid,
                userId, "requestChannelBrowsable");
            try {
                Intent intent = new Intent(TvContract.ACTION_CHANNEL_BROWSABLE_REQUESTED);
                List<ResolveInfo> list = getContext().getPackageManager()