Add summary for hostspot when airplane is on.
Change-Id: I5470dab7050b73ed474abd5b948e873699819751 Fixes: 72716285 Test: RunSettingsRoboTests
This commit is contained in:
@@ -2142,6 +2142,8 @@
|
||||
<string name="wifi_hotspot_configure_ap_text_summary">AndroidAP WPA2 PSK hotspot</string>
|
||||
<!-- Default access point SSID used for tethering -->
|
||||
<string name="wifi_tether_configure_ssid_default">AndroidHotspot</string>
|
||||
<!-- Summary text when hotspot is disabled because airplane mode is on [CHAR LIMIT=80]-->
|
||||
<string name="wifi_tether_disabled_by_airplane">Unavailable because airplane mode is turned on</string>
|
||||
|
||||
<!-- Do not translate. Used for diagnostic screens, precise translation is not necessary
|
||||
Wi-Fi Testing on the diagnostic screen-->
|
||||
|
@@ -202,7 +202,7 @@ public class WifiTetherPreferenceController extends AbstractPreferenceController
|
||||
boolean isAirplaneMode = Settings.Global.getInt(mContext.getContentResolver(),
|
||||
Settings.Global.AIRPLANE_MODE_ON, 0) != 0;
|
||||
if (isAirplaneMode) {
|
||||
mPreference.setSummary(R.string.summary_placeholder);
|
||||
mPreference.setSummary(R.string.wifi_tether_disabled_by_airplane);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
@@ -185,7 +185,7 @@ public class WifiTetherPreferenceControllerTest {
|
||||
receiver.onReceive(RuntimeEnvironment.application, broadcast);
|
||||
|
||||
assertThat(mPreference.getSummary().toString()).isEqualTo(
|
||||
RuntimeEnvironment.application.getString(R.string.summary_placeholder));
|
||||
"Unavailable because airplane mode is turned on");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user