Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit dc8790e

Browse files
Chris Yangmithun-mondal
authored andcommitted
Revert "[google_sign_in] Added NonNull annotations, reduce Guava usage (flutter#844) (flutter#1828)
1 parent 22e7133 commit dc8790e

4 files changed

Lines changed: 17 additions & 13 deletions

File tree

packages/google_sign_in/CHANGELOG.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
## 4.0.3
1+
## 4.0.4
22

3-
* Update guava to `27.0.1-android`.
4-
* Add correct @NonNull annotations to reduce compiler warnings.
3+
* Revert changes in 4.0.3.
4+
5+
## 4.0.3
6+
7+
* Update guava to `27.0.1-android`.
8+
* Add correct @NonNull annotations to reduce compiler warnings.
59

610
## 4.0.2
711

packages/google_sign_in/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ android {
4848

4949
dependencies {
5050
api 'com.google.android.gms:play-services-auth:16.0.1'
51-
implementation 'com.google.guava:guava:27.0.1-android'
51+
implementation 'com.google.guava:guava:20.0'
5252
}

packages/google_sign_in/android/src/main/java/io/flutter/plugins/googlesignin/GoogleSignInPlugin.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import android.accounts.Account;
88
import android.app.Activity;
99
import android.content.Intent;
10-
import android.text.TextUtils;
11-
import androidx.annotation.NonNull;
1210
import com.google.android.gms.auth.GoogleAuthUtil;
1311
import com.google.android.gms.auth.UserRecoverableAuthException;
1412
import com.google.android.gms.auth.api.signin.GoogleSignIn;
@@ -22,6 +20,8 @@
2220
import com.google.android.gms.tasks.OnCompleteListener;
2321
import com.google.android.gms.tasks.RuntimeExecutionException;
2422
import com.google.android.gms.tasks.Task;
23+
import com.google.common.base.Joiner;
24+
import com.google.common.base.Strings;
2525
import io.flutter.plugin.common.MethodCall;
2626
import io.flutter.plugin.common.MethodChannel;
2727
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
@@ -107,7 +107,7 @@ public void onMethodCall(MethodCall call, Result result) {
107107

108108
/**
109109
* A delegate interface that exposes all of the sign-in functionality for other plugins to use.
110-
* The below {@link Delegate} implementation should be used by any clients unless they need to
110+
* The below {@link #Delegate} implementation should be used by any clients unless they need to
111111
* override some of these functions, such as for testing.
112112
*/
113113
public interface IDelegate {
@@ -243,7 +243,7 @@ public void init(
243243
for (String scope : requestedScopes) {
244244
optionsBuilder.requestScopes(new Scope(scope));
245245
}
246-
if (!TextUtils.isEmpty(hostedDomain)) {
246+
if (!Strings.isNullOrEmpty(hostedDomain)) {
247247
optionsBuilder.setHostedDomain(hostedDomain);
248248
}
249249

@@ -270,7 +270,7 @@ public void signInSilently(Result result) {
270270
task.addOnCompleteListener(
271271
new OnCompleteListener<GoogleSignInAccount>() {
272272
@Override
273-
public void onComplete(@NonNull Task<GoogleSignInAccount> task) {
273+
public void onComplete(Task<GoogleSignInAccount> task) {
274274
onSignInResult(task);
275275
}
276276
});
@@ -305,7 +305,7 @@ public void signOut(Result result) {
305305
.addOnCompleteListener(
306306
new OnCompleteListener<Void>() {
307307
@Override
308-
public void onComplete(@NonNull Task<Void> task) {
308+
public void onComplete(Task<Void> task) {
309309
if (task.isSuccessful()) {
310310
finishWithSuccess(null);
311311
} else {
@@ -325,7 +325,7 @@ public void disconnect(Result result) {
325325
.addOnCompleteListener(
326326
new OnCompleteListener<Void>() {
327327
@Override
328-
public void onComplete(@NonNull Task<Void> task) {
328+
public void onComplete(Task<Void> task) {
329329
if (task.isSuccessful()) {
330330
finishWithSuccess(null);
331331
} else {
@@ -448,7 +448,7 @@ public void getTokens(
448448
@Override
449449
public String call() throws Exception {
450450
Account account = new Account(email, "com.google");
451-
String scopesStr = "oauth2:" + TextUtils.join(" ", requestedScopes);
451+
String scopesStr = "oauth2:" + Joiner.on(' ').join(requestedScopes);
452452
return GoogleAuthUtil.getToken(registrar.context(), account, scopesStr);
453453
}
454454
};

packages/google_sign_in/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for Google Sign-In, a secure authentication system
33
for signing in with a Google account on Android and iOS.
44
author: Flutter Team <flutter-dev@googlegroups.com>
55
homepage: https://github.com/flutter/plugins/tree/master/packages/google_sign_in
6-
version: 4.0.3
6+
version: 4.0.4
77

88
flutter:
99
plugin:

0 commit comments

Comments
 (0)