aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/java/com/wireguard/android/activity (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rename app module to uiHarsh Shandilya2020-03-096-504/+0
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* MainActivity: Dispatch insets to all fragmentsHarsh Shandilya2020-03-091-1/+3
| | | | | | Fixes tunnel list fragment rendering behind statusbar when other fragments are showing Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* backend: do not depend on anything except configJason A. Donenfeld2020-03-094-19/+19
| | | | | | | | | This is likely broken but should make for a good starting point. It also should hopefully handle stopping tunnels before starting new ones, in the case of the GoBackend. Again, untested. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* MainActivity: Remove unused importsHarsh Shandilya2020-02-281-4/+0
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ModuleLoader: Staticize isModuleLoadedHarsh Shandilya2020-02-281-1/+2
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ThemeChangeAwareActivity: Remove drawable cache busterHarsh Shandilya2020-02-251-35/+0
| | | | | | Shouldn't be needed anymore. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* MainActivity: Fix backstack bug exposed by fragment 1.2.2Harsh Shandilya2020-02-251-0/+1
| | | | | | We've been relying on implicit backstack changes to handle removing the detail fragment for a while which is now gone so let's do this properly like we should Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Cleanup inset dispatch codeHarsh Shandilya2020-02-251-3/+2
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Ensure insets are dispatched to all fragmentsHarsh Shandilya2020-02-251-0/+19
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Port tunnel creation UI from ViscerionHarsh Shandilya2020-02-141-12/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Introduce TunnelToggleActivityHarsh Shandilya2019-12-201-0/+51
| | | | | | | | | | | | | | | | On Android 10, apps cannot start services when they're in the background. This means that starting VpnService from within QuickTileService when the app is not active ends badly. To mitigate this situation, we introduce a proxy activity of sorts that will handle starting VpnService for us. The activity is completely transparent and invisible, and does only four things: - Toggle the tunnel state - Request the Tile bound by QuickTileService to refresh its state - Handle any error that might have been thrown during toggle - Call finishAffinity() and go away Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Download modules after verifying signify signatureJason A. Donenfeld2019-10-141-0/+13
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Revert "Fix activity leak on Android Q"Jason A. Donenfeld2019-10-131-10/+1
| | | | | | | | This reverts commit 489518000971914b2608da43e2146690dcc02cb9. October has arrived. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Activity: make dark/night theme follow system on QJason A. Donenfeld2019-10-122-3/+10
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Fix activity leak on Android QHarsh Shandilya2019-09-271-1/+10
| | | | | | | | | | This workaround was discussed at https://twitter.com/Piwai/status/1169274622614704129 after Google had closed the issuetracker with a WONTFIX at https://issuetracker.google.com/issues/139738913. The situation has since changed with Google promising a fix on October's ASB but since we can't really know, patch this ourselves for the timebeing. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Update copyrightJason A. Donenfeld2019-01-075-5/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Migrate to AndroidXHarsh Shandilya2018-12-185-17/+17
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Auto-format the source directoriesSamuel Holland2018-11-112-5/+6
| | | | | | Blame Jason for writing Java in vim. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: update copyright headersJason A. Donenfeld2018-09-065-9/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* MainActivity: Fix fragment selection logicSamuel Holland2018-07-281-107/+64
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* TunnelDetailFragment now restores state correctly after process deathEric Kuck2018-07-261-6/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Application: use proper completablefuture for backendJason A. Donenfeld2018-07-261-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ThemeChangeAwareActivity: reintroduce cache busterJason A. Donenfeld2018-07-251-0/+37
| | | | | | | This is still needed by certain icons, like the trash icon in the peer editor. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* MainActivity: attempt to fix commit state exceptionsJason A. Donenfeld2018-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* treewide: Optimize importsHarsh Shandilya2018-07-221-4/+0
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* fab: make icons always whiteJason A. Donenfeld2018-07-201-33/+0
| | | | | | | | 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>
* global: Add nullity annotationsEric Kuck2018-07-135-32/+45
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Request VPN permissions on activationEric Kuck2018-07-091-10/+0
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Use instanceOf instead of getClassJason A. Donenfeld2018-07-082-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: move to Apache 2.0Jason A. Donenfeld2018-07-065-5/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* treewide: Optimize importsHarsh Shandilya2018-06-232-4/+0
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* global: supply backend asynchronouslyJason A. Donenfeld2018-06-142-11/+23
| | | | | | | We can't block for IO, so move everything to async workers or to callbacks. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* BaseActivity: styleJason A. Donenfeld2018-06-071-2/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Give Samuel heart attack by removing DaggerJason A. Donenfeld2018-06-073-6/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* MainActivity: Fix styleHarsh Shandilya2018-06-061-5/+2
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* MainActivity: Silence useless warningHarsh Shandilya2018-06-051-0/+4
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* MainActivity: collapse action menu on toolbar touchHarsh Shandilya2018-06-051-0/+9
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* MainActivity: styleJason A. Donenfeld2018-06-051-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* DarkMode: move to shared preferences listenerJason A. Donenfeld2018-06-053-87/+79
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* MainActivity: styleJason A. Donenfeld2018-06-041-1/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* BaseActivity: support android 5 and 6 when clearing drawable cacheJason A. Donenfeld2018-06-041-7/+15
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* BaseActivity: invalidate icon cache on Android PJason A. Donenfeld2018-06-042-15/+15
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* android: Cleanup classesHarsh Shandilya2018-06-021-2/+2
| | | | | | | - Use final modifer wherever possible - Use try-with-resources for input/output streams Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* BaseActivity: flush themed icon cache on theme changeJason A. Donenfeld2018-06-011-0/+18
| | | | | | | | | | The most terrible hack you have ever seen. The drawable cache isn't properly flushed when changing the theme -- a frameworks bug, evidently -- so we work around it by digging deep into the mud. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* theme: add dark theme with toggleJason A. Donenfeld2018-06-012-3/+63
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Support always-on-vpnJason A. Donenfeld2018-05-271-3/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: Cleanup line lengths and misc lint warningsHarsh Shandilya2018-05-091-3/+8
| | | | | | | | | I know we decided to ditch the idea of shutting up "Exception thrown with empty param" warnings but this pesters me too much and we can instead just treat this as a weird future proofing thing if and when we end up needing the exception messages. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* MainActivity: Nip out as early as possible when moving to same fragmentHarsh Shandilya2018-05-091-3/+3
| | | | | | Save the useless logging and fragment manager object creation. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* global: fix up copyrightsJason A. Donenfeld2018-05-034-0/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: Add or update copyright headers in Java codeSamuel Holland2018-05-024-0/+20
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>