aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/java/com/wireguard/android/util (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rename app module to uiHarsh Shandilya2020-03-0911-903/+0
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Migrate tunnel related classes to tunnel/ Gradle moduleHarsh Shandilya2020-03-094-564/+0
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ToolsInstaller: restrict to only main app usageJason A. Donenfeld2020-03-091-0/+2
| | | | | | | We don't want lots of different packages fighting over who gets to install the tools. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ToolsInstaller: remove versioningJason A. Donenfeld2020-03-091-2/+1
| | | | | | Not ideal, but allows us to get rid of the BuildConfig requirement. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* RootShell: remove need for BuildConfigJason A. Donenfeld2020-03-091-2/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Backend: do not use singletonsJason A. Donenfeld2020-03-082-12/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ToolsInstaller: do not use RJason A. Donenfeld2020-03-091-3/+1
| | | | | | | | | This is horible! But ToolsInstaller uses lots of other error strings nakedly, as does ModuleLoader. These both need to be fixed up the proper way (like the last two commits). This commit here is just to make the initial porting a bit easier. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* RootShell: properly use errormessagesJason A. Donenfeld2020-03-094-33/+71
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ErrorMessages: do not use R from backendJason A. Donenfeld2020-03-091-12/+24
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ErrorMessages: do not traverse down into remote exceptionsJason A. Donenfeld2020-03-091-1/+6
| | | | | | Otherwise we miss the actual error message. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ModuleLoader: Staticize isModuleLoadedHarsh Shandilya2020-02-281-1/+1
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* SharedLibraryLoader: Fix leaked Closeable warningHarsh Shandilya2020-02-161-0/+1
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Port tunnel creation UI from ViscerionHarsh Shandilya2020-02-141-0/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ModuleLoader: sync file before renamingJason A. Donenfeld2019-10-221-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ToolsInstaller: write to temporary file, fsync, renameJason A. Donenfeld2019-10-212-3/+8
| | | | | Reported-by: Andre Christanto <christantoandre@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Application: put user agent in log to help debuggingJason A. Donenfeld2019-10-181-5/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Suppress depreciation warningsJason A. Donenfeld2019-10-181-0/+2
| | | | | | We know what we're doing here, and it's not nice. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Download modules after verifying signify signatureJason A. Donenfeld2019-10-141-0/+186
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ToolsInstaller: extract from apk instead of relying on native extractionJason A. Donenfeld2019-10-132-50/+39
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* SharedLibraryLoader: separate out extractionJason A. Donenfeld2019-10-131-29/+35
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* SharedLibraryLoader: prioritize ABI orderingJason A. Donenfeld2019-10-131-10/+10
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* SharedLibraryLoader: iterate through all apks for bundlesJason A. Donenfeld2019-10-131-30/+41
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* export: use content resolver on android Q+Jason A. Donenfeld2019-10-121-0/+96
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* FragmentUtils: Directly cast context as SettingsActivityHarsh Shandilya2019-09-271-2/+2
| | | | | | | | ContextThemeWrapper#getContext seems to be an instance of ContextImpl now which is not public API and also not what we want. Directly cast context as SettingsActivity which seems to work exactly how we need this to. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ToolsInstaller: fix typo on cleanupJason A. Donenfeld2019-02-171-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ToolsInstaller: Require Magisk 18Jason A. Donenfeld2019-02-141-6/+6
| | | | | | | People installing magisk modules are people capable of updating Magisk. No need to leave around old compat cruft. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ToolsInstaller: Use chcon over restoreconHarsh Shandilya2019-02-141-1/+1
| | | | | | | | | | | restorecon probes file_contexts to get the context to be applied to the file. /sbin/.magisk does not exist in file_contexts for obvious reasons so restorecon always fails. Use chcon directly with the system_file context to allow contexts to be applied. Suggested-by: Chris Renshaw <osm0sis@outlook.com> Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Update copyrightJason A. Donenfeld2019-01-0712-12/+12
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Migrate to AndroidXHarsh Shandilya2018-12-189-10/+10
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* 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>