OSDN Git Service

Initialize mTiles before constructing AutoTileManager
authorRubin Xu <rubinxu@google.com>
Mon, 15 Feb 2016 14:44:44 +0000 (14:44 +0000)
committerRubin Xu <rubinxu@google.com>
Mon, 15 Feb 2016 14:45:42 +0000 (14:45 +0000)
Bug: 22682394
Change-Id: Ida41d3757b0732a01e9ede92ec8c5d2f8426c6b0

packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java

index da2c20d..2af2009 100644 (file)
@@ -147,8 +147,9 @@ public final class QSTileHost implements QSTile.Host, Tunable {
 
         mServices = new TileServices(this, mLooper);
 
-        mAutoTiles = new AutoTileManager(context, this);
         TunerService.get(mContext).addTunable(this, TILES_SETTING);
+        // AutoTileManager can modify mTiles so make sure mTiles has already been initialized.
+        mAutoTiles = new AutoTileManager(context, this);
     }
 
     public void setHeaderView(View view) {