settings: Use proper locking
Change-Id: I0f2c30cb0bb324602738800a8ff81359fa484223
This commit is contained in:
@@ -261,7 +261,7 @@ public final class LineageSettings {
|
||||
long newValuesVersion = SystemProperties.getLong(mVersionSystemProperty, 0);
|
||||
|
||||
// Our own user's settings data uses a client-side cache
|
||||
synchronized (this) {
|
||||
synchronized (NameValueCache.this) {
|
||||
if (mValuesVersion != newValuesVersion) {
|
||||
if (LOCAL_LOGV || false) {
|
||||
Log.v(TAG, "invalidate [" + mUri.getLastPathSegment() + "]: current "
|
||||
@@ -298,7 +298,7 @@ public final class LineageSettings {
|
||||
String value = b.getPairValue();
|
||||
// Don't update our cache for reads of other users' data
|
||||
if (isSelf) {
|
||||
synchronized (this) {
|
||||
synchronized (NameValueCache.this) {
|
||||
mValues.put(name, value);
|
||||
}
|
||||
} else {
|
||||
@@ -328,7 +328,7 @@ public final class LineageSettings {
|
||||
}
|
||||
|
||||
String value = c.moveToNext() ? c.getString(0) : null;
|
||||
synchronized (this) {
|
||||
synchronized (NameValueCache.this) {
|
||||
mValues.put(name, value);
|
||||
}
|
||||
if (LOCAL_LOGV) {
|
||||
|
||||
Reference in New Issue
Block a user