Make user explicitly set security type for tether network

This was made implicit which is confusing for the user so this CL
adds a preference to make the user manually choose their security
type.

Test: robotests
Fixes: 79435112
Change-Id: Ie78806e8952b52e1b7cd21f0b87c9d064acaff64
Merged-In: Ie78806e8952b52e1b7cd21f0b87c9d064acaff64
This commit is contained in:
Salvador Martinez
2018-05-15 17:44:42 -07:00
committed by Andrew Sapperstein
parent 99902e1faf
commit d9bae5a15e
9 changed files with 242 additions and 65 deletions

View File

@@ -235,6 +235,22 @@
<item>@string/wifi_security_psk_generic</item>
</string-array>
<!-- Security types for wireless tether -->
<string-array name="wifi_tether_security">
<!-- Do not translate. -->
<item>@string/wifi_security_wpa2</item>
<!-- Do not translate. -->
<item>@string/wifi_security_none</item>
</string-array>
<!-- Values for security type for wireless tether -->
<string-array name="wifi_tether_security_values">
<!-- Do not translate. -->
<item>4</item>
<!-- Do not translate. -->
<item>0</item>
</string-array>
<!-- Match this with the constants in WifiDialog. --> <skip />
<!-- Wi-Fi settings. The type of EAP method a Wi-Fi network has. -->
<string-array name="wifi_eap_method">

View File

@@ -19,13 +19,20 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:title="@string/wifi_hotspot_checkbox_text"
settings:initialExpandedChildrenCount="2">
settings:initialExpandedChildrenCount="3">
<com.android.settings.widget.ValidatedEditTextPreference
android:key="wifi_tether_network_name"
android:title="@string/wifi_hotspot_name_title"
android:summary="@string/summary_placeholder" />
<ListPreference
android:key="wifi_tether_security"
android:title="@string/wifi_security"
android:summary="@string/summary_placeholder"
android:entries="@array/wifi_tether_security"
android:entryValues="@array/wifi_tether_security_values" />
<com.android.settings.widget.ValidatedEditTextPreference
android:key="wifi_tether_network_password"
android:title="@string/wifi_hotspot_password_title" />
@@ -33,7 +40,7 @@
<SwitchPreference
android:key="wifi_tether_auto_turn_off"
android:title="@string/wifi_hotspot_auto_off_title"
android:summary="@string/wifi_hotspot_auto_off_summary"/>
android:summary="@string/wifi_hotspot_auto_off_summary" />
<com.android.settings.widget.HotspotApBandSelectionPreference
android:key="wifi_tether_network_ap_band"
@@ -41,5 +48,5 @@
android:dialogLayout="@layout/hotspot_ap_band_selection_dialog"
android:dialogTitle="@string/wifi_hotspot_ap_band_title"
android:negativeButtonText="@string/cancel"
android:positiveButtonText="@string/apply"/>
android:positiveButtonText="@string/apply" />
</PreferenceScreen>