Using the WindowMetrics API instead of display.getRealSize

Bug: 221961069
Bug: 195408476
Bug: 198965093
Test: Verified locally and presubmit
Change-Id: I4dac9c19df4c43e6a38ba5c05f27d25f4cfcb071
This commit is contained in:
Sunny Goyal committed 2022-03-30 21:07:23 +00:00
1 parent f8c9905eae
commit 36c0f76e21
4 files changed
+49 -58

No files matched your search

@@ -306,7 +306,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;
@@ -372,7 +372,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);