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

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

Change-Id: Iddf52807bb60d8a5f035b414d129985d5ef08718
This commit is contained in:
TreeHugger Robot
2021-09-01 03:06:22 +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()