Commit Graph

887 Commits (753b8d3fb4b34b65b01a3b0ea0c227c3ba341ad8)
 

Author SHA1 Message Date
yin kaisheng a9ff204ae4
android: fix Hostname type in MaskedPrefs, it should be String type (#482) 3 months ago
kari-ts b4ca226eb7
android: make clipboard values clickable and focusable (#483)
also, use Column isntead of LazyColumn since the Tailnet lock view is a short list and doesn't require lazy rendering

Fixes tailscale/corp#21737

Signed-off-by: kari-ts <kari@tailscale.com>
3 months ago
kari-ts d94125e767
android: make settings button focusable and clickable (#484)
Fixes tailscale/corp#22717

Signed-off-by: kari-ts <kari@tailscale.com>
3 months ago
kari-ts eae8789628
android: move string into correct place (#481)
Move MDM auth key strings into the MDM strings blcok

Updates #cleanup

Signed-off-by: kari-ts <kari@tailscale.com>
3 months ago
kari-ts 29e3c187c2
android: stop tailscaled when VPN has been revoked (#480)
-add new Ipn UI state 'Stopping' to handle the case where the VPN is no longer active and a request to stop Tailscale has been issued (but is not complete yet) and use for optimistic UI
-when VPN has been revoked, stop tailscaled and set the state to Stopping
-this fixes the race condition where when we tell tailscaled to stop, stopping races against the netmap state updating as a result of the VPN being revoked
-add isActive state and use instead of isPrepared for UI showing whether we are connected - we were previously using isPrepared as a proxy for connection, but sometimes the VPN has been prepared but is not active (eg when VPN permissions have been given and VPN has been connected previously, but has been revoked)
-refactor network callbacks into its own class for readability

Fixes tailscale/tailscale#12850

Signed-off-by: kari-ts <kari@tailscale.com>
3 months ago
Josh Vocal 40090f179b
android: Fix search not filtering machines from input (#478)
android: Fix search not filtering text input

Fixes tailscale/tailscale#13218

* Filtering machines in the textfield works since the flow is now reachable
* Updating the health icon works since the flow is now reachable

Signed-off-by: Josh Vocal <joshvocal@gmail.com>
3 months ago
Jonathan Nobels 502eada21a
makefile: add tag_release recipe (#474)
updates #cleanup

The tag_release recipe was integrated with bumposs, but it's
still needed to manually tag branches such as the release
branch.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
3 months ago
Josh Vocal cdbd062426
android: Add Voicemail apps to Android Split Tunneling settings by de… (#479)
android: Add Voicemail apps to Android Split Tunneling settings by default

Updates tailscale/tailscale#13199

Signed-off-by: Josh Vocal <joshvocal@gmail.com>
3 months ago
Josh Vocal 26e5e796fa
android: Allow notification dismissed via swipe on Android 13 (#477)
Allow notification dismissed via swipe on Android 13

Signed-off-by: Josh Vocal <joshvocal@gmail.com>
3 months ago
Andrea Gottardo 8648c2ef27
mdm: add AuthKey piping (#476)
Updates tailscale/tailscale#1572

This PR defines the AuthKey system policy in the Android codebase, allowing the code in OSS (see tailscale/tailscale#13061) to pick up any value defined by an MDM solution via managed app configuration. It also adds the new key to the `app_restrictions.xml`.

OSS and Version updated to 1.73.13-taf3d3c433-g536e1adcc42

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
3 months ago
kari-ts 1a41ab3b66
android: check if other VPN is active (#475)
Detect when another VPN is active and launch dialog giving user the option to navigate to settings to disable.
Update state string and toggle to require successful VPN preparation

To do in a follow-up: monitor VPN connection, and if Tailscale VPN disconnects due to another VPN connecting, update toggle and text
Updates tailscale/tailscale#12850

Signed-off-by: kari-ts <kari@tailscale.com>
3 months ago
kari-ts 10a4350c02
android: prepare VPN when quick tile is clicked (#473)
Currently, the VPN is prepared when MainActivity is launched. If Tailscale is enabled by a quick tile, the VPN is not prepared.
This change creates an application scoped view model and moves the VPN prep to the application class so that it is not dependent on MainActivity.

Fixes tailscale/tailscale#12489

Signed-off-by: kari-ts <kari@tailscale.com>
3 months ago
Andrea Gottardo 4830d8826e
android: fix paddings and headers of Taildrop destination picker (#465)
Updates tailscale/corp#22362

First round of polish for the Taildrop device picker, to use more consistent metrics and SectionDivider resembling the rest of the app. We'll follow up with device icons like the ones we have on iOS in a later PR.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
3 months ago
Jonathan Nobels 20a5beab3e
android: bump OSS (#472)
OSS and Version updated to 1.73.0-t1e8f8ee5f-ga843c93669f

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
3 months ago
Andrea Gottardo a843c93669
Revert "VPNServiceBuilder: document excludeRoute not supported on pre-33 API" (#471) 3 months ago
kari-ts fcfb997fde
Revert "android: prepare VPN when quick tile is clicked" (#470)
Revert "android: prepare VPN when quick tile is clicked (#451)"

This reverts commit c6f3239b1b.
3 months ago
kari-ts c6f3239b1b
android: prepare VPN when quick tile is clicked (#451)
Currently, the VPN is prepared when MainActivity is launched. If Tailscale is enabled by a quick tile, the VPN is not prepared.
This change creates an application scoped view model and moves the VPN prep to the application class so that it is not dependent on MainActivity.

Fixes tailscale/tailscale#12489

Signed-off-by: kari-ts <kari@tailscale.com>
3 months ago
Jonathan Nobels e6fc832494
android: bumping OSS (#469)
OSS and Version updated to 1.71.135-tccf091e4a-g7e5e0f25cf6

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
3 months ago
Andrea Gottardo 7e5e0f25cf
VPNServiceBuilder: document excludeRoute not supported on pre-33 API (#467)
VPNServiceBuilder: document excludeRoute not supported on pre-33 API level

Updates #cleanup
Updates tailscale/tailscale#13106

Our code in VPNServiceBuilder attempts to call excludeRoute regardless of API level. However, it requires a device on Android API level 33 or newer. Let's document and log this while we plan a proper workaround.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
3 months ago
Percy Wegmann c1b957cc5f taildrop: use a random filename if real filename cannot be determined
Also pull in latest oss to avoid crashing if sharing fails.

Updates tailscale/corp#22357

Signed-off-by: Percy Wegmann <percy@tailscale.com>
3 months ago
Jonathan Nobels 716152b57d
makefile: add bump_version_code recipe back (#464)
updates tailscale/corp#21644

The docker build sill requires the recipe for bumping
the version code by one before we run the second
androidTV build.  This was removed, which breaks the
build.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
3 months ago
Andrea Gottardo 338c13b6b5
android: add HealthView (#458)
Updates tailscale/tailscale#4136

This PR adds a proper health warnings viewer for the Android client, like we already do on iOS and macOS. A subtile info.circle or exclamation mark icon is displayed next to the connection status when one or more warnings are found. A detail view provides visibility into the full list.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
4 months ago
Andrea Gottardo 403aa092c4
android: bumping OSS (#463)
OSS and Version updated to 1.71.72-t1ed958fe2-g2a32ed1f301

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
4 months ago
Nick Khyl 2a32ed1f30
libtailscale, mdm: allow syspolicy to subscribe to policy change notifications (#462)
In preparation for upcoming syspolicy improvements, we'd like to allow subscriptions
to policy change notifications via the syspolicyHandler.RegisterChangeCallback.
The registered callbacks are invoked whenever MDMSettings.update is called.

Updates tailscale/tailscale#12687

Signed-off-by: Nick Khyl <nickk@tailscale.com>
4 months ago
Nick Khyl 8767fbd8d8
mdm: improve handling and returning of not configured policy settings (#461)
We should distinguish between unconfigured policy settings and those configured with the default values.
In the first case, the syspolicyHandler should return syspolicy.ErrNoSuchKey instead of the default value,
while in the latter case, it should return the actual setting value, even if that value happens to be the default
value such as "user-decides". This distinction should also be reflected in the "Current MDM settings" view.

In this PR, we update MDMSetting.flow to hold both the value to be used by the app and a flag indicating
whether the policy setting is configured or not. If the policy setting is not configured, the value is the default
value for the setting type. We then use this new flag to decide whether to throw a NoSuchKeyException from
the Kotlin-side of the syspolicyHandler implementation and how to display the policy setting in the
"Current MDM settings" view.

Additionally, we update the MDMSettings.update and MDMSetting.setFrom methods to avoid calling
app.getEncryptedPrefs (and reading/decrypting the prefs) for every defined MDM setting.

Updates tailscale/tailscale#12687

Signed-off-by: Nick Khyl <nickk@tailscale.com>
4 months ago
Nick Khyl 946afb6c33 libtailscale, android: translate NoSuchKeyException as syspolicy.ErrNoSuchKey
Currently, NoSuchKeyException gets translated by gomobile to a Go error with "no such key" as the text.
It is imperative for syspolicy.Handler implementations to return syspolicy.ErrNoSuchKey if a policy setting
is not configured, so this PR adds translation for errors that do not already wrap syspolicy.ErrNoSuchKey,
but have "no such key" as the text.

Updates tailscale/tailscale#12687

Signed-off-by: Nick Khyl <nickk@tailscale.com>
4 months ago
Nick Khyl 101c9dd121 mdm: return values rather than the constant names for the setting enums
We stringify setting values with toString before returning them from the syspolicyHandler.
For enum setting types, such as AlwaysNeverUserDecides and ShowHide, the default toString
implementation returns the enum constant names, such as Always and UserDecides. However,
the Go backend requires us to return "always", "never", and "user-decides" values, exactly, and
falls back to the default value (e.g., "user-decides") if it receives anything else from the app.

This PR overrides the toString methods on both enums to return the required values rather than
the constant names.

Updates tailscale/tailscale#12687

Signed-off-by: Nick Khyl <nickk@tailscale.com>
4 months ago
Andrea Gottardo ea0c1e960d
android: remove Google Stadia from hardcoded exclusions list (#457) 4 months ago
Jonathan Nobels 76ab7eab92
makefile: fix bumposs to properly set version and tag (#456)
Updates #cleanup

bumposs was not properly setting the version.  Split the tasks
into separate recipes.  Simply calling make bumposs should
now generate a single commit with the proper versioning
in build.gradle.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
4 months ago
Jonathan Nobels cb916676a4
android: bumping OSS (#455)
OSS and Version updated to 1.71.22-t855da4777-g32e48dc78e7

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
4 months ago
Jonathan Nobels 32e48dc78e
makefile: consolidate bump/tag (#453)
Updates #cleanup

Bumping oss and tagging the release are now combined into a single step.   make bumposs will
now bump to the latest OSS, tag the commit and update the version number in build.gradle in
a single step.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
4 months ago
Jonathan Nobels 23454e9bc6
android: bump oss and version code (#452)
Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
4 months ago
Andrea Gottardo 1465b2a67f
ui: add Mullvad info view (#450)
Updates tailscale/tailscale#9421

Adds a view to highlight Mullvad support when it is not enabled.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
4 months ago
Andrea Gottardo b9917c8647
android: bump OSS to 1.71.x; update dependencies (#449)
Fixes #cleanup

Bumps OSS, updates dependencies and enables `android.nonTransitiveRClass` to improve build times.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
4 months ago
Jonathan Nobels 6deb61a20e
android/docker: combine CMD invocations into a single line (#448)
android/docker: combine CMD into a single line

 updates tailscale/corp#21644

docker ignores all but the last CMD invocation.  These
have to be combined into a single line.  The clean is
redundant.  We run a clean on the mounted directory
before we kick off make docker-run-build.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
4 months ago
Jonathan Nobels b9477c64a8
android/gradle: separate release and release_tv (#447)
updates tailscale/corp#21644

release_tv should init with the release target or it doesn't
build the right thing.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
4 months ago
Jonathan Nobels 2f59feef20
android/makefile: add tv-specific build variant (#445)
android/makefile: add tv-specific build

 updates tailscale/corp#21644

This will build a second tailscale-release-tv.aab with the leanback flag set
suitable for submission for android-tv.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
4 months ago
Andrea Gottardo c4a1dec8eb
mdm: support split tunneling configuration via syspolicy (#441)
Updates tailscale/tailscale#6912

Adds two new Android-only MDM policies: IncludedPackageNames and ExcludedPackageNames. These are comma-separated string values that contain Android package names to configure app-based split tunneling programmatically.

If ExcludedPackageNames is non-empty, Tailscale will exclude the given apps from the VPN tunnel.

If IncludedPackageNames is non-empty, Tailscale will configure the VPN tunnel to only route the given apps via Tailscale.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
4 months ago
Jonathan Nobels 65a025007f
android: bump version code (#446)
Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
4 months ago
Andrea Gottardo ca91191cc6
ui: only show high severity warnings in-app for 1.70 (#444)
As discussed with @barnstar, let's hide health messages within the app's main screen unless they are high severity. Low and mid-severity messages will be re-added in a more subtle, later iteration with a dedicated health messages view.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
4 months ago
Jonathan Nobels 26b4635c11
android: clean up build warnings (#443)
#cleanup

Removed a host of noisy deprecation and unchecked
cast warnings.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
5 months ago
Jonathan Nobels 66fa3c41a6
docs/makefile: update docker build instructions (#442)
#cleanup

Updated the notes on refreshing docker build containers
Removed the jarsign output from the build as it contains
the jks password.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
5 months ago
Jonathan Nobels dfda774dc0
makefile: reuse image and remove container for builds (#440)
Updates tailscale/corp#19670

Build optimization to reuse the existing build image and to
remove the individual containers post build.   Image name
is parameterized.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
5 months ago
Jonathan Nobels 2a8d07c5f6
android: bump version code (#439)
Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
5 months ago
Andrea Gottardo 9b24888c4c
android: implement app split tunneling support (#435)
Updates tailscale/tailscale#6912

Adds UI and models that provide the ability to add/remove apps which should be excluded from going through the VPN tunnel.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
5 months ago
Andrea Gottardo a120eb2fe1
ipn: update dependencies (#432)
Updates project dependencies.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
5 months ago
Andrea Gottardo b3a74986ac
health: only display system notifications for high severity warnings,… (#436)
health: only display system notifications for high severity warnings, show low severity notifications in-app

Updates tailscale/tailscale#4136

This PR brings the Android health system in line with recent macOS/iOS changes. Only high severity notifications will now trigger a system notification; meanwhile all notifications are now displayed in the app home screen, like we do on iOS. The "warming-up" Warnable is observed to prevent spurious notifications from appearing while the app has just launched.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
5 months ago
Andrea Gottardo 840a31d74e
android: bump version to 1.69.75 (230) (#434)
android: bump version code

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
5 months ago
Andrea Gottardo b6cacdfd6a
go.mod: bump OSS to 20240625185613 (#433)
Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
5 months ago
Andrea Gottardo d702d2dab8
ui: add sheet to ping devices and see relay status (#431)
This PR adds the ability to ping other devices in your tailnet from the Android app, similarly to the current functionality on iOS. The ping view displays the current latency value, a chart with latency over time, and whether you are using a direct/relayed connection.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
5 months ago