Fix DisplayHashManagerTest failure on ARC++

Test DisplayHashManagerTest#testGenerateDisplayHash_WindowOffscreen is
failing on ARC++ devices. That is because the test view is not moved out
of screen as expected when testGenerateDisplayHash_WindowOffscreen is
ran in freeform mode. The test uses mMainView, a RelativeLayout, as a
window to contain the test view. The test assumes the left test app edge
overlays the left screen edge. It attempts to move the test view out of
screen by shifting mMainView to left by the width of the test view.
However, when the test app is in freeform mode, moving the mMainView
with such distance is not enough to move the test view out of the screen
because there is remaining distance between the edge of the screen and
the edge of the RelativeLayout.

To move the main view completely out of the screen, shifting the main
view negativly by the the sum of the width of the test view and the
distance between the left screen edge and the left window edge.

Bug: 195200125
Test: Run `atest DisplayHashManagerTest`
Change-Id: I06ce4b2345339634c3bea10efd9c048636b97c50
1 file changed