From 0e4418f1329dd765dd8eed4927e2c04504442839 Mon Sep 17 00:00:00 2001 From: Rubin Xu Date: Mon, 18 Jan 2016 11:02:18 +0000 Subject: [PATCH] Reload active profiles when constructing WorkModeTile There seems to cases when after QSTile is constructed, handleUpdateState() is called without setListening(true) being called first. In the WorkModeTile case it leads to the tile removing itself. The fix is to reload active profile list in the constructor so handleUpdateState() would not remove itself because it thinks there is no active profile. Bug: 26178050 Change-Id: I3516c85ffcf00730c3afd67f9fdec1d41c781c0a --- .../SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java index 255f29f285c42..34ed37b2b75d9 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java @@ -47,6 +47,7 @@ public class WorkModeTile extends QSTile { super(host); mUserManager = UserManager.get(mContext); mProfiles = new LinkedList(); + reloadManagedProfiles(UserHandle.USER_CURRENT); } @Override