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

Commit 2606f697 authored by Tetsutoki Shiozawa's avatar Tetsutoki Shiozawa Committed by android-build-merger
Browse files

Merge "Fix: [SystemUI] icon_blacklist is not reset for sub users" am:...

Merge "Fix: [SystemUI] icon_blacklist is not reset for sub users" am: e8465e84 am: 24c969b1 am: ada90d75
am: da4c09e1

Change-Id: I70c88741ef0a231b4a96a3cad7915cbb8cd0012d
parents 93630197 da4c09e1
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -119,7 +119,9 @@ public class TunerServiceImpl extends TunerService {
        // 3 Removed because of a revert.
        if (oldVersion < 4) {
            // Delay this so that we can wait for everything to be registered first.
            new Handler(Dependency.get(Dependency.BG_LOOPER)).postDelayed(() -> clearAll(), 5000);
            final int user = mCurrentUser;
            new Handler(Dependency.get(Dependency.BG_LOOPER)).postDelayed(
                    () -> clearAllFromUser(user), 5000);
        }
        setValue(TUNER_VERSION, newVersion);
    }
@@ -221,6 +223,10 @@ public class TunerServiceImpl extends TunerService {

    @Override
    public void clearAll() {
        clearAllFromUser(mCurrentUser);
    }

    public void clearAllFromUser(int user) {
        // A couple special cases.
        Settings.Global.putString(mContentResolver, DemoMode.DEMO_MODE_ALLOWED, null);
        Intent intent = new Intent(DemoMode.ACTION_DEMO);
@@ -231,7 +237,7 @@ public class TunerServiceImpl extends TunerService {
            if (ArrayUtils.contains(RESET_BLACKLIST, key)) {
                continue;
            }
            Settings.Secure.putString(mContentResolver, key, null);
            Settings.Secure.putStringForUser(mContentResolver, key, null, user);
        }
    }