diff options
author | Svetoslav <svetoslavganov@google.com> | 2014-10-02 13:37:37 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-10-02 13:37:37 +0000 |
commit | 893a15d1e49203374006a20d1b0148e99534362e (patch) | |
tree | 75726c1ebf5e1ae7fd4ecefa278239ca3319ee1b /services/accessibility/java/com/android | |
parent | ef2bc5ccd4aa7a5f5683ac4fa6ece8eddec9ef3a (diff) | |
parent | 0671790c2895865ff0cc7780027427d1a9b95667 (diff) | |
download | frameworks_base-893a15d1e49203374006a20d1b0148e99534362e.zip frameworks_base-893a15d1e49203374006a20d1b0148e99534362e.tar.gz frameworks_base-893a15d1e49203374006a20d1b0148e99534362e.tar.bz2 |
am 0671790c: am c088ecc3: am 304a3528: am d35b072d: Merge "Fix accessiblity introspection from the shell user regression." into lmp-dev
* commit '0671790c2895865ff0cc7780027427d1a9b95667':
Fix accessiblity introspection from the shell user regression.
Diffstat (limited to 'services/accessibility/java/com/android')
-rw-r--r-- | services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java index cc17422..7d4156f 100644 --- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java @@ -2117,7 +2117,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { // performs the current profile parent resolution. final int resolvedUserId = mSecurityPolicy .resolveCallingUserIdEnforcingPermissionsLocked( - UserHandle.getCallingUserId()); + UserHandle.USER_CURRENT); if (resolvedUserId != mCurrentUserId) { return null; } @@ -2148,7 +2148,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { // performs the current profile parent resolution. final int resolvedUserId = mSecurityPolicy .resolveCallingUserIdEnforcingPermissionsLocked( - UserHandle.getCallingUserId()); + UserHandle.USER_CURRENT); if (resolvedUserId != mCurrentUserId) { return null; } @@ -2181,7 +2181,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { // performs the current profile parent resolution. final int resolvedUserId = mSecurityPolicy .resolveCallingUserIdEnforcingPermissionsLocked( - UserHandle.getCallingUserId()); + UserHandle.USER_CURRENT); if (resolvedUserId != mCurrentUserId) { return false; } @@ -2233,7 +2233,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { // performs the current profile parent resolution. final int resolvedUserId = mSecurityPolicy .resolveCallingUserIdEnforcingPermissionsLocked( - UserHandle.getCallingUserId()); + UserHandle.USER_CURRENT); if (resolvedUserId != mCurrentUserId) { return false; } @@ -2285,7 +2285,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { // performs the current profile parent resolution. final int resolvedUserId = mSecurityPolicy .resolveCallingUserIdEnforcingPermissionsLocked( - UserHandle.getCallingUserId()); + UserHandle.USER_CURRENT); if (resolvedUserId != mCurrentUserId) { return false; } @@ -2337,7 +2337,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { // performs the current profile parent resolution. final int resolvedUserId = mSecurityPolicy .resolveCallingUserIdEnforcingPermissionsLocked( - UserHandle.getCallingUserId()); + UserHandle.USER_CURRENT); if (resolvedUserId != mCurrentUserId) { return false; } @@ -2390,7 +2390,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { // performs the current profile parent resolution. final int resolvedUserId = mSecurityPolicy .resolveCallingUserIdEnforcingPermissionsLocked( - UserHandle.getCallingUserId()); + UserHandle.USER_CURRENT); if (resolvedUserId != mCurrentUserId) { return false; } @@ -2441,7 +2441,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { // performs the current profile parent resolution. final int resolvedUserId = mSecurityPolicy .resolveCallingUserIdEnforcingPermissionsLocked( - UserHandle.getCallingUserId()); + UserHandle.USER_CURRENT); if (resolvedUserId != mCurrentUserId) { return false; } @@ -2480,7 +2480,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { // performs the current profile parent resolution. final int resolvedUserId = mSecurityPolicy .resolveCallingUserIdEnforcingPermissionsLocked( - UserHandle.getCallingUserId()); + UserHandle.USER_CURRENT); if (resolvedUserId != mCurrentUserId) { return false; } @@ -2527,7 +2527,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { // performs the current profile parent resolution. final int resolvedUserId = mSecurityPolicy .resolveCallingUserIdEnforcingPermissionsLocked( - UserHandle.getCallingUserId()); + UserHandle.USER_CURRENT); if (resolvedUserId != mCurrentUserId) { return false; } @@ -3621,6 +3621,12 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { if (callingUserId == userId) { return resolveProfileParentLocked(userId); } + final int callingUserParentId = resolveProfileParentLocked(callingUserId); + if (callingUserParentId == mCurrentUserId && + (userId == UserHandle.USER_CURRENT + || userId == UserHandle.USER_CURRENT_OR_SELF)) { + return mCurrentUserId; + } if (!hasPermission(Manifest.permission.INTERACT_ACROSS_USERS) && !hasPermission(Manifest.permission.INTERACT_ACROSS_USERS_FULL)) { throw new SecurityException("Call from user " + callingUserId + " as user " |