Skip to content

Commit

Permalink
fix responseCode check (if online)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrhex committed Nov 6, 2017
1 parent d298b5c commit 8956cbc
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions gpgs/android/gpgs/Client.java
Expand Up @@ -111,12 +111,14 @@ public boolean resolveConnectionFailure(ConnectionResult result, int requestCode
}

public void onMainActivityResult(int requestCode, int responseCode, Intent intent) {
switch(requestCode) {
case Client.RC_SIGN_IN:
case Client.REQUEST_RESOLVE_ERROR:
isResolvingConnectionFailure = false;
if(!googleApiClient.isConnecting() && !googleApiClient.isConnected()) googleApiClient.connect();
break;
if (responseCode == activity.RESULT_OK) {
switch(requestCode) {
case Client.RC_SIGN_IN:
case Client.REQUEST_RESOLVE_ERROR:
isResolvingConnectionFailure = false;
if(!googleApiClient.isConnecting() && !googleApiClient.isConnected()) googleApiClient.connect();
break;
}
}
}

Expand Down

0 comments on commit 8956cbc

Please sign in to comment.