From c59249faf549b674e1bd64ba3c3191a8032b7e50 Mon Sep 17 00:00:00 2001 From: Jason Monk Date: Fri, 17 Jun 2016 10:19:43 -0400 Subject: [PATCH] Bring out your toggles Switch Wifi and BT back to toggling from QQS. Make cell open a detail panel. Change-Id: Ibdd8fa52a31c4bf81ee0e6974e263b46b6f71a31 Fixes: 29406644 --- .../src/com/android/systemui/qs/QuickQSPanel.java | 7 ++++++- .../com/android/systemui/qs/tiles/CellularTile.java | 12 ++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java index c984abe1b8e00..f287f1bac6cbe 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java @@ -112,6 +112,11 @@ public class QuickQSPanel extends QSPanel { } } + @Override + protected void onTileClick(QSTile tile) { + tile.secondaryClick(); + } + @Override public void onTuningChanged(String key, String newValue) { // No tunings for you. @@ -130,7 +135,7 @@ public class QuickQSPanel extends QSPanel { break; } } - super.setTiles(quickTiles, false); + super.setTiles(quickTiles, true); } private final Tunable mNumTiles = new Tunable() { diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java index 18191cf782dc8..0de5105485dc2 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java @@ -94,14 +94,6 @@ public class CellularTile extends QSTile { } } - @Override - protected void handleSecondaryClick() { - boolean dataEnabled = mDataController.isMobileDataSupported() - && mDataController.isMobileDataEnabled(); - MetricsLogger.action(mContext, MetricsEvent.QS_CELLULAR_TOGGLE, !dataEnabled); - mDataController.setMobileDataEnabled(!dataEnabled); - } - @Override public CharSequence getTileLabel() { return mContext.getString(R.string.quick_settings_cellular_detail_title); @@ -152,8 +144,8 @@ public class CellularTile extends QSTile { } state.contentDescription = state.contentDescription + "," + r.getString( R.string.accessibility_quick_settings_open_settings, getTileLabel()); - state.expandedAccessibilityClassName = Button.class.getName(); - state.minimalAccessibilityClassName = Switch.class.getName(); + state.minimalAccessibilityClassName = state.expandedAccessibilityClassName + = Button.class.getName(); state.value = mDataController.isMobileDataSupported() && mDataController.isMobileDataEnabled(); }