diff options
Diffstat (limited to 'community/mce/0003-inactivity-Allow-activities-in-lockscreen-mode.-aste.patch')
-rw-r--r-- | community/mce/0003-inactivity-Allow-activities-in-lockscreen-mode.-aste.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/community/mce/0003-inactivity-Allow-activities-in-lockscreen-mode.-aste.patch b/community/mce/0003-inactivity-Allow-activities-in-lockscreen-mode.-aste.patch new file mode 100644 index 00000000000..838a83025e8 --- /dev/null +++ b/community/mce/0003-inactivity-Allow-activities-in-lockscreen-mode.-aste.patch @@ -0,0 +1,58 @@ +From 6a4fad517e311a05a10f87e940faed42d3d9a67d Mon Sep 17 00:00:00 2001 +From: MagneFire <IDaNLContact@gmail.com> +Date: Sun, 7 Mar 2021 22:36:05 +0100 +Subject: [PATCH] inactivity: Allow activities in lockscreen mode. + asteroid-launcher marks the watchface as the lockscreen. When the watchface + is visible taping the screen would not keep the screen awake. + +--- + modules/inactivity.c | 36 +++++++----------------------------- + 1 file changed, 7 insertions(+), 29 deletions(-) + +diff --git a/modules/inactivity.c b/modules/inactivity.c +index 5ac9d19..74bde99 100644 +--- a/modules/inactivity.c ++++ b/modules/inactivity.c +@@ -360,35 +360,13 @@ static bool mia_activity_allowed(void) + goto DENY; + } + +- /* Normally activity does not apply when lockscreen is active */ +- if( submode & MCE_SUBMODE_TKLOCK ) { +- +- /* Active alarm */ +- switch( alarm_ui_state ) { +- case MCE_ALARM_UI_RINGING_INT32: +- case MCE_ALARM_UI_VISIBLE_INT32: +- goto ALLOW; +- +- default: +- break; +- } +- +- /* Active call */ +- switch( call_state ) { +- case CALL_STATE_RINGING: +- case CALL_STATE_ACTIVE: +- goto ALLOW; +- +- default: +- break; +- } +- +- /* Expecting user interaction */ +- if( interaction_expected ) +- goto ALLOW; +- +- goto DENY; +- } ++ /* Allways allow activity when lockscreen is active. ++ * ++ * This allows the lockscreen to be longer visible, ++ * because the blanking timer can be cancelled. ++ */ ++ if( submode & MCE_SUBMODE_TKLOCK ) ++ goto ALLOW; + + ALLOW: + allowed = true; |