diff options
| author | 2021-09-08 00:58:30 +0000 | |
|---|---|---|
| committer | 2021-09-08 00:58:30 +0000 | |
| commit | 1ba7b208c69eef75cf14a9f557967b934d3a093f (patch) | |
| tree | 6589efb123a9fa20b15138b31ba92d3c98cdeddb | |
| parent | 964ddbbbcc10b9842318c01128e4206217b85359 (diff) | |
| parent | 05d7f90c4127baedbdaf1885c0c953b6cd136e86 (diff) | |
TIF: fix issue of using caller-aware methods after clearCallingIdentity() am: 05363ef193 am: e55bc91578 am: 05d7f90c41
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15752564
Change-Id: I065946cac3faaa35c28f348a0935cbf141115373
| -rwxr-xr-x | services/core/java/com/android/server/tv/TvInputManagerService.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java index 323ac7b8806e..4668741aed0b 100755 --- a/services/core/java/com/android/server/tv/TvInputManagerService.java +++ b/services/core/java/com/android/server/tv/TvInputManagerService.java @@ -2005,10 +2005,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() |