TIF: fix issue of using caller-aware methods after clearCallingIdentity()
Bug: 189824175
Test: atest android.media.tv.cts.TvInputManagerTest
Change-Id: Iced6c2245c0099bc4bcdaceb51f8cce4dbc0a392
(cherry picked from commit a2ab2772d7)
This commit is contained in:
@@ -1970,10 +1970,9 @@ public final class TvInputManagerService extends SystemService {
|
|||||||
public void requestChannelBrowsable(Uri channelUri, int userId)
|
public void requestChannelBrowsable(Uri channelUri, int userId)
|
||||||
throws RemoteException {
|
throws RemoteException {
|
||||||
final String callingPackageName = getCallingPackageName();
|
final String callingPackageName = getCallingPackageName();
|
||||||
|
final int resolvedUserId = resolveCallingUserId(Binder.getCallingPid(),
|
||||||
|
Binder.getCallingUid(), userId, "requestChannelBrowsable");
|
||||||
final long identity = Binder.clearCallingIdentity();
|
final long identity = Binder.clearCallingIdentity();
|
||||||
final int callingUid = Binder.getCallingUid();
|
|
||||||
final int resolvedUserId = resolveCallingUserId(Binder.getCallingPid(), callingUid,
|
|
||||||
userId, "requestChannelBrowsable");
|
|
||||||
try {
|
try {
|
||||||
Intent intent = new Intent(TvContract.ACTION_CHANNEL_BROWSABLE_REQUESTED);
|
Intent intent = new Intent(TvContract.ACTION_CHANNEL_BROWSABLE_REQUESTED);
|
||||||
List<ResolveInfo> list = getContext().getPackageManager()
|
List<ResolveInfo> list = getContext().getPackageManager()
|
||||||
|
|||||||
Reference in New Issue
Block a user