Increase the max size of emulated displays
This CL incrases the max display size that can be emulated. The previous logic would only allow a size that is maximum 2x bigger than the host device emulating the display. For screenshot diff testing, we need to emulate big devices (like Lenovo P12 Pro) on small devices/emulators, so we need to increase this maximum size. Bug: 230832101 Test: Manual Change-Id: I4b6b871b75a638a1c818931c5c8970873d886cf3
This commit is contained in:
@@ -2941,9 +2941,10 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
|
|||||||
// Set some sort of reasonable bounds on the size of the display that we will try
|
// Set some sort of reasonable bounds on the size of the display that we will try
|
||||||
// to emulate.
|
// to emulate.
|
||||||
final int minSize = 200;
|
final int minSize = 200;
|
||||||
final int maxScale = 2;
|
final int maxScale = 3;
|
||||||
width = Math.min(Math.max(width, minSize), mInitialDisplayWidth * maxScale);
|
final int maxSize = Math.max(mInitialDisplayWidth, mInitialDisplayHeight) * maxScale;
|
||||||
height = Math.min(Math.max(height, minSize), mInitialDisplayHeight * maxScale);
|
width = Math.min(Math.max(width, minSize), maxSize);
|
||||||
|
height = Math.min(Math.max(height, minSize), maxSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
Slog.i(TAG_WM, "Using new display size: " + width + "x" + height);
|
Slog.i(TAG_WM, "Using new display size: " + width + "x" + height);
|
||||||
|
|||||||
Reference in New Issue
Block a user