QS: Fix some QS layout issues.
- Make the tile list configurable for testing.
- Support an external tile backed by a sticky broadcast intent.
- Ensure tiles clean up properly when no longer needed.
Bug:16818269
Bug:16822505
Change-Id: Ie24f878aae0d19c7f1feca4c519d10667023bef3
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
index ff26b54..96333a3 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
@@ -35,7 +35,13 @@
super(host);
mController = host.getHotspotController();
mUsageTracker = new UsageTracker(host.getContext(), HotspotTile.class);
- mUsageTracker.listenForReset();
+ mUsageTracker.setListening(true);
+ }
+
+ @Override
+ protected void handleDestroy() {
+ super.handleDestroy();
+ mUsageTracker.setListening(false);
}
@Override