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>
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>
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>
This removes a no-longer-needed workaround for the ListView
OnItemClickListener (it won't fire if a focusable view is inside the
item view). Since converting our ListView instances to RecyclerView
instances, we set the OnClick and OnLongClick listeners directly on the
item view, and this workaround no longer has any effect.
Unsurprisingly, the workaround breaks focusability of the Switch, which
is necessary to toggle tunnels on devices with keypad-based navigation,
such as the Fire TV.
This commit also adds explicit focusability hints for the Switch.
Related mail thread:
https://lists.zx2c4.com/pipermail/wireguard/2019-May/004112.html
Reported-by: Christophe-Marie Duquesne <chmd@chmd.fr>
Reported-by: Revath S Kumar <gmail@revathskumar.com>
[Samuel: sorted attributes; expanded commit message]
Signed-off-by: Samuel Holland <samuel@sholland.org>
- 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>
This isn't possible for colorForeground, colorBackground,
textAppearanceMedium, but at least it's useful for some things here.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
With the new shade of blue, perhaps this simply looks better.
I don't like hard coding the color away from the theme, however.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Harsh's "users" were offended by the dark theme. So, we change the
accent to that used by gboard's dark theme, which should be pretty
uncontroversial.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This way we can keep scrolling when there are exactly the right number
of items, so that the toggle switch becomes visible.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>