diff options
author | Kenny Guy <kennyguy@google.com> | 2014-10-02 16:55:35 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-10-02 16:55:35 +0000 |
commit | bdcfc01b3bff1ff1c4237dccfb90704326890bee (patch) | |
tree | 8d3683318eee3afb001c1f570eefafa48e705dca /packages/SettingsProvider | |
parent | c68aad9fd0f7937176ac6a8238e6236dd7ea3427 (diff) | |
parent | 3de09018a9611b1791cc29ed5200b7d9694189a9 (diff) | |
download | frameworks_base-bdcfc01b3bff1ff1c4237dccfb90704326890bee.zip frameworks_base-bdcfc01b3bff1ff1c4237dccfb90704326890bee.tar.gz frameworks_base-bdcfc01b3bff1ff1c4237dccfb90704326890bee.tar.bz2 |
am 3de09018: Merge "SettingsProvider should use correct cache when redirecting to user 0." into lmp-dev
* commit '3de09018a9611b1791cc29ed5200b7d9694189a9':
SettingsProvider should use correct cache when redirecting to user 0.
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java index 8084eda..3453a67 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java @@ -694,12 +694,11 @@ public class SettingsProvider extends ContentProvider { if (Settings.CALL_METHOD_GET_SYSTEM.equals(method)) { if (LOCAL_LOGV) Slog.v(TAG, "call(system:" + request + ") for " + callingUser); // Check if this request should be (re)directed to the primary user's db - if (callingUser == UserHandle.USER_OWNER - || shouldShadowParentProfile(callingUser, sSystemCloneToManagedKeys, request)) { - dbHelper = getOrEstablishDatabase(UserHandle.USER_OWNER); - } else { - dbHelper = getOrEstablishDatabase(callingUser); + if (callingUser != UserHandle.USER_OWNER + && shouldShadowParentProfile(callingUser, sSystemCloneToManagedKeys, request)) { + callingUser = UserHandle.USER_OWNER; } + dbHelper = getOrEstablishDatabase(callingUser); cache = sSystemCaches.get(callingUser); return lookupValue(dbHelper, TABLE_SYSTEM, cache, request); } @@ -713,10 +712,9 @@ public class SettingsProvider extends ContentProvider { UserManager.DISALLOW_SHARE_LOCATION, new UserHandle(callingUser))) { return sSecureCaches.get(callingUser).putIfAbsent(request, ""); } - dbHelper = getOrEstablishDatabase(UserHandle.USER_OWNER); - } else { - dbHelper = getOrEstablishDatabase(callingUser); + callingUser = UserHandle.USER_OWNER; } + dbHelper = getOrEstablishDatabase(callingUser); cache = sSecureCaches.get(callingUser); return lookupValue(dbHelper, TABLE_SECURE, cache, request); } |