Skip to content
Snippets Groups Projects
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
No related merge requests found
......@@ -241,7 +241,9 @@ class DisplayContent {
mTouchExcludeRegion.op(mTmpRect, Region.Op.DIFFERENCE);
}
}
mTapDetector.setTouchExcludeRegion(mTouchExcludeRegion);
if (mTapDetector != null) {
mTapDetector.setTouchExcludeRegion(mTouchExcludeRegion);
}
}
void switchUserStacks() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment