Fix some WM unit tests
WindowFrameTests#testLayoutNonfullscreenTask and sizes because test assumed that frame for window was always bigger than screen size. Now we calculate all frames relative to real display size. TestWindowManagerPolicy used in WM unit tests reported incorrect value from rotationHasCompatibleMetricsLw(), which lead to DisplayContent#mAltOrientation set to "true" after any rotation and resulted in shrinked display metrics. DisplayContentTests#testDefaultDisplayOverrideConfigUpdate was not restoring the config applied to default display because it was trying update values in config from non-empty to empty, which is considered a no-diff. Test: com.android.server.wm.WindowFrameTests Test: #testCalculatePolicyCrop Test: #testLayoutNonfullscreenTask Test: com.android.server.wm.AppWindowTokenTests Test: #testLandscapeSeascapeRotationByApp Test: com.android.server.wm.DisplayContentTests Test: #testDefaultDisplayOverrideConfigUpdate Change-Id: Ia0ed46307f67f6b47859209ebcf13253b59b8002
Loading
Please register or sign in to comment