OSDN Git Service

Fix Native tests for input are broken in postsubmit
authorArthur Hung <arthurhung@google.com>
Thu, 31 Jan 2019 08:39:28 +0000 (16:39 +0800)
committerArthur Hung <arthurhung@google.com>
Thu, 31 Jan 2019 08:39:28 +0000 (16:39 +0800)
commit6b5a2b98da3b61c7ea0c7bc3d5a6ae5fd7ddff72
tree7136e021bbc3d466383686cf7c233abda82d1ef2
parentc3871ccfc1098bae22fe4cc833fba89738778f03
Fix Native tests for input are broken in postsubmit

For releaseChannel, if clear the token first then unregisterChannel.
It may access the null pointer while looking for the corresponding
window and input channel.

This would change test case to simply clear the channel and token.
So updateInfo would get a null token for testing if setInputWindow fine.

Bug: 117116942
Test: atest inputflinger_tests
Change-Id: I11853720795554e1d83dafb9f3df948b5ee7e90e
services/inputflinger/tests/InputDispatcher_test.cpp