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

Commit 84b751e9 authored by Danny Baumann's avatar Danny Baumann
Browse files

Fix certain setting writes being incorrectly skipped.

If a value that previously had a very long value (over the 500 char
threshold) is now set to null, isRedundantSetValue would incorrectly
return true even though the value was changed.

Change-Id: Ia5304743024ec01024be98aa51ed260d38caf93c
parent 796f7c6f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1179,7 +1179,7 @@ public class SettingsProvider extends ContentProvider {
            if (cache == null) return false;
            if (cache == null) return false;
            synchronized (cache) {
            synchronized (cache) {
                Bundle bundle = cache.get(name);
                Bundle bundle = cache.get(name);
                if (bundle == null) return false;
                if (bundle == null || bundle == TOO_LARGE_TO_CACHE_MARKER) return false;
                String oldValue = bundle.getPairValue();
                String oldValue = bundle.getPairValue();
                if (oldValue == null && value == null) return true;
                if (oldValue == null && value == null) return true;
                if ((oldValue == null) != (value == null)) return false;
                if ((oldValue == null) != (value == null)) return false;