Fix physical display ratio incorrect
ScreenDecorations' physical display ratio is incorrect on rotation value
1 or 2. Change calculation base for physicalDisplayRatio()
Bug: 231407521
Test: atest ScreenDecorationsTest
Test: Manually check rounded corner display for every rotation and every
resolution on device.
Change-Id: I573636f5b889a0ef6e77eba7c6a5bac6e0dfb07d
This commit is contained in:
@@ -899,8 +899,8 @@ public class ScreenDecorations extends CoreStartable implements Tunable , Dumpab
|
||||
final DisplayInfo displayInfo = new DisplayInfo();
|
||||
mContext.getDisplay().getDisplayInfo(displayInfo);
|
||||
return DisplayUtils.getPhysicalPixelDisplaySizeRatio(
|
||||
stableDisplaySize.x, stableDisplaySize.y, displayInfo.logicalWidth,
|
||||
displayInfo.logicalHeight);
|
||||
stableDisplaySize.x, stableDisplaySize.y, displayInfo.getNaturalWidth(),
|
||||
displayInfo.getNaturalHeight());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user