Set screen timeout #32

Open
opened 2025-03-21 00:21:24 +01:00 by Benjamin_Loison · 17 comments
No description provided.
Author
Owner

Related to #19.

Related to #19.
Author
Owner
Related to [Benjamin_Loison/Voice_assistant/issues/18#issuecomment-4414487](https://codeberg.org/Benjamin_Loison/Voice_assistant/issues/18#issuecomment-4414487).
Author
Owner

I verified with https://www.online-stopwatch.com that current 2 minutes screen timeout is enforced.

I verified with https://www.online-stopwatch.com that current 2 minutes screen timeout is enforced.
Author
Owner

image.png

on my Fairphone 4 LineageOS 22.2 while being wireless debugging it from itself.

![image.png](/attachments/90dfcc1e-a0f6-4518-b07f-37db0fb46049) on my Fairphone 4 LineageOS 22.2 while being wireless debugging it from itself.
172 KiB
Author
Owner

Disabling screen lock while ADB is running is an alternative but in the case of the voice assistant may not that be relevant but note that to change this setting need ADB.

Disabling screen lock while ADB is running is an alternative but in the case of the voice assistant may not that be relevant but note that to change this setting need ADB.
Author
Owner
Bash script:
for section in global system secure
do
    echo $section
    adb shell settings list $section | grep 120
done
Output:
global
wifi_power_save=120
system
screen_off_timeout=120000
secure
<details> <summary>Bash script:</summary> ```bash for section in global system secure do echo $section adb shell settings list $section | grep 120 done ``` </details> <details> <summary>Output:</summary> ``` global wifi_power_save=120 system screen_off_timeout=120000 secure ``` </details>
Author
Owner

image.png

![image.png](/attachments/b2f4f68c-bf65-4070-b4f2-809be0808123)
145 KiB
Author
Owner

Preferably I would like an indefinitely setting.

Preferably I would like an indefinitely setting.
Author
Owner

image.png

Note Stay awake.

![image.png](/attachments/63b7937f-28c5-4ca2-ba38-88e3c9319798) Note *Stay awake*.
232 KiB
Author
Owner
Bash script:
for section in global system secure
do
    echo $section
    adb shell settings list $section | grep -E 'stay|awake'
done
Output:
global
stay_on_while_plugged_in=0
system
secure
<details> <summary>Bash script:</summary> ```bash for section in global system secure do echo $section adb shell settings list $section | grep -E 'stay|awake' done ``` </details> <details> <summary>Output:</summary> ``` global stay_on_while_plugged_in=0 system secure ``` </details>
Author
Owner

When I toggle graphically the setting:

adb shell settings get global stay_on_while_plugged_in
15
When I toggle graphically the setting: ```bash adb shell settings get global stay_on_while_plugged_in ``` ``` 15 ```
Author
Owner
Related to [Benjamin_Loison/Voice_assistant/issues/15](https://codeberg.org/Benjamin_Loison/Voice_assistant/issues/15).
Author
Owner

In the context of the voice assistant need both as while driving the phone is probably charging but under the shower it might not.

In the context of the voice assistant need both as while driving the phone is probably charging but under the shower it might not.
Author
Owner

For the voice assistant I assume that either a decent number of seconds (strictly more than 1) or a proposed option has been selected.

For the voice assistant I assume that either a decent number of seconds (strictly more than 1) or a proposed option has been selected.
Author
Owner

Can't we set a value such that it is always unlocked? In theory can set an arbitrary high number of minutes.

Can't we set a value such that it is always unlocked? In theory can set an arbitrary high number of minutes.
Author
Owner
See [Benjamin_Loison/Voice_assistant/commit/255c5d9e3288e61a22fa00aede3bf2e5d13b76dc](https://codeberg.org/Benjamin_Loison/Voice_assistant/commit/255c5d9e3288e61a22fa00aede3bf2e5d13b76dc).
Author
Owner

So as long as click once on the screen for instance to trigger listening before the screen timeout it is fine.
Even with graphical longest setting of 30 minutes, it means that should not tap to listen for this period of time to be locked out which is a not a so frequent scenario I guess.

So as long as click once on the screen for instance to trigger listening before the screen timeout it is fine. Even with graphical longest setting of 30 minutes, it means that should not tap to listen for this period of time to be locked out which is a not a so frequent scenario I guess.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Benjamin_Loison/adb#32
No description provided.