Make QS only have one Host and Tiles
Finish previous work to only have one set of tiles so that updates
can be easily propogated from custom tiles to the UI.
Change-Id: Id5e13774f825b78d3c9e50c2d9f8ea1710b2e77b
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index 91f88b9..fd07e50 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -329,16 +329,19 @@
drawTile(r, state);
}
}
+
@Override
public void onShowDetail(boolean show) {
QSPanel.this.showDetail(show, r);
}
+
@Override
public void onToggleStateChanged(boolean state) {
if (mDetailRecord == r) {
fireToggleStateChanged(state);
}
}
+
@Override
public void onScanStateChanged(boolean state) {
r.scanState = state;
@@ -352,7 +355,7 @@
announceForAccessibility(announcement);
}
};
- r.tile.setCallback(callback);
+ r.tile.addCallback(callback);
final View.OnClickListener click = new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -415,6 +418,9 @@
}
protected void handleShowDetail(Record r, boolean show) {
+ if (show && !mExpanded) {
+ mHost.animateExpandQS();
+ }
if (r instanceof TileRecord) {
handleShowDetailTile((TileRecord) r, show);
} else {