summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2015-09-10 15:30:45 -0700
committerThe Android Automerger <android-build@google.com>2015-09-10 17:02:39 -0700
commitea02ec65c19ac209047ed164272ec2b07f47e496 (patch)
treeb80c7a93880cd2155e4f57ac3b21d6202e232585
parent40bb46d77f3decad35273d509f32fd05bd2ed2ac (diff)
downloadbase-ea02ec65c19ac209047ed164272ec2b07f47e496.tar.gz
Add op package to the UID special case handling in account manager.
The account manager has a hardcoded rule to change the calling UID if the caller is the system and another UID is passed in. We have to do the same acrobatics for the app op package as if the UID changes the opPackageName will not match the new UID. If we used the passed in UID we should also use the passed in op package name. bug:23968092 Change-Id: I0c0c2a720e9edbf82001952929d990702f8650ca
-rw-r--r--services/core/java/com/android/server/accounts/AccountManagerService.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java
index d590d7aaf3dd..d5e9a320da84 100644
--- a/services/core/java/com/android/server/accounts/AccountManagerService.java
+++ b/services/core/java/com/android/server/accounts/AccountManagerService.java
@@ -2607,6 +2607,7 @@ public class AccountManagerService
// be passed in the original caller's uid here, which is what should be used for filtering.
if (packageUid != -1 && UserHandle.isSameApp(callingUid, Process.myUid())) {
callingUid = packageUid;
+ opPackageName = callingPackage;
}
List<String> visibleAccountTypes = getTypesVisibleToCaller(callingUid, userId,