Merge "Using the WindowMetrics API instead of display.getRealSize" into tm-dev

This commit is contained in:
Alex Chau
2022-03-31 10:58:40 +00:00
committed by Android (Google) Code Review
4 changed files with 49 additions and 58 deletions

View File

@@ -305,7 +305,7 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
public Info(Context context, Display display,
WindowManagerProxy wmProxy,
ArrayMap<String, Pair<CachedDisplayInfo, WindowBounds[]>> perDisplayBoundsCache) {
CachedDisplayInfo displayInfo = wmProxy.getDisplayInfo(display);
CachedDisplayInfo displayInfo = wmProxy.getDisplayInfo(context, display);
rotation = displayInfo.rotation;
currentSize = displayInfo.size;
displayId = displayInfo.id;
@@ -364,7 +364,7 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
pw.println(" id=" + info.displayId);
pw.println(" rotation=" + info.rotation);
pw.println(" fontScale=" + info.fontScale);
pw.println(" densityDpi=" + info.displayId);
pw.println(" densityDpi=" + info.densityDpi);
pw.println(" navigationMode=" + info.navigationMode.name());
pw.println(" currentSize=" + info.currentSize);
pw.println(" supportedBounds=" + info.supportedBounds);