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

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

Merge "Change AccessPointPreference to normal Preference"

parents 9ed872ce f7846036
Loading
Loading
Loading
Loading
+2 −15
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ import com.android.settingslib.TwoTargetPreference;
import com.android.settingslib.Utils;
import com.android.settingslib.wifi.AccessPoint.Speed;

public class AccessPointPreference extends TwoTargetPreference {
public class AccessPointPreference extends Preference {

    private static final int[] STATE_SECURED = {
            R.attr.state_encrypted
@@ -115,6 +115,7 @@ public class AccessPointPreference extends TwoTargetPreference {
                          int iconResId, boolean forSavedNetworks, StateListDrawable frictionSld,
                          int level, IconInjector iconInjector) {
        super(context);
        setWidgetLayoutResource(R.layout.access_point_friction_widget);
        mBadgeCache = cache;
        mAccessPoint = accessPoint;
        mForSavedNetworks = forSavedNetworks;
@@ -153,20 +154,6 @@ public class AccessPointPreference extends TwoTargetPreference {

        ImageView frictionImageView = (ImageView) view.findViewById(R.id.friction_icon);
        bindFrictionImage(frictionImageView);
        setDividerVisibility(view, View.GONE);
    }

    protected void setDividerVisibility(final PreferenceViewHolder view,
            @View.Visibility int visibility) {
        final View divider = view.findViewById(R.id.two_target_divider);
        if (divider != null) {
            divider.setVisibility(visibility);
        }
    }

    @Override
    protected int getSecondTargetResId() {
        return R.layout.access_point_friction_widget;
    }

    protected void updateIcon(int level, Context context) {