mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 21:55:10 +00:00
Added a new KdeConnect Application class that holds the Devices now, while BackgroundService "only" takes care of the LinkProviders. Since KdeConnect subclasses Application we have the guarantee that it will exist as long as our process does, so we can use it as a singleton. This removes the "BackgroundService.RunCommand" hack (which sent an Intent that would awake BackgroundService in case it wasn't running already and then call our code in a callback). This saves lots of round trips between the system and us and makes things simpler (and stack traces useful) by making the code sequential. We already had an Application subclass that I moved to a new helper, which now the KdeConnect class initializes together with all the other helpers.