Merge "TIF: fix issue of using caller-aware methods after clearCallingIdentity()" into sc-dev am: a7d0e74359 am: 5d490b5e92

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

Change-Id: I93a93df3ae76493a03c8fd34b92134c75c46bf00
This commit is contained in:
TreeHugger Robot
2021-09-01 03:25:03 +00:00
committed by Automerger Merge Worker

View File

@@ -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()