Repository navigation
Notify updates for disabled installed apps - #173
Merged
Merged
Conversation
Keep STATUS_UPDATED for sleeping/disabled apps so new releases are notified once, while UI keeps showing disabled status via existing isPackageEnabled gating. Gate notification Update action on enabled installs and remove disabled-status clearing on startup, sync, and package broadcasts. Fixes #171 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Disabled-only multi-app notifications lose their expanded list and Dismiss action.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Preserves update notifications for disabled installed apps while keeping them excluded from actionable update UI.
Changes:
- Removes disabled-app update-status clearing.
- Propagates package-enabled state into notification actions.
- Updates sync, paging, notification, and presentation tests.
| File | Description |
|---|---|
AppListTable.kt |
Removes obsolete status-clearing queries. |
PackageRemovedReceiver.kt |
Stops clearing updates on package broadcasts. |
SettingsViewModel.kt |
Supplies enabled state to test notifications. |
SyncNotification.kt |
Gates device-update actions by enabled state. |
UpdateCheck.kt |
Restores normal update decisions for disabled apps. |
UpdatedApp.kt |
Adds enabled state and update capability. |
PackageEnabledState.kt |
Removes disabled-status clearing helpers. |
WatchListStateViewModel.kt |
Removes startup status clearing. |
AppItemStateTest.kt |
Verifies disabled-app styling. |
UpdateCheckVersionRollbackTest.kt |
Covers restored sync decisions. |
SyncNotificationFilterTest.kt |
Covers disabled-app notification filtering. |
WatchListPagingSourceRoomTest.kt |
Covers disabled and re-enabled UI behavior. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Only gate the Update action on canUpdateOnDevice so notifications for disabled apps still list app titles and offer Dismiss. Cover repeat notification prevention for marked sleeping app updates. 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.

After #167, updates for disabled/sleeping installed apps were silently consumed during sync, so users never got notified about new releases of apps their system put to sleep (#171). This keeps detecting and notifying those updates while the UI continues to show the app as "Installed but disabled" rather than updatable.
Approach
STATUS_UPDATEDand advances the cachedversionNumber, so it is notified once and later syncs don't repeat it. TheCLEAR_DISABLED_UPDATE/DISABLED_INSTALLEDdecisions are removed.isPackageEnabled, so disabled apps still show the disabled label and are not listed as updatable. Re-enabling the app reveals the existing update without a new notification.UpdatedAppgets an explicitinstalledEnabled(no default) andcanUpdateOnDevice. The "Update" action is only offered when the app is installed and enabled.Notes
Tests
Updated/added cases in
UpdateCheckVersionRollbackTest,SyncNotificationFilterTest,WatchListPagingSourceRoomTestandAppItemStateTest. Full:app:testDebugUnitTestandktlintCheckpass.Fixes #171