Fix display size calculations in large screen (2/3)
The fix is taken from AOSP patch aosp/2154236.
This will make sure the UI Automator always has the entire display to
interact with. Otherwise, in multi-windowing mode or on devices with
task bar, it will only be able to interact with the current focused
window, the default launch bounds, or the display excluding task bar,
depends on the actual scenario.
Test: PlatformSenarioTests
Bug: 238981445
Bug: 238985243
Bug: 238581838
Bug: 233945217
Change-Id: I9223ef5552ddb081e75de1242670862f2813e56d
(cherry picked from commit d1e350c7fc)
Merged-In: I9223ef5552ddb081e75de1242670862f2813e56d
This commit is contained in:
committed by
Daniel Peykov
parent
b546f825e8
commit
6183509d5f
@@ -380,7 +380,7 @@ public class UiDevice {
|
||||
Tracer.trace();
|
||||
Display display = getAutomatorBridge().getDefaultDisplay();
|
||||
Point p = new Point();
|
||||
display.getSize(p);
|
||||
display.getRealSize(p);
|
||||
return p.x;
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ public class UiDevice {
|
||||
Tracer.trace();
|
||||
Display display = getAutomatorBridge().getDefaultDisplay();
|
||||
Point p = new Point();
|
||||
display.getSize(p);
|
||||
display.getRealSize(p);
|
||||
return p.y;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user