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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15752564

Change-Id: Iaa3b040cc8e47a3a36496b1de033b341a0e9e2e3
This commit is contained in:
shubang
2021-09-08 00:37:10 +00:00
committed by Automerger Merge Worker

View File

@@ -1981,10 +1981,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()