Ensure returned event is non-null
Currently, we aren't checking whether the returned event is null. This causes NPE during a test run when the implementation is bad. The NPE causes the entire test run to fail, rather than failing individual tests. This is inconvenient when doing TDD. In this change, add a matcher for downtime to simplify the code, and add null checks for cases where a matcher wouldn't be convenient. Bug: 211379801 Test: m inputflinger_tests && $ANDROID_HOST_OUT/nativetest64/inputflinger_tests/inputflinger_tests Change-Id: Id0c3cf1908adee0d810c7e24f8507c14f689f999
Loading
Please register or sign in to comment