PixelOS-AOSP / packages_modules_Wifi

0 stars 2 forks source link

Portable hotspot — Add configuration option for auto turn off timeout #1

Open devnoname120 opened 2 years ago

devnoname120 commented 2 years ago

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

https://github.com/PixelOS-AOSP/packages_apps_Settings/blob/75af6f9c8be92436094fc6842ea935a1d07d8f3e/res/xml/wifi_tether_settings.xml#L40-L43

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 🙏

devnoname120 commented 2 years ago

cc @whyredfire @basamaryan @Kitsunejasutin @geek0609 @twel12