summaryrefslogtreecommitdiffhomepage
path: root/app/src
AgeCommit message (Collapse)Author
2018-01-09model: Chain completions to avoid race conditionsSamuel Holland
Otherwise getConfigAsync().thenCompose(x -> setState()) would be unsafe. This reverts commit a6595a273afd50524cc66765c6bfbdcc34cb12e4. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-09global: Clean up error loggingSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-09WgQuickBackend: Log when tunnels can't be enumeratedSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-09RootShell: Improve shell start error handlingSamuel Holland
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>
2018-01-09RootShell: Be stricter about command delimitersSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-09RootShell: stop if we can't startJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-09RootShell: hoist out synchronizationJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-09ToolsInstaller: Propagate NoRootException properlySamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-09RootShell: Simplify, synchronize, clean upSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-09TunnelListFragment: Remove useless keywordSamuel Holland
final doesn't do anything in try-with-resources (it's always final). Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-09ToolsInstaller: terminators are better than seperatorsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-09RootShell: synchronize accesses to single shellJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-08RootShell: Simplify constructorSamuel Holland
ToolsInstaller now takes care of installing the tools. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08WgQuickBackend: Ensure tools are available before useSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08ToolsInstaller: Add a method to ensure tool availabilitySamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08WgQuickBackend: Inline resolveState()Samuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08ToolsInstaller: Add methods to check/make symlinksSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08ToolsInstallerPreference: Examine current state on loadSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08ToolsInstaller: Add method to check installation statusSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08TunnelEditorFragment: Fix dismissing creator activitySamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08global: Fix or suppress most lints/warningsSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08project: Remove currently-unused librarySamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08Fragment/Tile: Make success/error messages translatableSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-09layout: never use suggestionsJason A. Donenfeld
IP addresses and key material could be potentially sensitive. We also don't want any interactions with the suggestive text APIs. So, we mark it as both a visible password and we turn off suggestions. This will fix the length limit, too, in Android 8. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-09TunnelListFragment: fix plural grammarJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-08RootShell: fix off by oneJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-08QuickTileService: show toast for longer and use right messagesJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-08global: Prefix tags with WireGuard/Jason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-08RootShell: multiplex commandsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-08Port over remaining error handlingSamuel Holland
This doesn't really belong here, but there's no sense in throwing it away--even here, it's a minor optimization. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08Handle tunnel state change errors appropriatelySamuel Holland
This class should probably be renamed and moved, but I don't know to what or where. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08TunnelListFragment: Fix crash on deleting multiple tunnelsSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08ToggleSwitch: Improve reliabilitySamuel Holland
It's not great, but it's better than it was. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08WgQuickBackend: Improve error handlingSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08Tunnel: Add a State factory methodSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08project: Global cleanupSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08Application: Remove unneeded exported componentSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08ToolsInstaller: Extract to its own classesSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07TunnelManager: Simplify save/resume methodsSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07BaseActivity: Make variable names consistentSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07TunnelManager/QuickTileService: Remember last used tunnelSamuel Holland
This is actually a bit simpler than having a manually-selected "primary" tunnel, and is hopefully easier for the user. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07Remove primary configuration preferenceSamuel Holland
It is no longer used. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07FileConfigStore: Move function returns outside try blocksSamuel Holland
This makes more clear what things can throw exceptions, and the functions' control flow. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07Tunnel: Remove UNKNOWN stateSamuel Holland
It's never used. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07Move bundle keys where they are usedSamuel Holland
This both clarifies and simplifies the code. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07WgQuickBackend: Prefer ArrayList over LinkedListSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07ConfigEditorFragment: Support renaming tunnelsSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07model: Allow renaming tunnelsSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07model: Remove confusing uses of completion chainingSamuel Holland
This looks like the builder pattern, but isn't. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07TunnelListFragment: Name a CompletionStage what it isSamuel Holland
Signed-off-by: Samuel Holland <samuel@sholland.org>