aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.java (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remodel the ModelSamuel Holland2018-12-081-84/+31
| | | | | | | | | | | | - The configuration and crypto model is now entirely independent of Android classes other than Nullable and TextUtils. - Model classes are immutable and use builders that enforce the appropriate optional/required attributes. - The Android config proxies (for Parcelable and databinding) are moved to the Android side of the codebase, and are designed to be safe for two-way databinding. This allows proper observability in TunnelDetailFragment. - Various robustness fixes and documentation updates to helper classes.
* Auto-format the source directoriesSamuel Holland2018-11-111-66/+69
| | | | Blame Jason for writing Java in vim.
* global: update copyright headersJason A. Donenfeld2018-09-061-2/+1
|
* MonkeyedSnackbar: removeJason A. Donenfeld2018-08-261-5/+4
| | | | This didn't actually help with much and caused problems.
* MonkeyedSnackbar: work around Harsh's broken phoneJason A. Donenfeld2018-07-291-4/+5
| | | | | | 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?
* MainActivity: Fix fragment selection logicSamuel Holland2018-07-281-0/+1
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* TunnelEditorFragment: plug memory leak on listenersJason A. Donenfeld2018-07-251-0/+14
| | | | | | | | 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>
* TunnelEditorFragment: fix null pointer dereferenceJason A. Donenfeld2018-07-191-2/+4
|
* TunnelEditorFragment: binding might be nullJason A. Donenfeld2018-07-131-0/+2
|
* global: Add nullity annotationsEric Kuck2018-07-131-15/+23
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* TunnelEditorFragment: add DNSes to allowedIPs when excluding rfc1918Jason A. Donenfeld2018-07-121-0/+45
|
* global: move to Apache 2.0Jason A. Donenfeld2018-07-061-1/+1
|
* TunnelEditor: fix nitsJason A. Donenfeld2018-07-061-8/+4
|
* AppListDialogFragment: add implementation for excluding applicationsEric Kuck2018-07-061-1/+27
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Give Samuel heart attack by removing DaggerJason A. Donenfeld2018-06-071-1/+1
|
* EditorFragment: show toast on creation tooJason A. Donenfeld2018-05-271-0/+1
|
* ExceptionLoggers: never have a null messageJason A. Donenfeld2018-05-161-4/+4
|
* android: Directly use views for snackbarsHarsh Shandilya2018-05-161-9/+4
| | | | | | There should be no need to deference an extra variable. Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
* global: Cleanup line lengths and misc lint warningsHarsh Shandilya2018-05-091-3/+3
| | | | | | | | | 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 <harsh@prjkt.io>
* TunnelEditor: Add toast messages to success eventsHarsh Shandilya2018-05-051-0/+2
| | | | | | | Letting the user know that the operation went successfully via visual cues is a nice UX touch. Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
* TunnelEditor: Remove unused parameterHarsh Shandilya2018-05-031-2/+2
| | | | Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
* global: fix up copyrightsJason A. Donenfeld2018-05-031-0/+1
|
* global: Add or update copyright headers in Java codeSamuel Holland2018-05-021-0/+5
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* global: Clean up JavaSamuel Holland2018-04-301-4/+4
| | | | | | Address Java and Android lints. Signed-off-by: Samuel Holland <samuel@sholland.org>
* global: Automatic code formattingSamuel Holland2018-04-301-52/+50
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* wg: Break out crossport dependencyHarsh Shandilya2018-04-301-2/+2
| | | | | | | Replace all crossport uses with upstream design support library components. Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
* TunnelEditorFragment: rewrite and simplifyJason A. Donenfeld2018-04-301-108/+78
| | | | | This should remove some null pointer dereferences and overall make the thing more robust.
* Quick cleanup across the boardHarsh Shandilya2018-04-281-2/+4
| | | | | | | | | | - Clean up imports - Adjust method visibility - Drop in NonNull annotations where needed - Prevent potential NPEs from nulled getActivity calls - Remove unused methods Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
* Use validation instead of two-way bindingJason A. Donenfeld2018-04-281-20/+24
| | | | | | | | | | | | This is insane, but it appears to be working. We essentially store things in a separate class for editing, and then commit it back at a given time. This business with onViewStateRestored in both TunnelEditorFragment and in TunnelDetailFragment is buggy and likely wrong. In general TunnelEditorFragment should probably be rewritten. The relationship with the changed name is not clear.
* model: Use ConfigStore.rename() to avoid recreating tunnelsSamuel Holland2018-01-101-7/+5
| | | | | | Rename all of the functions to be in line with setConfig/setState Signed-off-by: Samuel Holland <samuel@sholland.org>
* TunnelEditorFragment: do not pass null localConfigJason A. Donenfeld2018-01-101-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we might dereference it, per this play store gathered trace: Xiaomi Redmi 3S (land), 2048MB RAM, Android 7.1 java.lang.NullPointerException: at com.wireguard.android.model.Tunnel.setConfig (Tunnel.java:118) at com.wireguard.android.fragment.TunnelEditorFragment.onOptionsItemSelected (TunnelEditorFragment.java:160) at android.app.Fragment.performOptionsItemSelected (Fragment.java:2478) at android.app.FragmentManagerImpl.dispatchOptionsItemSelected (FragmentManager.java:2182) at android.app.FragmentController.dispatchOptionsItemSelected (FragmentController.java:336) at android.app.Activity.onMenuItemSelected (Activity.java:3211) at com.android.internal.policy.PhoneWindow.onMenuItemSelected (PhoneWindow.java:1219) at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected (MenuBuilder.java:761) at com.android.internal.view.menu.MenuItemImpl.invoke (MenuItemImpl.java:152) at com.android.internal.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:904) at com.android.internal.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:894) at android.widget.ActionMenuView.invokeItem (ActionMenuView.java:616) at com.android.internal.view.menu.ActionMenuItemView.onClick (ActionMenuItemView.java:152) at android.view.View.performClick (View.java:5637) at android.view.View$PerformClick.run (View.java:22433) at android.os.Handler.handleCallback (Handler.java:751) at android.os.Handler.dispatchMessage (Handler.java:95) at android.os.Looper.loop (Looper.java:153) at android.app.ActivityThread.main (ActivityThread.java:6244) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:891) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:781)
* TunnelEditorFragment: Fix dismissing creator activitySamuel Holland2018-01-081-0/+1
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* global: Fix or suppress most lints/warningsSamuel Holland2018-01-081-1/+2
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* Fragment/Tile: Make success/error messages translatableSamuel Holland2018-01-081-27/+31
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* global: Prefix tags with WireGuard/Jason A. Donenfeld2018-01-081-1/+1
|
* project: Global cleanupSamuel Holland2018-01-081-0/+236
Signed-off-by: Samuel Holland <samuel@sholland.org>