Rely on Display#getRealSize when dumping XML hierarchy am: 74184991b7

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21544237

Change-Id: I44f33b2c062bf7e9ef41e7d57d506d0eab9a73d3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Manjeet Rulhania
2023-02-28 00:50:00 +00:00
committed by Automerger Merge Worker
3 changed files with 3 additions and 3 deletions

View File

@@ -107,7 +107,7 @@ public class DumpCommand extends Command {
DisplayManagerGlobal.getInstance().getRealDisplay(Display.DEFAULT_DISPLAY); DisplayManagerGlobal.getInstance().getRealDisplay(Display.DEFAULT_DISPLAY);
int rotation = display.getRotation(); int rotation = display.getRotation();
Point size = new Point(); Point size = new Point();
display.getSize(size); display.getRealSize(size);
AccessibilityNodeInfoDumper.dumpWindowToFile(info, dumpFile, rotation, size.x, AccessibilityNodeInfoDumper.dumpWindowToFile(info, dumpFile, rotation, size.x,
size.y); size.y);
} }

View File

@@ -139,7 +139,7 @@ public class AccessibilityNodeInfoDumper {
serializer.attribute("", "id", Integer.toString(displayId)); serializer.attribute("", "id", Integer.toString(displayId));
int rotation = display.getRotation(); int rotation = display.getRotation();
Point size = new Point(); Point size = new Point();
display.getSize(size); display.getRealSize(size);
for (int i = 0, n = windows.size(); i < n; ++i) { for (int i = 0, n = windows.size(); i < n; ++i) {
dumpWindowRec(windows.get(i), serializer, i, size.x, size.y, rotation); dumpWindowRec(windows.get(i), serializer, i, size.x, size.y, rotation);
} }

View File

@@ -767,7 +767,7 @@ public class UiDevice {
if(root != null) { if(root != null) {
Display display = getAutomatorBridge().getDefaultDisplay(); Display display = getAutomatorBridge().getDefaultDisplay();
Point size = new Point(); Point size = new Point();
display.getSize(size); display.getRealSize(size);
AccessibilityNodeInfoDumper.dumpWindowToFile(root, AccessibilityNodeInfoDumper.dumpWindowToFile(root,
new File(new File(Environment.getDataDirectory(), "local/tmp"), fileName), new File(new File(Environment.getDataDirectory(), "local/tmp"), fileName),
display.getRotation(), size.x, size.y); display.getRotation(), size.x, size.y);