Revert^2 Use resolved bounds in CompatDisplayInsets if letterboxed for aspect ratio
Activity can stay in size compat mode even when restarted if it is letterboxed for aspect ratio but not letterboxed for fixed orientation. This is because resolveAspectRatioRestriction is only called if compatDisplayInsets is null since we assume aspect ratio is already resolved in resolveFixedOrientationConfiguration if app is eligible for size compat mode. With close to square displays, landscape app can have orientation respected with insets (portrait display, landscape orientation with 3BN mode enabled) but still letterboxed for aspect ratio if user chooses aspect ratio or manufacturer overrides app's aspect ratio. CompatDisplayInsets should use resolved override bounds if activity is letterboxed for fixed orientation or aspect ratio so size compat calculations displays within these bounds and not task bounds. Bug: 327210346 Test: atest SizeCompatTests Merged-In: I4790009e36becc0dcce9652f0d6f7a80465ab03d Change-Id: I4790009e36becc0dcce9652f0d6f7a80465ab03d (cherry picked from commit 8ddcd1cf)
Loading
Please register or sign in to comment