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

Commit 1bef389f authored by Craig Mautner's avatar Craig Mautner
Browse files

Fix NPE in DisplayContent.setTouchExcludeRegion.

DisplayContent.mTapDetector is null for any non-default display. When
testing ActivityView DisplayContent.setTouchExcludeRegion() throws an
NPE when dereferencing mTapDetector.

This change adds a null test to avoid the NPE.

Fixes bug 19413700.

Change-Id: I48a66c0ed071c87b38b354eead58a4de97fb47b9
parent 8de86276
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -241,8 +241,10 @@ class DisplayContent {
                mTouchExcludeRegion.op(mTmpRect, Region.Op.DIFFERENCE);
            }
        }
        if (mTapDetector != null) {
            mTapDetector.setTouchExcludeRegion(mTouchExcludeRegion);
        }
    }

    void switchUserStacks() {
        final WindowList windows = getWindowList();