Handle disabled installed apps - #167
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
An unresolved moderate package-change scan issue and dependency-construction findings remain.
Review effort: Lite
Findings: 3
Open (3)
What changed in this PR
This PR adds end-to-end handling for disabled installed Android apps, including UI state, update suppression, stale-status cleanup, paging consistency, and package-change refreshes.
Changes:
- Detects effective enabled state, including
DISABLED_UNTIL_USED. - Hides disabled apps from update actions, notifications, sections, and Open actions.
- Adds disabled-app presentation, broadcast refreshes, snapshot validation, translations, and tests.
Review findings:
- Moderate (1 vote):
PackageRemovedReceiver.ktscans all updated rows on each package change; clear only the changed package. - Nit (4 votes): Require explicit
packageEnableddependencies inWatchListPagingSource.ktandInstalledPagingSource.kt. - Nit (2 votes): Require callers to explicitly pass the enabled state to
IconsResources.kt.
| File | Description |
|---|---|
app/src/test/java/com/anod/appwatcher/watchlist/WatchListPagingSourceRoomTest.kt |
Tests disabled filtering and paging snapshot consistency. |
app/src/test/java/com/anod/appwatcher/watchlist/SectionItemTest.kt |
Updates section-item fixtures. |
app/src/test/java/com/anod/appwatcher/utils/PackageEnabledStateTest.kt |
Tests effective package enabled-state resolution. |
app/src/test/java/com/anod/appwatcher/sync/UpdateCheckVersionRollbackTest.kt |
Tests disabled-app update decisions. |
app/src/test/java/com/anod/appwatcher/details/AppItemStateTest.kt |
Tests disabled-app presentation. |
app/src/test/java/com/anod/appwatcher/database/AppListTableRoomTest.kt |
Updates database row-query fixtures. |
app/src/test/java/com/anod/appwatcher/database/AppListTableQueriesTest.kt |
Tests snapshot ordering. |
app/src/main/res/values/strings.xml |
Adds default disabled-app strings. |
app/src/main/res/values-ru/strings.xml |
Adds Russian disabled-app translations. |
app/src/main/res/values-hu/strings.xml |
Adds Hungarian disabled-app translations. |
app/src/main/java/com/anod/appwatcher/watchlist/WatchListStateViewModel.kt |
Refreshes watchlist state on startup and broadcasts. |
app/src/main/java/com/anod/appwatcher/watchlist/WatchListPagingSource.kt |
Snapshots enabled state during paging. |
app/src/main/java/com/anod/appwatcher/watchlist/WatchListPage.kt |
Renders disabled-app indicators. |
app/src/main/java/com/anod/appwatcher/watchlist/SectionHeaderFactory.kt |
Excludes disabled apps from update sections. |
app/src/main/java/com/anod/appwatcher/watchlist/Section.kt |
Carries enabled state in section items. |
app/src/main/java/com/anod/appwatcher/utils/PackageEnabledState.kt |
Resolves package state and clears stale statuses. |
app/src/main/java/com/anod/appwatcher/sync/UpdateCheck.kt |
Suppresses disabled-app updates and notifications. |
app/src/main/java/com/anod/appwatcher/model/AppListFilter.kt |
Applies enabled-state-aware filtering. |
app/src/main/java/com/anod/appwatcher/installed/PackageRemovedReceiver.kt |
Handles package-change broadcasts. |
app/src/main/java/com/anod/appwatcher/installed/InstalledPagingSource.kt |
Propagates enabled state to installed items. |
app/src/main/java/com/anod/appwatcher/installed/InstalledListViewModel.kt |
Refreshes the installed-app cache. |
app/src/main/java/com/anod/appwatcher/details/DetailsViewModel.kt |
Refreshes package state and controls Open behavior. |
app/src/main/java/com/anod/appwatcher/details/DetailsPanel.kt |
Displays disabled status and hides Open. |
app/src/main/java/com/anod/appwatcher/details/AppItemState.kt |
Computes disabled-app presentation state. |
app/src/main/java/com/anod/appwatcher/database/AppListTable.kt |
Adds snapshot queries and bulk status clearing. |
app/src/main/java/com/anod/appwatcher/compose/IconsResources.kt |
Adds disabled installed-app icon support. |
app/src/main/AndroidManifest.xml |
Registers package-change broadcasts. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
anod
commented
Sep 28, 2026
anod
commented
Sep 28, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

Summary
DISABLED_UNTIL_USED, and represent disabled installed apps with a distinct icon and "Installed but disabled" detailsValidation
.\gradlew.bat :app:testDebugUnitTest :playstore:testAndroidHostTest ktlintCheck --no-daemon --console=plaingit diff --check:app:lintDebugwas also attempted earlier and remains blocked only by the pre-existing missing Hungarian/Russianno_document_providertranslations