From 0a1a3b8a70a266d65ccdc9ebbb50fba5dce313af Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期一, 21 十月 2019 14:54:14 +0800
Subject: [PATCH] update 安卓10

---
 Project/app/src/game_822055139/java/com/secondworld/univeralsdk/H2EngineSDK.java |   25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/Project/app/src/game_822055139/java/com/secondworld/univeralsdk/H2EngineSDK.java b/Project/app/src/game_822055139/java/com/secondworld/univeralsdk/H2EngineSDK.java
index a021aca..23a216d 100644
--- a/Project/app/src/game_822055139/java/com/secondworld/univeralsdk/H2EngineSDK.java
+++ b/Project/app/src/game_822055139/java/com/secondworld/univeralsdk/H2EngineSDK.java
@@ -54,6 +54,9 @@
                 case CodeU2A.AssetCopy:
                     FileUtil.copyAssets(_activity);
                     break;
+                case CodeU2A.CopyOneAsset:
+                    FileUtil.copy(_activity, _json.getString("fileName"));
+                    break;
                 case CodeU2A.BatteryListenStart:
                     BatteryUtil.getInstance().start(_activity);
                     break;
@@ -99,6 +102,7 @@
                                                       _json.getString("orderId"),
                                                       (float) _json.getDouble("mount"),
                                                       _json.getString("cpInfo"));
+                    FreePlatformUtil.getInstace().payProcessing = true;
                     break;
                 case CodeU2A.PayFinished:
                     Tracking.setPayment(_json.getString("orderID"),
@@ -116,6 +120,9 @@
                                            _json.getString("moneyType"),
                                            true,
                                            _money);
+
+                    FreePlatformUtil.getInstace().payProcessing = false;
+
                     break;
                 case CodeU2A.ClientPackage:
                     // 鍒濆鍖栫儹浜�
@@ -133,6 +140,9 @@
                     break;
                 case CodeU2A.JPushRemoveLocalMessage:
                     removeNotification(_activity, _json.getInt("id"));
+                    break;
+                case CodeU2A.SendRegistEvent:
+                    FreePlatformUtil.getInstace().SendRegisterEvent();
                     break;
             }
 
@@ -300,9 +310,6 @@
 
                 // ------------------------------- 鑷敱SDK -------------------------------
                 FreePlatformUtil.getInstace().init(activity);
-
-                // ------------------------------- 鐚�砈DK -------------------------------
-                FreePlatformUtil.getInstace().init(activity);
                 // ------------------------------- 鏋佸厜鎺ㄩ�� -------------------------------
                 JPushInterface.setDebugMode(true);
                 JPushInterface.init(activity);
@@ -355,6 +362,10 @@
         FreePlatform.getInstance().onCreate();
     }
 
+    public static void onWindowFocusChanged(boolean b)
+    {
+    }
+
     public static void onNewIntent(final Activity activity, final Intent intent)
     {
     }
@@ -387,6 +398,14 @@
     {
         FreePlatform.getInstance().onResume();
         TeaAgent.onResume(activity);
+
+        if(FreePlatformUtil.getInstace().payProcessing)
+        {
+            Map<String, Object> _msgStruct = new HashMap<>();
+            _msgStruct.put("code", CodeA2U.FreePlatformPayCancel);
+            UniversalUtil.sendMessageToUnity(_msgStruct);
+            FreePlatformUtil.getInstace().payProcessing = false;
+        }
     }
 
     public static void onStop(final Activity activity)

--
Gitblit v1.8.0