Refine updateSystemUiVisibilityLw for performance
- It doesn't change the visibilities of system bars, but some other
attributes, such as appearance, behavior, and disable flags. So
this CL renames it to updateSystemBarAttributes.
- Changing the attributes won't affect any window layout at all, so we
don't re-do layout after executing it. The method returns void now.
This CL also avoids redundant calls to performSurfacePlacement while
the visibilities of insets are changed. setClientVisible can be called
in a row while the visibilities of multiple types are changed. In this
case, only one LAYOUT_AND_ASSIGN_WINDOW_LAYERS_IF_NEEDED is needed to be
scheduled.
Fix: 194186241
Test: atest WindowAddRemovePerfTest DisplayPolicyLayoutTests
Test: Use "Window Insets Tests" > "Window Insets Controller" to
show/hide system bars, and see if the window layout is expected.
Change-Id: Ic66c00b1ad205c466424c033d27e7eaa2acd8fc1
6 files changed