mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-04 19:10:47 -05:00
Each tap on the grant screen started its own database write on the IO dispatcher, with nothing ordering them. A grant takes two queries (fetch, then replace) while a revoke takes one, so a quick grant and revoke could run as fetch, delete, replace and leave the app granted while it was shown as not granted. The new state was also computed from the item the UI captured, so two taps before a recomposition both granted. Write in tap order under a Mutex, like SuperuserViewModel does, and toggle the current state of the app. Assisted-by: Claude Opus 5.5