Add assumption that initial displaySize has changed

The test fails if the same display is used for
both CLOSED and OPENED state: there is no change in
display metrics so the non-resizable activity does
not enter app-compat mode so the restart button is
not shown.

Solution: determine display size before and after
changing to OPENED state and continue the test only
if the two sizes are different.

Bug: 233922949

Test: android.cts.statsdatom.sizecompatrestartbutton.SizeCompatRestartButtonStatsTests#testSizeCompatRestartButtonAppearedButNotClicked

Signed-off-by: Bogdan Cozma <bcozma@microsoft.com>
Change-Id: I9fbe9151ac602264b7482d35f7e4c6345379c6f4
1 file changed