commit | d06bcac213f671d76387655addfd6febe2b7a1e7 | [log] [tgz] |
---|---|---|
author | Alan Stokes <alanstokes@google.com> | Wed Nov 06 11:46:52 2019 +0000 |
committer | Alan Stokes <alanstokes@google.com> | Wed Nov 06 12:07:14 2019 +0000 |
tree | cde3c472d384b662c5e9e9c361bae9f61429e1d7 | |
parent | 3320ee5cc6526f31cfca49c1959b9d34c446dfdb [diff] |
Shrink array at most once. This removes worst-case N^2 behavior, does fewer allocations, and seems easier to understand. (Admittedly the case where it matters is probably rare.) Test: atest PackageManagerTest Change-Id: I62aa9d84a95a017269953e4e4f4c86e20a5a1838