Create viewports in a separate function
This will allow the caller to re-use the viewport object for other purposes. That said, the whole thing is poorly designed, and there are many places where we are mixing viewports and display ids, and not just in tests, but also in production. For example, InputDevice has the concept of associating with displays, but mappers also have a way to keep track of their own associations. The current approach allows us to slightly simplify some of the current and new tests written in InputReader area. Bug: 378308551 Test: TEST=inputflinger_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST Flag: TEST_ONLY Change-Id: Ic9b476f3e991d128e429afcc096c9dc12e68f01e
Loading
Please register or sign in to comment