Add DisplayViewport native tests
The strategy for finding DisplayViewport has changed in ag/4723479.
Add native tests for the new lookup logic here.
The matching is done by uniqueId if it is specified, and by type only if it is not.
Some additional refactors:
- Return std::optional from getDisplayViewport
- Make internal viewport optional. Expect normal operation if internal
viewport is not present at all.
Bug: 111108021
Test: atest -a inputflinger_tests
Change-Id: I7d7d698438d0d691f5f07fef2da80e792a504978
4 files changed