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

Commit a5612a0c authored by Matthew Ng's avatar Matthew Ng
Browse files

Fixes null error for quick scrub when there is no home button

Change-Id: I60c43009681d3e81442150f3c756eaa191619a67
Fixes: 72094006
Test: manual
parent e2861da8
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -294,6 +294,7 @@ public class QuickScrubController extends GestureDetector.SimpleOnGestureListene

        // Get the touch rect of the home button location
        View homeView = mNavigationBarView.getHomeButton().getCurrentView();
        if (homeView != null) {
            int[] globalHomePos = homeView.getLocationOnScreen();
            int[] globalNavBarPos = mNavigationBarView.getLocationOnScreen();
            int homeX = globalHomePos[0] - globalNavBarPos[0];
@@ -301,6 +302,7 @@ public class QuickScrubController extends GestureDetector.SimpleOnGestureListene
            mHomeButtonRect.set(homeX, homeY, homeX + homeView.getMeasuredWidth(),
                    homeY + homeView.getMeasuredHeight());
        }
    }

    @Override
    public void onDarkIntensityChange(float intensity) {