summaryrefslogtreecommitdiffhomepage
path: root/ui
AgeCommit message (Collapse)Author
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-15gradle: do not use retrofuture in uiJason 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-25build: target SDK 30Harsh Shandilya
We're all set to support it from the application side of things. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-23build: switch fragment and preference to -ktx artifactsHarsh Shandilya
Google recommends all dependencies with -ktx variants depend on them directly since they transitively pull in the main artifacts and offer extensions for better usage from Kotlin 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-08-23build: remove explicit buildToolsVersionHarsh Shandilya
AGP sets it automatically, let's rely on that Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-23build: uprev to Kotlin 1.4Harsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-23build: minor cleanups and reorganizationHarsh 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-29build: bump to AGP 4.0.0Harsh Shandilya
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-21build: don't obfuscate code in minify stepHarsh Shandilya
While Play Console correctly manages to deobfuscate stacktraces using the ProGuard mapping, it makes user recorded logs useless which is rather undesirable. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-19ui: tweak fab animation durationHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-19build: remove unused cardview dependencyHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-19strings: sync translationsHarsh Shandilya
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-08strings: sync translationsHarsh Shandilya
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: set proper content description for applicationsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-04-06ui: show excluded/included apps in details viewJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-04-06ui: align listen port and mtu in detail editorJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>