summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/accessibility/AccessibilityManagerService.java
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2013-07-15 10:20:27 -0700
committerSvetoslav <svetoslavganov@google.com>2013-07-15 10:20:31 -0700
commitd08d7ee4e9ce8c388e5dba392e2a6b156180dabc (patch)
tree918c8b99ea583e70551acf5e6e86250da0773561 /services/java/com/android/server/accessibility/AccessibilityManagerService.java
parent326ef35f6f0ee3221804585592e462a9307c2df1 (diff)
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
Diffstat (limited to 'services/java/com/android/server/accessibility/AccessibilityManagerService.java')
-rw-r--r--services/java/com/android/server/accessibility/AccessibilityManagerService.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/java/com/android/server/accessibility/AccessibilityManagerService.java
index fd6b46769d3e..83e69d6f355a 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;
}