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

Commit f7846036 authored by jackqdyulei's avatar jackqdyulei
Browse files

Change AccessPointPreference to normal Preference

Make it extend from normal Preference

Change-Id: Iee1ea7caedb8a5eb530545d085c96b877e3f7a00
Fixes: 72528535
Fixes: 72442172
Test: Build
parent b4799807
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
@@ -128,6 +128,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;
@@ -166,20 +167,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) {