Files
frameworks_base/libs/WindowManager/Shell/tests
Riddle Hsu f08127e398 Cache window and icon color of splash screen starting window
The background color of splash screen starting window may depend
on the declared window background and the content if icon. That
may be expensive operations if the drawables are not using pure
color. Because the attributes to compute the colors are simple,
it only need a few fields to identify whether the incoming request
has been computed. So it is worth to cache them with very small
extra memory. The cache of a package will be cleared if the package
is removed or replaced.

It may save the creation time up to 20ms (depends on the complexity
of the drawable).

Bug: 190176296
Test: atest StartingSurfaceDrawerTests#testColorCache
Test: Cold/warm launch app twice and compare the duration of
      trace name "makeSplashScreenContentView". The second time
      should be faster. Re-install the app and launch again,
      the trace will contain "peekWindowBGColor" that means
      that cache for the package was cleared.

Change-Id: I61158416694a226999843fa8fc6a8b23d6893f02
2021-06-07 22:24:03 +08:00
..
2021-02-18 09:35:06 +00:00
…

WM Shell Test

This contains all tests written for WM (WindowManager) Shell and it's currently divided into 3 categories

  • unittest, tests against individual functions, usually @SmallTest and do not require UI automation nor real device to run
  • integration, this maybe a mix of functional and integration tests. Contains tests verify the WM Shell as a whole, like talking to WM core. This usually involves mocking the window manager service or even talking to the real one. Due to this nature, test cases in this package is normally annotated as @LargeTest and runs with UI automation on real device
  • flicker, similar to functional tests with its sole focus on flickerness. See WM Shell Flicker Test Package for more details