This is super annoying for me as I usually close my laptop, move somewhere else, reopen my laptop. And this usually takes more than 10 minutes.
It would be great if this value could be configured. This would enable me to set it to different values in different contexts (daily life, holidays, etc.)
Create a preference controller for this new setting based on WifiTetherAutoOffPreferenceController, and replace .setAutoShutdownEnabled(settingsOn) with .setShutdownTimeoutMillis(settingsValue).
Add some tests (you can copy the ones from the auto off preference).
Appendix
I don't have a building environment set up, and neither an Android phone with this ROM (yet). It would be great if someone from the team could implement it, it should be rather straightforward by following the “How to implement” section above. Thanks 🙏
Rationale
The default auto-shutdown timeout for the portable hotspot feature is only 10 minutes by default.
This is super annoying for me as I usually close my laptop, move somewhere else, reopen my laptop. And this usually takes more than 10 minutes.
It would be great if this value could be configured. This would enable me to set it to different values in different contexts (daily life, holidays, etc.)
Technical information
Android documentation: https://source.android.com/docs/core/connect/wifi-softap#:~:text=config_wifiFrameworkSoftApShutDownTimeoutMilliseconds
Corresponding overlay setting:
config_wifiFrameworkSoftApShutDownTimeoutMilliseconds
How to implement
wifi_tether_auto_turn_off_timeout
here:https://github.com/PixelOS-AOSP/packages_apps_Settings/blob/75af6f9c8be92436094fc6842ea935a1d07d8f3e/res/xml/wifi_tether_settings.xml#L40-L43
Create a preference controller for this new setting based on
WifiTetherAutoOffPreferenceController
, and replace.setAutoShutdownEnabled(settingsOn)
with.setShutdownTimeoutMillis(settingsValue)
.Register this new preference controller here:
https://github.com/PixelOS-AOSP/packages_apps_Settings/blob/75af6f9c8be92436094fc6842ea935a1d07d8f3e/src/com/android/settings/AllInOneTetherSettings.java#L332-L333
and here
https://github.com/PixelOS-AOSP/packages_apps_Settings/blob/75af6f9c8be92436094fc6842ea935a1d07d8f3e/src/com/android/settings/wifi/tether/WifiTetherSettings.java#L194-L195
Appendix
I don't have a building environment set up, and neither an Android phone with this ROM (yet). It would be great if someone from the team could implement it, it should be rather straightforward by following the “How to implement” section above. Thanks 🙏