Commit Graph

9 Commits (0a44d50e8b0a3338aac158c0b83cc5afac1943bc)

Author SHA1 Message Date
Elias Naur 6d9acbb479 cmd/tailscale,java: refactor Google Sign-In into separate class
In preparation for the F-Droid release, refactor the non-free Google dependency
into a separate Java class and make the Go client tolerate missing support.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
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 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 1a937b5c5f java/com/tailscale/ipn: retain peer Fragment across Activity restarts
There is no reason to recreate it for transient restarts.

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