commit | 2e074fa297677ee61ca0138d48830cf5fe663989 | [log] [tgz] |
---|---|---|
author | Alan Stokes <alanstokes@google.com> | Wed Dec 11 13:52:03 2019 +0000 |
committer | Alan Stokes <alanstokes@google.com> | Wed Dec 11 13:56:35 2019 +0000 |
tree | 50e47c992b832eab2af5ab98815f3d5c0a70d4c3 | |
parent | dda7e6a9c70ae5e2581dcf26802ff48e54fd4cf4 [diff] |
Minor getPackagesForSharedUserIdLocked() fixes. Only shrink the array at most once - clearer & more efficient. Also make sure we don't return null, in the unlikely event we end up with zero entries, since that's the contract of this method. (Similar to change I62aa9d84a95a017269953e4e4f4c86e20a5a1838). Test: atest PackageManagerTests Change-Id: Id15e6cfd832b177e7a18a4980f3e1e79b780c4f4