Skip to content

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

Merged
d4rken merged 10 commits into
mainfrom
acs_missing_screen_data
May 1, 2024
Merged

Automation: Improve reliability one Android 14 devices (OnePlus & Redmi)#1152
d4rken merged 10 commits into
mainfrom
acs_missing_screen_data

Conversation

@d4rken
Copy link
Copy Markdown
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

d4rken added 3 commits April 30, 2024 18:10
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 (ACS) labels Apr 30, 2024
d4rken added 7 commits April 30, 2024 19:24
… 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
@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 (ACS) bug Something isn't working as expected c: AppCleaner c: AppControl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cache cleaning error on some applications OnePlus 11 @ Android 14 does not return screen content via accessibility service

1 participant