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.
This commit is contained in:
@@ -694,12 +694,11 @@ public class SettingsProvider extends ContentProvider {
|
|||||||
if (Settings.CALL_METHOD_GET_SYSTEM.equals(method)) {
|
if (Settings.CALL_METHOD_GET_SYSTEM.equals(method)) {
|
||||||
if (LOCAL_LOGV) Slog.v(TAG, "call(system:" + request + ") for " + callingUser);
|
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
|
// Check if this request should be (re)directed to the primary user's db
|
||||||
if (callingUser == UserHandle.USER_OWNER
|
if (callingUser != UserHandle.USER_OWNER
|
||||||
|| shouldShadowParentProfile(callingUser, sSystemCloneToManagedKeys, request)) {
|
&& shouldShadowParentProfile(callingUser, sSystemCloneToManagedKeys, request)) {
|
||||||
dbHelper = getOrEstablishDatabase(UserHandle.USER_OWNER);
|
callingUser = UserHandle.USER_OWNER;
|
||||||
} else {
|
|
||||||
dbHelper = getOrEstablishDatabase(callingUser);
|
|
||||||
}
|
}
|
||||||
|
dbHelper = getOrEstablishDatabase(callingUser);
|
||||||
cache = sSystemCaches.get(callingUser);
|
cache = sSystemCaches.get(callingUser);
|
||||||
return lookupValue(dbHelper, TABLE_SYSTEM, cache, request);
|
return lookupValue(dbHelper, TABLE_SYSTEM, cache, request);
|
||||||
}
|
}
|
||||||
@@ -713,10 +712,9 @@ public class SettingsProvider extends ContentProvider {
|
|||||||
UserManager.DISALLOW_SHARE_LOCATION, new UserHandle(callingUser))) {
|
UserManager.DISALLOW_SHARE_LOCATION, new UserHandle(callingUser))) {
|
||||||
return sSecureCaches.get(callingUser).putIfAbsent(request, "");
|
return sSecureCaches.get(callingUser).putIfAbsent(request, "");
|
||||||
}
|
}
|
||||||
dbHelper = getOrEstablishDatabase(UserHandle.USER_OWNER);
|
callingUser = UserHandle.USER_OWNER;
|
||||||
} else {
|
|
||||||
dbHelper = getOrEstablishDatabase(callingUser);
|
|
||||||
}
|
}
|
||||||
|
dbHelper = getOrEstablishDatabase(callingUser);
|
||||||
cache = sSecureCaches.get(callingUser);
|
cache = sSecureCaches.get(callingUser);
|
||||||
return lookupValue(dbHelper, TABLE_SECURE, cache, request);
|
return lookupValue(dbHelper, TABLE_SECURE, cache, request);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user