优化细节

This commit is contained in:
Jenly
2020-04-28 21:08:50 +08:00
parent 078d31b2ad
commit 4b8b4e8723

View File

@@ -242,6 +242,7 @@ public class CaptureHelper implements CaptureLifecycle,CaptureTouchEvent,Capture
public void onPause(){
if (captureHandler != null) {
captureHandler.quitSynchronously();
captureHandler = null;
}
inactivityTimer.onPause();
ambientLightManager.stop();
@@ -526,6 +527,7 @@ public class CaptureHelper implements CaptureLifecycle,CaptureTouchEvent,Capture
}
if(isPlayBeep){//如果播放音效,则稍微延迟一点,给予播放音效时间
if(captureHandler != null){
captureHandler.postDelayed(() -> {
//如果设置了回调并且onCallback返回为true则表示拦截
if(onCaptureCallback!=null && onCaptureCallback.onResultCallback(text)){
@@ -536,6 +538,7 @@ public class CaptureHelper implements CaptureLifecycle,CaptureTouchEvent,Capture
activity.setResult(Activity.RESULT_OK,intent);
activity.finish();
},100);
}
return;
}