summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com
AgeCommit message (Collapse)Author
2020-02-25Cleanup inset dispatch codeHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-25Ensure insets are dispatched to all fragmentsHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-25Setup EdgeToEdgeHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-25Add EdgeToEdge and coreKtx dependencyHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-23AppListDialogFragment: Revamp toggle logicHarsh Shandilya
Rather than always toggle all elements, elect to unselect all if any are selected. This allows returning to a clean state in at most two clicks. Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-23AppListDialogFragment: Code cleanupHarsh Shandilya
- Using the require_() methods provides helpful error messages when things are null compared to the get_() methods which throw NPEs. - Ensure currentlyExcludedApps is empty but never null - Rename inner variable to silence name shadowing lint - Make setExclusionsAndDismiss private Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-23AppListDialogFragment: change "Deselect All" to "Toggle All"Sébastien LEBEAU
Change functionality in excluded apps dialog for better user experience when user wants only one or few apps to use WireGuard. Signed-off-by: Sébastien LEBEAU <sebcbi1@gmail.com> Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-16SharedLibraryLoader: Fix leaked Closeable warningHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-16Record StrictMode failures to logcatHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-14Port tunnel creation UI from ViscerionHarsh Shandilya
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-02-10Attribute: remove need for android TextUtilsJason A. Donenfeld
If this is to be JRE-only, then it doesn't make sense to rely on the android class, especially since this is so trivial to inline. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-02-10InetAddresses: don't have global android importJason A. Donenfeld
This allows a proper fallback on normal JRE. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-24GoBackend: restrict APIs to proper versionJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-24GoBackend: Ensure we're unmetered on API 29 as wellHarsh Shandilya
VPN apps targetting Android 10 are treated as metered by default. Source: https://developer.android.com/reference/android/net/VpnService.Builder.html#setMetered(boolean) Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-01-23Rework timer in tunnel detailJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-23Match lowercase asus phones for fab hackJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-23GoBackend: set empty underlying networksJason A. Donenfeld
https://lists.zx2c4.com/pipermail/wireguard/2020-January/004859.html https://issuetracker.google.com/issues/114309459 https://developer.android.com/about/versions/pie/android-9.0-changes-all#network-capabilities-vpn Apparently we need to call this at least once. Reported-by: Andrey Kupreychik <foxel@quickfox.ru> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-20Introduce TunnelToggleActivityHarsh Shandilya
On Android 10, apps cannot start services when they're in the background. This means that starting VpnService from within QuickTileService when the app is not active ends badly. To mitigate this situation, we introduce a proxy activity of sorts that will handle starting VpnService for us. The activity is completely transparent and invisible, and does only four things: - Toggle the tunnel state - Request the Tile bound by QuickTileService to refresh its state - Handle any error that might have been thrown during toggle - Call finishAffinity() and go away Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2019-12-20Use RequiresApi instead of TargetApiJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-11-27QuickTileService: require phone be unlockedJason A. Donenfeld
Reported-by: Simon <simon@laro.se> Reported-by: Harsh Shandilya <me@msfjarvis.dev> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-11-20Implement statisticsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-22ModuleLoader: sync file before renamingJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-21ToolsInstaller: write to temporary file, fsync, renameJason A. Donenfeld
Reported-by: Andre Christanto <christantoandre@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-18InetAddresses: cleanup and implement final fallbackJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-18Application: put user agent in log to help debuggingJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-18Suppress depreciation warningsJason A. Donenfeld
We know what we're doing here, and it's not nice. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-16Google doesn't want to enable others to support free open source softwareJason A. Donenfeld
Revert "preferences: add donation link" This reverts commit e5455f579aec48abb30ba68b0248b02d79303126. The app was removed from the Play Store for violating their payments policy. Upon filing an appeal, I was told that they do not allow donations to projects like WireGuard. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-14Download modules after verifying signify signatureJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-13Revert "Fix activity leak on Android Q"Jason A. Donenfeld
This reverts commit 489518000971914b2608da43e2146690dcc02cb9. October has arrived. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-13ToolsInstaller: extract from apk instead of relying on native extractionJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-13SharedLibraryLoader: separate out extractionJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-13SharedLibraryLoader: prioritize ABI orderingJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-13SharedLibraryLoader: iterate through all apks for bundlesJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-12Activity: make dark/night theme follow system on QJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-12Application: use preferences from compat libsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-12export: use content resolver on android Q+Jason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-12preferences: add donation linkJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-09-30Migrate to Android 10Harsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2019-09-30InetAddresses: prepare for Android 10's real method supportJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-09-27FragmentUtils: Directly cast context as SettingsActivityHarsh Shandilya
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>
2019-09-27Fix activity leak on Android QHarsh Shandilya
This workaround was discussed at https://twitter.com/Piwai/status/1169274622614704129 after Google had closed the issuetracker with a WONTFIX at https://issuetracker.google.com/issues/139738913. The situation has since changed with Google promising a fix on October's ASB but since we can't really know, patch this ourselves for the timebeing. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2019-03-19InetEndpoint: properly match IPv6 addressesJason A. Donenfeld
The old one didn't account for trailing digits. Reported-by: Brandon Jackson <bjackson@napshome.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-16WgQuickBackend: pass result to error stringJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-17ToolsInstaller: fix typo on cleanupJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-14ToolsInstaller: Require Magisk 18Jason A. Donenfeld
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>
2019-02-14ToolsInstaller: Use chcon over restoreconHarsh Shandilya
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>
2019-01-07Update copyrightJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-07PeerProxy: Only add IPv4 DNS servers when excluding private IPsSamuel Holland
Reported-By: Christophe-Marie Duquesne <chmd@chmd.fr> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-18Migrate to AndroidXHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-12-15InetEndpoint: disallow huge portsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>