summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java
AgeCommit message (Collapse)Author
2018-08-26Extract error messages to string resourcesHarsh Shandilya
Useful for validation errors and localisation later on Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-08-26MonkeyedSnackbar: removeJason A. Donenfeld
This didn't actually help with much and caused problems. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-08-16config: fix wrong Peer endpoint string formatZhao Gang
When a tunnel is running, saving the tunnel's config with an IPv6 address endpoint like [::1]:42 would result in the wrong format ::1:42. This patch fixes it. For endpoints with an IPv6 address(e.g. [::1]:42). Since the default endpoint InetSocketAddress is created unresolved, getEndpointString() returns "[::1]:42" (InetSocketAddress.getHostString() returns the literal hostname). After the endpoint is resolved, getEndpointString() returns "::1:42" (InetSocketAddress.getHostString() returns the IPv6 address without the square brackets). This inconsistent return values caused the above mentioned bug. With this patch, function getEndpointString would return the right format string whether the endpoint is resolved or not. Signed-off-by: Zhao Gang <gang.zhao.42@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-30FloatingActionsMenu: don't wrap context on asus api 21Jason A. Donenfeld
Works around frameworks bug. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-30Show different color for multiselectionJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-29MonkeyedSnackbar: fix typosJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-29MonkeyedSnackbar: work around Harsh's broken phoneJason A. Donenfeld
I think I'd probably like to revert this, since presumably there's a good reason in the first place why the support lib disables animations when accessibility services are turned on? Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-29FloatingActionButtonBehavior: animate transitionsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-29Roll back to API 27 for nowJason A. Donenfeld
There's no source available for API 28, which is a pain. But this commit should be reverted whenever source is released. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-29Target API 28Jason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-29TunnelListFragment: show selected tunnelJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-29TunnelListFragment: fix multiselection on rotationJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-29FloatingActionButonBehavior: set translation back to 0 when snackbar diesJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-28MainActivity: Fix fragment selection logicSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-07-28Application: refuse to run on old androidJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-28QuickTileService: fix bug the wrong wayJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-27config: show more informative error message on wrong keyJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-26Set ACRA install sourceJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-26TunnelDetailFragment now restores state correctly after process deathEric Kuck
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-26Application: use proper completablefuture for backendJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-26Wire up ACRAJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-26FloatingActionBehaviour: Adjust constructorsHarsh Shandilya
Get these in line with the parent class Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-07-25ThemeChangeAwareActivity: reintroduce cache busterJason A. Donenfeld
This is still needed by certain icons, like the trash icon in the peer editor. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-25MainActivity: attempt to fix commit state exceptionsJason A. Donenfeld
This is an attempt to fix: java.lang.IllegalStateException: at android.support.v4.app.FragmentManagerImpl.checkStateLoss (FragmentManager.java:2053) at android.support.v4.app.FragmentManagerImpl.enqueueAction (FragmentManager.java:2079) at android.support.v4.app.BackStackRecord.commitInternal (BackStackRecord.java:678) at android.support.v4.app.BackStackRecord.commit (BackStackRecord.java:632) at com.wireguard.android.activity.MainActivity.moveToState (MainActivity.java:58) at com.wireguard.android.activity.MainActivity.onSelectedTunnelChanged (MainActivity.java:157) at com.wireguard.android.activity.BaseActivity.setSelectedTunnel (BaseActivity.java:75) at com.wireguard.android.fragment.BaseFragment.setSelectedTunnel (BaseFragment.java:82) at com.wireguard.android.fragment.TunnelListFragment.lambda$null$4$TunnelListFragment (TunnelListFragment.java:307) at com.wireguard.android.fragment.TunnelListFragment$$Lambda$4.onClick (Unknown Source:6) at android.view.View.performClick (View.java:6274) at android.view.View$PerformClick.run (View.java:24729) at android.os.Handler.handleCallback (Handler.java:789) at android.os.Handler.dispatchMessage (Handler.java:98) at android.os.Looper.loop (Looper.java:169) at android.app.ActivityThread.main (ActivityThread.java:6595) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:240) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:767) But this is probably the wrong way to fix it and instead moveToState needs to be reimagined. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-25TunnelEditorFragment: plug memory leak on listenersJason A. Donenfeld
Apparently these don't get GC'd unless they're removed explicitly, because there's a global singleton registry of them. So, introduce a little registry of our own. Reported-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-25qrcode: minor adjustmentsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-25Added QR code scanner as tunnel import methodEric Kuck
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-24config: Remove Locale based string formatHarsh Shandilya
The configurations are supposed to be in a very specific format which is not user-facing and hence doesn't have to be adjusted for locale avoiding both the redundancy as well as potential breakages in the configuration file format from different locales. Fixes: 71c67aa24ae2 ("config: Minor cleanup") Reported-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-07-24tools: pass in debug package nameJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-22FloatingActionsMenuRecyclerViewScrollListener: add final modifiersJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-22treewide: Optimize importsHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-07-20fab: move in direct ratio to scrollJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-20fab: make icons always whiteJason A. Donenfeld
With the new shade of blue, perhaps this simply looks better. I don't like hard coding the color away from the theme, however. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-20TunnelListFragment: Allocate interpolators outside scroll listenerHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-07-19TunnelEditorFragment: fix null pointer dereferenceJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-19QuickTileService: fix null pointer dereferenceJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-18TunnelListFragment: setOnScrollListener is old, but we support API 21, so we ↵Jason A. Donenfeld
have to use it Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-18AppListDialogFragment: getArguments is null before onCreateJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-18fab: use auto calculated fling thresholdJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-18fab: make fab respond to recyclerview scroll eventsHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-07-18fab: slide fab up when a snackbar showsHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-07-16android: QuickTileService: Do not use slashed icon on Android PHarsh Shandilya
Android P features circle masked QS tiles which make use of colors to denote STATE_ACTIVE/STATE_INACTIVE rather than a slash across the drawable as seen on Android Oreo. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-07-16InetAddresses: unwrap reflection exceptionsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-16android: TunnelListFragment: Annotate parameter to match super methodHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-07-13BaseFragment: do not allow tunnel to be nullJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-13config: dns servers can be nullJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-13config: make loadData privateJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-13TunnelEditorFragment: binding might be nullJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-13QuickTileService: show intermediate state when changingJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-13global: Add nullity annotationsEric Kuck
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>