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
This commit is contained in:
Svetoslav
2013-07-15 10:20:27 -07:00
parent 326ef35f6f
commit d08d7ee4e9

View File

@@ -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;
}