-
-
Notifications
You must be signed in to change notification settings - Fork 50
Alert User of Pending Reboot When Manual Update Check Is Blocked #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 16
Are you sure you want to change the base?
Conversation
…an update is already available and awaiting a reboot to complete installation.
18faa2f
to
3046508
Compare
@haok1402 It would be very helpful to prevent fully disabling System Updater notifications and reboot notifications while still allowing explicitly disabling the others (disabling errors is sketchy but it would need to support automatically retrying before reporting errors at least for automatic updates prior to prevent disabling it). This is done for some other system app notifications but these are easily the most important and should be done for it too. It seems many users try to disable the Already up-to-date notifications or the progress notification and accidentally end up disabling all of them instead. |
@thestinger I believe @haok1402 is traveling and may not be able to respond for a few days. Meanwhile, is it easy to indicate one of the system apps that currently prevents notification disabling? |
It's done for GmsCompat. I'm not sure exactly where. I think there are cases where overall notifications can't be disabled but specific channels can be disabled. |
@thestinger Thanks for the info! I'm interested and will start looking into it. |
I've investigated how GmsCompat handles this and confirmed that it uses fixed notifications, with certain channels marked as blockable — users can't disable notifications entirely but a few specific channels. Based on that, I plan to make and test similar changes to System Updater: mark its notifications as fixed and set the reboot channel as non-blockable. @thestinger Would you prefer these changes as part of this PR (to retain the current discussion/context), or submitted in a new PR that references this one? |
Just as a new fully separate PR. |
I have an implementation that seems to work on the old release. |
This might still be useful since I think there are still ways to clear away the reboot notification despite it being marked persistent, the permission being marked fixed and the channel not being opted into being blockable. |
cddb120
to
0e93954
Compare
@haok1402 Can you rebase it instead of merging? |
@thestinger Yes, fixing it. |
3821d98
to
b6b5c42
Compare
Statically grant Updater permission for "fixed" notifications; set most notifications to be blockable by users, but set notifications on the REBOOT channel to be non-blockable. Some users have gotten "stuck" by disabling the notification to reboot the system to install a new release. Updater can't download and prepare a later release until the previously-prepared release has been installed, so it is important to avoid losing the please-reboot notification.
This worked as intended for most users but caused an unexpected issue blocking changing all of the notification channels for several users. This reverts commit 4e69487.
Description:
This PR improves the system updater by notifying users when they attempt a manual update check while an update is already prepared and awaiting a reboot. Instead of ignoring the user’s tap on the “Check for updates” button, the system now displays an alert, prompting the user to reboot.
Due to the critical nature of System Updater, this proposed change is the smallest imagined code change. If desired, it could be expanded on. For example, it would be possible to store the build number of the pending update and include that in the displayed alert.
Changes:
KEY_WAITING_FOR_REBOOT
wastrue
inside theclickListener
, the update check was ignored without notifying the user.Testing:
Tested on Pixel 6a, 2025032100 release to ensure:
Screenshot from the testing can be found here.
Expected Behavior:
When the user checks for updates:
I am happy to revise and resubmit the code if any changes are desired.
Resolves #101