Loading res/values/arrays.xml +8 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,10 @@ <!-- Security types for wireless tether --> <string-array name="wifi_tether_security"> <!-- Do not translate. --> <item>@string/wifi_security_sae</item> <!-- Do not translate. --> <item>@string/wifi_security_psk_sae</item> <!-- Do not translate. --> <item>@string/wifi_security_wpa2</item> <!-- Do not translate. --> Loading @@ -230,6 +234,10 @@ <!-- Values for security type for wireless tether --> <string-array name="wifi_tether_security_values" translatable="false"> <!-- Do not translate. --> <item>3</item> <!-- Do not translate. --> <item>2</item> <!-- Do not translate. --> <item>1</item> <!-- Do not translate. --> Loading res/values/strings.xml +8 −0 Original line number Diff line number Diff line Loading @@ -2255,6 +2255,8 @@ <string name="wifi_details_title">Network details</string> <!-- Wifi details preference title to display router IP subnet mask --> <string name="wifi_details_subnet_mask">Subnet mask</string> <!-- Wifi details preference title to display wifi type info [CHAR LIMIT=50]--> <string name="wifi_type_title">Type</string> <!-- Wifi details preference title to display router DNS info --> <string name="wifi_details_dns">DNS</string> <!-- Wifi details preference category title for IPv6 information --> Loading Loading @@ -2290,6 +2292,12 @@ <string name="wifi_gateway">Gateway</string> <!-- Label for the network prefix of the network [CHAR LIMIT=25]--> <string name="wifi_network_prefix_length">Network prefix length</string> <!-- Summary for the WiFi Type WIFI_STANDARD_11AX [CHAR LIMIT=50]--> <string name="wifi_type_11AX">Wi\u2011Fi 6</string> <!-- Summary for the WiFi Type WIFI_STANDARD_11AC [CHAR LIMIT=50]--> <string name="wifi_type_11AC">Wi\u2011Fi 5</string> <!-- Summary for the WiFi Type WIFI_STANDARD_11N [CHAR LIMIT=50]--> <string name="wifi_type_11N">Wi\u2011Fi 4</string> <!-- Wi-Fi p2p / Wi-Fi Direct settings --> <!-- Used in the 1st-level settings screen to launch Wi-fi Direct settings [CHAR LIMIT=25] --> Loading res/xml/wifi_network_details_fragment2.xml +5 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,11 @@ <PreferenceCategory android:key="ip_details_category" android:title="@string/wifi_setup_detail"> <Preference android:key="type" android:title="@string/wifi_type_title" android:selectable="false" settings:enableCopying="true"/> <Preference android:key="ssid" android:title="@string/wifi_advanced_ssid_title" Loading src/com/android/settings/AllInOneTetherSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -355,7 +355,7 @@ public class AllInOneTetherSettings extends RestrictedDashboardFragment @Override public void onTetherConfigUpdated(AbstractPreferenceController controller) { final SoftApConfiguration config = buildNewConfig(); mPasswordPreferenceController.updateVisibility(config.getSecurityType()); mPasswordPreferenceController.setSecurityType(config.getSecurityType()); mWifiManager.setSoftApConfiguration(config); if (mWifiManager.getWifiApState() == WifiManager.WIFI_AP_STATE_ENABLED) { Loading src/com/android/settings/wifi/WifiUtils.java +3 −3 Original line number Diff line number Diff line Loading @@ -56,12 +56,12 @@ public class WifiUtils { } /** * Check if the WPA2-PSK hotspot password is valid. * Check if the hotspot password is valid. */ public static boolean isHotspotWpa2PasswordValid(String password) { public static boolean isHotspotPasswordValid(String password, int securityType) { final SoftApConfiguration.Builder configBuilder = new SoftApConfiguration.Builder(); try { configBuilder.setPassphrase(password, SoftApConfiguration.SECURITY_TYPE_WPA2_PSK); configBuilder.setPassphrase(password, securityType); } catch (IllegalArgumentException e) { return false; } Loading Loading
res/values/arrays.xml +8 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,10 @@ <!-- Security types for wireless tether --> <string-array name="wifi_tether_security"> <!-- Do not translate. --> <item>@string/wifi_security_sae</item> <!-- Do not translate. --> <item>@string/wifi_security_psk_sae</item> <!-- Do not translate. --> <item>@string/wifi_security_wpa2</item> <!-- Do not translate. --> Loading @@ -230,6 +234,10 @@ <!-- Values for security type for wireless tether --> <string-array name="wifi_tether_security_values" translatable="false"> <!-- Do not translate. --> <item>3</item> <!-- Do not translate. --> <item>2</item> <!-- Do not translate. --> <item>1</item> <!-- Do not translate. --> Loading
res/values/strings.xml +8 −0 Original line number Diff line number Diff line Loading @@ -2255,6 +2255,8 @@ <string name="wifi_details_title">Network details</string> <!-- Wifi details preference title to display router IP subnet mask --> <string name="wifi_details_subnet_mask">Subnet mask</string> <!-- Wifi details preference title to display wifi type info [CHAR LIMIT=50]--> <string name="wifi_type_title">Type</string> <!-- Wifi details preference title to display router DNS info --> <string name="wifi_details_dns">DNS</string> <!-- Wifi details preference category title for IPv6 information --> Loading Loading @@ -2290,6 +2292,12 @@ <string name="wifi_gateway">Gateway</string> <!-- Label for the network prefix of the network [CHAR LIMIT=25]--> <string name="wifi_network_prefix_length">Network prefix length</string> <!-- Summary for the WiFi Type WIFI_STANDARD_11AX [CHAR LIMIT=50]--> <string name="wifi_type_11AX">Wi\u2011Fi 6</string> <!-- Summary for the WiFi Type WIFI_STANDARD_11AC [CHAR LIMIT=50]--> <string name="wifi_type_11AC">Wi\u2011Fi 5</string> <!-- Summary for the WiFi Type WIFI_STANDARD_11N [CHAR LIMIT=50]--> <string name="wifi_type_11N">Wi\u2011Fi 4</string> <!-- Wi-Fi p2p / Wi-Fi Direct settings --> <!-- Used in the 1st-level settings screen to launch Wi-fi Direct settings [CHAR LIMIT=25] --> Loading
res/xml/wifi_network_details_fragment2.xml +5 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,11 @@ <PreferenceCategory android:key="ip_details_category" android:title="@string/wifi_setup_detail"> <Preference android:key="type" android:title="@string/wifi_type_title" android:selectable="false" settings:enableCopying="true"/> <Preference android:key="ssid" android:title="@string/wifi_advanced_ssid_title" Loading
src/com/android/settings/AllInOneTetherSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -355,7 +355,7 @@ public class AllInOneTetherSettings extends RestrictedDashboardFragment @Override public void onTetherConfigUpdated(AbstractPreferenceController controller) { final SoftApConfiguration config = buildNewConfig(); mPasswordPreferenceController.updateVisibility(config.getSecurityType()); mPasswordPreferenceController.setSecurityType(config.getSecurityType()); mWifiManager.setSoftApConfiguration(config); if (mWifiManager.getWifiApState() == WifiManager.WIFI_AP_STATE_ENABLED) { Loading
src/com/android/settings/wifi/WifiUtils.java +3 −3 Original line number Diff line number Diff line Loading @@ -56,12 +56,12 @@ public class WifiUtils { } /** * Check if the WPA2-PSK hotspot password is valid. * Check if the hotspot password is valid. */ public static boolean isHotspotWpa2PasswordValid(String password) { public static boolean isHotspotPasswordValid(String password, int securityType) { final SoftApConfiguration.Builder configBuilder = new SoftApConfiguration.Builder(); try { configBuilder.setPassphrase(password, SoftApConfiguration.SECURITY_TYPE_WPA2_PSK); configBuilder.setPassphrase(password, securityType); } catch (IllegalArgumentException e) { return false; } Loading