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

Commit 3620736b authored by Eghosa Ewansiha-Vlachavas's avatar Eghosa Ewansiha-Vlachavas
Browse files

Check if `mDragResizeListener` is null before use in `DesktopModeWindowDecoration`

Prevents null pointer exception being thrown leading to sysui crash.

Fixes: 332874241
Test: manual
Change-Id: I883526d7077c9e37761ace8b9e68452e9d33acb9
parent 65dc94c7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -425,7 +425,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
    }

    boolean shouldResizeListenerHandleEvent(MotionEvent e, Point offset) {
        return mDragResizeListener.shouldHandleEvent(e, offset);
        return mDragResizeListener != null && mDragResizeListener.shouldHandleEvent(e, offset);
    }

    boolean isHandlingDragResize() {
@@ -795,7 +795,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
     */
    private Region getGlobalExclusionRegion() {
        Region exclusionRegion;
        if (mTaskInfo.isResizeable) {
        if (mDragResizeListener != null && mTaskInfo.isResizeable) {
            exclusionRegion = mDragResizeListener.getCornersRegion();
        } else {
            exclusionRegion = new Region();