summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java
index fd4107a..8783a85 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java
@@ -400,6 +400,12 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks
mDateView = (DateView)sb.findViewById(R.id.date);
mCmBatteryMiniIcon = (CmBatteryMiniIcon)sb.findViewById(R.id.CmBatteryMiniIcon);
+ /* Destroy any existing widgets before recreating the expanded dialog
+ * to ensure there are no lost context issues */
+ if (mPowerWidget != null) {
+ mPowerWidget.destroyWidget();
+ }
+
mExpandedDialog = new ExpandedDialog(context);
mExpandedView = expanded;
mExpandedContents = expanded.findViewById(R.id.notificationLinearLayout);