From c1cc490f746ae8edd9bc4c66a035973b7cb8e1e5 Mon Sep 17 00:00:00 2001 From: jackqdyulei Date: Wed, 20 Dec 2017 11:22:52 -0800 Subject: [PATCH] Add toggle for enable/disable auto hotspot off Bug: 69323125 Test: RunSettingsRoboTests Change-Id: I18896401240f75bdf2bdf187c2c7a7b623b20c43 --- res/values/strings.xml | 5 + res/xml/wifi_tether_settings.xml | 9 +- ...WifiTetherAutoOffPreferenceController.java | 53 +++++++++++ .../wifi/tether/WifiTetherSettings.java | 3 + ...TetherAutoOffPreferenceControllerTest.java | 95 +++++++++++++++++++ 5 files changed, 164 insertions(+), 1 deletion(-) create mode 100644 src/com/android/settings/wifi/tether/WifiTetherAutoOffPreferenceController.java create mode 100644 tests/robotests/src/com/android/settings/wifi/tether/WifiTetherAutoOffPreferenceControllerTest.java diff --git a/res/values/strings.xml b/res/values/strings.xml index 694a1b052dc..d9fcd33d823 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -2102,6 +2102,11 @@ Apps can create a hotspot to share content with nearby devices. + + Turn off hotspot automatically + + Wi\u2011Fi hotspot will turn off if no devices are connected + Turning hotspot on\u2026 diff --git a/res/xml/wifi_tether_settings.xml b/res/xml/wifi_tether_settings.xml index d6b8a25d501..bb9af88da85 100644 --- a/res/xml/wifi_tether_settings.xml +++ b/res/xml/wifi_tether_settings.xml @@ -17,7 +17,9 @@ + xmlns:settings="http://schemas.android.com/apk/res-auto" + android:title="@string/wifi_hotspot_checkbox_text" + settings:initialExpandedChildrenCount="2"> + +