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

Commit cb5fc91a authored by Mark Harman's avatar Mark Harman
Browse files

Catch UnsupportedOperationException.

parent bfafaf13
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@
<pre>
Version 1.55 (Work in progress)

FIXED   Crash on some devices when starting preview using camera vendor extensions, now fail
FIXED   Fixed possible crash related to focusing with Camera2 API.
FIXED   Dialog for poor magnetic sensor dialog wasn't showing any text.
FIXED   Ensure the info text for capture progress in x- extension modes remains visible until 100%.
+9 −2
Original line number Diff line number Diff line
@@ -6095,8 +6095,8 @@ public class CameraController2 extends CameraController {
                        }
                        function.call();
                    }
                    catch(CameraAccessException | NullPointerException | IllegalArgumentException e) {
                        // see notes below in createCaptureSession() for why we also catch NullPointerException and IllegalArgumentException
                    catch(CameraAccessException | NullPointerException | IllegalArgumentException | UnsupportedOperationException e) {
                        // see notes below in createCaptureSession() for why we also catch NullPointerException, IllegalArgumentException, UnsupportedOperationException
                        // need to catch separately when wait_until_started==false due to this running on a background thread
                        MyDebug.logStackTrace(TAG, "exception create extension session on background thread", e);
                        //myStateCallback.onConfigureFailed();
@@ -6475,6 +6475,8 @@ public class CameraController2 extends CameraController {
                                Log.e(TAG, "camera is no longer open");
                                return;
                            }
                            /*if( true )
                                throw new UnsupportedOperationException(); // test*/
                            camera.createExtensionSession(extensionConfiguration);
                        }
                    }, on_failed);
@@ -6619,6 +6621,11 @@ public class CameraController2 extends CameraController {
            MyDebug.logStackTrace(TAG, "IllegalArgumentException trying to create capture session", e);
            throw new CameraControllerException();
        }
        catch(UnsupportedOperationException e) {
            // have had crashes from Google Play, from createExtensionSession
            MyDebug.logStackTrace(TAG, "UnsupportedOperationException trying to create capture session", e);
            throw new CameraControllerException();
        }
    }

    @Override