aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/java/com/wireguard/android/util (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Clean up error messagesSamuel Holland2018-12-153-51/+132
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Provide semantically meaningful exceptions for translationSamuel Holland2018-12-151-8/+12
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Fix locale usageJason A. Donenfeld2018-12-112-9/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Unwrap the correct exceptionZachary Wander2018-12-111-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Localize exception messagesZachary Wander2018-12-112-6/+15
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Remodel the ModelSamuel Holland2018-12-084-11/+40
| | | | | | | | | | | | | | - 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. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Auto-format the source directoriesSamuel Holland2018-11-112-34/+34
| | | | | | Blame Jason for writing Java in vim. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: update copyright headersJason A. Donenfeld2018-09-0611-21/+11
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* FragmentUtils: Make final and prevent instantiationHarsh Shandilya2018-08-261-1/+5
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* MonkeyedSnackbar: removeJason A. Donenfeld2018-08-261-3/+1
| | | | | | This didn't actually help with much and caused problems. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* MonkeyedSnackbar: work around Harsh's broken phoneJason A. Donenfeld2018-07-291-1/+3
| | | | | | | | 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? Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tools: pass in debug package nameJason A. Donenfeld2018-07-241-2/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: Add nullity annotationsEric Kuck2018-07-136-26/+28
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* global: move to Apache 2.0Jason A. Donenfeld2018-07-0611-11/+11
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: Small cleanupsJason A. Donenfeld2018-06-251-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* android: Consolidate getPrefActivity into FragmentUtilsHarsh Shandilya2018-06-231-0/+25
| | | | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> [Samuel: Changed static to non-static import] Signed-off-by: Samuel Holland <samuel@sholland.org>
* treewide: Optimize importsHarsh Shandilya2018-06-231-1/+1
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* util: Extract non-Android utility interfacesSamuel Holland2018-06-197-72/+11
| | | | | | | | As part of a refactoring that will likely introduce more custom collection classes, move the non-Android-specific parts outside the com.wireguard.android package. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ToolsInstaller: safer state machineJason A. Donenfeld2018-06-101-12/+19
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Give Samuel heart attack by removing DaggerJason A. Donenfeld2018-06-073-32/+8
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* VersionPreference: account for checking state and move away from tools installerJason A. Donenfeld2018-06-071-9/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ToolsInstallerPreference: do not check for magisk on main threadJason A. Donenfeld2018-06-061-2/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ToolsInstaller: allow installing as Magisk moduleJason A. Donenfeld2018-06-051-1/+41
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* DarkMode: move to shared preferences listenerJason A. Donenfeld2018-06-051-109/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* android: Cleanup classesHarsh Shandilya2018-06-023-17/+18
| | | | | | | - Use final modifer wherever possible - Use try-with-resources for input/output streams Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Topic: John does things differentlyJason A. Donenfeld2018-06-021-29/+30
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Topic: make reentrantJason A. Donenfeld2018-06-011-6/+17
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Settings: add versionJason A. Donenfeld2018-06-011-0/+13
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* theme: add dark theme with toggleJason A. Donenfeld2018-06-011-0/+97
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg-quick: don't break push notificationsJason A. Donenfeld2018-05-311-1/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* SharedLibraryLoader: introduce to work around Samsung PackageManager bugsJason A. Donenfeld2018-05-291-0/+74
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ExceptionLoggers: never have a null messageJason A. Donenfeld2018-05-161-2/+11
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: Cleanup line lengths and misc lint warningsHarsh Shandilya2018-05-094-8/+13
| | | | | | | | | 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 <me@msfjarvis.dev>
* global: fix up copyrightsJason A. Donenfeld2018-05-0312-0/+12
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: Add or update copyright headers in Java codeSamuel Holland2018-05-0212-0/+60
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* wg: Break out crossport dependencyHarsh Shandilya2018-04-301-2/+1
| | | | | | | Replace all crossport uses with upstream design support library components. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Quick cleanup across the boardHarsh Shandilya2018-04-281-1/+1
| | | | | | | | | | - 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 <me@msfjarvis.dev>
* Update application state based on wg-quickJason A. Donenfeld2018-04-231-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ToolsInstaller: Remove double-checked lockingSamuel Holland2018-01-171-16/+15
| | | | | | | | | It can't work and may be crashing the runtime. Use a lock object to avoid exposing the synchronization in the class's interface. Signed-off-by: Samuel Holland <samuel@sholland.org>
* RootShell: Use a lock object instead of sync methodsSamuel Holland2018-01-171-88/+98
| | | | | | | This avoids exposing the synchronization implementation details in the class's interface. Signed-off-by: Samuel Holland <samuel@sholland.org>
* ToolsInstaller: symlink tools alwaysJason A. Donenfeld2018-01-101-22/+14
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: Clean up error loggingSamuel Holland2018-01-091-1/+1
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* RootShell: Improve shell start error handlingSamuel Holland2018-01-091-9/+14
| | | | | | | No need to catch and re-throw exceptions before starting the process. If running `su` itself fails, there's no (functional) root, so report that. Signed-off-by: Samuel Holland <samuel@sholland.org>
* RootShell: Be stricter about command delimitersSamuel Holland2018-01-091-13/+24
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* RootShell: stop if we can't startJason A. Donenfeld2018-01-091-31/+36
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* RootShell: hoist out synchronizationJason A. Donenfeld2018-01-091-11/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ToolsInstaller: Propagate NoRootException properlySamuel Holland2018-01-091-18/+14
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* RootShell: Simplify, synchronize, clean upSamuel Holland2018-01-092-128/+89
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* ToolsInstaller: terminators are better than seperatorsJason A. Donenfeld2018-01-091-7/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* RootShell: synchronize accesses to single shellJason A. Donenfeld2018-01-091-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>