diff options
| author | 2018-03-27 11:37:58 -0400 | |
|---|---|---|
| committer | 2018-03-27 18:59:15 +0000 | |
| commit | 2be7a05a1cb78f20a900990e33d965b684803670 (patch) | |
| tree | d00dd3bee0a3981d597e5e3fbdbb814226e19979 | |
| parent | f67bb19fc3e75ae524f3a5e14917d61925481569 (diff) | |
clear calling identity on isPackageSuspended
Fixes: 76441207
Test: inspection
Change-Id: Ic58f727177fce82e882a7ad1c1414c9d5a5bfee8
| -rw-r--r-- | services/core/java/com/android/server/notification/NotificationManagerService.java | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 59cd561439aa..210857e1b097 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -5969,6 +5969,7 @@ public class NotificationManagerService extends SystemService {      }      private boolean isPackageSuspendedForUser(String pkg, int uid) { +        final long identity = Binder.clearCallingIdentity();          int userId = UserHandle.getUserId(uid);          try {              return mPackageManager.isPackageSuspendedForUser(pkg, userId); @@ -5977,6 +5978,8 @@ public class NotificationManagerService extends SystemService {          } catch (IllegalArgumentException ex) {              // Package not found.              return false; +        } finally { +            Binder.restoreCallingIdentity(identity);          }      } |