Skip to content

Automation: Cancel automation if the screen becomes unavailable - #720

Merged
d4rken merged 1 commit into
mainfrom
lockscreen_cancel
Oct 13, 2023
Merged

Automation: Cancel automation if the screen becomes unavailable#720
d4rken merged 1 commit into
mainfrom
lockscreen_cancel

Conversation

@d4rken

@d4rken d4rken commented Oct 13, 2023

Copy link
Copy Markdown
Member

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.

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 d4rken added enhancement New feature, request, improvement or optimization c: AppCleaner Automation Accessibility service related (ACS) labels Oct 13, 2023
@d4rken
d4rken merged commit df7cdb3 into main Oct 13, 2023
@d4rken
d4rken deleted the lockscreen_cancel branch October 13, 2023 22:28
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.

Pause ACS operations while lockscreen is active?

1 participant