Skip to content

AppCleaner: If the lock screen becomes active, hide the overlay until the lockscreen is dismissed - #685

Merged
d4rken merged 2 commits into
mainfrom
acs_lockscreen_detection
Oct 7, 2023
Merged

AppCleaner: If the lock screen becomes active, hide the overlay until the lockscreen is dismissed#685
d4rken merged 2 commits into
mainfrom
acs_lockscreen_detection

Conversation

@d4rken

@d4rken d4rken commented Oct 2, 2023

Copy link
Copy Markdown
Member

This fixes the issue that some users were not able to dismiss their lockscreen while the overlay was active, but they were also not able to dismiss the overlay.

d4rken added 2 commits October 2, 2023 14:39
…interaction

Some users have reported trouble with stopping SD Maid when the lock-in screen became active.
…interaction

Some users have reported trouble with stopping SD Maid when the lock-in screen became active.
@d4rken d4rken added enhancement New feature, request, improvement or optimization c: AppCleaner Automation Accessibility service related (ACS) labels Oct 2, 2023
@d4rken
d4rken merged commit 63f5fc2 into main Oct 7, 2023
@d4rken
d4rken deleted the acs_lockscreen_detection branch October 7, 2023 20:16
d4rken added a commit that referenced this pull request Oct 13, 2023
Operations that use the accessibility service may obstruct the user.
In some cases the lockscreen prevented the user from canceling.
So #685 disabled the overlay if the screen is unavailable, e.g. the lockscreen is active.

This change goes a step further.
The overlay is still hidden if the screen becomes unavailable, but we will also throw a special Exception that should propagate up the stack and cancel the whole operation.

So to stop the automation, turning off the screen is enough.
The automation itself keeps the screen from timing-out, so this should only happen if the user manually presses the power button.

Also see #692.

Closes #686

A "pause" option would be inappropriate here, screen becoming unavailable is an exceptional state.
d4rken added a commit that referenced this pull request Oct 13, 2023
Operations that use the accessibility service may obstruct the user.
In some cases the lockscreen prevented the user from canceling.
So #685 disabled the overlay if the screen is unavailable, e.g. the lockscreen is active.

This change goes a step further.
The overlay is still hidden if the screen becomes unavailable, but we will also throw a special Exception that should propagate up the stack and cancel the whole operation.

So to stop the automation, turning off the screen is enough.
The automation itself keeps the screen from timing-out, so this should only happen if the user manually presses the power button.

Also see #692.

Closes #686

A "pause" option would be inappropriate here, screen becoming unavailable is an exceptional state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Automation Accessibility service related (ACS) c: AppCleaner enhancement New feature, request, improvement or optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant