summaryrefslogtreecommitdiffhomepage
path: root/ui/src
AgeCommit message (Collapse)Author
2020-09-21TunnelManager: catch exception in intent receiverJason A. Donenfeld
java.lang.IllegalStateException: at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1720) at android.app.ContextImpl.startService (ContextImpl.java:1675) at android.content.ContextWrapper.startService (ContextWrapper.java:669) at com.wireguard.android.backend.GoBackend.startVpnService (GoBackend.java:4) at com.wireguard.android.backend.GoBackend.setStateInternal (GoBackend.java:4) at com.wireguard.android.backend.GoBackend.setState (GoBackend.java:2) at com.wireguard.android.model.TunnelManager$setTunnelState$2$1.invokeSuspend (TunnelManager.java:6) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (BaseContinuationImpl.java:2) at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.java:2) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.java) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.java:7) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.java:7) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.java:7) Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-20TunnelEditorFragment: do not assume a contextJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-20TunnelListFragment: do not assume binding always existsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-20TunnelDetailFragment: use kotlin coroutine for timer and rework nullabilityJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-20BaseFragment: avoid using requireContext() in permission result callbackJason A. Donenfeld
java.lang.IllegalStateException: at androidx.fragment.app.Fragment.requireContext (Fragment.java:17) at com.wireguard.android.fragment.BaseFragment$setTunnelStateWithPermissionsResult$1.invokeSuspend (BaseFragment.java:4) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (BaseContinuationImpl.java:2) at kotlinx.coroutines.UndispatchedCoroutine.afterResume (UndispatchedCoroutine.java:19) at kotlinx.coroutines.AbstractCoroutine.resumeWith (AbstractCoroutine.java:13) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (BaseContinuationImpl.java:2) at kotlinx.coroutines.UndispatchedCoroutine.afterResume (UndispatchedCoroutine.java:19) at kotlinx.coroutines.AbstractCoroutine.resumeWith (AbstractCoroutine.java:13) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (BaseContinuationImpl.java:2) at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.java:2) at android.os.Handler.handleCallback (Handler.java:790) at android.os.Handler.dispatchMessage (Handler.java:99) at android.os.Looper.loop (Looper.java:164) at android.app.ActivityThread.main (ActivityThread.java:7025) at java.lang.reflect.Method.invoke (Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:441) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1408) Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-20AddTunnelsSheet: disable qrcode scanning if no cameraJason A. Donenfeld
Part of the enhancements for Android TV. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-20ui: add tooling label for exclusions buttonHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-20ui: add navigation hints for D-Pad and IMEHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-18ui: add xhdpi banner resourceHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-18SettingsActivity: account for module present but no rootJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-18ui: move to Jetpack DataStore instead of SharedPrefsJason A. Donenfeld
Hopefully PreferencesPreferenceDataStore gets to go away sometime down the line. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-18ui: reformat codeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-17ui: retire EdgeToEdgeHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-17ui: replace deprecated onActivityCreated with onViewCreatedHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-17ui: refactor AddTunnelsSheet's selection communicationHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-17ui: refactor AppListDialogFragment's selection communicationHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-17activityx: use contracts more and refineJason A. Donenfeld
This is the beginning; there are still many of the old API's callsites to convert. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-17DownloadsFileSaver: encapsulate permission checksJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-16LogViewerActivity: simplify scopingJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-16ZipExporterPreference: don't ask for storage permissions on newer androidJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-16ui: resolve getColor deprecation in LogViewerActivityHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-16LogViewerActivity: destroy process when coroutine scope is cancelledJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-16ui: await activity creation to change selected tunnelHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-16ui: replace GlobalScope with a hand-rolled CoroutineScopeHarsh Shandilya
GlobalScope has numerous problems[1] that make it unfit for use in most applications and making it behave correctly requires an excessive amount of verbosity that's alleviated simply by using any other scope. Since we run multiple operations in the context of the application's lifecycle, introduce a new scope that is created when our application is, and cancelled upon its termination. While at it, make the scope default to Dispatchers.IO to reduce pressure on the UI event loop. Tasks requiring access to the UI thread appropriately switch context making the change completely safe. 1: https://medium.com/@elizarov/the-reason-to-avoid-globalscope-835337445abc Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-16ConfigNamingDialogFragment: fix focus request for config naming dialogHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-16TunnelEditorFragment: move backwards using fragment manager instead of hackJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-16TunnelEditorFragment: avoid extra trip through event loopJason A. Donenfeld
onSelectedTunnelChanged is already queueing us to Dispatchers.Main (rather than Dispatchers.Main.immediate, which would crash, but why?), so avoid the extra trip through the event loop by toggling the selected tunnel right away. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-16Extensions: use more idiomatic kotlinJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-16global: lint codebase with recent changesJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-16ui: don't use low-level logger APIHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-16ui: update manifest for API 30 changesHarsh Shandilya
- Mark WRITE_EXTERNAL_STORAGE as unused above API 29 since we defer to Storage Access Framework on P and above - Adds a <queries> tag to allow listing apps for exclusion/inclusion dialog Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-16coroutines: lifecycleScope is by default on Main.immediateJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-15coroutines: use lifecycleScope where appropriateJason A. Donenfeld
There's still a bit of GlobalScope lingering around, which might be removable. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-15MonkeyedTextInputEditText: au revoirJason A. Donenfeld
Remember to go back to using com.google.android.material when 1.3.0-alpha03 comes out. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
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-06-02strings: sync translationsHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
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-05-09ui: remove unneeded actionBarPopupTheme attributeHarsh Shandilya
This caused inconsistencies between our overflow icon and actionbar title's tint Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-26ui: switch up dark theme system bars colorsHarsh Shandilya
The status bar color had a subtle transparency applied which caused inconsistencies, and the navigation bar color was the wrong shade of gray. Reported-by: Danny Lin <danny@kdrag0n.dev> Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-19ui: tweak fab animation durationHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>