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

Commit 872ecd29 authored by Yunfan Chen's avatar Yunfan Chen Committed by Android (Google) Code Review
Browse files

Merge "Null check before access display cutout" into main

parents a97ec6e8 85853292
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ constructor(context: Context, gestureDetector: GesturePointerEventDetector) : Co
        mSwipeDistanceThreshold =
            r.getDimensionPixelSize(R.dimen.system_gestures_distance_threshold)
        val display = DisplayManagerGlobal.getInstance().getRealDisplay(mContext.displayId)
        val displayCutout = display.cutout
        val displayCutout = display?.cutout
        if (displayCutout != null) {
            // Expand swipe start threshold such that we can catch touches that just start beyond
            // the notch area
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ class SystemGesturesPointerEventListener implements PointerEventListener {

        final Display display = DisplayManagerGlobal.getInstance()
                .getRealDisplay(Display.DEFAULT_DISPLAY);
        final DisplayCutout displayCutout = display.getCutout();
        final DisplayCutout displayCutout = display != null ? display.getCutout() : null;
        if (displayCutout != null) {
            // Expand swipe start threshold such that we can catch touches that just start beyond
            // the notch area