Return natural orientation according to available screen size
It aligns the same policy as TaskFragment#computeConfigResourceOverrides to resolve orientation. Otherwise when the display size is close to square. A nosensor activity may get natural orientation in portrait but get task orientation in landscape, which causes unexpected letterbox. e.g. physical screen size is 1000x1010 -> portrait But screenWidthDp=500, screenHeightDp=490 (occupied by insets) -> landscape Bug: 233855302 Test: atest DisplayContentTests#testOrientationForAspectRatio Change-Id: I6d148e6dc5fe543f20c0b5aef0fc9255c2e481aa
Loading
Please register or sign in to comment