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. Fix: 327210346 Test: atest SizeCompatTests Change-Id: I47ca4412a89e0c672c0118658c33d29e15f30c95
Loading
Please register or sign in to comment