Commit Graph

78 Commits (070d36d76d4d1c2caaf9715896912422a3760efe)

Author SHA1 Message Date
Elias Naur 1b402aebb0 cmd/tailscale,java/com/tailscale/ipn: always register the Peer Fragment
Before this change, the Peer would be registered across Activity restarts
but not after Activity destruction (for example, when the user pressed the
back button).

Use the newer Gio ViewEvent API for tracking the Activity lifecycle and
the most recent Activity reference.

Move Java calls that need an Activity from Peer to App, leaving Peer solely
as a method for receiving onActivityResult.

Fixes tailscale/tailscale#670

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 3089ad8347 cmd/tailsca,java/comt/tailscale/ipn: don't require an Activity for Google sign-out
The GoogleSignIn.getClient has a version that only needs a Context, not an Activity.

Updates tailscale/tailscale#670

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 05fc3ef433 cmd/tailscale: close overflow menu when the Android back button is pressed
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur a7dfea267c cmd/tailscale: fallback back to Google DNS on ChromeOS
Contrary to the VpnService.Builder documentation, ChromeOS doesn't
automatically fall back to the underlying network nameservers when
none are provided.

Updates tailscale/tailscale#431

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 9e45538997 cmd/tailscale,java/com/tailscale/ipn: provide OSVersion and DeviceModel for the backend
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 91d4d47fd8 cmd/tailscale: stop loader indicator when Google Sign-in is cancelled
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 15632cb15b cmd/tailscale: sign-out any Google users when logging out from Tailscale
Fixes tailscale/tailscale#585

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 5a018c7209 cmd/tailscale: reset loader indicator after Google Sign-in
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 2119f8aa9d cmd/tailscale: avoid backend deadlocks from SetPrefs and LinkChange
Updates tailscale/tailscale#471 (perhaps fixes it)

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur bae9b8394a android: add quick setting tile support
Fixes tailscale/tailscale#516

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur df1d8b338b cmd/tailscale: implement Google ID sign-in
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur ad92c8d81f cmd/tailscale: remove redundant locking
There are no more concurrent accesses to the prefs variable.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 22851bfa05 cmd/tailscale: add progress indicator to sign in buttons
For tailscale/tailscale#481

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur ec9bb108c6 cmd/tailscale: add Google sign-in button
Hidden behind a flag pending support from the Tailscale client.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur cd9c808dd2 java/com/tailscale,cmd/tailscale: remove webview signin
Adjust the Custom Tabs browser color to match the app header while
here.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 8f621e531a cmd/tailscale: don't notify for never-expiring sessions
Fixes tailscale/tailscale#469

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 28c8a2e1e5 go.mod: change the module name to github.com/tailscale/tailscale-android
Makes it go-gettable.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 31b3c725c8 cmd/tailscale: reset cached config when failing to set up VPN tunnel
Add a bit of logging while here.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 0d0a049057 cmd/tailscale: avoid deadlocking between backend calls and callbacks
The runBackend goroutine issues backend requests (StartLoginInteractive,
Logout, SetPrefs) from the same select that receives callbacks the
backend.

Avoid the potential for same-goroutine deadlock by issuing backend requests on
separate goroutines.

Fixes tailscale/tailscale#470

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 18adee11a5 cmd/tailscale: assume internet connectivity at startup
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur bfd730f3d7 cmd/tailscale: handle IPN callbacks from the backend goroutine
Before this change, the notification and configuration callbacks
raced with the backend goroutine.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 4c1017a548 cmd/tailscale,android: bump gio version
Updates tailscale/tailscale#431 (fixes a resize crash)

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur adb6bb736b cmd/tailscale: dim want-running switch when not authorized
Updates tailscale/tailscale#420

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 5de04d4177 cmd/tailscale: bump gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 8ae20a98eb cmd/tailscale: synchronize UI switch with ipn.Prefs.WantRunning
Updates tailscale/tailscale#420

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 3db59c3a9b cmd/tailscale,java/com/tailscale/ipn: set hostname to Build.MODEL
Fixes tailscale/tailscale#409

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur dd6a68bae7 cmd/tailscale: use Stopped as the barrier state for enabling the VPN
NeedsLogin is not the correct barrier because NeedsMachineAuth should also
block VPN startup.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 5109987e18 all: initial commit
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago