Repository navigation
Conversation
jawzf
force-pushed
the
feat/011-device-care-action
branch
from
October 23, 2026 12:30
2d8ed8b to
ec88e79
Compare
New System action that clears all apps' caches (pm trim-caches) and closes idle user apps' background processes (am kill) through Shizuku or root. It skips Essentials, the launcher, the keyboard, Shizuku and apps FreezeManager sees as active, then shows a toast with the space freed. Both steps can be switched off in the action's settings sheet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jawzf
force-pushed
the
feat/011-device-care-action
branch
from
October 25, 2026 09:53
ec88e79 to
e1e0ce8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a Device care action to DIY automations, under System actions next to Send notification. It cleans up the device in one step and needs Shizuku or root.
Before: there was no way to clear app caches or close background apps without picking a list of apps (App Freezing).
After: add Device care to any automation (for example, Screen on or Charging), with two switches in its settings:
pm trim-caches). Apps rebuild them as needed.am kill). It skips Essentials, the default launcher, the current keyboard, Shizuku, and appsFreezeManager.isAppActivesees as in use (foreground, playing media, ongoing notification).am killnever touches foreground apps or foreground services, and unlikeforce-stopit leaves the app's alarms, jobs and notifications alone. System apps aren't touched.When it finishes, a toast shows the space freed, e.g. "Device care: 23 MB freed". Save is disabled with both switches off. With only one switch on, the action row shows "Device care · Clear app caches" or "Device care · Close background apps".
How:
Action.DeviceCareis a configurable action likeSendNotification, saved through the existingActionGsonAdapter.DeviceCare.runruns both steps throughShellUtilsoff the main thread, sending all the kills as one shell command. The action declaresSHIZUKU/ROOT, so the editor shows the existing permission sheet when access is missing, andexecuteAllreports it at run time.Type of change
UI changes
The Device care settings sheet.
The toast after a run.
Checklist
develop(notmain)../gradlew assembleDebug(andassembleRelease)../gradlew testDebugUnitTest(2 new tests inActionListJsonTest: round trip, and a bare{"type":"DeviceCare"}loads with both options on).EssentialsBottomSheet,RoundedCardContainer,IconToggleItem, the existing permission sheet andFreezeManager.isAppActive.strings.xml(English only); icons arerounded_*drawables.FeatureRegistry.kt.🤖 Generated with Claude Code