From ded3c940e06fcb012bd60a5eb3db2e1aeb17146d Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期二, 15 一月 2019 16:38:13 +0800
Subject: [PATCH] 382 高版本编译android对拒绝权限的硬件信息获取出错保护

---
 Core/SDK/SDKUtility.cs |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/Core/SDK/SDKUtility.cs b/Core/SDK/SDKUtility.cs
index b288485..df2ca42 100644
--- a/Core/SDK/SDKUtility.cs
+++ b/Core/SDK/SDKUtility.cs
@@ -387,7 +387,14 @@
                 Device.userAgent = _json["userAgent"].ToString();
 #if UNITY_ANDROID
                 Device.macAddress = _json["mac"].ToString();
-                Device.imei = _json["imei"].ToString();
+                if (_json["imei"] != null)
+                {
+                    Device.imei = _json["imei"].ToString();
+                }
+                else
+                {
+                    Device.imei = Device.uniqueID;
+                }
                 Device.totalMemory = (int)_json["memoryTotal"];
 #endif
                 if (OnDeviceInfoChanged != null)

--
Gitblit v1.8.0