Commit Graph

521 Commits (d309f31b5ab868b79fa1e63e1a00bf4bb090d809)

Author SHA1 Message Date
kari-ts d309f31b5a
android: don't show hex code yet (#536)
Hold off on showing the code until there is a place in the admin console for the user to input the code.

Updates tailscale/tailscale#13277

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
Andrea Gottardo cd993fee43
ui: hide commit hashes in user-facing version string (#534)
We currently show the full version number everywhere. This pointlessly causes confusion for users, and is only really useful for Tailscale employees. Let's show the marketing version everywhere instead.

Users can still tap on the version number to copy the full version string. The extended version is also available in the Android settings, when inspecting Tailscale from the Apps list.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2 months ago
Keli a32c2aa0df
android: bumping OSS (#532)
OSS and Version updated to 1.75.81-t4ad3f0122-g0126db799b1

Signed-off-by: Keli Velazquez <keli@tailscale.com>
2 months ago
Andrea Gottardo 0126db799b
ui/model: adjust default control server URL (#531)
Updates tailscale/corp#23660

I screwed up by not including 'https://' in a last-minute refactoring :-)
2 months ago
Andrea Gottardo 4ca757bb75
android: bumping OSS to 1.75.80 (#530)
android: bumping OSS

OSS and Version updated to 1.75.80-t8fdffb8da-g2daeee584df

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2 months ago
Andrea Gottardo 2daeee584d
ui/UserView: show custom control server URL in account switcher (#529) 2 months ago
kari-ts be89cb10fe
android: bumping OSS (#528)
OSS and Version updated to 1.75.58-t262c526c4-gf5ecca3c967

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
kari-ts f5ecca3c96
android: StringArrayListMDMSetting should check for String[] (#527)
getFromBundle should check for both String[] and ArrayList<String>

Fixes tailscale/corp#23557

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
Kristoffer Dalby 8eabe8d6dd
android: bumping OSS (#526)
android: bumping OSS

OSS and Version updated to 1.75.56-t1eaad7d3d-g625f6f02352

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2 months ago
kari-ts 9572541648
android: bumping OSS (#524)
OSS and Version updated to 1.75.51-ta70287d32-gc10aca720b8

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
kari-ts c10aca720b
android: don't set vpnService to nil when state is Stopped (#523)
We are currently setting vpnService.service to nil:
-any time there’s an error with updateTUN
-when we exit out of runBackend
-if the config is the default config (aka when the ipn state is Stopped)

When it gets set to nil, we don’t handle state or config updates by calling updateTUN until after startVPN is called again.
The second case never happens because there’s no condition to break out of the loop in runBackend and ctx is uncancelable per the doc for context.Background()
In the third case, we should not establish the VPN; the state is already in the correct Stopped state, but there’s no need to set the service to nil and prevent updateTUN from being called. The quick settings tile bug is caused by this third case, where because the saved prefs starts the app up in the Stopped state, the config is set to the default config, and the service is set to nil, and we can't updateTUN until there’s another startVPN call.

This PR:
-cleans up the updateTUN error handling to be more consistent
-removes the IPNService parameter from updateTUN so that vpnService.service is not set to nil in the third case
-updates IPNService to use stopSelf and not stopForeground when we disconnect the VPN; the latter only disconnects if there is a memory need

Fixes tailscale/tailscale#12489

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
kari-ts 25e7681c32
android: set VPN status in service APIs (#522)
This is mainly a no-op; right now we are setting the VPN status when we successfully edit prefs with wantRunning=false, but the VPN status is separate from tailscaled status and reflects the status of the VPN interface. This change moves that status update into the Android Service APIs.

Updates tailscale/tailscale#12850
Updates tailscale/tailscale#12489

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
Jonathan Nobels f8f2ee029a
android: fix all linter warnings and treat warnings as errors (#521)
#Updates tailscale/corp#22284

Fixes and/or explicitly suppresses all linter warnings and
we will now fail the build if new warnings are introduced.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2 months ago
kari-ts 08ae018468
android: send Android logs to logz (#515)
TSLog sends log messages to Android's logcat and Tailscale's logger
Libtailscale wrapper is a Kotlin wrapper that allows us to get around the problems with mocking a native library

Fixes tailscale/corp#23191

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
kari-ts 9731afd44c
android: use PackageManager to determine install AppSourceChecker (#517)
We were using MaybeGoogle to determine whether the app was installed from the Play Store, but this has not worked since the refactor.
Fixes tailscale/tailscale#13442
Updates tailscale/corp#23283

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
kari-ts 9654bb5d9d
android: include hex in LoginQRView (#502)
Updates tailscale/tailscale#13277

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
kari-ts 2ec7304092
android: use onSuccess parameter in setWantRunning (#516)
Previously we were never actually invoking this parameter
We previously weren't setting vpnActive after closing IPNService

Updates tailscale/corp#22284

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
kari-ts 22de0cdb7e
android: make custom url check case-insensitive (#513)
Fixes tailscale/corp#23210

Signed-off-by: kari-ts <kari@tailscale.com>
Co-authored-by: Jonathan Nobels <jnobels@gmail.com>
2 months ago
Jonathan Nobels 0b2a04b475
android: bump OSS to 1.75.11 (#512)
android: bumping OSS

OSS and Version updated to 1.75.11-t8b962f23d-gf07d419a125

The toolchain hash is being incorrectly by bumpOSS.
Reverting it back to the correct value for 1.74/1.75

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2 months ago
kari-ts 9987dbc592
android: only update DNS configs on LinkProperties changes (#511)
We were updating DNS configs when capabilities changed, without LinkProperties having been filled in. Because onAvailable always happened first, LinkProperties were created with default value, and onCapabilitiesChanged sent a DNS update using those LinkProperties.
This change only updates DNS configs on LinkProperties, which is the last update sent on a network change.

Updates tailscale/tailscale#13173

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
kari-ts 8b91b0ff0a
android: bumping OSS (#510)
OSS and Version updated to 1.75.6-tf572286bf-g2fcb080aa67

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
Andrea Gottardo 001e79546c
android: bump OSS to 1.75.3 + update toolchain (#501)
OSS and Version updated to 1.75.3-tafec2d41b-gffbc556cde8

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2 months ago
Andrea Gottardo ffbc556cde
android: bumping OSS to 1.75.2 (#500)
OSS and Version updated to 1.75.2-t93f61aa4c-ge195def5e23

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2 months ago
Andrew Dunham aaecc62e1c android: rework NetworkChangeCallback to track all networks
Instead of just tracking our default network, track all of them and
decide upon each change which is the "best" option.

Updates tailscale/tailscale#13173

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
2 months ago
kari-ts 28712da8d0
android: fix BuildConfig infinite loop (#495)
Rather than create a Go struct that is set by Android, have Go call into Android to fetch build BuildConfig
Updates tailscale/tailscale#13431

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
Andrew Dunham 45567146f4 android, libtailscale: pass BuildConfig to Go code; use for DNS config
This commit wires up a method to allow the Tailscale Go backend to
obtain the build configuration, and then adds a new build configuration
to the build to control whether we fall back to the Google public DNS
servers if we can't determine the platform's DNS configuration.

This replaces the previous "IsPlayVersion" / "MaybeGoogle" check for
whether to use the DNS servers as fallbacks, to allow users to decide
this independently of what version of the Android app this is.

Updates tailscale/tailscale#13431

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
2 months ago
kari-ts 283e1ebcd8
android: fix network callback race (#493)
ConnectivityManager doesn't make guarantees about the order of network updates. Only use network updates for currently active network.
Also, use registerDefaultNetworkCallback so that we are only listening for default networks.

Updates tailscale/tailscale#13173

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
Jonathan Nobels 9f87446ab6
android: bumping OSS to 1.73.114 (#492)
OSS Updated to 1.73.114
Version 1.73.114-t0970615b1-gab7ab737364

updates #cleanup

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
3 months ago
Jonathan Nobels ab7ab73736
android: fix versioning and bump oss (#490)
* android: update docker image names for go 1.23

updates #cleanup

We need to regenerate the docker images, we'll
denote the new ones with a go1.23 extension.

This also sets the TS_USE_TOOLCHAIN flag so
we're using the corp toolchain which fixes some
versioning script issues.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

* android: bumping OSS

OSS and Version updated to 1.73.104-te7b5e8c8c-g161457b99b5

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

---------

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
3 months ago
Anton Tolchanov 095dae1195 android: exclude MDM classes from ProGuard optimizations
Updates tailscale/corp#22797

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
3 months ago
Andrea Gottardo 19581721cf
android: bump OSS to 1.73.73, use Go 1.23 (#485)
Updates #cleanup

OSS and Version updated to 1.73.73

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
3 months ago
kari-ts 18e4b176c6
android: fix missing '}' issue (#487)
also run linter

Updates #cleanup

Signed-off-by: kari-ts <kari@tailscale.com>
3 months ago
kari-ts 77eaadb360
android: fix missing imports (#486)
android: make clipboard values clickable and focusable

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>
Signed-off-by: kari-ts <135075563+kari-ts@users.noreply.github.com>
3 months ago
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
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