OSDN Git Service

Make InputApplicationInfo as a part of InputApplicationHandle (1/2)
authorArthur Hung <arthurhung@google.com>
Wed, 20 Mar 2019 08:52:24 +0000 (16:52 +0800)
committerArthur Hung <arthurhung@google.com>
Fri, 22 Mar 2019 10:14:29 +0000 (18:14 +0800)
commit7a0c39a5b46bbb8f2e7b869c642078e892d4804c
tree0dbccb8e489d3977be760d85e206b86baac08047
parentebb52c5ac8b95637f5048b993aad88253cd85205
Make InputApplicationInfo as a part of InputApplicationHandle (1/2)

InputWindowHandle::updateInfo would also call
InputApplicationHandle::updateInfo that may access the null pointer if the
focus application changed in same time.

- To replace allocated mInfo in updateInfo(), make it as an object
  member variable of InputApplicationHandle.

Bug: 128930899
Test: atest inputflinger_tests
Change-Id: Id19d2d8cd1be181ea994d0efa7afbb2567c4d734
include/input/InputApplication.h
libs/input/InputApplication.cpp
services/inputflinger/InputDispatcher.cpp
services/inputflinger/tests/InputDispatcher_test.cpp