Commit Graph

395 Commits

Author SHA1 Message Date
Jason A. Donenfeld
ebe3297c83 libwg-go: ensure local Go instance is patched
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-05-09 17:33:36 +02:00
Samuel Holland
7f6c861fd6 mipmap: Fix formatting of launcher icon XML
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-05-05 10:11:35 -05:00
Harsh Shandilya
58b9a88bcb styles: Fixup CAB background color
Long pressing any list item entry would cause the action bar to
use the dark color from the parent theme -- fix that.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-05-05 10:11:20 -05:00
Harsh Shandilya
e4eac7a3cf drawables: Introduce material iconography
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-05-05 10:11:14 -05:00
Harsh Shandilya
55ec3046d1 styles: Propagate WireGuard blue in UI
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-05-05 10:08:49 -05:00
Harsh Shandilya
6bd4f7495d styles: Propagate WireGuard red in UI
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-05-05 10:08:24 -05:00
Harsh Shandilya
fd571c53ce TunnelEditor: Add toast messages to success events
Letting the user know that the operation went successfully
via visual cues is a nice UX touch.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-05-05 10:08:14 -05:00
Jason A. Donenfeld
5ed36d7346 wireguard-go: bump submodule
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-05-05 06:09:45 +02:00
Harsh Shandilya
37413f2fb4 TunnelEditor: Remove unused parameter
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-05-03 23:49:14 -05:00
Harsh Shandilya
59aa3035a8 ui: Use a proper CardView based layout
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-05-03 23:45:03 -05:00
Jason A. Donenfeld
46b374cf25 tools: include libmnl paths after system paths for ndk 17
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-05-03 19:15:09 -05:00
Jason A. Donenfeld
b276833b33 config: loosen parser to match reality
Mid-line comments, mixed case.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-05-03 19:15:09 -05:00
Jason A. Donenfeld
f77eac6796 global: fix up copyrights
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-05-03 19:15:09 -05:00
Samuel Holland
e8d8d5dc29 Keypair: Minimize the scope of warning suppression
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-05-02 10:31:25 -05:00
Samuel Holland
3e8d457501 KeyEncoding: Address lints/warnings and match line length
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-05-02 10:31:25 -05:00
Samuel Holland
aa92c4a9d5 global: Add or update copyright headers in Java code
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-05-02 10:31:25 -05:00
Harsh Shandilya
24572aa861 global: Some more lint cleanup
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-05-02 17:14:35 +02:00
Jason A. Donenfeld
cb6681b15a drawable: add adaptive icon
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-05-02 07:19:05 +02:00
Jason A. Donenfeld
a46b2eb9e5 libwg-go: avoid phony target and update go
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-05-02 06:02:15 +02:00
Harsh Shandilya
a77ff1627d wg-build: Update gradle build files
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-05-02 03:40:02 +02:00
Harsh Shandilya
96ebf4cd51 libwg-go: Ignore go{path,root}
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-05-02 03:40:02 +02:00
Samuel Holland
691d8a34a0 project: Import select Android Studio configuration files
Having a consistent set of code style and inspection rules makes it
easier for contributors to match the existing code.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-05-01 16:31:21 -05:00
Jason A. Donenfeld
92fc1dbac8 libwg-go: do not deadlock on Close
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-05-01 17:48:59 +02:00
Jason A. Donenfeld
997138cd22 Version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-30 23:11:32 +02:00
Jason A. Donenfeld
ba1b6c7095 ZipExporterPreference: account for directory already existing
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-30 19:55:06 +02:00
Samuel Holland
843003f436 global: Clean up Java
Address Java and Android lints.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-04-30 11:50:21 -05:00
Samuel Holland
8e4fb91a28 global: Clean up XML
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-04-30 11:39:23 -05:00
Samuel Holland
7eedf08d4b global: Automatic code formatting
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-04-30 11:39:12 -05:00
Samuel Holland
e2636320b7 app: Sort dependencies
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-04-30 11:38:15 -05:00
Samuel Holland
a481aa244c project: Update gradle files
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-04-30 11:38:15 -05:00
Jason A. Donenfeld
6ce739f01f libwg-go: use system Go when possible
We're still maybe curlzipping and using a binary distribution of Go, but
at least this is only the case on machines that don't have go.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-30 18:19:37 +02:00
Jason A. Donenfeld
05b4e395a9 Tunnel importer: stricter file filters
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-30 17:37:34 +02:00
Jason A. Donenfeld
65ca5979d2 proguard: enable
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-30 16:57:57 +02:00
Jason A. Donenfeld
3c84db7788 Preferences: use v14 material style
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-30 15:35:21 +02:00
Jason A. Donenfeld
a47ddf57d1 ZipExporterPreference: requireNonNull is redundant
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-30 15:12:49 +02:00
Harsh Shandilya
f9d68185e2 wg: Collapse fab when pressing back before exiting
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-04-30 17:33:24 +05:30
Harsh Shandilya
f1fa46829d SettingsActivity: Migrate permissions check to AppCompat
Pretty straightforward, I was clearly overthinking this.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-04-30 17:30:25 +05:30
Harsh Shandilya
a6e530049c ZipExporterPreference: Correctly get preference activity
In AppCompat based preferences, this#getContext returns an
object of android.view.ContextThemeWrapper class from where
we can safely extract a reference to our parent activity.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-04-30 17:30:25 +05:30
Harsh Shandilya
77c0d4dfa6 TunnelListFragment: Use Collections methods in place of Arrays
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-04-30 17:30:25 +05:30
Harsh Shandilya
7e415a62c7 wg: Break out crossport dependency
Replace all crossport uses with upstream design
support library components.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-04-30 17:30:25 +05:30
Harsh Shandilya
431b75be15 wg-build: Upgrade databinding library to 3.1.2
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-04-30 17:30:24 +05:30
Harsh Shandilya
fe4cc22ca0 SettingsActivity: Gracefully exit when options menu home is pressed
This is an activity, so it does not join the fragment backstack, but
instead piles on top

SettingsActivity
| -> MainActivity
| -> EditorFragment
| -> DetailFragment
| -> ListFragment

Without overriding the back button in the toolbar, it simply
kills the entire state on MainActivity and causes it to reload.
By calling finish() on the activity when home is pressed from the
item menu we can silently make it die without affecting any underlying
states held by MainActivity and instead return to the exact fragment
we launched settings from.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-04-30 17:30:24 +05:30
Harsh Shandilya
4fc1e61a83 SettingsActivity: Define preferenceTheme for AppCompat
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-04-30 17:30:24 +05:30
Harsh Shandilya
e7e571a301 wg: Migrate menu visibility to AppCompat
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-04-30 17:30:24 +05:30
Harsh Shandilya
425d194e4f wg: Add and use dummy AppTheme
Preparation for when the app will start carrying
colors reflecting the WireGuard brand.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-04-30 17:30:24 +05:30
Harsh Shandilya
4ec0b3a908 Prefer AppCompat classes
AppCompat is the preferred way to go for any app targetting
a wider range of SDKs.

Replace all activities and fragments with their AppCompat
variants and fixup method calls to use support variants.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-04-30 17:30:24 +05:30
Harsh Shandilya
af57824c14 wireguard: Extract dependency versions to ext struct
Maintain common versions in a single place

Also upgraded the support library to 27.1.1 and
databinding library to 3.1.1.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-04-30 17:30:24 +05:30
Jason A. Donenfeld
596904977a TunnelDetailFragment: rewrite and simplify
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-30 05:29:54 +02:00
Jason A. Donenfeld
73b0c4ea81 TunnelEditorFragment: rewrite and simplify
This should remove some null pointer dereferences and overall make the
thing more robust.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-30 05:29:54 +02:00
Jason A. Donenfeld
622f41f11f Allow exporting to zip file
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-29 07:53:56 +02:00