aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/src/main/java/com/wireguard/android/util (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tv: wire in statsJason A. Donenfeld2020-09-221-0/+22
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: abstract out tunnel importingJason A. Donenfeld2020-09-222-10/+150
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: initial draft of Android TV supportHarsh Shandilya2020-09-221-0/+11
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: move to Jetpack DataStore instead of SharedPrefsJason A. Donenfeld2020-09-181-0/+85
| | | | | | | Hopefully PreferencesPreferenceDataStore gets to go away sometime down the line. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: reformat codeJason A. Donenfeld2020-09-181-1/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: refactor AddTunnelsSheet's selection communicationHarsh Shandilya2020-09-171-5/+0
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* DownloadsFileSaver: encapsulate permission checksJason A. Donenfeld2020-09-171-34/+55
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ZipExporterPreference: don't ask for storage permissions on newer androidJason A. Donenfeld2020-09-161-0/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: replace GlobalScope with a hand-rolled CoroutineScopeHarsh Shandilya2020-09-161-0/+4
| | | | | | | | | | | | | | | | | 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>
* Extensions: use more idiomatic kotlinJason A. Donenfeld2020-09-161-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: lint codebase with recent changesJason A. Donenfeld2020-09-162-1/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* coroutines: use lifecycleScope where appropriateJason A. Donenfeld2020-09-152-21/+10
| | | | | | | There's still a bit of GlobalScope lingering around, which might be removable. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* coroutines: convert the restJason A. Donenfeld2020-09-152-70/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: remove hacky manual check for keyguardHarsh Shandilya2020-09-131-20/+1
| | | | | | 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>
* ui: update BiometricAuthenticator for API changesHarsh Shandilya2020-09-131-2/+6
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: fix memory leak from statically held Handler instanceHarsh Shandilya2020-09-131-2/+1
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: fix SDK 30 deprecation warning for implicit Looper in Handler initHarsh Shandilya2020-08-231-1/+2
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* AdminKnobs: allow enterprise admins to disable private key exportJason A. Donenfeld2020-07-231-0/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: misc cleanups to AppListDialogFragmentHarsh Shandilya2020-04-061-0/+5
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* global: cleanup code styleJason A. Donenfeld2020-03-301-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* BiometricAuthenticator: rework logic and bugsJason A. Donenfeld2020-03-301-9/+27
| | | | | | | Otherwise there's a frameworks bug that causes the fragment's activity to become null. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* BiometricAuthenticator: implement biometric authentication for sensitive operationsHarsh Shandilya2020-03-301-0/+73
| | | | | | | | 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>
* global: hardcode tags so that minification doesn't ruin the logJason A. Donenfeld2020-03-281-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: Remove unnecessary non-null assertion in TAG fieldsHarsh Shandilya2020-03-281-1/+1
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: use kotlin class instead of java class for tagJason A. Donenfeld2020-03-281-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ClipboardUtils: Update to handle TextInputEditTextHarsh Shandilya2020-03-281-9/+12
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Convert ErrorMessages to KotlinHarsh Shandilya2020-03-272-160/+138
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Convert AsyncWorker to KotlinHarsh Shandilya2020-03-272-66/+43
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* databinding: rewrite in kotlinJason A. Donenfeld2020-03-274-351/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* util: begin conversion to kotlinJason A. Donenfeld2020-03-274-148/+102
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* util: Start converting to KotlinHarsh Shandilya2020-03-264-66/+48
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* tunnel: Remove MISSING_VALUE from BadConfigException reasonsHarsh Shandilya2020-03-141-1/+0
| | | | | | | This is covered under SYNTAX_ERROR which feels like a reasonable choice, so get rid of this unused field and associated resource string. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: Codestyle cleanupsHarsh Shandilya2020-03-101-6/+10
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* global: format codeJason A. Donenfeld2020-03-092-34/+38
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: optimize importsJason A. Donenfeld2020-03-0910-31/+22
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: get rid of nonnull gradle hackJason A. Donenfeld2020-03-0910-0/+29
| | | | | | | | | | Hacking things up via gradle is not right, and package-info.java poses problems with two modules, so instead we just apply it manually to every class. Remember to add this to new classes! Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ModuleLoader: move to right projectJason A. Donenfeld2020-03-091-186/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* AsyncWorker: move back to original locationJason A. Donenfeld2020-03-091-0/+63
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Use AndroidX Nullable annotation everywhereHarsh Shandilya2020-03-091-1/+1
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Rename app module to uiHarsh Shandilya2020-03-0911-0/+903
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>