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
Loading
Please register or sign in to comment