Skip to content
Commit f6205bfa authored by Tiger Huang's avatar Tiger Huang
Browse files

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
parent 5eb2ccc3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment