mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
ffd8cd059c
The past few Android releases have been adding restrictions to what services are allowed to do, for the sake of stopping services from using up too much battery in the background. The IntentService class, which GameFileCacheService uses, was even deprecated in Android 11 in light of this. Typically, the reason why you would want use a service instead of using a simple thread or some other concurrency mechanism from the Java standard library is if you want to be able to run code in the background while the user isn't using your app. This isn't actually something we care about for GameFileCacheService -- if Android wants to kill Dolphin there's no reason to keep GameFileCacheService running -- so let's make it not be a service. I'm changing this mainly for the sake of future proofing, but there is one immediate (minor) benefit: Previously, if you tried to launch Dolphin from Android Studio while your phone was locked, the whole app would fail to launch because launching GameFileCacheService wasn't allowed because Dolphin wasn't considered a foreground app. |
||
---|---|---|
.. | ||
src/main | ||
.gitignore | ||
build.gradle | ||
proguard-rules.pro |