summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/java
AgeCommit message (Collapse)Author
2020-09-15TunnelListFragment: set selection on Main, not Main.immediateJason A. Donenfeld
Otherwise, we crash when saving the config. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-15MonkeyedTextInputEditText: add note about sunset planJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-15gradle: desugar retrofuture and remove old depsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-15coroutines: convert the restJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-14coroutines: convert low-hanging fruitsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-13ui: remove hacky manual check for keyguardHarsh Shandilya
Setting the correct value for the allowedAuthenticators field lets the library correctly detect this by itself as verified on an API 21 emulator Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-13ui: update BiometricAuthenticator for API changesHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-13ui: fix memory leak from statically held Handler instanceHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-23ui: fix SDK 30 deprecation warning for implicit Looper in Handler initHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-23ui: also enable StrictMode thread policy in debug buildsHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-23AdminKnobs: allow enterprise admins to disable private key exportJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-05-29ui: address new databinding requirementsHarsh Shandilya
Layouts in differing configurations must agree on their root tags, so we give both copies of main_activity the same root ID, and adjust the check for two-pane layout to simply test for nullability. This also changes the inset dispatch code to use ViewCompat and WindowInsetsCompat since they will adjust insets based on the SDK level allowing us to abstract away that concern. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-16ui: animate fab scale rather than translationHarsh Shandilya
Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-15ObservableTunnel: account for race in renulling statsJason A. Donenfeld
The stats might become null between these two checks, when a tunnel flips off, resulting in a null pointer dereference: at com.wireguard.android.model.ObservableTunnel.getStatisticsAsync (ObservableTunnel.java:103) at com.wireguard.android.fragment.TunnelDetailFragment.updateStats (TunnelDetailFragment.java:108) at com.wireguard.android.fragment.TunnelDetailFragment.access$updateStats (TunnelDetailFragment.java:27) at com.wireguard.android.fragment.TunnelDetailFragment$onResume$1.run (TunnelDetailFragment.java:74) at java.util.TimerThread.mainLoop (TimerThread.java:562) at java.util.TimerThread.run (TimerThread.java:512) Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-04-08ui: animate fab position in tunnel deletion flowHarsh Shandilya
When tunnel deletion is triggered we don't bother with animation theatrics because the resulting Snackbar needs this fab to be its anchor, which it can't do if its outside the screen or busy animating. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-08ui: tweak FABs to use the correct typeHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-07ui: codestyle nitHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-07KernelModuleDisablerPreference: do not make synchronous calls to getBackendJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-04-06ui: add suffix to persistent keepalive in editorJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-04-06ui: add missing fields to detail viewJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-04-06TunnelListFragment: onCreateActionMode is called before adapter is aliveJason A. Donenfeld
Long press a tunnel item. SIGKILL the app. Reenter it. Boom: kotlin.KotlinNullPointerException: at com.wireguard.android.fragment.TunnelListFragment$ActionModeListener.onCreateActionMode (TunnelListFragment.java:347) at androidx.appcompat.app.AppCompatDelegateImpl$ActionModeCallbackWrapperV9.onCreateActionMode (AppCompatDelegateImpl.java:2442) at androidx.appcompat.app.WindowDecorActionBar$ActionModeImpl.dispatchOnCreate (WindowDecorActionBar.java:1062) at androidx.appcompat.app.WindowDecorActionBar.startActionMode (WindowDecorActionBar.java:530) at androidx.appcompat.app.AppCompatDelegateImpl.startSupportActionMode (AppCompatDelegateImpl.java:1055) at androidx.appcompat.app.AppCompatActivity.startSupportActionMode (AppCompatActivity.java:316) at com.wireguard.android.fragment.TunnelListFragment$ActionModeListener.setItemChecked (TunnelListFragment.java:371) at com.wireguard.android.fragment.TunnelListFragment.onActivityCreated (TunnelListFragment.java:174) at androidx.fragment.app.Fragment.performActivityCreated (Fragment.java:2717) at androidx.fragment.app.FragmentStateManager.activityCreated (FragmentStateManager.java:346) at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1188) at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:161) at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1356) at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:5) at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState (FragmentManager.java:1434) at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState (FragmentManager.java:5) at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1497) at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:389) at androidx.fragment.app.FragmentManager.dispatchStateChange (FragmentManager.java:2625) at androidx.fragment.app.FragmentManager.dispatchStateChange (FragmentManager.java:677) at androidx.fragment.app.FragmentManager.dispatchActivityCreated (FragmentManager.java:2577) at androidx.fragment.app.FragmentManager.dispatchActivityCreated (FragmentManager.java:9) at androidx.fragment.app.FragmentController.dispatchActivityCreated (FragmentController.java:247) at androidx.fragment.app.FragmentActivity.onStart (FragmentActivity.java:541) at androidx.appcompat.app.AppCompatActivity.onStart (AppCompatActivity.java:201) at android.app.Instrumentation.callActivityOnStart (Instrumentation.java:1440) at android.app.Activity.performStart (Activity.java:8109) at android.app.ActivityThread.handleStartActivity (ActivityThread.java:3806) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence (TransactionExecutor.java:235) at android.app.servertransaction.TransactionExecutor.cycleToPath (TransactionExecutor.java:215) at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:187) at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:105) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2386) at android.os.Handler.dispatchMessage (Handler.java:107) at android.os.Looper.loop (Looper.java:213) at android.app.ActivityThread.main (ActivityThread.java:8178) at java.lang.reflect.Method.invoke (Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:513) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1101) This commit avoids the crash. But it's not clear to me that this is really the right solution. However, in testing it appears to work. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-04-06ui: misc cleanups to AppListDialogFragmentHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-06AppListDialogFragment: support both inclusion and exclusionJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-04-06MultiselectableRelativeLayout: use JvmOverloads constructorHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-01ObservableTunnel: do not cache keyJason A. Donenfeld
Reported-by: Reza Island's <rezza.aji.ras@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-30TunnelEditorFragment: don't show bioauth if already visibleJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-30global: cleanup code styleJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-30LogViewerActivity: don't crash if pipe closesJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-30BiometricAuthenticator: rework logic and bugsJason A. Donenfeld
Otherwise there's a frameworks bug that causes the fragment's activity to become null. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-30BiometricAuthenticator: implement biometric authentication for sensitive ↵Harsh Shandilya
operations When biometric hardware is available, it will be used to authenticate the user before private keys are shown on screen or when zip exports are executed. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-30ObservableTunnel: Don't cache configAsyncHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-30BindingAdapters: use sleeker lambdaJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-30TunnelEditorFragment: add hooks for biometric authJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-29AddTunnelsSheet: Make behaviour nullableHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-28global: hardcode tags so that minification doesn't ruin the logJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-28LogViewerActivity: only scroll every quarter for the first 2.5 seconds of ↵Jason A. Donenfeld
dumping Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-28ui: Remove unnecessary non-null assertion in TAG fieldsHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-28MonkeyedTextInputEditText: make more robustJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-28ui: use kotlin class instead of java class for tagJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-28ObservableTunnel: do not cache statsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-28TunnelEditor: move generate button to inside boxJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-28MonkeyedTextInputEditText: introduce a new horrorJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-28ClipboardUtils: Update to handle TextInputEditTextHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-28Disable screen capture in tunnel editorHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-28TunnelComparator: naturally sort tunnel listJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-28ObservableTunnel: Don't recurse in getConfigHarsh Shandilya
The correct way to retrieve the value inside a getter/setter is to use `field` to ensure you don't invoke the getter while inside the getter and trigger a stack overflow Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-27databinding: simplify and address warningsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-27ui: Replace ErrorMessages getter with indexing operatorHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-27Convert ErrorMessages to KotlinHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-27Convert AsyncWorker to KotlinHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>