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

Commit 8c97bcc9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Show friction icons in Saved Networks list."

parents 0843c579 4d8781e6
Loading
Loading
Loading
Loading
+3 −13
Original line number Diff line number Diff line
@@ -43,10 +43,6 @@ public class AccessPointPreference extends Preference {
    private static final int[] STATE_SECURED = {
            R.attr.state_encrypted
    };
    private static final int[] STATE_SAVED = {
            R.attr.state_encrypted,
            R.attr.state_saved
    };

    private static final int[] wifi_friction_attributes = { R.attr.wifi_friction };

@@ -152,11 +148,9 @@ public class AccessPointPreference extends Preference {
        }
        view.itemView.setContentDescription(mContentDescription);

        if (!mForSavedNetworks) {
        ImageView frictionImageView = (ImageView) view.findViewById(R.id.friction_icon);
        bindFrictionImage(frictionImageView);
    }
    }

    protected void updateIcon(int level, Context context) {
        if (level == -1) {
@@ -184,12 +178,8 @@ public class AccessPointPreference extends Preference {
            return;
        }
        if (mAccessPoint.getSecurity() != AccessPoint.SECURITY_NONE) {
            if (mAccessPoint.isSaved()) {
                mFrictionSld.setState(STATE_SAVED);
            } else {
            mFrictionSld.setState(STATE_SECURED);
        }
        }
        Drawable drawable = mFrictionSld.getCurrent();
        frictionImageView.setImageDrawable(drawable);
    }