commit | 73fa26655809abf0c72ce7c4c239784ef3e14191 | [log] [tgz] |
---|---|---|
author | Alec Mouri <alecmouri@google.com> | Mon May 10 12:56:18 2021 -0700 |
committer | Alec Mouri <alecmouri@google.com> | Tue May 11 11:21:50 2021 -0700 |
tree | 88fcab24f5882fc5113be2427daf8358f108ca8a | |
parent | 75a9dc09754ce2a49c8aead9069bfa4fa69debb0 [diff] |
Fix crash in Flattener dumpsys When there are multiple connected displays where only one of them is powered on, then caching is enabled on all displays but may historically only been used on one. This means that mInitialLayerCounts may be empty, which breaks retrieving the max element with std::max_element. Add an emptiness check to sidestep that issue. Bug: 187736454 Test: dumpsys SurfaceFlinger --planner Change-Id: Iee917bb75c89e47f92f3440dd58bc58755e1f7b4