From 77909062da2c799c9475ff55429f10d9d8caf31a Mon Sep 17 00:00:00 2001 From: Oliver Scott Date: Thu, 25 Feb 2021 11:31:14 -0500 Subject: [PATCH] Wi-Fi timeout feature Also includes squashed change: Author: Tommy Webb Date: Thu May 18 13:47:42 2023 -0400 fixup! Wi-Fi timeout feature Only allow admin users to adjust the Wi-Fi timeout. Issue: calyxos#1633 Change-Id: I9379bdd1fae136b2900692b4ea49c10106b3f285 Issue: calyxos#228 Change-Id: Ib35e45c38ca8c4f7146c8868b92ab98ca8d3c5b3 Signed-off-by: Pranav Vashi --- res/values/evolution_strings.xml | 5 +- res/xml/wifi_configure_settings.xml | 8 ++ .../wifi/WifiTimeoutPreferenceController.java | 120 ++++++++++++++++++ 3 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 src/com/android/settings/wifi/WifiTimeoutPreferenceController.java diff --git a/res/values/evolution_strings.xml b/res/values/evolution_strings.xml index b50422155ae..fe2c346154c 100644 --- a/res/values/evolution_strings.xml +++ b/res/values/evolution_strings.xml @@ -88,7 +88,10 @@ SoC Model Total RAM - + + WiFi timeout + Do not automatically turn off WiFi + WiFi will turn off after %1$s if no network connected Bluetooth timeout Do not automatically turn off Bluetooth Bluetooth will turn off after %1$s if no devices connected diff --git a/res/xml/wifi_configure_settings.xml b/res/xml/wifi_configure_settings.xml index 5866c5898d9..765e8bc5fd2 100644 --- a/res/xml/wifi_configure_settings.xml +++ b/res/xml/wifi_configure_settings.xml @@ -26,6 +26,14 @@ android:summary="@string/wifi_wakeup_summary" settings:controller="com.android.settings.wifi.WifiWakeupPreferenceController"/> + +