commit | f15d2905619eb022347f4e32f01f4c18ab75b911 | [log] [tgz] |
---|---|---|
author | Jing Ji <jji@google.com> | Tue Oct 06 01:26:31 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Oct 06 01:26:31 2020 +0000 |
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
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index d3f4667..2feb470 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 @@ } 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;