Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d787f127 authored by Luca Stefani's avatar Luca Stefani
Browse files

settings: Use proper locking

Change-Id: I0f2c30cb0bb324602738800a8ff81359fa484223
parent 2e050a5c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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) {