正在查看: Rilo v2.0.21 应用的 BaseGameViewModel.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Rilo v2.0.21 应用的 BaseGameViewModel.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.vdx.sud;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.Toast;
import com.stripe.android.model.PaymentMethodOptionsParams;
import com.truecaller.android.sdk.network.RestAdapter;
import com.truecaller.android.sdk.network.VerificationService;
import com.twilio.audioswitch.bluetooth.BluetoothScoJobKt;
import com.twilio.audioswitch.wired.WiredHeadsetReceiverKt;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import tech.sud.mgp.SudMGPWrapper.decorator.SudFSMMGCache;
import tech.sud.mgp.SudMGPWrapper.decorator.SudFSMMGDecorator;
import tech.sud.mgp.SudMGPWrapper.decorator.SudFSMMGListener;
import tech.sud.mgp.SudMGPWrapper.decorator.SudFSTAPPDecorator;
import tech.sud.mgp.SudMGPWrapper.model.GameConfigModel;
import tech.sud.mgp.SudMGPWrapper.model.GameViewInfoModel;
import tech.sud.mgp.SudMGPWrapper.state.MGStateResponse;
import tech.sud.mgp.SudMGPWrapper.state.SudMGPAPPState;
import tech.sud.mgp.SudMGPWrapper.state.SudMGPMGState;
import tech.sud.mgp.SudMGPWrapper.utils.SudJsonUtils;
import tech.sud.mgp.core.ISudFSMStateHandle;
import tech.sud.mgp.core.ISudFSTAPP;
import tech.sud.mgp.core.ISudListenerInitSDK;
import tech.sud.mgp.core.ISudListenerNotifyStateChange;
import tech.sud.mgp.core.SudInitSDKParamModel;
import tech.sud.mgp.core.SudLoadMGParamModel;
import tech.sud.mgp.core.SudMGP;
import timber.log.Timber;
@Metadata(d1 = {"\u0000\u0098\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0010!\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0004\n\u0002\u0010\u0000\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0010\b&\u0018\u00002\u00020\u0001:\u0001bB\u0005¢\u0006\u0002\u0010\u0002J\u000e\u00101\u001a\u0002022\u0006\u00103\u001a\u00020#J\u0018\u00104\u001a\u0002022\u0006\u0010\u0003\u001a\u00020\u00042\u0006\u00103\u001a\u00020#H\u0002J\u0006\u00105\u001a\u000202J0\u00106\u001a\u0002022\b\u0010\u0003\u001a\u0004\u0018\u00010\u00042\b\u0010/\u001a\u0004\u0018\u00010\n2\b\u0010\t\u001a\u0004\u0018\u00010\n2\b\u00107\u001a\u0004\u0018\u000108H$J\u0012\u00109\u001a\u0002022\b\u0010:\u001a\u0004\u0018\u00010;H$J \u0010<\u001a\u0002022\u0006\u0010\u0003\u001a\u00020\u00042\u0006\u00103\u001a\u00020#2\u0006\u0010=\u001a\u00020\nH\u0002J \u0010>\u001a\u0002022\u0006\u0010\u0003\u001a\u00020\u00042\u0006\u0010=\u001a\u00020\n2\u0006\u00103\u001a\u00020#H\u0002J\u0018\u0010?\u001a\u0002022\u0006\u0010\u0003\u001a\u00020\u00042\u0006\u00103\u001a\u00020#H\u0002J\b\u0010@\u001a\u00020\u001dH\u0002J \u0010A\u001a\u0002022\u0006\u0010B\u001a\u00020C2\u0006\u0010D\u001a\u00020E2\u0006\u0010F\u001a\u00020EH\u0002J\u001c\u0010G\u001a\u0002022\b\u0010H\u001a\u0004\u0018\u00010\n2\b\u0010I\u001a\u0004\u0018\u00010JH\u0016J\u0012\u0010K\u001a\u0002022\b\u0010\u0014\u001a\u0004\u0018\u00010\u0015H$J\u0018\u0010L\u001a\u0002022\u0006\u0010B\u001a\u00020C2\u0006\u0010M\u001a\u00020\nH\u0016J\b\u0010N\u001a\u000202H\u0016J\u0010\u0010O\u001a\u0002022\u0006\u0010P\u001a\u00020\nH\u0016J\u001c\u0010Q\u001a\u0002022\b\u0010B\u001a\u0004\u0018\u00010C2\b\u0010R\u001a\u0004\u0018\u00010SH\u0016J\b\u0010T\u001a\u000202H\u0016J\u0018\u0010U\u001a\u0002022\u0006\u0010B\u001a\u00020C2\u0006\u0010M\u001a\u00020\nH\u0016J\u0018\u0010V\u001a\u0002022\u0006\u0010B\u001a\u00020C2\u0006\u0010M\u001a\u00020\nH\u0016J\u0006\u0010W\u001a\u000202J\b\u0010X\u001a\u000202H\u0002J\b\u0010Y\u001a\u000202H$J\u0006\u0010Z\u001a\u000202J\b\u0010[\u001a\u000202H\u0002J\u0018\u0010\\\u001a\u0002022\u0006\u0010-\u001a\u00020.2\u0006\u0010B\u001a\u00020CH\u0002J\u0018\u0010]\u001a\u0002022\u0006\u0010B\u001a\u00020C2\b\u0010M\u001a\u0004\u0018\u00010\nJ\u0018\u0010^\u001a\u0002022\b\u0010\u0014\u001a\u0004\u0018\u00010\u00152\u0006\u0010B\u001a\u00020CJ\u0010\u0010_\u001a\u0002022\u0006\u0010`\u001a\u00020\nH\u0002J\u001e\u0010a\u001a\u0002022\u0006\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0012\u001a\u00020\n2\u0006\u00103\u001a\u00020#R\u001c\u0010\u0003\u001a\u0004\u0018\u00010\u0004X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0005\u0010\u0006\"\u0004\b\u0007\u0010\bR\u0014\u0010\t\u001a\u0004\u0018\u00010\nX¤\u0004¢\u0006\u0006\u001a\u0004\b\u000b\u0010\fR\u0012\u0010\r\u001a\u00020\nX¤\u0004¢\u0006\u0006\u001a\u0004\b\u000e\u0010\fR\u0012\u0010\u000f\u001a\u00020\u00108\u0006@\u0006X\u0087\u000e¢\u0006\u0002\n\u0000R\"\u0010\u0012\u001a\u0004\u0018\u00010\n2\b\u0010\u0011\u001a\u0004\u0018\u00010\n@BX\u0086\u000e¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\fR\u001c\u0010\u0014\u001a\u0004\u0018\u00010\u0015X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0016\u0010\u0017\"\u0004\b\u0018\u0010\u0019R\u0010\u0010\u001a\u001a\u00020\u001b8\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0012\u0010\u001c\u001a\u00020\u001dX¤\u0004¢\u0006\u0006\u001a\u0004\b\u001c\u0010\u001eR\u0014\u0010\u001f\u001a\u0004\u0018\u00010\nX¤\u0004¢\u0006\u0006\u001a\u0004\b \u0010\fR\u0016\u0010!\u001a\n\u0012\u0004\u0012\u00020#\u0018\u00010\"X\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010$\u001a\u0004\u0018\u00010%X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010&\u001a\u00020#X\u0082\u000e¢\u0006\u0002\n\u0000R\u0011\u0010'\u001a\u00020(8F¢\u0006\u0006\u001a\u0004\b)\u0010*R\u000e\u0010+\u001a\u00020,X\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010-\u001a\u00020.8\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0014\u0010/\u001a\u0004\u0018\u00010\nX¤\u0004¢\u0006\u0006\u001a\u0004\b0\u0010\f¨\u0006c"}, d2 = {"Lcom/vdx/sud/BaseGameViewModel;", "Ltech/sud/mgp/SudMGPWrapper/decorator/SudFSMMGListener;", "()V", "activity", "Landroid/app/Activity;", "getActivity", "()Landroid/app/Activity;", "setActivity", "(Landroid/app/Activity;)V", "appId", "", "getAppId", "()Ljava/lang/String;", VerificationService.KEY_REQUEST_HEADER, "getAppKey", "gameConfigModel", "Ltech/sud/mgp/SudMGPWrapper/model/GameConfigModel;", "<set-?>", "gameRoomId", "getGameRoomId", "gameView", "Landroid/view/View;", "getGameView", "()Landroid/view/View;", "setGameView", "(Landroid/view/View;)V", "handler", "Landroid/os/Handler;", "isTestEnv", "", "()Z", "languageCode", "getLanguageCode", "pauseAsyncMgIdList", "", "", "pauseAsyncSingleExecutorService", "Ljava/util/concurrent/ExecutorService;", "playingGameId", "sudFSMMGCache", "Ltech/sud/mgp/SudMGPWrapper/decorator/SudFSMMGCache;", "getSudFSMMGCache", "()Ltech/sud/mgp/SudMGPWrapper/decorator/SudFSMMGCache;", "sudFSMMGDecorator", "Ltech/sud/mgp/SudMGPWrapper/decorator/SudFSMMGDecorator;", "sudFSTAPPDecorator", "Ltech/sud/mgp/SudMGPWrapper/decorator/SudFSTAPPDecorator;", "userId", "getUserId", "addPauseAsyncMgId", "", "gameId", "delayLoadGame", "destroyMG", "getCode", "listener", "Lcom/vdx/sud/BaseGameViewModel$GameGetCodeListener;", "getGameRect", "gameViewInfoModel", "Ltech/sud/mgp/SudMGPWrapper/model/GameViewInfoModel;", "initSdk", PaymentMethodOptionsParams.Blik.PARAM_CODE, "loadGame", "login", "needPauseAsync", "notifyGameViewInfo", "handle", "Ltech/sud/mgp/core/ISudFSMStateHandle;", "gameViewWidth", "", "gameViewHeight", "notifyStateChange", WiredHeadsetReceiverKt.INTENT_STATE, "obj", "", "onAddGameView", "onExpireCode", "dataJson", "onGameDestroyed", "onGameLog", "str", "onGameMGCommonGameUiCustomConfig", "model", "Ltech/sud/mgp/SudMGPWrapper/state/SudMGPMGState$MGCommonGameUiCustomConfig;", "onGameStarted", "onGetGameCfg", "onGetGameViewInfo", "onPause", "onPauseAsync", "onRemoveGameView", "onResume", "onResumeAsync", "processOnExpireCode", "processOnGetGameCfg", "processOnGetGameViewInfo", "showDialog", RestAdapter.JSON_KEY_ERROR_MESSAGE, "switchGame", "GameGetCodeListener", "sud_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public abstract class BaseGameViewModel implements SudFSMMGListener {
private Activity activity;
private String gameRoomId;
private View gameView;
private List<Long> pauseAsyncMgIdList;
private ExecutorService pauseAsyncSingleExecutorService;
private long playingGameId;
public final SudFSTAPPDecorator sudFSTAPPDecorator = new SudFSTAPPDecorator();
private final SudFSMMGDecorator sudFSMMGDecorator = new SudFSMMGDecorator();
public GameConfigModel gameConfigModel = new GameConfigModel();
public final Handler handler = new Handler(Looper.getMainLooper());
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\bf\u0018\u00002\u00020\u0001J\b\u0010\u0002\u001a\u00020\u0003H&J\u0010\u0010\u0004\u001a\u00020\u00032\u0006\u0010\u0005\u001a\u00020\u0006H&¨\u0006\u0007"}, d2 = {"Lcom/vdx/sud/BaseGameViewModel$GameGetCodeListener;", "", "onFailed", "", "onSuccess", PaymentMethodOptionsParams.Blik.PARAM_CODE, "", "sud_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public interface GameGetCodeListener {
void onFailed();
void onSuccess(String code);
}
public static final void showDialog$lambda$1(DialogInterface dialogInterface, int i2) {
}
protected abstract String getAppId();
protected abstract String getAppKey();
protected abstract void getCode(Activity activity, String userId, String appId, GameGetCodeListener listener);
protected abstract void getGameRect(GameViewInfoModel gameViewInfoModel);
protected abstract String getLanguageCode();
protected abstract String getUserId();
protected abstract boolean isTestEnv();
protected abstract void onAddGameView(View gameView);
public void onGameDestroyed() {
}
public void onGameStarted() {
}
protected abstract void onRemoveGameView();
public final String getGameRoomId() {
return this.gameRoomId;
}
public final View getGameView() {
return this.gameView;
}
public final void setGameView(View view) {
this.gameView = view;
}
public final Activity getActivity() {
return this.activity;
}
public final void setActivity(Activity activity) {
this.activity = activity;
}
public final void switchGame(Activity activity, String gameRoomId, long gameId) {
Intrinsics.checkNotNullParameter(activity, "activity");
Intrinsics.checkNotNullParameter(gameRoomId, "gameRoomId");
if (TextUtils.isEmpty(gameRoomId)) {
Toast.makeText(activity, "gameRoomId can not be empty", 1).show();
return;
}
if (this.playingGameId == gameId && Intrinsics.areEqual(gameRoomId, this.gameRoomId)) {
return;
}
destroyMG();
this.gameRoomId = gameRoomId;
this.playingGameId = gameId;
login(activity, gameId);
}
private final void login(final Activity activity, final long gameId) {
if (activity.isDestroyed() || gameId <= 0) {
return;
}
getCode(activity, getUserId(), getAppId(), new GameGetCodeListener() {
@Override
public void onSuccess(String code) {
long j2;
Intrinsics.checkNotNullParameter(code, PaymentMethodOptionsParams.Blik.PARAM_CODE);
long j3 = gameId;
j2 = this.playingGameId;
if (j3 != j2) {
return;
}
this.initSdk(activity, gameId, code);
}
@Override
public void onFailed() {
this.delayLoadGame(activity, gameId);
}
});
}
public final void initSdk(final Activity activity, final long gameId, final String code) {
String appId = getAppId();
String appKey = getAppKey();
SudInitSDKParamModel sudInitSDKParamModel = new SudInitSDKParamModel();
sudInitSDKParamModel.context = activity;
sudInitSDKParamModel.appId = appId;
sudInitSDKParamModel.appKey = appKey;
sudInitSDKParamModel.isTestEnv = isTestEnv();
sudInitSDKParamModel.userId = getUserId();
SudMGP.initSDK(sudInitSDKParamModel, new ISudListenerInitSDK() {
public void onSuccess() {
BaseGameViewModel.this.loadGame(activity, code, gameId);
}
public void onFailure(int errCode, String errMsg) {
Intrinsics.checkNotNullParameter(errMsg, "errMsg");
if (BaseGameViewModel.this.isTestEnv()) {
Log.e("TAG", "onFailure: initSDK onFailure:" + errMsg + '(' + errCode + ')');
Toast.makeText(activity, "initSDK onFailure:" + errMsg + '(' + errCode + ')', 1).show();
}
BaseGameViewModel.this.delayLoadGame(activity, gameId);
}
});
}
public final void loadGame(Activity activity, String code, long gameId) {
if (activity.isDestroyed() || gameId != this.playingGameId) {
return;
}
this.sudFSMMGDecorator.setSudFSMMGListener(this);
SudLoadMGParamModel sudLoadMGParamModel = new SudLoadMGParamModel();
sudLoadMGParamModel.activity = activity;
sudLoadMGParamModel.userId = getUserId();
sudLoadMGParamModel.roomId = this.gameRoomId;
sudLoadMGParamModel.code = code;
sudLoadMGParamModel.mgId = gameId;
sudLoadMGParamModel.language = getLanguageCode();
ISudFSTAPP loadMG = SudMGP.loadMG(sudLoadMGParamModel, this.sudFSMMGDecorator);
if (loadMG == null) {
Toast.makeText(activity, "loadMG params error", 1).show();
delayLoadGame(activity, gameId);
} else {
this.sudFSTAPPDecorator.setISudFSTAPP(loadMG);
View gameView = loadMG.getGameView();
this.gameView = gameView;
onAddGameView(gameView);
}
}
public final void delayLoadGame(final Activity activity, final long gameId) {
this.handler.postDelayed(new Runnable() {
@Override
public final void run() {
BaseGameViewModel.delayLoadGame$lambda$0(BaseGameViewModel.this, activity, gameId);
}
}, BluetoothScoJobKt.TIMEOUT);
}
public static final void delayLoadGame$lambda$0(BaseGameViewModel baseGameViewModel, Activity activity, long j2) {
Intrinsics.checkNotNullParameter(baseGameViewModel, "this$0");
Intrinsics.checkNotNullParameter(activity, "$activity");
baseGameViewModel.login(activity, j2);
}
public final void destroyMG() {
if (this.playingGameId > 0) {
this.sudFSTAPPDecorator.destroyMG();
this.sudFSMMGDecorator.destroyMG();
this.gameRoomId = null;
this.playingGameId = 0L;
this.gameView = null;
this.activity = null;
onRemoveGameView();
}
}
public void onGameLog(String str) {
Intrinsics.checkNotNullParameter(str, "str");
super.onGameLog(str);
}
public void onExpireCode(ISudFSMStateHandle handle, String dataJson) {
Intrinsics.checkNotNullParameter(handle, "handle");
Intrinsics.checkNotNullParameter(dataJson, "dataJson");
processOnExpireCode(this.sudFSTAPPDecorator, handle);
}
public void onGetGameViewInfo(ISudFSMStateHandle handle, String dataJson) {
Intrinsics.checkNotNullParameter(handle, "handle");
Intrinsics.checkNotNullParameter(dataJson, "dataJson");
processOnGetGameViewInfo(this.gameView, handle);
}
public void onGetGameCfg(ISudFSMStateHandle handle, String dataJson) {
Intrinsics.checkNotNullParameter(handle, "handle");
Intrinsics.checkNotNullParameter(dataJson, "dataJson");
processOnGetGameCfg(handle, dataJson);
}
private final void processOnExpireCode(final SudFSTAPPDecorator sudFSTAPPDecorator, final ISudFSMStateHandle handle) {
getCode(null, getUserId(), getAppId(), new GameGetCodeListener() {
@Override
public void onSuccess(String code) {
long j2;
Intrinsics.checkNotNullParameter(code, PaymentMethodOptionsParams.Blik.PARAM_CODE);
j2 = BaseGameViewModel.this.playingGameId;
if (j2 <= 0) {
return;
}
MGStateResponse mGStateResponse = new MGStateResponse();
mGStateResponse.ret_code = 0;
sudFSTAPPDecorator.updateCode(code, (ISudListenerNotifyStateChange) null);
handle.success(SudJsonUtils.toJson(mGStateResponse));
}
@Override
public void onFailed() {
MGStateResponse mGStateResponse = new MGStateResponse();
mGStateResponse.ret_code = -1;
handle.failure(SudJsonUtils.toJson(mGStateResponse));
}
});
}
public final void processOnGetGameViewInfo(final View gameView, final ISudFSMStateHandle handle) {
Intrinsics.checkNotNullParameter(handle, "handle");
Intrinsics.checkNotNull(gameView);
int measuredWidth = gameView.getMeasuredWidth();
int measuredHeight = gameView.getMeasuredHeight();
if (measuredWidth > 0 && measuredHeight > 0) {
notifyGameViewInfo(handle, measuredWidth, measuredHeight);
} else {
gameView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
gameView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
this.notifyGameViewInfo(handle, gameView.getMeasuredWidth(), gameView.getMeasuredHeight());
}
});
}
}
public final void notifyGameViewInfo(ISudFSMStateHandle handle, int gameViewWidth, int gameViewHeight) {
GameViewInfoModel gameViewInfoModel = new GameViewInfoModel();
gameViewInfoModel.ret_code = 0;
gameViewInfoModel.view_size.width = gameViewWidth;
gameViewInfoModel.view_size.height = gameViewHeight;
getGameRect(gameViewInfoModel);
String json = SudJsonUtils.toJson(gameViewInfoModel);
Log.d("SudBaseGameViewModel", "notifyGameViewInfo:" + json);
handle.success(json);
}
private final void showDialog(String message) {
try {
new AlertDialog.Builder(this.activity).setMessage(message).setCancelable(false).setPositiveButton("Okay", new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i2) {
BaseGameViewModel.showDialog$lambda$1(dialogInterface, i2);
}
}).show();
} catch (Exception e2) {
Timber.tag("").e(e2, "showDialog: ", new Object[0]);
}
}
public final void onPause() {
if (needPauseAsync()) {
onPauseAsync();
} else {
this.sudFSTAPPDecorator.pauseMG();
}
}
public final void onResume() {
if (needPauseAsync()) {
onResumeAsync();
} else {
this.sudFSTAPPDecorator.playMG();
}
}
private final void onPauseAsync() {
ExecutorService executorService = this.pauseAsyncSingleExecutorService;
Intrinsics.checkNotNull(executorService);
executorService.execute(new Runnable() {
@Override
public final void run() {
BaseGameViewModel.onPauseAsync$lambda$2(BaseGameViewModel.this);
}
});
}
public static final void onPauseAsync$lambda$2(BaseGameViewModel baseGameViewModel) {
Intrinsics.checkNotNullParameter(baseGameViewModel, "this$0");
baseGameViewModel.sudFSTAPPDecorator.pauseMG();
}
private final void onResumeAsync() {
ExecutorService executorService = this.pauseAsyncSingleExecutorService;
Intrinsics.checkNotNull(executorService);
executorService.execute(new Runnable() {
@Override
public final void run() {
BaseGameViewModel.onResumeAsync$lambda$3(BaseGameViewModel.this);
}
});
}
public static final void onResumeAsync$lambda$3(BaseGameViewModel baseGameViewModel) {
Intrinsics.checkNotNullParameter(baseGameViewModel, "this$0");
baseGameViewModel.sudFSTAPPDecorator.playMG();
}
private final boolean needPauseAsync() {
List<Long> list = this.pauseAsyncMgIdList;
if (list != null) {
Intrinsics.checkNotNull(list);
if (list.contains(Long.valueOf(this.playingGameId))) {
return true;
}
}
return false;
}
public final void processOnGetGameCfg(ISudFSMStateHandle handle, String dataJson) {
Intrinsics.checkNotNullParameter(handle, "handle");
Timber.e("dataJson " + dataJson, new Object[0]);
handle.success(SudJsonUtils.toJson(this.gameConfigModel));
}
public void onGameMGCommonGameUiCustomConfig(ISudFSMStateHandle handle, SudMGPMGState.MGCommonGameUiCustomConfig model) {
super.onGameMGCommonGameUiCustomConfig(handle, model);
SudMGPAPPState.APPCommonGameUiCustomConfig aPPCommonGameUiCustomConfig = new SudMGPAPPState.APPCommonGameUiCustomConfig();
aPPCommonGameUiCustomConfig.diceCrown = "https://i.imgur.com/oQZWyr7.png";
notifyStateChange("app_common_game_ui_custom_config", aPPCommonGameUiCustomConfig);
}
public void notifyStateChange(String state, Object obj) {
this.sudFSTAPPDecorator.notifyStateChange(state, obj);
}
public final SudFSMMGCache getSudFSMMGCache() {
SudFSMMGCache sudFSMMGCache = this.sudFSMMGDecorator.getSudFSMMGCache();
Intrinsics.checkNotNullExpressionValue(sudFSMMGCache, "sudFSMMGDecorator.sudFSMMGCache");
return sudFSMMGCache;
}
public final void addPauseAsyncMgId(long gameId) {
if (this.pauseAsyncSingleExecutorService == null) {
this.pauseAsyncSingleExecutorService = Executors.newSingleThreadExecutor();
}
if (this.pauseAsyncMgIdList == null) {
this.pauseAsyncMgIdList = new ArrayList();
}
List<Long> list = this.pauseAsyncMgIdList;
Intrinsics.checkNotNull(list);
if (list.contains(Long.valueOf(gameId))) {
return;
}
List<Long> list2 = this.pauseAsyncMgIdList;
Intrinsics.checkNotNull(list2);
list2.add(Long.valueOf(gameId));
}
}