Hello!

When using Open Camera it stays as foreground activity. When phone in pocket, sometimes, you can press power button and Open Camera appear as foreground activty. This can result in very serious battery drain because unintentionally display will be keept on, with camera active for undefended period of time.

This caused by combination of three settings:

1) System Display Timeout (default 30 seconds, but can be set to 30 minutes)
2) Open Camera show on lock screen option
3) Open Camera keep screen on option

I suggest if combination of these settings are enabled (timeout longer then 30 seconds) then automatically hide foreground Open Camera activity when user manually click power button (turn screen off). As result next time phone will be turned on in pocket, Open camera activity will not be in foreground and device will not drain the battery.

Here is a patch with suggested changes:

 

Last edit: Alexey Kuznetsov 2023-03-15