Commit Graph

608 Commits (c0ddf78526e8f505c437f804c67f712d43298590)

Author SHA1 Message Date
Jonathan Nobels 135d3b09b2
android: bump OSS and fix breaking changes (#718)
android: bump OSS

OSS and Version updated to 1.91.144-tc679aaba3-gc1b1cad63

Removed Expiry from model.Netmap and corrected the optionality
of Node.KeyExpiry to fix breaking LocalAPI changes.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2 weeks ago
Andrew Lytvynov 6f3d1881a8
Fix hardware key attestation support (#715)
Enable attestation key by default, any enforcement happens in control.
Also, make the HashMap for tracking loaded keys in HardwareKeyStore a
singleton, so that multiple instances of HardwareKeyStore created in
App.kt don't lose the state of the loaded keys.

Updates https://github.com/tailscale/tailscale/issues/15830

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
3 weeks ago
Patrick O'Doherty c7cc272eba
android,libtailscale: allow toggling HW attestation via MDM (#709)
Previously hardware attestation was enabled on all supported devices.
We now gate this functionality behind an MDM setting (whose default
value is true) to allow disabling this in deployments where it
might cause issues.

Updates tailscale/corp#31269

OSS and Version updated to 1.89.254-t005e264b5-g0b32dd75c

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
Signed-off-by: Patrick O'Doherty <patrick@tailscale.com>
2 months ago
Jonathan Nobels 0b32dd75c5
build.gradle: update versionCode to match playstore (#711)
udpates #cleanup

Manual bump for now to fix issues with FDroid builds.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2 months ago
Andrew Lytvynov 11869b00c5
android,libtailscale: implement key.HardwareAttestationKey (#694)
Use a KeyStore-backed key to store a hardware-bound private key.

Updates https://github.com/tailscale/tailscale/issues/15830

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
3 months ago
Nick O'Neill 0de26e52c0
android: Support tailnet display name, falling back to domain (#703)
android: support tailnet display name, falling back to domain

Updates https://github.com/tailscale/corp/issues/30456

Signed-off-by: Nick O'Neill <nick@tailscale.com>
3 months ago
Jonathan Nobels 0498654ebd
android: hide placeholder when avatar is loaded (#701)
fixes tailscale/corp#32012

Hides the placeholder image once the user's avatar is
loaded.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
3 months ago
Michael Nahkies 981f5e8770 all: add Makefile fmt and fmt-check targets, format all source code
Signed-off-by: Michael Nahkies <michael@nahkies.co.nz>
3 months ago
kari-ts cc2f6386a6
android: update target API to 35 (#688)
Fixes tailscale/corp#31101

Signed-off-by: kari-ts <kari@tailscale.com>
4 months ago
kari-ts e68e64014e
android: defer taildrop selector until first taildrop attempt (#684)
Move Taildrop directory selector out of onboarding
-Listen for Taildrop, and show selector if a directory has not been set

Remove LocalBackend re-initialization
-This is no longer necessary since the directory is set in FileOps

Updates tailscale/corp#29211

Signed-off-by: kari-ts <kari@tailscale.com>
4 months ago
kari-ts e71641a422
android: expand SAF FileOps implementation (#675)
* android: expand SAF FileOps implementation

This expands the SAF FileOps to implement the refactored FileOps

Updates tailscale/corp#29211

Signed-off-by: kari-ts <kari@tailscale.com>

* android: bump OSS

OSS and Version updated to 1.87.25-t0f15e4419-gde3b6dbfd

Signed-off-by: kari-ts <kari@tailscale.com>

---------

Signed-off-by: kari-ts <kari@tailscale.com>
Signed-off-by: kari-ts <135075563+kari-ts@users.noreply.github.com>
4 months ago
kari-ts 7aab785be0
android: add tailnet deletion dialog (#682)
Add dialog for deleting tailnet in user switcher view.

Fixes tailscale/corp#31024

Signed-off-by: kari-ts <kari@tailscale.com>
4 months ago
kari-ts 483a949eb2
android: don't show Taildrop picker on TV (#679)
Updates tailscale/tailscale#16164

Signed-off-by: kari-ts <kari@tailscale.com>
4 months ago
kari-ts 460736a151
android: add All() to state store implementation (#673)
Android has its own SharedPreferences-backed implementation of ipn.StateStore. Due to https://github.com/golang/go/issues/13445, we bundle the key list into a single primitive and unpack it in Go in our All() implementation.
This also adds a compile-time check to prevent drift the interface.

Updates tailscale/tailscale#15830

Signed-off-by: kari-ts <kari@tailscale.com>
5 months ago
Jonathan Nobels 28f1931531
android: touchless auth key login (#667)
updates tailscale/corp#29482

If an authKey is detected in the mdm payload, we will now skip the
onboarding flows and several of the other non-mandatory permission
prompts.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
6 months ago
Zach Buchheit b9993097fc
mdm: define OnboardingFlow syspolicy on Android (#648)
Adds an MDM setting `OnboardingFlow` which allows for the intro screen to be skipped when set to true.

Adds MDM Setting update to the top of MainActivity onCreate to ensure the latest MDMSettings are accurate. When attempting to do this while
relying on MDMSettings being update during onResume it created a race condition where occasionally OnboardingFlow was being evaluated to the
default value `show` when in reality it should be set to `hide`.

updates tailscale/corp#29482

Signed-off-by: zbuchheit <zachb@tailscale.com>
6 months ago
kari-ts 211eb45535
android: add fallback VPN permission (#662)
Some heavily customized OEMS may auto-deny VPN requests without exposing the setting. Show a fallback dialog for devices with no visible VPN panel.

Updates tailscale/tailscale#14095

Signed-off-by: kari-ts <kari@tailscale.com>
6 months ago
kari-ts 28084cbd27
android: do not stop running on login, and edit prefs after startLogi… (#659)
android: do not stop running on login, and edit prefs after startLoginInteractive

Previously: start, edit prefs with wantRunning=false, then startLoginInteractive
Now: 1. editPrefs() with WantRunning=true, LoggedOut=false if AuthKey != null
     2. start() -> boots tailscaled
     3. startLoginInteractive()
Do not call wantRunning=false; the route clearing issue requiring that is resolved.

This also:
-add deepCopy function which copies MaskedPrefs. Note that .copy() does not copy the non-constructor parameters
-removes InternalExitNodePriorSet in MaskedPrefs, since this can't be set on the client

Updates tailscale/corp#24002

Signed-off-by: kari-ts <kari@tailscale.com>
6 months ago
Jonathan Nobels 296b582520
android: detect amazon fire stick as a AndroidTV (#664)
fixes tailscale/tailscale#16164

We weren't detecting fire stick devices as TV devices.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
6 months ago
Anton Tolchanov a5a5cbb2d5 android: add definitions for the DeviceSerialNumber MDM key
Updates tailscale/tailscale#16010

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
6 months ago
kari-ts 1ec621c382
android: make currentDir reactive (#661)
-The composables were reading the currentDir value once and not observing it. This fixes it so that we recompose when the StateFlow changes.
-Use commit() instead of apply() when writing to EncryptedSharedPreferences since we are reading from it immediately and need the writes to happen synchronously
-Remove unused function in PermissionsViewModel

Fixes tailscale/corp#29283

Signed-off-by: kari-ts <kari@tailscale.com>
6 months ago
kari-ts 87f0e9754b
android: allow users to update taildrop directory (#658)
-Modify Permissions view to navigate to Taildrop dir view and Notifications view, and to reflect state
-Add Taildrop dir view which navigates to directory selector
-Add Notifications view which navigates to Taildrop notifications setting

Updates tailscale/tailscale#15263

Signed-off-by: kari-ts <kari@tailscale.com>
6 months ago
Jonathan Nobels a14d4c7184
android: add explanatory dialog for taildrop directory selection (#657)
fixes tailscale/corp#29067

Adds an interstitial explaining that the user needs to select/create
a taildrop target directory on startup.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
6 months ago
Jonathan Nobels 88a5d3c140
android: modify mullvad exit node detection logic (#656)
updates tailscale/corp#29045

We ran into an issue where the current detection logic was not
sufficient to filter out mullvad nodes.  This modifies the logic so we
scan both the Name and ComputedName for the mullvad domain and
also treat all nodes with location info as mullvad nodes.  While all
of these conditions *should* be true for any mullvad node, in practice
it's possible that they aren't so we or them together for some redundancy
and define a mullvad exit node to be any node where any of these
conditions is true.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
6 months ago
kari-ts bd5191363c
android: use SAF for storing Taildropped files (#632)
Use Android Storage Access Framework for receiving Taildropped files.

-Add a picker to allow users to select where Taildropped files go
-If no directory is selected, internal app storage is used
-Provide SAF API for Go to use when writing and renaming files
-Provide Android FileOps implementation

Updates tailscale/tailscale#15263

Signed-off-by: kari-ts <kari@tailscale.com>
7 months ago
kari-ts d5988faf9a
android: add IME action to trigger custom CustomLogin (#649)
Updates tailscale/tailscale#14864

Signed-off-by: kari-ts <kari@tailscale.com>
7 months ago
kari-ts 81ff898782
android: replace broadcast intent with service intent (#650)
We were previously calling startService(intent), which is a direct call consumed by IPNService, but restartVPN was not working as intended because the broadcast receiver was never triggered.
Rather than use a broadcast receiver, directly start the service in restartVPN as we do in stopVPN. Also, batch changes to excluded apps so that we don't restart the VPN each time the user toggles an app.

Fixes tailscale/corp#28668

Signed-off-by: kari-ts <kari@tailscale.com>
7 months ago
kari-ts e3c76eb812
android: fix isExitNode check (#646)
&& takes precedence over ?:, so fix isExitNode to check both IPv4 and IPv6

Updates tailscale/tailscale#15785

Signed-off-by: kari-ts <kari@tailscale.com>
7 months ago
kari-ts d3f34c579d
android: defer vpn permission until activity is resumed (#647)
Right now, we register the launcher in MainActivity.onCreate(), inject this into the ViewModel, then show the launcher in MainView.
There is no guarantee that the activity is in RESUMED when the Composable runs, showing the launcher. This can lead to a silent RESULT_CANCELED on some OEMs.
The fix is to add a lifecycle-aware wrapper that defers the launch.

Updates tailscale/tailscale#15419

Signed-off-by: kari-ts <kari@tailscale.com>
7 months ago
davfsa ca7dc5f8a8
android: ensure in secure state to interact with quicktile (#622)
* android: ensure in secure state to interact with quicktile

Updates tailscale/tailscale#14628

Signed-off-by: davfsa <davfsa@gmail.com>

* Update android/src/main/java/com/tailscale/ipn/QuickToggleService.java

Signed-off-by: davfsa <davfsa@gmail.com>

---------

Signed-off-by: davfsa <davfsa@gmail.com>
7 months ago
Jakub Meysner 8683c789fd
android/src/main: show exit node information in the permanent notification (#642)
* android/src: ktfmt

Signed-off-by: Jakub Meysner <git@jakubmeysner.com>

* android/src/main: show exit node information in the permanent notification

Displays exit node status (including the name of the exit node) in the permanent connection notification's content (moving the overall connected/disconnected status to the title).

Fixes tailscale/tailscale#14438

Signed-off-by: Jakub Meysner <git@jakubmeysner.com>

* docker: fix invalid instruction in Dockerfile not using trailing slash for files destination directory

> If the source is a file, and the destination doesn't end with a trailing slash, the source file will be written to the destination path as a file.
~ https://docs.docker.com/reference/dockerfile/#destination

Signed-off-by: Jakub Meysner <git@jakubmeysner.com>

---------

Signed-off-by: Jakub Meysner <git@jakubmeysner.com>
7 months ago
kari-ts ff4a49a076
android: fix IllegalStateException in navigation (#643)
Update to androidx.navigation 2.8.5: this fixes the NavHost exception per https://developer.android.com/jetpack/androidx/releases/navigation#2.8.5

Fixes tailscale/tailscale#15755

Signed-off-by: kari-ts <kari@tailscale.com>
8 months ago
sakuram 79cd12a159 android: fix typo in comment
Signed-off-by: sakuram <trge241@gmail.com>
8 months ago
kari-ts 0888b3c248
android: add missing import (#629)
Updates tailscale/corp#27375

Signed-off-by: kari-ts <kari@tailscale.com>
8 months ago
kari-ts 9652dbc6e4
android: only use new search for API 33+ (#627)
disable search for Android TV running < API 33

Updates tailscale/corp#27375

Signed-off-by: kari-ts <kari@tailscale.com>
8 months ago
kari-ts 99712c14da
android: enable search for TV (#620)
Updates tailscale/corp#18973

Signed-off-by: kari-ts <kari@tailscale.com>
9 months ago
kari-ts 189de89466
android: check back stack before popping back (#618)
A possible cause for an IndexOutOfBounds exception is that when the intent is delivered, the back stack doesn't have enough entries for the operation. Condition popping back on if there is more than one entry in the back stack; otherwise, navigate directly to main to reset the back stack.

Updates tailscale/tailscale#15188

Signed-off-by: kari-ts <kari@tailscale.com>
9 months ago
kari-ts 10b2c61f5f
android: refine search (#611)
-improve transition
-clean up search input spacing to match other elements
-match search results page styling to machines page
-fix issue where search suggestions were propagating to main view
-flip new search flag On

Fixes tailscale/corp#18973

Signed-off-by: kari-ts <kari@tailscale.com>
9 months ago
Andrea Gottardo 8d55951fb2
android: bump OSS (#607)
Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
10 months ago
Jonathan Nobels 817121e213
android/tv: remove avatar padding in userView (#606)
updates tailscale/corp#26199

Removes the avatar padding when the avatar is not focusable.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
10 months ago
Jonathan Nobels 7f93377c2f
android/tv: fix focus highlighting on back buttons (#605)
updates tailscale/corp#26199

The back buttons would not highlight properly when
they are focussed on Android TV.  This pulls in what
was implemented for the Avatar.

Some small tweaks to the action animation so that it
has a nice radius instead of a square box.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
10 months ago
Andrea Gottardo 56d7be331e
ui: display error dialog when saving subnet routes fails (#604)
Fixes tailscale/corp#26175

When setting subnet routing settings, for a variety of reasons the Tailscale backend may reject an entered value with a 400 error. Here we handle such errors in a user-facing fashion:

- We display an ErrorDialog with title 'Failed to save' and whatever error message the backend request returned. To do so, we introduce a new initializer for ErrorDialog that accepts a runtime-generated String instead of a fixed string resource.
- We ask the backend to provide an updated value of AdvertiseRoutes whenever the error dialog is dismissed by the user, and set it as the UI state, to ensure consistency between UI and backend upon a failed save.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
10 months ago
Keli 0ed18a2b0a
android: fix typo in subnet menu (#603)
android: update typo in subnet menu
Updates a typo in the subnet router "add route" menu from "a IPv4" to "an IPv4"

Fixes tailscale/corp#26167

Signed-off-by: Keli Velazquez <keli@tailscale.com>
10 months ago
Andrea Gottardo 0f6059dfc0
android: bump OSS (#599)
Bump OSS to 20250117225247 and versionCode to 350

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
11 months ago
Andrea Gottardo 61895c47a1
mdm: define Hostname syspolicy on Android (#598)
Updates tailscale/corp#25936

Adds a definition for the Hostname syspolicy which we are adding in OSS: https://github.com/tailscale/tailscale/pull/14676

Also adds it to the app_restrictions.xml file so that MDM solutions can pick it up.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
11 months ago
Andrea Gottardo 9c3378d7eb
ui: add ability to advertise Android device as subnet router (#595) 11 months ago
Jarne Demeulemeester a2850b1078
android: mark Quick Settings tile as toggleable (#594)
Signed-off-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
11 months ago
Andrea Gottardo b1bc451d76
android: bump OSS, set versionCode to 346 (#596)
OSS bumped to v1.79.116-t6364b5f1e-g34a06be19

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
11 months ago
kari-ts e500111fb9
android: put new search behind flag (#587)
Until the WIP feature is ready

Updates tailscale/corp#18973

Signed-off-by: kari-ts <kari@tailscale.com>
Signed-off-by: kari-ts <135075563+kari-ts@users.noreply.github.com>
12 months ago
kari-ts ebbc1b2f49
android: add logging to see what's spamming editPrefs (#586)
Updates tailscale/tailscale#14125

Signed-off-by: kari-ts <kari@tailscale.com>
12 months ago