Skip to content

Conversation

@d4rken
Copy link
Member

@d4rken d4rken commented Dec 15, 2025

On OxygenOS 15 (and similar ROMs), the "Clear cache" button becomes both non-clickable and disabled when cache is 0 bytes. The automation was timing out because:

  1. findClickableParent() returned null (no clickable parent exists)
  2. The action bailed out early, never calling clickClearCache()
  3. Even when reached, clickClearCache() didn't detect the 0-cache scenario properly

Fixed by:

  • Falling back to the target button when no clickable parent is found
  • Adding detection for 0-cache scenario (button is not clickable AND disabled) in clickClearCache()

The fix distinguishes between:

  • Size calculation: button is clickable but temporarily disabled → retry
  • Zero cache: button is not clickable and disabled → return success

Closes #1889

On OxygenOS 15 (and similar ROMs), the "Clear cache" button becomes
both non-clickable and disabled when cache is 0 bytes. The automation
was timing out because:

1. findClickableParent() returned null (no clickable parent exists)
2. The action bailed out early, never calling clickClearCache()
3. Even when reached, clickClearCache() didn't detect the 0-cache
   scenario properly

Fixed by:
- Falling back to the target button when no clickable parent is found
- Adding detection for 0-cache scenario (button is not clickable AND
  disabled) in clickClearCache()

The fix distinguishes between:
- Size calculation: button is clickable but temporarily disabled → retry
- Zero cache: button is not clickable and disabled → return success

Closes #1889
@d4rken d4rken added c: AppCleaner Automation Accessibility service related (ACS) ROM: OxygenOS OnePlus before ColorOS bug Something isn't working as expected labels Dec 15, 2025
@d4rken d4rken merged commit 85f87ef into main Dec 15, 2025
13 checks passed
@d4rken d4rken deleted the appcleaner-oneplus-empty-caches-1889 branch December 15, 2025 21:14
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 ROM: OxygenOS OnePlus before ColorOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stuck on clearing caches

2 participants