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

Commit b87d3868 authored by kaiyiz's avatar kaiyiz Committed by Steve Kondik
Browse files

SystemUI: Fix system ui crash while continuously click flash light tile issue

In FlashlightController, after set mSession/mSurface null in teardown(),
mSession is reassigned in callback of mSessionListener.onConfigured().
This will lead to no Surface object for mSession.

Don't reassigned mSession when mSurface is already set null.

CRs-Fixed: 750124

Change-Id: I1c4214cc4b58375e82740853c5aff9b68530f816
parent 97b7db87
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -308,9 +308,11 @@ public class FlashlightController {
            new CameraCaptureSession.StateListener() {
        @Override
        public void onConfigured(CameraCaptureSession session) {
            if (mSurface != null) {
                mSession = session;
                postUpdateFlashlight();
            }
        }

        @Override
        public void onConfigureFailed(CameraCaptureSession session) {