|
|
@ -231,6 +231,7 @@ public class OXFaceOnlineActivity extends BaseActivity implements View.OnClickLi |
|
|
|
// 方案二:添加状态标识控制订单选择页面的显示,避免重复弹出 |
|
|
|
private static boolean isOrderSelectionActivityShowing = false; // 订单选择页面是否正在显示 |
|
|
|
private static boolean isOrderVerificationResultActivityShowing = false; // 订单核销结果页面是否正在显示 |
|
|
|
public static boolean isVerificationCodeActivityShowing = false; // 验证码页面是否正在显示 |
|
|
|
@Override |
|
|
|
protected void onCreate(Bundle savedInstanceState) { |
|
|
|
super.onCreate(savedInstanceState); |
|
|
@ -1207,6 +1208,12 @@ public class OXFaceOnlineActivity extends BaseActivity implements View.OnClickLi |
|
|
|
@Override |
|
|
|
public void onFaceDetectCallback(LivenessModel livenessModel) { |
|
|
|
try { |
|
|
|
// 检查是否需要进行人脸检测 |
|
|
|
if (!isNeedCheckFace()) { |
|
|
|
LogManager.logDebug(TAG, "当前有弹窗覆盖,跳过人脸检测处理"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 更新人脸检测状态 |
|
|
|
updateFaceDetectionStatus(livenessModel); |
|
|
|
|
|
|
@ -3562,4 +3569,39 @@ public class OXFaceOnlineActivity extends BaseActivity implements View.OnClickLi |
|
|
|
LogManager.logInfo(TAG, "人脸识别开始,停止动态人数检测"); |
|
|
|
stopDynamicPeopleDetection(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 检查是否需要进行人脸检测 |
|
|
|
* 当有其他弹窗覆盖在视频流上时,不进行人脸检测 |
|
|
|
* @return true表示需要检测,false表示不需要检测 |
|
|
|
*/ |
|
|
|
private boolean isNeedCheckFace() { |
|
|
|
// 1. 当查询到当前GateUnavailableDialog.java已经弹出时,返回false |
|
|
|
if (gateUnavailableDialog != null && gateUnavailableDialog.isShowing()) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
// 2. 当查询到当前OrderSelectionActivity.java已经弹出时,返回false |
|
|
|
if (isOrderSelectionActivityShowing) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
// 3. 当查询到当前OrderVerificationResultActivity.java已经弹出时,返回false |
|
|
|
if (isOrderVerificationResultActivityShowing) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
// 4. 当查询到当前VerificationCodeActivity.java已经弹出时,返回false |
|
|
|
if (isVerificationCodeActivityShowing) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
// 5. 当查询到当前UnlockPasswordDialog.java已经弹出时,返回false |
|
|
|
if (unlockPasswordDialog != null && unlockPasswordDialog.isShowing()) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
// 其它情况返回true |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |