Android 15 has improved its implementation of while-in-use foreground service restrictions, so the experience will now be degraded. It is no longer possible to toggle the torch state on the lock screen without unlocking the device and the quick settings panel will now be closed after every action. There is no way to work around this.
Starting the TorchService is now done by laundering the foreground service start through a UI-less activity. It's possible this will be patched in futures versions of Android, but for now, it works fine. Other than the notification panel closing, there is no UI jank at all.
This commit also drops support for Android 12 through 14. It's too painful to try to maintain the Android 14 and Android 15 workarounds at the same time. Dropping Android 14 support drastically simplifies the service logic. Users on older Android versions should stick with PixelLight 1.0 anyway, due to the better user experience.
Android 15 has improved its implementation of while-in-use foreground service restrictions, so the experience will now be degraded. It is no longer possible to toggle the torch state on the lock screen without unlocking the device and the quick settings panel will now be closed after every action. There is no way to work around this.
Starting the TorchService is now done by laundering the foreground service start through a UI-less activity. It's possible this will be patched in futures versions of Android, but for now, it works fine. Other than the notification panel closing, there is no UI jank at all.
This commit also drops support for Android 12 through 14. It's too painful to try to maintain the Android 14 and Android 15 workarounds at the same time. Dropping Android 14 support drastically simplifies the service logic. Users on older Android versions should stick with PixelLight 1.0 anyway, due to the better user experience.
Closes: #3