Use mDecorWindowContext to verify window resources
Fixes an issue where two different Contexts are used to create an AdditionalWindow and verify the SurfaceControl.Transactions on its SurfaceControl. The window is created using mDecorWindowContext, which may have an overriden density and may be different that the density of the display. Meanwhile, the verification phase was using the Context of ShellTestCase.java, which is a TestableContext whose density will be true to the display density. This CL changes that the verification phase to also use mDecorWindowContext. It also changes the Context object passed into the constructor of TestWindowDecoration from Instrumentation.getContext() to the TestableContext for consistency. Bug: 286259007 Test: `atest WindowDecorationTests`, then from settings change the display size, then running `atest WindowDecorationTests` again. Change-Id: I8d61f6836c7088efd5d77edf494066b2a2b12f8a
Loading
Please register or sign in to comment