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