|
@ -1189,6 +1189,8 @@ public class OXFaceOnlineActivity extends BaseActivity implements View.OnClickLi |
|
|
|
|
|
|
|
|
// 根据后台配置更新按钮显示状态 |
|
|
// 根据后台配置更新按钮显示状态 |
|
|
updateButtonVisibility(); |
|
|
updateButtonVisibility(); |
|
|
|
|
|
|
|
|
|
|
|
resumeCamera(); |
|
|
|
|
|
|
|
|
LogManager.logInfo(TAG, "OXFaceOnlineActivity onResume"); |
|
|
LogManager.logInfo(TAG, "OXFaceOnlineActivity onResume"); |
|
|
} |
|
|
} |
|
@ -1211,6 +1213,7 @@ public class OXFaceOnlineActivity extends BaseActivity implements View.OnClickLi |
|
|
@Override |
|
|
@Override |
|
|
public void onGetCameraData(byte[] data, Camera camera, int width, int height) { |
|
|
public void onGetCameraData(byte[] data, Camera camera, int width, int height) { |
|
|
try { |
|
|
try { |
|
|
|
|
|
Log.d(TAG, "45466: 444:"+isNeedCamera); |
|
|
// 摄像头预览数据进行人脸检测 |
|
|
// 摄像头预览数据进行人脸检测 |
|
|
if (isNeedCamera) { |
|
|
if (isNeedCamera) { |
|
|
// 增加帧计数器和时间间隔控制 |
|
|
// 增加帧计数器和时间间隔控制 |
|
@ -1227,6 +1230,7 @@ public class OXFaceOnlineActivity extends BaseActivity implements View.OnClickLi |
|
|
Log.d(TAG, "onGetCameraData: 666:"+FaceSDKManager.initStatus); |
|
|
Log.d(TAG, "onGetCameraData: 666:"+FaceSDKManager.initStatus); |
|
|
// 检查应用是否处于前台 |
|
|
// 检查应用是否处于前台 |
|
|
if (!isApplicationInForeground()) { |
|
|
if (!isApplicationInForeground()) { |
|
|
|
|
|
Log.d(TAG, "isApplicationInForeground: 777:"+isApplicationInForeground()); |
|
|
// 如果应用在后台,减少处理频率,每隔10秒处理一次 |
|
|
// 如果应用在后台,减少处理频率,每隔10秒处理一次 |
|
|
if ((currentTime - lastBackgroundProcessTime) < 10000) { |
|
|
if ((currentTime - lastBackgroundProcessTime) < 10000) { |
|
|
return; |
|
|
return; |
|
@ -2007,6 +2011,7 @@ public class OXFaceOnlineActivity extends BaseActivity implements View.OnClickLi |
|
|
@Override |
|
|
@Override |
|
|
public void run() { |
|
|
public void run() { |
|
|
if (livenessModel == null) { |
|
|
if (livenessModel == null) { |
|
|
|
|
|
LogManager.logError(TAG, "livenessModel为空"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|