优化细节
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user