Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automation: Improve reliability one Android 14 devices (OnePlus & Redmi) #1152

Merged
merged 10 commits into from May 1, 2024

Conversation

d4rken
Copy link
Member

@d4rken d4rken commented Apr 30, 2024

Stop using the root from accessibility events as fallback if rootInActiveWindow is null.
Delayed event emission can leave us with an out-dated (and later recycled) root node being used by the StepProcessor.

Error behavior:

  • Click event (e.g. clear cache being clicked) from app 1 is emitted when SD Maid starts processing app 2
  • windowRoot of app 2 is not ready yet
  • SD Maid starts using fallback root from the last event (the click event from app 2)
  • The fallback root is no longer valid, as it corresponds to the settings screen from app 1
  • SD Maids keeps retrying and the fallback root is at some point recycled
  • SD Maid keeps trying to crawl an empty root

Fixes #1124
Might fix #1016

Stop using the root from accessibility events as fallback.
Delayed event emission can lead to an out-dated (and later recycled) root being used by the step-process.

Error behavior:

* Click event from app 1 is emitted when SD Maid starts processing app 2
* windowRoot of app 2 is not ready yet
* SD Maid starts using fallback root from the last event (the click event from app 2)
* The fallback root is no longer valid, as it corresponds to the settings screen from app 1
* SD Maids keeps retrying and the fallback root is at some point recycled
* SD Maid keeps trying to crawl an empty root nodef

Fixes #1124
Might fix #1016
@d4rken d4rken added bug Something isn't working as expected c: AppCleaner Automation Accessibility service related labels Apr 30, 2024
… and we previously didn't notice this not working because of the default flags, let's null the defaults to make this error case more obvious.

This might also make the accessibility service less intrusive as the defaults will mean less info is provided when there is no automation task active in SD Maid.
@d4rken d4rken merged commit 643a7db into main May 1, 2024
16 checks passed
@d4rken d4rken deleted the acs_missing_screen_data branch May 1, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Automation Accessibility service related bug Something isn't working as expected c: AppCleaner c: AppControl
Projects
None yet
1 participant