From 35753aa495dddfbc4b3151c35fc4eea9a8a5c086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BF=8A=E6=89=8D?= <61060866@qq.com> Date: Tue, 23 Apr 2024 18:30:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=99=B9=E8=BD=AF=E8=AF=B7=E6=B1=82=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nativedemo/arcsoft/ArcSoftFaceCheckManager.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/aispeech/nativedemo/arcsoft/ArcSoftFaceCheckManager.java b/app/src/main/java/com/aispeech/nativedemo/arcsoft/ArcSoftFaceCheckManager.java index 3a2d4d5..87dce59 100644 --- a/app/src/main/java/com/aispeech/nativedemo/arcsoft/ArcSoftFaceCheckManager.java +++ b/app/src/main/java/com/aispeech/nativedemo/arcsoft/ArcSoftFaceCheckManager.java @@ -157,9 +157,13 @@ public class ArcSoftFaceCheckManager implements FaceCheckInterface { if (code != 200) { onFail(obj.getString("msg")); } else { - String activeKey = obj.optString("activation_code"); - activeArc(activeKey, false); - ConfigUtil.commitArcProdActiveKey(AppContext.getInstance(), activeKey); + String activeKey = obj.optString("data"); + if (StringUtils.isEmpty(activeKey)) { + onFail("激活码为空"); + } else { + activeArc(activeKey, false); + ConfigUtil.commitArcProdActiveKey(AppContext.getInstance(), activeKey); + } } } catch (Exception e) { e.printStackTrace(); @@ -169,7 +173,8 @@ public class ArcSoftFaceCheckManager implements FaceCheckInterface { @Override public void onFail(String error) { - Log.e(this.getClass().getSimpleName(), "new Heartbeat = " + error); + Logger.e("arc error: " + error); + Log.e(TAG, "new Heartbeat = " + error); } }; DigiWebSocketServer.getArcActivateKey(callback);