I maintain an Android app that monitors elderly people and emails their family if something looks wrong. It runs a foreground service 24/7, and the single most important thing it does at install time is get added to the battery-optimisation whitelist - the one behind PowerManager.isIgnoringBatteryOptimizations() . On my Honor device running MagicOS 9.0, I did a fresh new install. I did everything right during setup. Tapped "Don't optimise." Enabled autostart. Finished onboarding. All looked good. I opened the app a few times, closed it. Normal behavior. People will open it, see that it works, close it. They will wake up, out of curiosity, they will open it, then close it. A few hours later, I received an email: Battery optimisation is blocking the app. Please open Settings and set it back to "Don't optimize." I opened the OS settings and all looked good there. They were correct.…