Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6312f7b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Show colorAccent icon color for connected Wi-Fi entry" into sc-dev am: e08ddd5f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14097781

Change-Id: I08cb5f892b361a782fb2d9ab0a4dfe6ce5abc82b
parents 4f8c860a e08ddd5f
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -186,6 +186,10 @@ public class WifiEntryPreference extends Preference implements WifiEntry.WifiEnt
        // TODO(b/70983952): Fill this method in
    }

    protected int getIconColorAttr() {
        return (mWifiEntry.getConnectedState() == WifiEntry.CONNECTED_STATE_CONNECTED)
                ? android.R.attr.colorAccent : android.R.attr.colorControlNormal;
    }

    private void updateIcon(boolean showX, int level) {
        if (level == -1) {
@@ -195,8 +199,7 @@ public class WifiEntryPreference extends Preference implements WifiEntry.WifiEnt

        final Drawable drawable = mIconInjector.getIcon(showX, level);
        if (drawable != null) {
            drawable.setTintList(Utils.getColorAttr(getContext(),
                    android.R.attr.colorControlNormal));
            drawable.setTint(Utils.getColorAttrDefaultColor(getContext(), getIconColorAttr()));
            setIcon(drawable);
        } else {
            setIcon(null);