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

Commit 390a0ca0 authored by Ricky Wai's avatar Ricky Wai Committed by Android (Google) Code Review
Browse files

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

parents e67a29a0 b96c1eac
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) {