Skip to content

Commit

Permalink
Use frameworks wifi icons instead of sysui
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Fabian Kozynski authored and SKULSHADY committed Sep 11, 2019
1 parent 4eb75fa commit b6d441f
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 185 deletions.
22 changes: 0 additions & 22 deletions packages/SystemUI/res/drawable/ic_qs_wifi_disabled.xml

This file was deleted.

28 changes: 0 additions & 28 deletions packages/SystemUI/res/drawable/ic_qs_wifi_full_0.xml

This file was deleted.

31 changes: 0 additions & 31 deletions packages/SystemUI/res/drawable/ic_qs_wifi_full_1.xml

This file was deleted.

31 changes: 0 additions & 31 deletions packages/SystemUI/res/drawable/ic_qs_wifi_full_2.xml

This file was deleted.

31 changes: 0 additions & 31 deletions packages/SystemUI/res/drawable/ic_qs_wifi_full_3.xml

This file was deleted.

28 changes: 0 additions & 28 deletions packages/SystemUI/res/drawable/ic_qs_wifi_full_4.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<AccessPointCallback> mCallbacks = new ArrayList<AccessPointCallback>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit b6d441f

Please sign in to comment.