mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-04 19:10:47 -05:00
Turning on "Check for updates" didn't request the notification permission, so on Android 13+ the update notifications could never be shown. Instead, every creation of MainActivity, including rotations, requested the permission when the setting was on, and turned the setting off if it was denied, while the settings switch still showed it as on. Request the permission when the setting is turned on, and only enable it when granted. Only request it on startup when the activity is first created, and refresh the switch from the setting when the settings tab resumes. Assisted-by: Claude Opus 5.5