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

Stop allocating memory for non-existing controls

Before this CL, we would create an fixed-length array of to collect all
the possible controls from binder calls. The length is the number of
pre-defined internal insets types which is much longer than needed.
Also, when the internal insets types are removed, a client can receive
unlimited controls. This make it impossible to use an fixed-size array
to collect controls from the out parameters of a binder call.

This CL adds a static inner class: InsetsSourceControl.Array. It can be
used as a parameter to collect controls, and it won't waste memory for
non-existing ones.

Bug: 234093736
Test: atest RelayoutPerfTest WindowAddRemovePerfTest
      WindowManagerServiceTests
Change-Id: Ie544ade65f4be3eb6ace81cde1dd53c171b191b9
parent 4c58d93f
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