From cedcd28103c29e8644f7555a9bd835d081c7ae8e Mon Sep 17 00:00:00 2001 From: Rubin Xu Date: Mon, 15 Feb 2016 14:44:44 +0000 Subject: [PATCH] Initialize mTiles before constructing AutoTileManager Bug: 22682394 Change-Id: Ida41d3757b0732a01e9ede92ec8c5d2f8426c6b0 --- .../src/com/android/systemui/statusbar/phone/QSTileHost.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java index da2c20db6d905..2af2009ac5057 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java @@ -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) {