Merge "Do not use cached tile specs value in QSTileHost.addTile()" into nyc-dev am: 390a0ca025
am: 140fe982df
* commit '140fe982df7c78e104b93f79d2bbe395e23259ec':
Do not use cached tile specs value in QSTileHost.addTile()
Change-Id: If46d5f353b7ca93177eeb455c09922414bc80fab
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user