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

Commit 0a5402dc authored by Jeff Davidson's avatar Jeff Davidson
Browse files

Fix crash in WifiSettings.

SDK version is an int, not a long. (Also change SharedPreference key
to avoid issues for people who've already dismissed the Wifi Assistant
card).

Bug: 17304642
Change-Id: Ic959516b88e91edd53562703fa7db9c15ead20e4
parent 3d319d0b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ public class WifiSettings extends RestrictedSettingsFragment
    private static final int MENU_ID_MODIFY = Menu.FIRST + 8;
    private static final int MENU_ID_WRITE_NFC = Menu.FIRST + 9;

    private static final String KEY_ASSISTANT_DISMISS_PLATFORM = "wifi_assistant_dismiss_platform";
    private static final String KEY_ASSISTANT_DISMISS_PLATFORM = "assistant_dismiss_platform";

    public static final int WIFI_DIALOG_ID = 1;
    /* package */ static final int WPS_PBC_DIALOG_ID = 2;
@@ -768,7 +768,7 @@ public class WifiSettings extends RestrictedSettingsFragment
    private void disableWifiAssistantCardUntilPlatformUpgrade() {
        SharedPreferences sharedPreferences = getPreferenceScreen().getSharedPreferences();
        SharedPreferences.Editor editor = sharedPreferences.edit();
        editor.putLong(KEY_ASSISTANT_DISMISS_PLATFORM, Build.VERSION.SDK_INT);
        editor.putInt(KEY_ASSISTANT_DISMISS_PLATFORM, Build.VERSION.SDK_INT);
        editor.apply();
    }