From d08d7ee4e9ce8c388e5dba392e2a6b156180dabc Mon Sep 17 00:00:00 2001 From: Svetoslav Date: Mon, 15 Jul 2013 10:20:27 -0700 Subject: [PATCH] Allowing the root user to use the screen introspection APIs. We were allowing the system and the shell user to access use the screen introspection APIs but the root user was not able to to so. This change enableS the root user to also use these APIs. Note that we usually allow the root user to access privileged functionality similarly to the shell user of the system. bug:8877685 Change-Id: Ie4008339e864b835bd3a2d5e06b042e4431c5270 --- .../server/accessibility/AccessibilityManagerService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/java/com/android/server/accessibility/AccessibilityManagerService.java index fd6b46769d3e7..83e69d6f355a1 100644 --- a/services/java/com/android/server/accessibility/AccessibilityManagerService.java +++ b/services/java/com/android/server/accessibility/AccessibilityManagerService.java @@ -2820,7 +2820,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { public int resolveCallingUserIdEnforcingPermissionsLocked(int userId) { final int callingUid = Binder.getCallingUid(); - if (callingUid == Process.SYSTEM_UID + if (callingUid == 0 + || callingUid == Process.SYSTEM_UID || callingUid == Process.SHELL_UID) { return mCurrentUserId; }