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

Commit 0a4127c5 authored by Ricky Wai's avatar Ricky Wai Committed by android-build-merger
Browse files

Merge "Do not use cached tile specs value in QSTileHost.addTile()" into nyc-dev

am: 390a0ca0

* commit '390a0ca0':
  Do not use cached tile specs value in QSTileHost.addTile()

Change-Id: I0363a9c64960b82b3b74a79de3e4998d0a03b550
parents 9fe1077b 390a0ca0
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -369,13 +369,15 @@ public class QSTileHost implements QSTile.Host, Tunable {
    }

    public void addTile(String spec) {
        if (mTileSpecs.contains(spec)) {
        final String setting = Settings.Secure.getStringForUser(mContext.getContentResolver(),
                TILES_SETTING, ActivityManager.getCurrentUser());
        final List<String> tileSpecs = loadTileSpecs(mContext, setting);
        if (tileSpecs.contains(spec)) {
            return;
        }
        ArrayList<String> specs = new ArrayList<>(mTileSpecs);
        specs.add(spec);
        tileSpecs.add(spec);
        Settings.Secure.putStringForUser(mContext.getContentResolver(), TILES_SETTING,
                TextUtils.join(",", specs), ActivityManager.getCurrentUser());
                TextUtils.join(",", tileSpecs), ActivityManager.getCurrentUser());
    }

    public void addTile(ComponentName tile) {