Wifi: Update message when scan result is empty
Handle case when Wi-Fi scan result is empty Change-Id: I03ccbf2603367efa3c6dfe20514e8c7c5a68b5d9 Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
This commit is contained in:
committed by
Irfan Sheriff
parent
5cce0e6e77
commit
6243e8e466
@@ -1216,6 +1216,8 @@
|
|||||||
<string name="wifi_menu_modify">Modify network</string>
|
<string name="wifi_menu_modify">Modify network</string>
|
||||||
<!-- Wi-Fi settings. text displayed when Wi-Fi is off and network list is empty [CHAR LIMIT=50]-->
|
<!-- Wi-Fi settings. text displayed when Wi-Fi is off and network list is empty [CHAR LIMIT=50]-->
|
||||||
<string name="wifi_empty_list_wifi_off">To see available networks, turn Wi-Fi on.</string>
|
<string name="wifi_empty_list_wifi_off">To see available networks, turn Wi-Fi on.</string>
|
||||||
|
<!-- Wi-Fi settings. text displayed when Wi-Fi is on and network list is empty [CHAR LIMIT=50]-->
|
||||||
|
<string name="wifi_empty_list_wifi_on">Wi-Fi on, but no Wi-Fi networks around.</string>
|
||||||
|
|
||||||
<!-- Dialog for Access Points --> <skip />
|
<!-- Dialog for Access Points --> <skip />
|
||||||
<!-- Label to show/hide advanced options -->
|
<!-- Label to show/hide advanced options -->
|
||||||
|
@@ -538,6 +538,9 @@ public class WifiSettings extends SettingsPreferenceFragment
|
|||||||
((WifiSettingsForSetupWizardXL)getActivity()).onAccessPointsUpdated(
|
((WifiSettingsForSetupWizardXL)getActivity()).onAccessPointsUpdated(
|
||||||
getPreferenceScreen(), accessPoints);
|
getPreferenceScreen(), accessPoints);
|
||||||
} else {
|
} else {
|
||||||
|
if(accessPoints.size() == 0) {
|
||||||
|
addMessagePreference(R.string.wifi_empty_list_wifi_on);
|
||||||
|
}
|
||||||
for (AccessPoint accessPoint : accessPoints) {
|
for (AccessPoint accessPoint : accessPoints) {
|
||||||
getPreferenceScreen().addPreference(accessPoint);
|
getPreferenceScreen().addPreference(accessPoint);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user