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

Commit 8532ba36 authored by frankpreel's avatar frankpreel
Browse files

Save current operating mode.

Please note that QRCode mode is *NOT* part of the save.
Only Video and Photo modes can be restored.
If the application is exited in QRCode mode, Photo mode will be restored the next time the application is started.
parent cae06472
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -4755,7 +4755,7 @@ public class Preview implements SurfaceHolder.Callback, TextureView.SurfaceTextu
        }
        }


        if (is_qrcode() != old_is_qrcode) {
        if (is_qrcode() != old_is_qrcode) {
            //K1ZFP TODO //
            applicationInterface.setVideoPref(false);
        }
        }
        else if (is_video() != old_is_video) {
        else if (is_video() != old_is_video) {
            setFocusPref(false); // first restore the saved focus for the new photo/video mode; don't do autofocus, as it'll be cancelled when restarting preview
            setFocusPref(false); // first restore the saved focus for the new photo/video mode; don't do autofocus, as it'll be cancelled when restarting preview
@@ -4766,7 +4766,7 @@ public class Preview implements SurfaceHolder.Callback, TextureView.SurfaceTextu


            if (change_user_pref) {
            if (change_user_pref) {
                // now save
                // now save
                applicationInterface.setVideoPref(is_video()); // K1ZFP TODO Warn//
                applicationInterface.setVideoPref(true);
            }
            }
            if (!during_startup) {
            if (!during_startup) {
                // if during startup, updateFlashForVideo() needs to always be explicitly called anyway
                // if during startup, updateFlashForVideo() needs to always be explicitly called anyway