From 8a5cbf6024942739386e65cc6a1ea905df9bfd6e Mon Sep 17 00:00:00 2001 From: azaat Date: Wed, 24 Mar 2021 13:28:48 +0300 Subject: [PATCH] [run instrumentation] Change where stoppingVideo is called --- .../java/net/sourceforge/opencamera/preview/Preview.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java b/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java index 1ca31b30..42acb8ed 100644 --- a/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java +++ b/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java @@ -963,6 +963,7 @@ private void configureTransform() { } private void stopVideoPostPrepare(boolean from_restart) { + applicationInterface.stoppingVideo(); Log.d(TAG, "Stopping video post prepare"); if( video_recorder != null ) { // check again, just to be safe @@ -1004,7 +1005,7 @@ private void stopVideoPostPrepare(boolean from_restart) { @TargetApi(Build.VERSION_CODES.LOLLIPOP) public void stopVideo(boolean from_restart) { - applicationInterface.stoppingVideo(); + camera_controller.closeVideoRecordingSession(); if( MyDebug.LOG ) Log.d(TAG, "stopVideo()"); @@ -1032,8 +1033,6 @@ public void stopVideo(boolean from_restart) { } - camera_controller.closeVideoRecordingSession(); - /* If camera2api is not used, we should stop video immediately. Otherwise it is done in callback after captureSession is closed