Commit Graph

7 Commits

Author SHA1 Message Date
Samuel Holland
2e3daa8913 ProfileActivity: Extract base class for fixing fragments
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-09 03:23:25 -05:00
Samuel Holland
81ab643d2b ProfileList: Convert to a fragment
This is required for a future two-fragment tablet layout, and simplifies
the code a bit since the profile detail (view/edit) will be implemented
as fragments anyway.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-04 12:24:18 -05:00
Samuel Holland
773190f57d ProfileService: Add a listener to start it on boot
This will allow automatically starting profiles on boot.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-30 02:01:38 -05:00
Samuel Holland
c65ac9fafe ProfileService: Create it and move profile loading
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>
2017-07-30 01:48:57 -05:00
Samuel Holland
7ceafaf2bb ProfileList: Add minimal activity
For now, it simply reads the files in the app's data directory with
file names ending in ".conf" and displays them in a list.

This includes the generic list data binding setup for future use.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-29 06:09:55 -05:00
Samuel Holland
5a82ecf18a icon: Use the uncropped logo for the non-round icon
The round icon remains the same.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-30 22:47:24 -05:00
Samuel Holland
56cf8816d3 project: Create empty project with WireGuard icon
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-28 23:10:37 -05:00