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

Commit 148d371e authored by chiz's avatar chiz Committed by Steve Kondik
Browse files

Camera: Fix crash during open and close camera

When we open camera for the second time after opening camera,
switching to camcorder and exit camcorder rapidly, crash will
be observed. It's due to the assertion of double open.
When app receives pause event, it should cancel the switch
animation, as we as it's listener.

Change-Id: Id351d3e5db63c54646d592b728a4624e3d6e1211
parent 1fe58283
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -323,6 +323,9 @@ public class CameraActivity extends ActivityBase

    @Override
    public void onPause() {
        if (mCameraSwitchAnimator != null && mCameraSwitchAnimator.isRunning()) {
            mCameraSwitchAnimator.cancel();
        }
        mPaused = true;
        mOrientationListener.disable();
        mCurrentModule.onPauseBeforeSuper();