diff options
| author | 2020-10-06 01:26:31 +0000 | |
|---|---|---|
| committer | 2020-10-06 01:26:31 +0000 | |
| commit | f15d2905619eb022347f4e32f01f4c18ab75b911 (patch) | |
| tree | fcf49524e8e0dbcb69aca7f9a975290fe91aa90f | |
| parent | a7578af121a16bc531add0b43bde1c1ae56bf964 (diff) | |
| parent | 23f159677499c0638851ada544aefafff49b4cbb (diff) | |
Merge "Enforce permission checks in getting app exit reasons" into rvc-dev am: f36b9764e0 am: 23f1596774
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12539768
Change-Id: I1eeadd72ae3315f781b61439c29dcf85e50d4203
| -rw-r--r-- | services/core/java/com/android/server/am/ActivityManagerService.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index d3f4667fe448..2feb4700b509 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -8184,12 +8184,10 @@ public class ActivityManagerService extends IActivityManager.Stub } finally { Binder.restoreCallingIdentity(identity); } - if (uid == Process.INVALID_UID) { - return Process.INVALID_UID; - } + // If the uid is Process.INVALID_UID, the below 'if' check will be always true if (UserHandle.getAppId(uid) != UserHandle.getAppId(callingUid)) { // Requires the DUMP permission if the target package doesn't belong - // to the caller. + // to the caller or it doesn't exist. enforceCallingPermission(android.Manifest.permission.DUMP, function); } return uid; |