Modify logic for showing the Unsupported Display Size dialog

When determining whether to show 'the Unsupported Display Size
dialog', the global configuration is used. However, the density of
the secondary display may differ from the global configuration.
Therefore, I modify the codes to use the configuration of the proper
display as the criteria.

Bug: 355647098
Test: atest CtsWindowManagerDeviceAnimations:android.server.wm.animations.DisplaySizeTest
Test: atest CtsWindowManagerDeviceAnimations:android.server.wm.animations.DisplaySizeTest --user-type secondary_user
Test: atest CtsWindowManagerDeviceAnimations:android.server.wm.animations.DisplaySizeTest --user-type secondary_user_on_secondary_display
(cherry picked from https://partner-android-review.googlesource.com/q/commit:2ba9ca5a36e227ca10e4659502ff8a310d4ea365)

Change-Id: I242dad217908d255eb1febba40c6befacf9c4c22
1 file changed