SDL: updated Google Play Games build scripts, removed Google+ stuff
This commit is contained in:
@@ -28,9 +28,6 @@ import java.util.Random;
|
||||
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.ResultCallback;
|
||||
import com.google.android.gms.auth.GoogleAuthException;
|
||||
import com.google.android.gms.auth.GoogleAuthUtil;
|
||||
import com.google.android.gms.auth.UserRecoverableAuthException;
|
||||
import com.google.android.gms.common.Scopes;
|
||||
import com.google.android.gms.games.Games;
|
||||
import com.google.android.gms.games.GamesStatusCodes;
|
||||
|
||||
@@ -41,8 +41,8 @@ import com.google.android.gms.games.multiplayer.Invitation;
|
||||
import com.google.android.gms.games.multiplayer.Multiplayer;
|
||||
import com.google.android.gms.games.multiplayer.turnbased.TurnBasedMatch;
|
||||
import com.google.android.gms.games.request.GameRequest;
|
||||
import com.google.android.gms.plus.Plus;
|
||||
import com.google.android.gms.plus.Plus.PlusOptions;
|
||||
//import com.google.android.gms.plus.Plus;
|
||||
//import com.google.android.gms.plus.Plus.PlusOptions;
|
||||
|
||||
public class GameHelper implements GoogleApiClient.ConnectionCallbacks,
|
||||
GoogleApiClient.OnConnectionFailedListener {
|
||||
@@ -112,7 +112,7 @@ public class GameHelper implements GoogleApiClient.ConnectionCallbacks,
|
||||
|
||||
// Api options to use when adding each API, null for none
|
||||
GamesOptions mGamesApiOptions = GamesOptions.builder().build();
|
||||
PlusOptions mPlusApiOptions = null;
|
||||
//PlusOptions mPlusApiOptions = null;
|
||||
NoOptions mAppStateApiOptions = null;
|
||||
|
||||
// Google API client object we manage.
|
||||
@@ -121,10 +121,10 @@ public class GameHelper implements GoogleApiClient.ConnectionCallbacks,
|
||||
// Client request flags
|
||||
public final static int CLIENT_NONE = 0x00;
|
||||
public final static int CLIENT_GAMES = 0x01;
|
||||
public final static int CLIENT_PLUS = 0x02;
|
||||
//public final static int CLIENT_PLUS = 0x02;
|
||||
public final static int CLIENT_APPSTATE = 0x04;
|
||||
public final static int CLIENT_SNAPSHOT = 0x05;
|
||||
public final static int CLIENT_ALL = CLIENT_GAMES | CLIENT_PLUS
|
||||
public final static int CLIENT_ALL = CLIENT_GAMES //| CLIENT_PLUS
|
||||
| CLIENT_APPSTATE | CLIENT_SNAPSHOT;
|
||||
|
||||
// What clients were requested? (bit flags)
|
||||
@@ -256,10 +256,10 @@ public class GameHelper implements GoogleApiClient.ConnectionCallbacks,
|
||||
* Sets the options to pass when setting up the Plus API. Call before
|
||||
* setup().
|
||||
*/
|
||||
public void setPlusApiOptions(PlusOptions options) {
|
||||
doApiOptionsPreCheck();
|
||||
mPlusApiOptions = options;
|
||||
}
|
||||
//public void setPlusApiOptions(PlusOptions options) {
|
||||
// doApiOptionsPreCheck();
|
||||
// mPlusApiOptions = options;
|
||||
//}
|
||||
|
||||
/**
|
||||
* Creates a GoogleApiClient.Builder for use with @link{#setup}. Normally,
|
||||
@@ -283,10 +283,10 @@ public class GameHelper implements GoogleApiClient.ConnectionCallbacks,
|
||||
builder.addScope(Games.SCOPE_GAMES);
|
||||
}
|
||||
|
||||
if (0 != (mRequestedClients & CLIENT_PLUS)) {
|
||||
builder.addApi(Plus.API);
|
||||
builder.addScope(Plus.SCOPE_PLUS_LOGIN);
|
||||
}
|
||||
//if (0 != (mRequestedClients & CLIENT_PLUS)) {
|
||||
// builder.addApi(Plus.API);
|
||||
// builder.addScope(Plus.SCOPE_PLUS_LOGIN);
|
||||
//}
|
||||
|
||||
if (0 != (mRequestedClients & CLIENT_SNAPSHOT)) {
|
||||
builder.addScope(Drive.SCOPE_APPFOLDER);
|
||||
@@ -534,10 +534,10 @@ public class GameHelper implements GoogleApiClient.ConnectionCallbacks,
|
||||
|
||||
// for Plus, "signing out" means clearing the default account and
|
||||
// then disconnecting
|
||||
if (0 != (mRequestedClients & CLIENT_PLUS)) {
|
||||
debugLog("Clearing default account on PlusClient.");
|
||||
Plus.AccountApi.clearDefaultAccount(mGoogleApiClient);
|
||||
}
|
||||
//if (0 != (mRequestedClients & CLIENT_PLUS)) {
|
||||
// debugLog("Clearing default account on PlusClient.");
|
||||
// Plus.AccountApi.clearDefaultAccount(mGoogleApiClient);
|
||||
//}
|
||||
|
||||
// For the games client, signing out means calling signOut and
|
||||
// disconnecting
|
||||
|
||||
Reference in New Issue
Block a user