From b6d441f8200e9634dea220ad025dec69cb5e9110 Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Mon, 17 Dec 2018 14:00:51 -0500 Subject: [PATCH] Use frameworks wifi icons instead of sysui ic_qs_wifi_full_x have been replaced by ic_wifi_signal_x in frameworks. That way they can be overlaid with the whole system. Also, ic_qs_wifi_disabled was identical to ic_qs_wifi_full_0, so it was removed. Test: Visual (using HotDog overlay) Bug: 121040363 Change-Id: Ia36613e5c0b1f3a0c1eb5c687d795992e8660955 --- .../res/drawable/ic_qs_wifi_disabled.xml | 22 ------------- .../res/drawable/ic_qs_wifi_full_0.xml | 28 ----------------- .../res/drawable/ic_qs_wifi_full_1.xml | 31 ------------------- .../res/drawable/ic_qs_wifi_full_2.xml | 31 ------------------- .../res/drawable/ic_qs_wifi_full_3.xml | 31 ------------------- .../res/drawable/ic_qs_wifi_full_4.xml | 28 ----------------- .../android/systemui/qs/tiles/WifiTile.java | 3 +- .../policy/AccessPointControllerImpl.java | 9 +----- .../systemui/statusbar/policy/WifiIcons.java | 15 ++++++--- 9 files changed, 13 insertions(+), 185 deletions(-) delete mode 100644 packages/SystemUI/res/drawable/ic_qs_wifi_disabled.xml delete mode 100644 packages/SystemUI/res/drawable/ic_qs_wifi_full_0.xml delete mode 100644 packages/SystemUI/res/drawable/ic_qs_wifi_full_1.xml delete mode 100644 packages/SystemUI/res/drawable/ic_qs_wifi_full_2.xml delete mode 100644 packages/SystemUI/res/drawable/ic_qs_wifi_full_3.xml delete mode 100644 packages/SystemUI/res/drawable/ic_qs_wifi_full_4.xml diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_disabled.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_disabled.xml deleted file mode 100644 index 77d4645194af..000000000000 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_disabled.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - \ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_full_0.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_full_0.xml deleted file mode 100644 index 53e4efcbdea9..000000000000 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_full_0.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_full_1.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_full_1.xml deleted file mode 100644 index 8294183e19d9..000000000000 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_full_1.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_full_2.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_full_2.xml deleted file mode 100644 index 3d59cf28d329..000000000000 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_full_2.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_full_3.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_full_3.xml deleted file mode 100644 index 21313b8108a2..000000000000 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_full_3.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_full_4.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_full_4.xml deleted file mode 100644 index fd763ffb1d3f..000000000000 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_full_4.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java index 67a6eed1e1a0..f393b5b71f93 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java @@ -48,6 +48,7 @@ import com.android.systemui.statusbar.policy.NetworkController.AccessPointController; import com.android.systemui.statusbar.policy.NetworkController.IconState; import com.android.systemui.statusbar.policy.NetworkController.SignalCallback; +import com.android.systemui.statusbar.policy.WifiIcons; import java.util.List; @@ -216,7 +217,7 @@ protected void handleUpdateState(SignalState state, Object arg) { } else if (!state.value) { state.slash.isSlashed = true; state.state = Tile.STATE_INACTIVE; - state.icon = ResourceIcon.get(R.drawable.ic_qs_wifi_disabled); + state.icon = ResourceIcon.get(WifiIcons.QS_WIFI_DISABLED); state.label = r.getString(R.string.quick_settings_wifi_label); } else if (wifiConnected) { state.icon = ResourceIcon.get(cb.wifiSignalIconId); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AccessPointControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AccessPointControllerImpl.java index 41189da56b23..2dffd498a51a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AccessPointControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AccessPointControllerImpl.java @@ -29,7 +29,6 @@ import com.android.settingslib.wifi.AccessPoint; import com.android.settingslib.wifi.WifiTracker; import com.android.settingslib.wifi.WifiTracker.WifiListener; -import com.android.systemui.R; import java.io.PrintWriter; import java.util.ArrayList; @@ -46,13 +45,7 @@ public class AccessPointControllerImpl private static final String ENCRYPTING_STATE = "trigger_restart_min_framework"; private static final String ENCRYPTED_STATE = "1"; - private static final int[] ICONS = { - R.drawable.ic_qs_wifi_full_0, - R.drawable.ic_qs_wifi_full_1, - R.drawable.ic_qs_wifi_full_2, - R.drawable.ic_qs_wifi_full_3, - R.drawable.ic_qs_wifi_full_4, - }; + private static final int[] ICONS = WifiIcons.WIFI_FULL_ICONS; private final Context mContext; private final ArrayList mCallbacks = new ArrayList(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java index 374408d3ec7a..f629863c53a9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java @@ -32,19 +32,24 @@ public class WifiIcons { R.drawable.stat_sys_wifi_signal_4_fully } }; + static final int[] WIFI_FULL_ICONS = { + com.android.internal.R.drawable.ic_wifi_signal_0, + com.android.internal.R.drawable.ic_wifi_signal_1, + com.android.internal.R.drawable.ic_wifi_signal_2, + com.android.internal.R.drawable.ic_wifi_signal_3, + com.android.internal.R.drawable.ic_wifi_signal_4 + }; + public static final int[][] QS_WIFI_SIGNAL_STRENGTH = { { R.drawable.ic_qs_wifi_0, R.drawable.ic_qs_wifi_1, R.drawable.ic_qs_wifi_2, R.drawable.ic_qs_wifi_3, R.drawable.ic_qs_wifi_4 }, - { R.drawable.ic_qs_wifi_full_0, - R.drawable.ic_qs_wifi_full_1, - R.drawable.ic_qs_wifi_full_2, - R.drawable.ic_qs_wifi_full_3, - R.drawable.ic_qs_wifi_full_4 } + WIFI_FULL_ICONS }; + public static final int QS_WIFI_DISABLED = com.android.internal.R.drawable.ic_wifi_signal_0; static final int QS_WIFI_NO_NETWORK = R.drawable.ic_qs_wifi_no_network; static final int WIFI_NO_NETWORK = R.drawable.stat_sys_wifi_signal_null;