Reduce dependency of real device for wm unit test

By default the test copy the display info from the environment.
Such as the display size can be close to square or
mDefaultFixedToUserRotation is true for FEATURE_AUTOMOTIVE,
which may not match the assumption of some tests.

Though ideally the unit test should mock those attributes to
have consistent precondition, so far there are not too many
cases hence make the affected tests more independent.

Bug: 272527315
Bug: 267795360
Test: atest ActivityRecordTests#testIsSnapshotCompatible
      WallpaperControllerTests.testWallpaperSizeWithFixedTransform

Change-Id: I3373a3f7093e9ace1edf185a9d124e262f27f1f0
4 files changed