Loading core/java/android/provider/Settings.java +9 −7 Original line number Diff line number Diff line Loading @@ -3036,9 +3036,7 @@ public final class Settings { public void destroy() { try { // If this process is the system server process, mArray is the same object as // the memory int array kept inside SettingsProvider, so skipping the close() if (!Settings.isInSystemServer() && !mArray.isClosed()) { if (!mArray.isClosed()) { mArray.close(); } } catch (IOException e) { Loading Loading @@ -3218,8 +3216,9 @@ public final class Settings { @UnsupportedAppUsage public String getStringForUser(ContentResolver cr, String name, final int userHandle) { final boolean isSelf = (userHandle == UserHandle.myUserId()); final boolean useCache = isSelf && !isInSystemServer(); boolean needsGenerationTracker = false; if (isSelf) { if (useCache) { synchronized (NameValueCache.this) { final GenerationTracker generationTracker = mGenerationTrackers.get(name); if (generationTracker != null) { Loading Loading @@ -3365,10 +3364,13 @@ public final class Settings { } } } else { if (LOCAL_LOGV) Log.i(TAG, "call-query of user " + userHandle if (DEBUG || LOCAL_LOGV) { Log.i(TAG, "call-query of user " + userHandle + " by " + UserHandle.myUserId() + (isInSystemServer() ? " in system_server" : "") + " so not updating cache"); } } return value; } // If the response Bundle is null, we fall through Loading Loading
core/java/android/provider/Settings.java +9 −7 Original line number Diff line number Diff line Loading @@ -3036,9 +3036,7 @@ public final class Settings { public void destroy() { try { // If this process is the system server process, mArray is the same object as // the memory int array kept inside SettingsProvider, so skipping the close() if (!Settings.isInSystemServer() && !mArray.isClosed()) { if (!mArray.isClosed()) { mArray.close(); } } catch (IOException e) { Loading Loading @@ -3218,8 +3216,9 @@ public final class Settings { @UnsupportedAppUsage public String getStringForUser(ContentResolver cr, String name, final int userHandle) { final boolean isSelf = (userHandle == UserHandle.myUserId()); final boolean useCache = isSelf && !isInSystemServer(); boolean needsGenerationTracker = false; if (isSelf) { if (useCache) { synchronized (NameValueCache.this) { final GenerationTracker generationTracker = mGenerationTrackers.get(name); if (generationTracker != null) { Loading Loading @@ -3365,10 +3364,13 @@ public final class Settings { } } } else { if (LOCAL_LOGV) Log.i(TAG, "call-query of user " + userHandle if (DEBUG || LOCAL_LOGV) { Log.i(TAG, "call-query of user " + userHandle + " by " + UserHandle.myUserId() + (isInSystemServer() ? " in system_server" : "") + " so not updating cache"); } } return value; } // If the response Bundle is null, we fall through Loading