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

Commit 45fe16c7 authored by Arne Coucheron's avatar Arne Coucheron
Browse files

Revert "Fix HotSpot first-use-help bug."

This reverts commit 07921b72.

Change-Id: I87afbdfead56ea5596fc2fabf63c78d5bbce5365
parent cace128a
Loading
Loading
Loading
Loading
+1 −24
Original line number Diff line number Diff line
@@ -96,8 +96,6 @@ public class TetherSettings extends RestrictedSettingsFragment
    private static final String ACTION_HOTSPOT_CONFIGURE_RRSPONSE =
            "Hotspot_PreConfigure_Response";

    private static final String INTENT_EXTRA_NEED_SHOW_HELP_LATER = "needShowHelpLater";

    private static final int DIALOG_AP_SETTINGS = 1;

    private static final String TAG = "TetheringSettings";
@@ -157,7 +155,6 @@ public class TetherSettings extends RestrictedSettingsFragment
    private boolean mUsbEnable = false;
    private WifiManager mWifiStatusManager;
    private boolean mIsWifiEnabled = false;
    private boolean mHaveWifiApConfig = false;

    @Override
    protected int getMetricsCategory() {
@@ -283,24 +280,6 @@ public class TetherSettings extends RestrictedSettingsFragment
                Context.WIFI_SERVICE);
    }

    @Override
    public void onResume() {
        super.onResume();
        if(mWifiManager != null) {
            WifiConfiguration config = mWifiManager.getWifiApConfiguration();
            boolean isNotNoneSecurity = config.getAuthType() > WifiConfiguration.KeyMgmt.NONE;
            // WifiConfiguration.KeyMgmt be used to management schemes,
            // WifiConfiguration.preSharedKey for use with WPA-PSK, it's password,
            // if preSharedKey is empty, the WifiConfiguration need to set password.
            if(isNotNoneSecurity) {
                mHaveWifiApConfig = config.preSharedKey != null &&
                    !config.preSharedKey.isEmpty();
            } else {
                mHaveWifiApConfig = true;
            }
        }
    }

    @Override
    public void onDestroy() {
        mDataSaverBackend.remListener(this);
@@ -637,12 +616,10 @@ public class TetherSettings extends RestrictedSettingsFragment
            if(enableWifiApSettingsExt && showNoSimCardDialog(getPrefContext())) {
                ((HotspotPreference)preference).setChecked(false);
                return false;
            } else if(enableWifiApSettingsExt &&
                (isNeedShowHelp(getPrefContext()) || !mHaveWifiApConfig)) {
            } else if(enableWifiApSettingsExt && isNeedShowHelp(getPrefContext())) {
                Intent intent = new Intent();
                intent.setAction(ACTION_HOTSPOT_PRE_CONFIGURE);
                intent.setPackage("com.qualcomm.qti.extsettings");
                intent.putExtra(INTENT_EXTRA_NEED_SHOW_HELP_LATER, true);
                getPrefContext().startActivity(intent);
                ((HotspotPreference)preference).setChecked(false);
                return false;