bug fix: remove crash with sign out google

This commit is contained in:
CounterFire2023 2024-02-20 16:38:38 +08:00
parent 04a804cf79
commit d73965730c

View File

@ -287,10 +287,14 @@ public class MainActivity extends UnityPlayerActivity
}
public void signOutGoogle(String funId) {
mGoogleSignInClient.signOut()
.addOnCompleteListener(this, task -> {
// ...
});
if (isGooglePlayServicesAvailable()) {
if (mGoogleSignInClient != null) {
mGoogleSignInClient.signOut()
.addOnCompleteListener(this, task -> {
// ...
});
}
}
}
private void handleSignInResult(Task<GoogleSignInAccount> completedTask) {