Loading core/java/android/app/ActivityManager.java +6 −1 Original line number Diff line number Diff line Loading @@ -2835,7 +2835,12 @@ public class ActivityManager { * Returns a list of any processes that are currently in an error condition. The result * will be null if all processes are running properly at this time. * * @return Returns a list of ProcessErrorStateInfo records, or null if there are no * <p>As of {@link android.os.Build.VERSION_CODES#T Android T}, for regular apps this method * will only return {@link ProcessErrorStateInfo} records for the processes running as the * caller's uid, unless the caller has the permission {@link android.Manifest.permission#DUMP}. * </p> * * @return Returns a list of {@link ProcessErrorStateInfo} records, or null if there are no * current error conditions (it will not return an empty list). This list ordering is not * specified. */ Loading services/core/java/com/android/server/am/ActivityManagerService.java +9 −2 Original line number Diff line number Diff line Loading @@ -8396,9 +8396,13 @@ public class ActivityManagerService extends IActivityManager.Stub // assume our apps are happy - lazy create the list final List<ActivityManager.ProcessErrorStateInfo>[] errList = new List[1]; final int callingUid = Binder.getCallingUid(); final boolean allUsers = ActivityManager.checkUidPermission(INTERACT_ACROSS_USERS_FULL, Binder.getCallingUid()) == PackageManager.PERMISSION_GRANTED; int userId = UserHandle.getUserId(Binder.getCallingUid()); callingUid) == PackageManager.PERMISSION_GRANTED; int userId = UserHandle.getUserId(callingUid); final boolean hasDumpPermission = ActivityManager.checkUidPermission( android.Manifest.permission.DUMP, callingUid) == PackageManager.PERMISSION_GRANTED; synchronized (mProcLock) { // iterate across all processes Loading @@ -8406,6 +8410,9 @@ public class ActivityManagerService extends IActivityManager.Stub if (!allUsers && app.userId != userId) { return; } if (!hasDumpPermission && app.info.uid != callingUid) { return; } final ProcessErrorStateRecord errState = app.mErrorState; final boolean crashing = errState.isCrashing(); final boolean notResponding = errState.isNotResponding(); Loading Loading
core/java/android/app/ActivityManager.java +6 −1 Original line number Diff line number Diff line Loading @@ -2835,7 +2835,12 @@ public class ActivityManager { * Returns a list of any processes that are currently in an error condition. The result * will be null if all processes are running properly at this time. * * @return Returns a list of ProcessErrorStateInfo records, or null if there are no * <p>As of {@link android.os.Build.VERSION_CODES#T Android T}, for regular apps this method * will only return {@link ProcessErrorStateInfo} records for the processes running as the * caller's uid, unless the caller has the permission {@link android.Manifest.permission#DUMP}. * </p> * * @return Returns a list of {@link ProcessErrorStateInfo} records, or null if there are no * current error conditions (it will not return an empty list). This list ordering is not * specified. */ Loading
services/core/java/com/android/server/am/ActivityManagerService.java +9 −2 Original line number Diff line number Diff line Loading @@ -8396,9 +8396,13 @@ public class ActivityManagerService extends IActivityManager.Stub // assume our apps are happy - lazy create the list final List<ActivityManager.ProcessErrorStateInfo>[] errList = new List[1]; final int callingUid = Binder.getCallingUid(); final boolean allUsers = ActivityManager.checkUidPermission(INTERACT_ACROSS_USERS_FULL, Binder.getCallingUid()) == PackageManager.PERMISSION_GRANTED; int userId = UserHandle.getUserId(Binder.getCallingUid()); callingUid) == PackageManager.PERMISSION_GRANTED; int userId = UserHandle.getUserId(callingUid); final boolean hasDumpPermission = ActivityManager.checkUidPermission( android.Manifest.permission.DUMP, callingUid) == PackageManager.PERMISSION_GRANTED; synchronized (mProcLock) { // iterate across all processes Loading @@ -8406,6 +8410,9 @@ public class ActivityManagerService extends IActivityManager.Stub if (!allUsers && app.userId != userId) { return; } if (!hasDumpPermission && app.info.uid != callingUid) { return; } final ProcessErrorStateRecord errState = app.mErrorState; final boolean crashing = errState.isCrashing(); final boolean notResponding = errState.isNotResponding(); Loading