c65ac9fafe
The long-running service is needed for keeping track of which profiles are enabled, for showing notifications, and for the tile service to use. Since it has to know which profiles exist anyway, moving the main ObservableList there avoids some code duplication. It ensures the list is only loaded once, so it cannot get out of sync. It also makes the ProfileList activity load faster, because it doesn't have to wait for file I/O; and it provides a canonical place for storing the Profile objects so they are accessible everywhere, instead of having to look them up by name. This does present some challenges with leaking activities, because all listeners must be removed from the profiles list (and its contents) when an activity is stopped. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> |
||
---|---|---|
.. | ||
src/main | ||
build.gradle | ||
proguard-rules.pro |