Consolidate size compat bounds calculation
- Since hierarchy was merged, the compat bounds can be computed in a single place resolveSizeCompatModeConfiguration(). - Originally, the horizontal centered bounds rely on mSizeCompatBounds to override getBounds(). Now mSizeCompatBounds is null unless the activity is scaled or its top insets cannot match parent. The centered bounds are calculated both on first startup and configuration changed. - Encapsulate the raw compat bounds calculation to CompatDisplayInsets. And add support for the cases that display cannot rotatate or the orientation from descendant is ignored. - Fix global coordinates are involved in size compat space, that causes the resolved bounds are intersected with insets unexpectedly. Now the actual screen position is applied at the last step of resolving. - Fix TestDisplayContent uses inverted condition to toggle rotatable, which hides some test failures. - Fix IME is shifted on a horizontal centered size compat activity. Fix: 149760957 Bug: 146483215 Bug: 139656157 Test: atest SizeCompatTests TaskRecordTests Change-Id: If4d52d85cd54414071fd320a5d06a78d78fb36f4
Loading
Please register or sign in to comment