From 27c81ac22c0f0a2318ba8ac9adf7a091fc136021 Mon Sep 17 00:00:00 2001
From: allez <305670599@qq.com>
Date: 星期五, 09 七月 2021 11:25:11 +0800
Subject: [PATCH] 0000 提交港台sdk
---
SdkProject/plugins/quick/java/com/secondworld/sdk/QuickSdkMgr.java | 53 +++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 43 insertions(+), 10 deletions(-)
diff --git a/SdkProject/plugins/quick/java/com/secondworld/sdk/QuickSdkMgr.java b/SdkProject/plugins/quick/java/com/secondworld/sdk/QuickSdkMgr.java
index 44510a8..5287985 100644
--- a/SdkProject/plugins/quick/java/com/secondworld/sdk/QuickSdkMgr.java
+++ b/SdkProject/plugins/quick/java/com/secondworld/sdk/QuickSdkMgr.java
@@ -61,17 +61,17 @@
ActivityCompat.requestPermissions(activity, new String[]{
Manifest.permission.READ_PHONE_STATE, Manifest.permission.WRITE_EXTERNAL_STORAGE}, RequestCode.QUICK);
} else {
- QuickSdkMgr.I.init(activity);
+ //QuickSdkMgr.I.init(activity);
}
} catch (Exception e) {
- QuickSdkMgr.I.init(activity);
+ //QuickSdkMgr.I.init(activity);
}
}
public void onRequestPermissionsResult(Activity activity, int requestCode, int[] grantResults) {
if (requestCode != RequestCode.QUICK) return;
if (hasPermissions(activity)) {
- QuickSdkMgr.I.init(activity);
+ //QuickSdkMgr.I.init(activity);
return;
}
final AlertDialog.Builder normalDialog = new AlertDialog.Builder(activity);
@@ -114,17 +114,25 @@
if (GameActivityProxy.I.activity == null)
return;
if (hasPermissions(GameActivityProxy.I.activity)) {
- init(BtGameMain.I.activity);
- Toast.makeText(GameAppProxy.app, "姝e湪鍒濆鍖栦腑锛岃绋嶇瓑", Toast.LENGTH_LONG).show();
+ //init(BtGameMain.I.activity);
+ Toast.makeText(GameAppProxy.app, "寮傚父璇烽噸鍚父鎴�", Toast.LENGTH_LONG).show();
}
break;
}
case SUCCEED: {
- User.getInstance().login(GameActivityProxy.I.activity);
+ //User.getInstance().login(GameActivityProxy.I.activity);
+ GameActivityProxy.I.activity.runOnUiThread(new Runnable()
+ {
+ @Override
+ public void run()
+ {
+ User.getInstance().login(GameActivityProxy.I.activity);
+ }
+ });
break;
}
case LOADING: {
- Toast.makeText(GameAppProxy.app, "姝e湪鍒濆鍖栦腑锛岃绋嶇瓑", Toast.LENGTH_LONG).show();
+ Toast.makeText(GameAppProxy.app, "姝e湪鍒濆鍖栦腑锛岃绋嶇瓑锛�", Toast.LENGTH_LONG).show();
break;
}
}
@@ -133,19 +141,44 @@
public void loginOut() {
if (GameActivityProxy.I.activity == null)
return;
- User.getInstance().logout(GameActivityProxy.I.activity);
+ //User.getInstance().logout(GameActivityProxy.I.activity);
+ GameActivityProxy.I.activity.runOnUiThread(new Runnable()
+ {
+ @Override
+ public void run()
+ {
+ User.getInstance().logout(GameActivityProxy.I.activity);
+ }
+ });
}
public void setGameRoleInfo(GameRoleInfo roleInfo, boolean createRole) {
if (GameActivityProxy.I.activity == null)
return;
- User.getInstance().setGameRoleInfo(GameActivityProxy.I.activity, roleInfo, createRole);
+ //User.getInstance().setGameRoleInfo(GameActivityProxy.I.activity, roleInfo, createRole);
+
+ GameActivityProxy.I.activity.runOnUiThread(new Runnable()
+ {
+ @Override
+ public void run()
+ {
+ User.getInstance().setGameRoleInfo(GameActivityProxy.I.activity, roleInfo, createRole);
+ }
+ });
}
public void pay(OrderInfo orderInfo, GameRoleInfo roleInfo) {
if (GameActivityProxy.I.activity == null)
return;
- Payment.getInstance().pay(GameActivityProxy.I.activity, orderInfo, roleInfo);
+ //Payment.getInstance().pay(GameActivityProxy.I.activity, orderInfo, roleInfo);
+ GameActivityProxy.I.activity.runOnUiThread(new Runnable()
+ {
+ @Override
+ public void run()
+ {
+ Payment.getInstance().pay(GameActivityProxy.I.activity, orderInfo, roleInfo);
+ }
+ });
}
public void verifyRealName() {
--
Gitblit v1.8.0