Support dnd condition in Settings
- Add way to open QS detail panels directly
- Add internal broadcast that can launch apps when dnd mode changes
Change-Id: If2b6350dc31623f3bf2f64c7eb141cff5d3d4e89
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index ae8542a..16fd9eb 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -154,6 +154,20 @@
}
}
+ public void openDetails(String subPanel) {
+ QSTile<?> tile = getTile(subPanel);
+ showDetailAdapter(true, tile.getDetailAdapter(), new int[] {getWidth() / 2, 0});
+ }
+
+ private QSTile<?> getTile(String subPanel) {
+ for (int i = 0; i < mRecords.size(); i++) {
+ if (subPanel.equals(mRecords.get(i).tile.getTileSpec())) {
+ return mRecords.get(i).tile;
+ }
+ }
+ return mHost.createTile(subPanel);
+ }
+
protected void createCustomizePanel() {
mCustomizePanel = (QSCustomizer) LayoutInflater.from(mContext)
.inflate(R.layout.qs_customize_panel, null);