Commit Graph

1450 Commits

Author SHA1 Message Date
Jason A. Donenfeld
5944efc13c QuickTileService: show toast for longer and use right messages
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-08 20:30:25 +01:00
Jason A. Donenfeld
7645ea15c4 global: Prefix tags with WireGuard/
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-08 20:29:51 +01:00
Jason A. Donenfeld
31ba7e6593 RootShell: multiplex commands
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-08 19:46:51 +01:00
Samuel Holland
ae2068dc16 Port over remaining error handling
This doesn't really belong here, but there's no sense in throwing it
away--even here, it's a minor optimization.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08 04:34:28 -06:00
Samuel Holland
c4e91f8040 Handle tunnel state change errors appropriately
This class should probably be renamed and moved, but I don't know to
what or where.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08 04:33:54 -06:00
Samuel Holland
c40555c1bd TunnelListFragment: Fix crash on deleting multiple tunnels
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08 04:31:30 -06:00
Samuel Holland
b6ed17884f ToggleSwitch: Improve reliability
It's not great, but it's better than it was.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08 04:31:04 -06:00
Samuel Holland
668d90f063 WgQuickBackend: Improve error handling
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08 04:25:15 -06:00
Samuel Holland
ec81014c4e Tunnel: Add a State factory method
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08 04:25:15 -06:00
Samuel Holland
d645d69847 project: Global cleanup
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08 02:19:13 -06:00
Samuel Holland
88e30431cb Application: Remove unneeded exported component
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08 00:35:35 -06:00
Samuel Holland
08cca56388 ToolsInstaller: Extract to its own classes
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08 00:34:55 -06:00
Samuel Holland
1f30e133d6 TunnelManager: Simplify save/resume methods
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 21:52:14 -06:00
Samuel Holland
4a3d68bb7d BaseActivity: Make variable names consistent
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 21:51:55 -06:00
Samuel Holland
1fd9547f6a TunnelManager/QuickTileService: Remember last used tunnel
This is actually a bit simpler than having a manually-selected "primary"
tunnel, and is hopefully easier for the user.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 21:50:43 -06:00
Samuel Holland
38b2aafce8 Remove primary configuration preference
It is no longer used.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 21:46:41 -06:00
Samuel Holland
16c0b5b15a FileConfigStore: Move function returns outside try blocks
This makes more clear what things can throw exceptions, and the
functions' control flow.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 20:33:39 -06:00
Samuel Holland
0ab3e29432 Tunnel: Remove UNKNOWN state
It's never used.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 20:33:07 -06:00
Samuel Holland
11f851abf8 Move bundle keys where they are used
This both clarifies and simplifies the code.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 20:32:01 -06:00
Samuel Holland
cef97b990e WgQuickBackend: Prefer ArrayList over LinkedList
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 01:45:27 -06:00
Samuel Holland
e01813487f app: Upgrade to build tools version 27.0.3
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 01:33:11 -06:00
Samuel Holland
137325d3cc ConfigEditorFragment: Support renaming tunnels
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 01:23:08 -06:00
Samuel Holland
30396b8718 model: Allow renaming tunnels
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 01:22:31 -06:00
Samuel Holland
e70b242c01 model: Remove confusing uses of completion chaining
This looks like the builder pattern, but isn't.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 00:41:47 -06:00
Samuel Holland
77fdd7c883 TunnelListFragment: Name a CompletionStage what it is
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 00:26:08 -06:00
Samuel Holland
1862ff0bbe Tunnel: The name passed to isNameValid is never null
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 00:25:49 -06:00
Samuel Holland
2f5494d47c ConfigEditorFragment: Ensure localName is never null
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 00:25:33 -06:00
Samuel Holland
be8b6017d5 Make TunnelManager the point of asynchronicity
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 00:24:56 -06:00
Samuel Holland
5a2f692d73 TunnelManager: Sort tunnels case-insensitively
The second comparator is required to allow multiple tunnels that differ
only in case.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 23:45:49 -06:00
Samuel Holland
536c6958fc SortedKeyedList...: Support arbitrary comparators
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 23:44:34 -06:00
Samuel Holland
4f2b6bef84 Keyed...: Rename all the things
Hooray for diamond interface inheritance.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 23:07:17 -06:00
Samuel Holland
4d38993832 project: Minor cleanups
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 22:14:10 -06:00
Samuel Holland
22bdffcecd model: Proxy all async work through the TunnelManager
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 06:30:41 -06:00
Samuel Holland
2315a699fb TunnelManager: Enumerate running tunnels only once
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 05:20:11 -06:00
Samuel Holland
df7d18fb5d Tunnel: Require passing a state to the constructor
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 05:18:34 -06:00
Samuel Holland
1c2239ae91 Backend: Add a function to enumerate running tunnels
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 05:18:34 -06:00
Samuel Holland
2543f28274 MainActivity: Fix ActionBar after rotation
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 05:18:34 -06:00
Samuel Holland
2206dfc432 TunnelDetailFragment: Allow copying peer public keys
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 05:18:34 -06:00
Samuel Holland
193de10972 TunnelDetailFragment: Remove state text and last change
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 05:18:34 -06:00
Samuel Holland
dbed7155d6 activity: Remove useless indirection
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 05:18:34 -06:00
Samuel Holland
63efaa2dcc databinding: Collection classes use generic E
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 04:09:30 -06:00
Samuel Holland
5f09afbc16 databinding: Simplify method signature
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 04:09:30 -06:00
Samuel Holland
6eef4093d8 databinding: Remove unused classes and methods
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 04:09:30 -06:00
Samuel Holland
ff0bb081a0 Convert the list of tunnels to a KeyedObservableList
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 04:09:30 -06:00
Samuel Holland
c73287f64b databinding: Add an adapter for the KeyedObservableList
This adapter actually finally implements stable IDs correctly.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 04:09:30 -06:00
Samuel Holland
e24654ce7c util: Add a keyed list class and a sorted variant
This is inspired by C#'s KeyedCollection. The sorted variant removes the
need for an observable SortedMap.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 04:09:30 -06:00
Samuel Holland
58eedfd6d9 TunnelManager: Clear primary tunnel when it's removed
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 04:09:30 -06:00
Samuel Holland
609194fae2 Serviceless rewrite, part 1
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 04:09:29 -06:00
Samuel Holland
4c0869393e Rename package widgets -> widget
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 04:08:01 -06:00
Samuel Holland
b7196e328a Rename package bindings -> databinding
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 04:08:01 -06:00