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

Commit 9656ccbe authored by kaiyiz's avatar kaiyiz Committed by Gerrit - the friendly Code Review server
Browse files

Settings: "Portable WLAN hotspot" displays error

UI refresh slow, so the switch is off.

Update switch in onCreateView.

CRs-Fixed: 747371

Change-Id: I488edec3ad9e95119892a7091955f576ed1b535a
parent 186789da
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ public class HotspotPreference extends Preference implements OnCheckedChangeList
    private Switch mSwitch;
    private TextView mSubSummary;
    private Context mContext;
    private boolean mSwitchEnabled;

    public HotspotPreference(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
@@ -71,6 +72,7 @@ public class HotspotPreference extends Preference implements OnCheckedChangeList
        mSubSummary.setVisibility(View.GONE);
        mSwitch = (Switch) view.findViewById(R.id.switchWidget);
        mSwitch.setOnCheckedChangeListener(this);
        setChecked(mSwitchEnabled);
        return view;
    }

@@ -92,5 +94,6 @@ public class HotspotPreference extends Preference implements OnCheckedChangeList
            mSwitch.setChecked(state);
            mSwitch.setOnCheckedChangeListener(this);
        }
        mSwitchEnabled=state;
    }
}