Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
package com.facebook.gamingservices.cloudgaming;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import androidx.annotation.Nullable;
import com.facebook.GraphRequest;
import com.facebook.gamingservices.cloudgaming.internal.SDKConstants;
import com.facebook.gamingservices.internal.GamingMediaUploader;
import java.io.File;
import java.io.FileNotFoundException;
/* loaded from: classes2.dex */
public abstract class AppToUserNotificationSender {
public static void scheduleAppToUserNotification(String str, String str2, Bitmap bitmap, int i, @Nullable String str3, GraphRequest.Callback callback) throws FileNotFoundException {
GamingMediaUploader.uploadToGamingServices(SDKConstants.PARAM_A2U_CAPTION, bitmap, getParameters(), new MediaUploadCallback(str, str2, i, str3, callback));
}
public static void scheduleAppToUserNotification(String str, String str2, File file, int i, @Nullable String str3, GraphRequest.Callback callback) throws FileNotFoundException {
GamingMediaUploader.uploadToGamingServices(SDKConstants.PARAM_A2U_CAPTION, file, getParameters(), new MediaUploadCallback(str, str2, i, str3, callback));
}
public static void scheduleAppToUserNotification(String str, String str2, Uri uri, int i, @Nullable String str3, GraphRequest.Callback callback) throws FileNotFoundException {
GamingMediaUploader.uploadToGamingServices(SDKConstants.PARAM_A2U_CAPTION, uri, getParameters(), new MediaUploadCallback(str, str2, i, str3, callback));
}
private static Bundle getParameters() {
Bundle bundle = new Bundle();
bundle.putString("upload_source", "A2U");
return bundle;
}
}

View File

@@ -0,0 +1,131 @@
package com.facebook.gamingservices.cloudgaming;
import android.content.Context;
import android.content.SharedPreferences;
import androidx.annotation.Nullable;
import com.facebook.AccessToken;
import com.facebook.AccessTokenSource;
import com.facebook.FacebookException;
import com.facebook.GraphResponse;
import com.facebook.Profile;
import com.facebook.gamingservices.GamingPayload;
import com.facebook.gamingservices.cloudgaming.DaemonRequest;
import com.facebook.gamingservices.cloudgaming.internal.SDKConstants;
import com.facebook.gamingservices.cloudgaming.internal.SDKLogger;
import com.facebook.gamingservices.cloudgaming.internal.SDKMessageEnum;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class CloudGameLoginHandler {
private static final int DEFAULT_TIMEOUT_IN_SEC = 5;
private static boolean IS_RUNNING_IN_CLOUD = false;
private static SDKLogger mLogger;
public static boolean isRunningInCloud() {
return IS_RUNNING_IN_CLOUD;
}
@Nullable
public static synchronized AccessToken init(Context context) throws FacebookException {
AccessToken init;
synchronized (CloudGameLoginHandler.class) {
init = init(context, 5);
}
return init;
}
@Nullable
public static synchronized AccessToken init(Context context, int i) throws FacebookException {
AccessToken currentAccessToken;
synchronized (CloudGameLoginHandler.class) {
if (i <= 0) {
i = 5;
}
if (!isCloudEnvReady(context, i)) {
throw new FacebookException("Not running in Cloud environment.");
}
mLogger = SDKLogger.getInstance(context);
GraphResponse executeAndWait = DaemonRequest.executeAndWait(context, null, SDKMessageEnum.GET_ACCESS_TOKEN, i);
if (executeAndWait == null || executeAndWait.getJSONObject() == null) {
throw new FacebookException("Cannot receive response.");
}
if (executeAndWait.getError() != null) {
throw new FacebookException(executeAndWait.getError().getErrorMessage());
}
setPackageName(executeAndWait.getJSONObject(), context);
try {
currentAccessToken = setCurrentAccessToken(executeAndWait.getJSONObject());
GamingPayload.loadPayloadFromCloudGame(executeAndWait.getJSONObject().optString("payload"));
Profile.fetchProfileForCurrentAccessToken();
IS_RUNNING_IN_CLOUD = true;
mLogger.logLoginSuccess();
} catch (JSONException e) {
throw new FacebookException("Cannot properly handle response.", e);
}
}
return currentAccessToken;
}
private static boolean isCloudEnvReady(Context context, int i) {
GraphResponse executeAndWait = DaemonRequest.executeAndWait(context, null, SDKMessageEnum.IS_ENV_READY, i);
return (executeAndWait == null || executeAndWait.getJSONObject() == null || executeAndWait.getError() != null) ? false : true;
}
public static void gameLoadComplete(Context context, DaemonRequest.Callback callback) {
DaemonRequest.executeAsync(context, (JSONObject) null, callback, SDKMessageEnum.MARK_GAME_LOADED);
}
private static void setPackageName(JSONObject jSONObject, Context context) {
String optString = jSONObject.optString(SDKConstants.PARAM_DAEMON_PACKAGE_NAME);
if (optString.isEmpty()) {
throw new FacebookException("Could not establish a secure connection.");
}
SharedPreferences.Editor edit = context.getSharedPreferences(SDKConstants.PREF_DAEMON_PACKAGE_NAME, 0).edit();
edit.putString(SDKConstants.PARAM_DAEMON_PACKAGE_NAME, optString);
edit.commit();
}
@Nullable
private static AccessToken setCurrentAccessToken(JSONObject jSONObject) throws JSONException {
String optString = jSONObject.optString(SDKConstants.PARAM_ACCESS_TOKEN);
String optString2 = jSONObject.optString(SDKConstants.PARAM_ACCESS_TOKEN_SOURCE);
String optString3 = jSONObject.optString("appID");
String optString4 = jSONObject.optString(SDKConstants.PARAM_DECLINED_PERMISSIONS);
String optString5 = jSONObject.optString(SDKConstants.PARAM_EXPIRED_PERMISSIONS);
String optString6 = jSONObject.optString(SDKConstants.PARAM_EXPIRATION_TIME);
String optString7 = jSONObject.optString(SDKConstants.PARAM_DATA_ACCESS_EXPIRATION_TIME);
String optString8 = jSONObject.optString(SDKConstants.PARAM_GRAPH_DOMAIN);
String optString9 = jSONObject.optString(SDKConstants.PARAM_LAST_REFRESH_TIME);
String optString10 = jSONObject.optString("permissions");
String optString11 = jSONObject.optString(SDKConstants.PARAM_USER_ID);
String optString12 = jSONObject.optString(SDKConstants.PARAM_SESSION_ID);
if (optString.isEmpty() || optString3.isEmpty() || optString11.isEmpty()) {
return null;
}
SDKLogger sDKLogger = mLogger;
if (sDKLogger != null) {
sDKLogger.setAppID(optString3);
mLogger.setUserID(optString11);
mLogger.setSessionID(optString12);
}
AccessToken accessToken = new AccessToken(optString, optString3, optString11, convertPermissionsStringIntoPermissionsList(optString10), convertPermissionsStringIntoPermissionsList(optString4), convertPermissionsStringIntoPermissionsList(optString5), !optString2.isEmpty() ? AccessTokenSource.valueOf(optString2) : null, !optString6.isEmpty() ? new Date(Integer.parseInt(optString6) * 1000) : null, !optString9.isEmpty() ? new Date(Integer.parseInt(optString9) * 1000) : null, !optString7.isEmpty() ? new Date(Integer.parseInt(optString7) * 1000) : null, optString8.isEmpty() ? null : optString8);
AccessToken.setCurrentAccessToken(accessToken);
return accessToken;
}
private static List<String> convertPermissionsStringIntoPermissionsList(String str) throws JSONException {
ArrayList arrayList = new ArrayList();
if (!str.isEmpty()) {
JSONArray jSONArray = new JSONArray(str);
for (int i = 0; i < jSONArray.length(); i++) {
arrayList.add(jSONArray.get(i).toString());
}
}
return arrayList;
}
}

View File

@@ -0,0 +1,115 @@
package com.facebook.gamingservices.cloudgaming;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Handler;
import android.os.HandlerThread;
import androidx.annotation.Nullable;
import com.facebook.FacebookRequestError;
import com.facebook.GraphRequest;
import com.facebook.GraphResponse;
import com.facebook.gamingservices.cloudgaming.internal.SDKConstants;
import com.facebook.gamingservices.cloudgaming.internal.SDKLogger;
import java.net.HttpURLConnection;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class DaemonReceiver {
private static SDKLogger mLogger;
private static ConcurrentHashMap<String, CompletableFuture<GraphResponse>> requestStore;
@Nullable
private static DaemonReceiver single_instance;
private DaemonReceiver(Context context) {
IntentFilter intentFilter = new IntentFilter(SDKConstants.RECEIVER_INTENT);
HandlerThread handlerThread = new HandlerThread(SDKConstants.RECEIVER_HANDLER);
handlerThread.start();
context.registerReceiver(new DaemonBroadcastReceiver(), intentFilter, null, new Handler(handlerThread.getLooper()));
requestStore = new ConcurrentHashMap<>();
mLogger = SDKLogger.getInstance(context);
}
public synchronized ConcurrentHashMap<String, CompletableFuture<GraphResponse>> getRequestStore() {
return requestStore;
}
public static synchronized DaemonReceiver getInstance(Context context) {
DaemonReceiver daemonReceiver;
synchronized (DaemonReceiver.class) {
try {
if (single_instance == null) {
single_instance = new DaemonReceiver(context);
}
daemonReceiver = single_instance;
} catch (Throwable th) {
throw th;
}
}
return daemonReceiver;
}
/* JADX INFO: Access modifiers changed from: private */
public static GraphResponse processResponse(JSONObject jSONObject, String str) {
if (!jSONObject.isNull("success")) {
return createSuccessResponse(jSONObject, str);
}
if (!jSONObject.isNull("error")) {
return createErrorResponse(jSONObject, str);
}
return createDefaultErrorResponse(str);
}
private static GraphResponse createSuccessResponse(JSONObject jSONObject, String str) {
if (jSONObject.optJSONObject("success") != null) {
mLogger.logSendingSuccessResponse(str);
return new GraphResponse(new GraphRequest(), (HttpURLConnection) null, "", jSONObject.optJSONObject("success"));
}
if (jSONObject.optJSONArray("success") != null) {
mLogger.logSendingSuccessResponse(str);
return new GraphResponse(new GraphRequest(), (HttpURLConnection) null, "", jSONObject.optJSONArray("success"));
}
return createDefaultErrorResponse(str);
}
public static GraphResponse createErrorResponse(FacebookRequestError facebookRequestError, @Nullable String str) {
mLogger.logSendingErrorResponse(facebookRequestError, str);
return new GraphResponse(new GraphRequest(), null, facebookRequestError);
}
private static GraphResponse createErrorResponse(JSONObject jSONObject, String str) {
JSONObject optJSONObject = jSONObject.optJSONObject("error");
if (optJSONObject != null) {
return createErrorResponse(new FacebookRequestError(optJSONObject.optInt("code"), optJSONObject.optString("type"), optJSONObject.optString("message")), str);
}
return createDefaultErrorResponse(str);
}
private static GraphResponse createDefaultErrorResponse(String str) {
return createErrorResponse(new FacebookRequestError(20, "UNSUPPORTED_FORMAT", "The response format is invalid."), str);
}
public static class DaemonBroadcastReceiver extends BroadcastReceiver {
private DaemonBroadcastReceiver() {
}
@Override // android.content.BroadcastReceiver
public void onReceive(Context context, Intent intent) {
CompletableFuture completableFuture;
try {
JSONObject jSONObject = new JSONObject(intent.getStringExtra(SDKConstants.RECEIVER_PAYLOAD));
String string = jSONObject.getString(SDKConstants.REQUEST_ID);
if (!DaemonReceiver.requestStore.containsKey(string) || (completableFuture = (CompletableFuture) DaemonReceiver.requestStore.remove(string)) == null) {
return;
}
completableFuture.complete(DaemonReceiver.processResponse(jSONObject, string));
} catch (JSONException unused) {
}
}
}
}

View File

@@ -0,0 +1,157 @@
package com.facebook.gamingservices.cloudgaming;
import android.content.Context;
import android.content.Intent;
import androidx.annotation.Nullable;
import com.facebook.FacebookRequestError;
import com.facebook.GraphResponse;
import com.facebook.gamingservices.cloudgaming.internal.SDKConstants;
import com.facebook.gamingservices.cloudgaming.internal.SDKLogger;
import com.facebook.gamingservices.cloudgaming.internal.SDKMessageEnum;
import java.util.Iterator;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.function.Consumer;
import java.util.function.Supplier;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class DaemonRequest {
private Callback mCallback;
private Context mContext;
private SDKLogger mLogger;
private JSONObject mParameters;
private ConcurrentHashMap<String, CompletableFuture<GraphResponse>> mRequestStore;
public interface Callback {
void onCompleted(GraphResponse graphResponse);
}
public DaemonRequest(Context context, JSONObject jSONObject, Callback callback) {
this.mContext = context;
this.mParameters = jSONObject;
this.mCallback = callback;
this.mRequestStore = DaemonReceiver.getInstance(context).getRequestStore();
this.mLogger = SDKLogger.getInstance(context);
}
private void executeAsync() throws ExecutionException, InterruptedException {
createRequest().thenAccept((Consumer<? super GraphResponse>) new Consumer<GraphResponse>() { // from class: com.facebook.gamingservices.cloudgaming.DaemonRequest.1
@Override // java.util.function.Consumer
public void accept(GraphResponse graphResponse) {
if (DaemonRequest.this.mCallback != null) {
DaemonRequest.this.mCallback.onCompleted(graphResponse);
}
}
});
}
private GraphResponse executeAndWait() throws ExecutionException, InterruptedException {
return createRequest().get();
}
private GraphResponse executeAndWait(int i) throws ExecutionException, InterruptedException, TimeoutException {
return createRequest().get(i, TimeUnit.SECONDS);
}
private CompletableFuture<GraphResponse> createRequest() {
return CompletableFuture.supplyAsync(new Supplier<GraphResponse>() { // from class: com.facebook.gamingservices.cloudgaming.DaemonRequest.2
/* JADX WARN: Can't rename method to resolve collision */
@Override // java.util.function.Supplier
public GraphResponse get() {
String uuid = UUID.randomUUID().toString();
try {
DaemonRequest.this.mParameters.put(SDKConstants.REQUEST_ID, uuid);
Intent intent = new Intent();
String string = DaemonRequest.this.mParameters.getString("type");
DaemonRequest.this.mLogger.logPreparingRequest(string, uuid, DaemonRequest.this.mParameters);
if (!string.equals(SDKMessageEnum.GET_ACCESS_TOKEN.toString()) && !string.equals(SDKMessageEnum.IS_ENV_READY.toString())) {
String string2 = DaemonRequest.this.mContext.getSharedPreferences(SDKConstants.PREF_DAEMON_PACKAGE_NAME, 0).getString(SDKConstants.PARAM_DAEMON_PACKAGE_NAME, null);
if (string2 == null) {
return DaemonReceiver.createErrorResponse(new FacebookRequestError(-1, "DAEMON_REQUEST_EXECUTE_ASYNC_FAILED", "Unable to correctly create the request with a secure connection"), uuid);
}
intent.setPackage(string2);
}
intent.setAction(SDKConstants.REQUEST_ACTION);
Iterator<String> keys = DaemonRequest.this.mParameters.keys();
while (keys.hasNext()) {
String next = keys.next();
intent.putExtra(next, DaemonRequest.this.mParameters.getString(next));
}
CompletableFuture completableFuture = new CompletableFuture();
DaemonRequest.this.mRequestStore.put(uuid, completableFuture);
DaemonRequest.this.mContext.sendBroadcast(intent);
DaemonRequest.this.mLogger.logSentRequest(string, uuid, DaemonRequest.this.mParameters);
return (GraphResponse) completableFuture.get();
} catch (InterruptedException | ExecutionException | JSONException unused) {
return DaemonReceiver.createErrorResponse(new FacebookRequestError(-1, "DAEMON_REQUEST_EXECUTE_ASYNC_FAILED", "Unable to correctly create the request or obtain response"), uuid);
}
}
});
}
public static void executeAsync(Context context, @Nullable JSONObject jSONObject, Callback callback, SDKMessageEnum sDKMessageEnum) {
JSONObject put;
try {
if (jSONObject == null) {
put = new JSONObject().put("type", sDKMessageEnum.toString());
} else {
put = jSONObject.put("type", sDKMessageEnum.toString());
}
new DaemonRequest(context, put, callback).executeAsync();
} catch (InterruptedException | ExecutionException | JSONException unused) {
if (callback != null) {
callback.onCompleted(DaemonReceiver.createErrorResponse(new FacebookRequestError(-1, "DAEMON_REQUEST_EXECUTE_ASYNC_FAILED", "Unable to correctly create the request or obtain response"), (String) null));
}
}
}
public static GraphResponse executeAndWait(Context context, @Nullable JSONObject jSONObject, SDKMessageEnum sDKMessageEnum) {
JSONObject put;
try {
if (jSONObject == null) {
put = new JSONObject().put("type", sDKMessageEnum.toString());
} else {
put = jSONObject.put("type", sDKMessageEnum.toString());
}
return new DaemonRequest(context, put, null).executeAndWait();
} catch (InterruptedException | ExecutionException | JSONException unused) {
return DaemonReceiver.createErrorResponse(new FacebookRequestError(-1, "DAEMON_REQUEST_EXECUTE_ASYNC_FAILED", "Unable to correctly create the request or obtain response"), (String) null);
}
}
public static GraphResponse executeAndWait(Context context, @Nullable JSONObject jSONObject, SDKMessageEnum sDKMessageEnum, int i) {
JSONObject put;
try {
if (jSONObject == null) {
put = new JSONObject().put("type", sDKMessageEnum.toString());
} else {
put = jSONObject.put("type", sDKMessageEnum.toString());
}
return new DaemonRequest(context, put, null).executeAndWait(i);
} catch (InterruptedException | ExecutionException | TimeoutException | JSONException unused) {
return DaemonReceiver.createErrorResponse(new FacebookRequestError(-1, "DAEMON_REQUEST_EXECUTE_ASYNC_FAILED", "Unable to correctly create the request or obtain response"), (String) null);
}
}
public static void executeAsync(Context context, @Nullable JSONObject jSONObject, Callback callback, String str) {
JSONObject put;
try {
if (jSONObject == null) {
put = new JSONObject().put("type", str);
} else {
put = jSONObject.put("type", str);
}
new DaemonRequest(context, put, callback).executeAsync();
} catch (InterruptedException | ExecutionException | JSONException unused) {
if (callback != null) {
callback.onCompleted(DaemonReceiver.createErrorResponse(new FacebookRequestError(-1, "DAEMON_REQUEST_EXECUTE_ASYNC_FAILED", "Unable to correctly create the request or obtain response"), (String) null));
}
}
}
}

View File

@@ -0,0 +1,82 @@
package com.facebook.gamingservices.cloudgaming;
import android.content.Context;
import androidx.annotation.Nullable;
import com.facebook.GraphResponse;
import com.facebook.gamingservices.cloudgaming.DaemonRequest;
import com.facebook.gamingservices.cloudgaming.internal.SDKConstants;
import com.facebook.gamingservices.cloudgaming.internal.SDKLogger;
import com.facebook.gamingservices.cloudgaming.internal.SDKMessageEnum;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class GameFeaturesLibrary {
public static void getPayload(Context context, JSONObject jSONObject, DaemonRequest.Callback callback) {
DaemonRequest.executeAsync(context, jSONObject, callback, SDKMessageEnum.GET_PAYLOAD);
}
public static void canCreateShortcut(Context context, JSONObject jSONObject, DaemonRequest.Callback callback) {
DaemonRequest.executeAsync(context, jSONObject, callback, SDKMessageEnum.CAN_CREATE_SHORTCUT);
}
public static void createShortcut(Context context, JSONObject jSONObject, DaemonRequest.Callback callback) {
DaemonRequest.executeAsync(context, jSONObject, callback, SDKMessageEnum.CREATE_SHORTCUT);
}
public static void postSessionScore(Context context, int i, DaemonRequest.Callback callback) {
try {
DaemonRequest.executeAsync(context, new JSONObject().put("score", i), callback, SDKMessageEnum.POST_SESSION_SCORE);
} catch (JSONException e) {
SDKLogger.logInternalError(context, SDKMessageEnum.POST_SESSION_SCORE, e);
}
}
public static void postSessionScoreAsync(Context context, int i, DaemonRequest.Callback callback) {
try {
DaemonRequest.executeAsync(context, new JSONObject().put("score", i), callback, SDKMessageEnum.POST_SESSION_SCORE_ASYNC);
} catch (JSONException e) {
SDKLogger.logInternalError(context, SDKMessageEnum.POST_SESSION_SCORE_ASYNC, e);
}
}
public static void getTournamentAsync(Context context, DaemonRequest.Callback callback) {
DaemonRequest.executeAsync(context, (JSONObject) null, callback, SDKMessageEnum.GET_TOURNAMENT_ASYNC);
}
public static void createTournamentAsync(Context context, int i, @Nullable String str, @Nullable String str2, @Nullable String str3, @Nullable String str4, @Nullable Integer num, @Nullable JSONObject jSONObject, DaemonRequest.Callback callback) {
try {
DaemonRequest.executeAsync(context, new JSONObject().put(SDKConstants.PARAM_INITIAL_SCORE, i).put("title", str).put("image", str2).put(SDKConstants.PARAM_SORT_ORDER, str3).put(SDKConstants.PARAM_SCORE_FORMAT, str4).put(SDKConstants.PARAM_END_TIME, num).put("data", jSONObject), callback, SDKMessageEnum.TOURNAMENT_CREATE_ASYNC);
} catch (JSONException e) {
SDKLogger.logInternalError(context, SDKMessageEnum.TOURNAMENT_CREATE_ASYNC, e);
}
}
public static void shareTournamentAsync(Context context, @Nullable Integer num, @Nullable JSONObject jSONObject, DaemonRequest.Callback callback) {
try {
DaemonRequest.executeAsync(context, new JSONObject().put("score", num).put("data", jSONObject), callback, SDKMessageEnum.TOURNAMENT_SHARE_ASYNC);
} catch (JSONException e) {
SDKLogger.logInternalError(context, SDKMessageEnum.TOURNAMENT_SHARE_ASYNC, e);
}
}
public static void postTournamentScoreAsync(Context context, int i, DaemonRequest.Callback callback) throws JSONException {
DaemonRequest.executeAsync(context, new JSONObject().put("score", i), callback, SDKMessageEnum.TOURNAMENT_POST_SCORE_ASYNC);
}
public static void getTournamentsAsync(Context context, DaemonRequest.Callback callback) throws JSONException {
DaemonRequest.executeAsync(context, (JSONObject) null, callback, SDKMessageEnum.TOURNAMENT_GET_TOURNAMENTS_ASYNC);
}
public static void joinTournamentAsync(Context context, String str, DaemonRequest.Callback callback) throws JSONException {
DaemonRequest.executeAsync(context, new JSONObject().put(SDKConstants.PARAM_TOURNAMENT_ID, str), callback, SDKMessageEnum.TOURNAMENT_JOIN_ASYNC);
}
public static void performHapticFeedback(Context context) {
DaemonRequest.executeAsync(context, (JSONObject) null, new DaemonRequest.Callback() { // from class: com.facebook.gamingservices.cloudgaming.GameFeaturesLibrary.1
@Override // com.facebook.gamingservices.cloudgaming.DaemonRequest.Callback
public void onCompleted(GraphResponse graphResponse) {
}
}, SDKMessageEnum.PERFORM_HAPTIC_FEEDBACK_ASYNC);
}
}

View File

@@ -0,0 +1,44 @@
package com.facebook.gamingservices.cloudgaming;
import android.content.Context;
import com.facebook.gamingservices.cloudgaming.DaemonRequest;
import com.facebook.gamingservices.cloudgaming.internal.SDKConstants;
import com.facebook.gamingservices.cloudgaming.internal.SDKLogger;
import com.facebook.gamingservices.cloudgaming.internal.SDKMessageEnum;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class InAppAdLibrary {
public static void loadRewardedVideo(Context context, String str, DaemonRequest.Callback callback) {
try {
DaemonRequest.executeAsync(context, new JSONObject().put(SDKConstants.PARAM_PLACEMENT_ID, str), callback, SDKMessageEnum.LOAD_REWARDED_VIDEO);
} catch (JSONException e) {
SDKLogger.logInternalError(context, SDKMessageEnum.LOAD_REWARDED_VIDEO, e);
}
}
public static void loadInterstitialAd(Context context, String str, DaemonRequest.Callback callback) {
try {
DaemonRequest.executeAsync(context, new JSONObject().put(SDKConstants.PARAM_PLACEMENT_ID, str), callback, SDKMessageEnum.LOAD_INTERSTITIAL_AD);
} catch (JSONException e) {
SDKLogger.logInternalError(context, SDKMessageEnum.LOAD_INTERSTITIAL_AD, e);
}
}
public static void showRewardedVideo(Context context, String str, DaemonRequest.Callback callback) {
try {
DaemonRequest.executeAsync(context, new JSONObject().put(SDKConstants.PARAM_PLACEMENT_ID, str), callback, SDKMessageEnum.SHOW_REWARDED_VIDEO);
} catch (JSONException e) {
SDKLogger.logInternalError(context, SDKMessageEnum.SHOW_REWARDED_VIDEO, e);
}
}
public static void showInterstitialAd(Context context, String str, DaemonRequest.Callback callback) {
try {
DaemonRequest.executeAsync(context, new JSONObject().put(SDKConstants.PARAM_PLACEMENT_ID, str), callback, SDKMessageEnum.SHOW_INTERSTITIAL_AD);
} catch (JSONException e) {
SDKLogger.logInternalError(context, SDKMessageEnum.SHOW_INTERSTITIAL_AD, e);
}
}
}

View File

@@ -0,0 +1,65 @@
package com.facebook.gamingservices.cloudgaming;
import android.content.Context;
import androidx.annotation.Nullable;
import com.facebook.gamingservices.cloudgaming.DaemonRequest;
import com.facebook.gamingservices.cloudgaming.internal.SDKConstants;
import com.facebook.gamingservices.cloudgaming.internal.SDKLogger;
import com.facebook.gamingservices.cloudgaming.internal.SDKMessageEnum;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class InAppPurchaseLibrary {
public static void onReady(Context context, DaemonRequest.Callback callback) {
DaemonRequest.executeAsync(context, (JSONObject) null, callback, SDKMessageEnum.ON_READY);
}
public static void getCatalog(Context context, DaemonRequest.Callback callback) {
DaemonRequest.executeAsync(context, (JSONObject) null, callback, SDKMessageEnum.GET_CATALOG);
}
public static void getPurchases(Context context, DaemonRequest.Callback callback) {
DaemonRequest.executeAsync(context, (JSONObject) null, callback, SDKMessageEnum.GET_PURCHASES);
}
public static void purchase(Context context, String str, @Nullable String str2, DaemonRequest.Callback callback) {
try {
DaemonRequest.executeAsync(context, new JSONObject().put(SDKConstants.PARAM_PRODUCT_ID, str).put(SDKConstants.PARAM_DEVELOPER_PAYLOAD, str2), callback, SDKMessageEnum.PURCHASE);
} catch (JSONException e) {
SDKLogger.logInternalError(context, SDKMessageEnum.PURCHASE, e);
}
}
public static void consumePurchase(Context context, String str, DaemonRequest.Callback callback) {
try {
DaemonRequest.executeAsync(context, new JSONObject().put(SDKConstants.PARAM_PURCHASE_TOKEN, str), callback, SDKMessageEnum.CONSUME_PURCHASE);
} catch (JSONException e) {
SDKLogger.logInternalError(context, SDKMessageEnum.CONSUME_PURCHASE, e);
}
}
public static void getSubscribableCatalog(Context context, DaemonRequest.Callback callback) {
DaemonRequest.executeAsync(context, (JSONObject) null, callback, SDKMessageEnum.GET_SUBSCRIBABLE_CATALOG);
}
public static void purchaseSubscription(Context context, String str, DaemonRequest.Callback callback) {
try {
DaemonRequest.executeAsync(context, new JSONObject().put(SDKConstants.PARAM_PRODUCT_ID, str), callback, SDKMessageEnum.PURCHASE_SUBSCRIPTION);
} catch (JSONException e) {
SDKLogger.logInternalError(context, SDKMessageEnum.PURCHASE_SUBSCRIPTION, e);
}
}
public static void getSubscriptions(Context context, DaemonRequest.Callback callback) {
DaemonRequest.executeAsync(context, (JSONObject) null, callback, SDKMessageEnum.GET_SUBSCRIPTIONS);
}
public static void cancelSubscription(Context context, String str, DaemonRequest.Callback callback) {
try {
DaemonRequest.executeAsync(context, new JSONObject().put(SDKConstants.PARAM_PURCHASE_TOKEN, str), callback, SDKMessageEnum.CANCEL_SUBSCRIPTION);
} catch (JSONException e) {
SDKLogger.logInternalError(context, SDKMessageEnum.CANCEL_SUBSCRIPTION, e);
}
}
}

View File

@@ -0,0 +1,48 @@
package com.facebook.gamingservices.cloudgaming;
import android.os.Bundle;
import androidx.annotation.Nullable;
import com.facebook.AccessToken;
import com.facebook.FacebookException;
import com.facebook.GraphRequest;
import com.facebook.GraphResponse;
import com.facebook.HttpMethod;
import com.facebook.gamingservices.cloudgaming.internal.SDKConstants;
/* loaded from: classes2.dex */
class MediaUploadCallback implements GraphRequest.Callback {
private String body;
GraphRequest.Callback callback;
@Nullable
private String payload;
private int timeInterval;
private String title;
public MediaUploadCallback(String str, String str2, int i, @Nullable String str3, GraphRequest.Callback callback) {
this.title = str;
this.body = str2;
this.timeInterval = i;
this.payload = str3;
this.callback = callback;
}
@Override // com.facebook.GraphRequest.Callback
public void onCompleted(GraphResponse graphResponse) {
if (graphResponse.getError() != null) {
throw new FacebookException(graphResponse.getError().getErrorMessage());
}
String optString = graphResponse.getJSONObject().optString("id");
AccessToken currentAccessToken = AccessToken.getCurrentAccessToken();
Bundle bundle = new Bundle();
bundle.putString("title", this.title);
bundle.putString("body", this.body);
bundle.putInt(SDKConstants.PARAM_A2U_TIME_INTERVAL, this.timeInterval);
String str = this.payload;
if (str != null) {
bundle.putString(SDKConstants.PARAM_A2U_PAYLOAD, str);
}
bundle.putString(SDKConstants.PARAM_A2U_MEDIA_ID, optString);
new GraphRequest(currentAccessToken, SDKConstants.PARAM_A2U_GRAPH_PATH, bundle, HttpMethod.POST, this.callback).executeAsync();
}
}

View File

@@ -0,0 +1,18 @@
package com.facebook.gamingservices.cloudgaming;
import android.content.Context;
import androidx.annotation.Nullable;
import com.facebook.gamingservices.cloudgaming.DaemonRequest;
import com.facebook.gamingservices.cloudgaming.internal.SDKMessageEnum;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class PlayableAdsLibrary {
public static void openAppStore(Context context, @Nullable JSONObject jSONObject, DaemonRequest.Callback callback) {
DaemonRequest.executeAsync(context, jSONObject, callback, SDKMessageEnum.OPEN_APP_STORE);
}
public static void markGameLoaded(Context context, @Nullable JSONObject jSONObject, DaemonRequest.Callback callback) {
DaemonRequest.executeAsync(context, jSONObject, callback, SDKMessageEnum.MARK_GAME_LOADED);
}
}

View File

@@ -0,0 +1,21 @@
package com.facebook.gamingservices.cloudgaming.internal;
/* loaded from: classes2.dex */
public class SDKAnalyticsEvents {
public static final String EVENT_GAME_LOAD_COMPLETE = "cloud_games_load_complete";
public static final String EVENT_INTERNAL_ERROR = "cloud_games_internal_error";
public static final String EVENT_LOGIN_SUCCESS = "cloud_games_login_success";
public static final String EVENT_PREPARING_REQUEST = "cloud_games_preparing_request";
public static final String EVENT_SENDING_ERROR_RESPONSE = "cloud_games_sending_error_response";
public static final String EVENT_SENDING_SUCCESS_RESPONSE = "cloud_games_sending_success_response";
public static final String EVENT_SENT_REQUEST = "cloud_games_sent_request";
public static final String PARAMETER_APP_ID = "app_id";
public static final String PARAMETER_ERROR_CODE = "error_code";
public static final String PARAMETER_ERROR_MESSAGE = "error_message";
public static final String PARAMETER_ERROR_TYPE = "error_type";
public static final String PARAMETER_FUNCTION_TYPE = "function_type";
public static final String PARAMETER_PAYLOAD = "payload";
public static final String PARAMETER_REQUEST_ID = "request_id";
public static final String PARAMETER_SESSION_ID = "session_id";
public static final String PARAMETER_USER_ID = "user_id";
}

View File

@@ -0,0 +1,86 @@
package com.facebook.gamingservices.cloudgaming.internal;
/* loaded from: classes2.dex */
public class SDKConstants {
public static final String PARAM_A2U_BODY = "body";
public static final String PARAM_A2U_CAPTION = "A2U Image";
public static final String PARAM_A2U_GRAPH_PATH = "me/schedule_gaming_app_to_user_update";
public static final String PARAM_A2U_MEDIA_ID = "media_id";
public static final String PARAM_A2U_PAYLOAD = "payload:";
public static final String PARAM_A2U_RESPONSE_ID = "id";
public static final String PARAM_A2U_TIME_INTERVAL = "time_interval";
public static final String PARAM_A2U_TITLE = "title";
public static final String PARAM_ACCESS_TOKEN = "accessToken";
public static final String PARAM_ACCESS_TOKEN_SOURCE = "accessTokenSource";
public static final String PARAM_APP_ID = "appID";
public static final String PARAM_CONTEXT_CONTEXT_ID = "context_id";
public static final String PARAM_CONTEXT_FILTERS = "filters";
public static final String PARAM_CONTEXT_ID = "id";
public static final String PARAM_CONTEXT_MAX_SIZE = "maxSize";
public static final String PARAM_CONTEXT_MIN_SIZE = "minSize";
public static final String PARAM_CONTEXT_TOKEN = "contextToken";
public static final String PARAM_DAEMON_PACKAGE_NAME = "daemonPackageName";
public static final String PARAM_DATA = "data";
public static final String PARAM_DATA_ACCESS_EXPIRATION_TIME = "dataAccessExpirationTime";
public static final String PARAM_DEBUG_MESSAGE = "msg";
public static final String PARAM_DEBUG_MESSAGE_SEVERITY = "severity";
public static final String PARAM_DEBUG_MESSAGE_TAG = "tag";
public static final String PARAM_DEBUG_MESSAGE_TIMESTAMP = "timestamp";
public static final String PARAM_DECLINED_PERMISSIONS = "declinedPermissions";
public static final String PARAM_DEEP_LINK = "deepLink";
public static final String PARAM_DEEP_LINK_ID = "id";
public static final String PARAM_DEVELOPER_PAYLOAD = "developerPayload";
public static final String PARAM_END_TIME = "endTime";
public static final String PARAM_EXPIRATION_TIME = "expirationTime";
public static final String PARAM_EXPIRED_PERMISSIONS = "expiredPermissions";
public static final String PARAM_GAME_PACKAGE_NAME = "gamePackageName";
public static final String PARAM_GAME_REQUESTS_ACTION_TYPE = "actionType";
public static final String PARAM_GAME_REQUESTS_CTA = "cta";
public static final String PARAM_GAME_REQUESTS_DATA = "data";
public static final String PARAM_GAME_REQUESTS_MESSAGE = "message";
public static final String PARAM_GAME_REQUESTS_OPTIONS = "options";
public static final String PARAM_GAME_REQUESTS_TITLE = "title";
public static final String PARAM_GAME_REQUESTS_TO = "to";
public static final String PARAM_GRAPH_DOMAIN = "graphDomain";
public static final String PARAM_IMAGE = "image";
public static final String PARAM_INITIAL_SCORE = "initialScore";
public static final String PARAM_INTENT = "intent";
public static final String PARAM_KEY = "key";
public static final String PARAM_LAST_REFRESH_TIME = "lastRefreshTime";
public static final String PARAM_PAYLOAD = "payload";
public static final String PARAM_PERMISSIONS = "permissions";
public static final String PARAM_PLACEMENT_ID = "placementID";
public static final String PARAM_PRODUCT_ID = "productID";
public static final String PARAM_PURCHASE_TOKEN = "purchaseToken";
public static final String PARAM_SCORE = "score";
public static final String PARAM_SCORE_FORMAT = "scoreFormat";
public static final String PARAM_SESSION_ID = "sessionID";
public static final String PARAM_SORT_ORDER = "sortOrder";
public static final String PARAM_TEXT = "text";
public static final String PARAM_TITLE = "title";
public static final String PARAM_TOURNAMENTS = "INSTANT_TOURNAMENT";
public static final String PARAM_TOURNAMENTS_APP_ID = "app_id";
public static final String PARAM_TOURNAMENTS_DEEPLINK = "deeplink";
public static final String PARAM_TOURNAMENTS_END_TIME = "end_time";
public static final String PARAM_TOURNAMENTS_ID = "tournament_id";
public static final String PARAM_TOURNAMENTS_PAYLOAD = "tournament_payload";
public static final String PARAM_TOURNAMENTS_SCORE = "score";
public static final String PARAM_TOURNAMENTS_SCORE_FORMAT = "score_format";
public static final String PARAM_TOURNAMENTS_SORT_ORDER = "sort_order";
public static final String PARAM_TOURNAMENTS_TITLE = "tournament_title";
public static final String PARAM_TOURNAMENT_ID = "tournamentId";
public static final String PARAM_TYPE = "type";
public static final String PARAM_UPDATE_ACTION = "action";
public static final String PARAM_UPDATE_IMAGE = "image";
public static final String PARAM_UPDATE_TEMPLATE = "template";
public static final String PARAM_UPDATE_TEXT = "text";
public static final String PARAM_URL = "url";
public static final String PARAM_USER_ID = "userID";
public static final String PARAM_VALUE = "value";
public static final String PREF_DAEMON_PACKAGE_NAME = "com.facebook.gamingservices.cloudgaming:preferences";
public static final String RECEIVER_HANDLER = "com.facebook.gamingservices.DAEMON_RESPONSE_HANDLER";
public static final String RECEIVER_INTENT = "com.facebook.gamingservices.DAEMON_RESPONSE";
public static final String RECEIVER_PAYLOAD = "returnPayload";
public static final String REQUEST_ACTION = "com.facebook.gamingservices.DAEMON_REQUEST";
public static final String REQUEST_ID = "requestID";
}

View File

@@ -0,0 +1,128 @@
package com.facebook.gamingservices.cloudgaming.internal;
import android.content.Context;
import android.os.Bundle;
import androidx.annotation.Nullable;
import com.facebook.FacebookRequestError;
import com.facebook.appevents.InternalAppEventsLogger;
import java.util.concurrent.ConcurrentHashMap;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class SDKLogger {
private static SDKLogger instance;
private final InternalAppEventsLogger logger;
private String appID = null;
private String userID = null;
private String sessionID = null;
private ConcurrentHashMap<String, String> requestIDToFunctionTypeMap = new ConcurrentHashMap<>();
public void setAppID(String str) {
this.appID = str;
}
public void setSessionID(String str) {
this.sessionID = str;
}
public void setUserID(String str) {
this.userID = str;
}
private SDKLogger(Context context) {
this.logger = new InternalAppEventsLogger(context);
}
public static synchronized SDKLogger getInstance(Context context) {
SDKLogger sDKLogger;
synchronized (SDKLogger.class) {
try {
if (instance == null) {
instance = new SDKLogger(context);
}
sDKLogger = instance;
} catch (Throwable th) {
throw th;
}
}
return sDKLogger;
}
public static void logInternalError(Context context, SDKMessageEnum sDKMessageEnum, Exception exc) {
getInstance(context).logInternalError(sDKMessageEnum, exc);
}
public void logPreparingRequest(String str, String str2, JSONObject jSONObject) {
Bundle parametersWithRequestIDAndFunctionType = getParametersWithRequestIDAndFunctionType(str2, str);
parametersWithRequestIDAndFunctionType.putString("payload", jSONObject.toString());
this.logger.logEventImplicitly(SDKAnalyticsEvents.EVENT_PREPARING_REQUEST, parametersWithRequestIDAndFunctionType);
}
public void logSentRequest(String str, String str2, JSONObject jSONObject) {
Bundle parametersWithRequestIDAndFunctionType = getParametersWithRequestIDAndFunctionType(str2, str);
this.requestIDToFunctionTypeMap.put(str2, str);
parametersWithRequestIDAndFunctionType.putString("payload", jSONObject.toString());
this.logger.logEventImplicitly(SDKAnalyticsEvents.EVENT_SENT_REQUEST, parametersWithRequestIDAndFunctionType);
}
public void logSendingSuccessResponse(String str) {
this.logger.logEventImplicitly(SDKAnalyticsEvents.EVENT_SENDING_SUCCESS_RESPONSE, getParametersWithRequestIDAndFunctionType(str));
}
public void logSendingErrorResponse(FacebookRequestError facebookRequestError, @Nullable String str) {
Bundle parametersWithRequestIDAndFunctionType = getParametersWithRequestIDAndFunctionType(str);
parametersWithRequestIDAndFunctionType.putString("error_code", Integer.toString(facebookRequestError.getErrorCode()));
parametersWithRequestIDAndFunctionType.putString("error_type", facebookRequestError.getErrorType());
parametersWithRequestIDAndFunctionType.putString("error_message", facebookRequestError.getErrorMessage());
this.logger.logEventImplicitly(SDKAnalyticsEvents.EVENT_SENDING_ERROR_RESPONSE, parametersWithRequestIDAndFunctionType);
}
public void logLoginSuccess() {
this.logger.logEventImplicitly(SDKAnalyticsEvents.EVENT_LOGIN_SUCCESS, getInitParameters());
}
public void logGameLoadComplete() {
this.logger.logEventImplicitly(SDKAnalyticsEvents.EVENT_GAME_LOAD_COMPLETE, getInitParameters());
}
public void logInternalError(SDKMessageEnum sDKMessageEnum, Exception exc) {
Bundle initParameters = getInitParameters();
initParameters.putString(SDKAnalyticsEvents.PARAMETER_FUNCTION_TYPE, sDKMessageEnum.toString());
initParameters.putString("error_type", exc.getClass().getName());
initParameters.putString("error_message", exc.getMessage());
this.logger.logEventImplicitly(SDKAnalyticsEvents.EVENT_INTERNAL_ERROR, initParameters);
}
private Bundle getParametersWithRequestIDAndFunctionType(@Nullable String str) {
Bundle initParameters = getInitParameters();
if (str != null) {
String orDefault = this.requestIDToFunctionTypeMap.getOrDefault(str, null);
initParameters.putString("request_id", str);
if (orDefault != null) {
initParameters.putString(SDKAnalyticsEvents.PARAMETER_FUNCTION_TYPE, orDefault);
this.requestIDToFunctionTypeMap.remove(str);
}
}
return initParameters;
}
private Bundle getParametersWithRequestIDAndFunctionType(String str, String str2) {
Bundle initParameters = getInitParameters();
initParameters.putString("request_id", str);
initParameters.putString(SDKAnalyticsEvents.PARAMETER_FUNCTION_TYPE, str2);
return initParameters;
}
private Bundle getInitParameters() {
Bundle bundle = new Bundle();
String str = this.appID;
if (str != null) {
bundle.putString("app_id", str);
}
String str2 = this.sessionID;
if (str2 != null) {
bundle.putString(SDKAnalyticsEvents.PARAMETER_SESSION_ID, str2);
}
return bundle;
}
}

View File

@@ -0,0 +1,72 @@
package com.facebook.gamingservices.cloudgaming.internal;
import androidx.annotation.Nullable;
import com.ironsource.v8;
/* loaded from: classes2.dex */
public enum SDKMessageEnum {
OPEN_PLAY_STORE("openPlayStore"),
OPEN_APP_STORE("openAppStore"),
MARK_GAME_LOADED("markGameLoaded"),
GET_PLAYER_DATA("getPlayerData"),
SET_PLAYER_DATA("setPlayerData"),
GET_CATALOG("getCatalog"),
GET_PURCHASES("getPurchases"),
PURCHASE("purchase"),
CONSUME_PURCHASE("consumePurchase"),
ON_READY("onReady"),
GET_SUBSCRIBABLE_CATALOG("getSubscribableCatalog"),
PURCHASE_SUBSCRIPTION("purchaseSubscription"),
GET_SUBSCRIPTIONS("getSubscriptions"),
CANCEL_SUBSCRIPTION("cancelSubscription"),
LOAD_INTERSTITIAL_AD("loadInterstitialAd"),
LOAD_REWARDED_VIDEO("loadRewardedVideo"),
SHOW_INTERSTITIAL_AD("showInterstitialAd"),
SHOW_REWARDED_VIDEO(v8.g.h),
GET_ACCESS_TOKEN("getAccessToken"),
GET_CONTEXT_TOKEN("getContextToken"),
GET_PAYLOAD("getPayload"),
IS_ENV_READY("isEnvReady"),
SHARE("share"),
CAN_CREATE_SHORTCUT("canCreateShortcut"),
CREATE_SHORTCUT("createShortcut"),
OPEN_GAMING_SERVICES_DEEP_LINK("openGamingServicesDeepLink"),
OPEN_GAME_REQUESTS_DIALOG("openGameRequestsDialog"),
POST_SESSION_SCORE("postSessionScore"),
POST_SESSION_SCORE_ASYNC("postSessionScoreAsync"),
GET_TOURNAMENT_ASYNC("getTournamentAsync"),
TOURNAMENT_CREATE_ASYNC("tournamentCreateAsync"),
TOURNAMENT_SHARE_ASYNC("tournamentShareAsync"),
TOURNAMENT_POST_SCORE_ASYNC("tournamentPostScoreAsync"),
TOURNAMENT_GET_TOURNAMENTS_ASYNC("getTournaments"),
TOURNAMENT_JOIN_ASYNC("joinTournament"),
OPEN_LINK("openExternalLink"),
PERFORM_HAPTIC_FEEDBACK_ASYNC("performHapticFeedbackAsync"),
CONTEXT_SWITCH("contextSwitch"),
CONTEXT_CHOOSE("contextChoose"),
CONTEXT_CREATE("contextCreate"),
CONTEXT_GET_ID("contextGetID"),
DEBUG_PRINT("debugPrint"),
GET_COUNTRY_ISO("getCountryISO");
private final String mStringValue;
@Override // java.lang.Enum
public String toString() {
return this.mStringValue;
}
SDKMessageEnum(String str) {
this.mStringValue = str;
}
@Nullable
public static SDKMessageEnum fromString(String str) {
for (SDKMessageEnum sDKMessageEnum : values()) {
if (sDKMessageEnum.toString().equals(str)) {
return sDKMessageEnum;
}
}
return null;
}
}

View File

@@ -0,0 +1,42 @@
package com.facebook.gamingservices.cloudgaming.internal;
import androidx.annotation.Nullable;
/* loaded from: classes2.dex */
public enum SDKShareIntentEnum {
INVITE("INVITE"),
REQUEST("REQUEST"),
CHALLENGE("CHALLENGE"),
SHARE("SHARE");
private final String mStringValue;
@Override // java.lang.Enum
public String toString() {
return this.mStringValue;
}
SDKShareIntentEnum(String str) {
this.mStringValue = str;
}
@Nullable
public static String validate(String str) {
for (SDKShareIntentEnum sDKShareIntentEnum : values()) {
if (sDKShareIntentEnum.toString().equals(str)) {
return str;
}
}
return null;
}
@Nullable
public static SDKShareIntentEnum fromString(String str) {
for (SDKShareIntentEnum sDKShareIntentEnum : values()) {
if (sDKShareIntentEnum.toString().equals(str)) {
return sDKShareIntentEnum;
}
}
return null;
}
}