Skip to content

Commit 68f0f64

Browse files
SUPERCILEXsamtstern
authored andcommitted
Start safe ID at non-default value for getSafeAutoManageId (#578)
1 parent f72df45 commit 68f0f64

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

auth/src/main/java/com/firebase/ui/auth/util/GoogleApiHelper.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* A {@link Task} based wrapper to get a connect {@link GoogleApiClient}.
2222
*/
2323
public abstract class GoogleApiHelper implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener {
24-
private static final AtomicInteger SAFE_ID = new AtomicInteger(0);
24+
private static final AtomicInteger SAFE_ID = new AtomicInteger(10);
2525

2626
protected GoogleApiClient mClient;
2727
private TaskCompletionSource<Bundle> mGoogleApiConnectionTask = new TaskCompletionSource<>();
@@ -32,6 +32,10 @@ protected GoogleApiHelper(FragmentActivity activity, GoogleApiClient.Builder bui
3232
mClient = builder.build();
3333
}
3434

35+
/**
36+
* @return a safe id for {@link GoogleApiClient.Builder#enableAutoManage(FragmentActivity, int,
37+
* GoogleApiClient.OnConnectionFailedListener)}
38+
*/
3539
public static int getSafeAutoManageId() {
3640
return SAFE_ID.getAndIncrement();
3741
}

0 commit comments

Comments
 (0)