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

Commit 2f1b547a authored by Liran Binyamin's avatar Liran Binyamin
Browse files

Crash fix in BubbleStachedHandleViewController.

Switching between gesture nav and 3 button nav may lead to a state where
the RegionSamplingHelper is unexpectedly null.

Bug: 269670598
Test: In Settings switch navigation modes until launcher crashes.
Change-Id: I56d6eea81070f367db292c1ded9866452f6e2650
parent 62b44831
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -203,6 +203,7 @@ public class BubbleStashedHandleViewController {
    private void updateRegionSampling() {
        boolean handleVisible = mStashedHandleView.getVisibility() == VISIBLE
                && mBubbleStashController.isStashed();
        if (mRegionSamplingHelper != null) {
            mRegionSamplingHelper.setWindowVisible(handleVisible);
            if (handleVisible) {
                mStashedHandleView.updateSampledRegion(mStashedHandleBounds);
@@ -211,6 +212,7 @@ public class BubbleStashedHandleViewController {
                mRegionSamplingHelper.stop();
            }
        }
    }

    /**
     * Sets the translation of the stashed handle during the swipe up gesture.