Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6cabf7da authored by Mark Harman's avatar Mark Harman
Browse files

Crash in 1.47 for panorama photo mode if a new photo is taken when a previous...

Crash in 1.47 for panorama photo mode if a new photo is taken when a previous panorama is still being processed; update testTakePhotoPanorama() to test this.
parent 9d1cad51
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -51,6 +51,8 @@
Version 1.47.1 (Work in progress)

FIXED   Crash in 1.47 when saving photo with SAF and geotagging, when using Camera2 API.
FIXED   Crash in 1.47 for panorama photo mode if a new photo is taken when a previous panorama is
        still being processed.
FIXED   Crash for panorama if no matches found when aligning images.

Version 1.47 (2019/08/14)
+22 −0
Original line number Diff line number Diff line
@@ -10537,6 +10537,28 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
        assertTrue(settingsButton.getVisibility() == View.VISIBLE);
        assertTrue(cancelPanoramaButton.getVisibility() == View.GONE);
        if( !cancel && !to_max ) {
            // test trying to take another photo whilst saving
            Thread.sleep(500);
            assertTrue( mActivity.getApplicationInterface().getImageSaver().getNImagesToSave() > 0 );
            Log.d(TAG, "about to click take photo whilst saving images");
            clickView(takePhotoButton);
            Log.d(TAG, "done clicking take photo");
            this.getInstrumentation().waitForIdleSync();
            Log.d(TAG, "after idle sync");
            assertFalse( mActivity.getApplicationInterface().getGyroSensor().isRecording() );
            // and again (test for crash that occured in 1.47!)
            Thread.sleep(500);
            assertTrue( mActivity.getApplicationInterface().getImageSaver().getNImagesToSave() > 0 );
            Log.d(TAG, "about to click take photo whilst saving images");
            clickView(takePhotoButton);
            Log.d(TAG, "done clicking take photo");
            this.getInstrumentation().waitForIdleSync();
            Log.d(TAG, "after idle sync");
            assertFalse( mActivity.getApplicationInterface().getGyroSensor().isRecording() );
        }
        mActivity.waitUntilImageQueueEmpty();
        assertTrue( folder.exists() );
+6 −0
Original line number Diff line number Diff line
@@ -3255,6 +3255,12 @@ public class MainActivity extends Activity {
                applicationInterface.finishPanorama();
                return;
            }
            else if( !applicationInterface.canTakeNewPhoto() ) {
                if( MyDebug.LOG )
                    Log.d(TAG, "can't start new panoroma, still saving in background");
                // we need to test here, otherwise the Preview won't take a new photo - but we'll think we've
                // started the panorama!
            }
            else {
                if( MyDebug.LOG )
                    Log.d(TAG, "start panorama");