Use ui::LayerStack

Bug: 182939859
Test: Build
Change-Id: I4658471996939713a6330a9c4a7d05cf4c91833a
This commit is contained in:
Dominik Laskowski
2021-07-27 21:09:34 -07:00
parent acccd67afc
commit 989de3d470
3 changed files with 10 additions and 10 deletions

View File

@@ -448,16 +448,15 @@ status_t BootAnimation::readyToRun() {
// In the case of multi-display, boot animation shows on the specified displays
// in addition to the primary display
auto ids = SurfaceComposerClient::getPhysicalDisplayIds();
constexpr uint32_t LAYER_STACK = 0;
for (auto id : physicalDisplayIds) {
const auto ids = SurfaceComposerClient::getPhysicalDisplayIds();
for (const auto id : physicalDisplayIds) {
if (std::find(ids.begin(), ids.end(), id) != ids.end()) {
sp<IBinder> token = SurfaceComposerClient::getPhysicalDisplayToken(id);
if (token != nullptr)
t.setDisplayLayerStack(token, LAYER_STACK);
if (const auto token = SurfaceComposerClient::getPhysicalDisplayToken(id)) {
t.setDisplayLayerStack(token, ui::DEFAULT_LAYER_STACK);
}
}
}
t.setLayerStack(control, LAYER_STACK);
t.setLayerStack(control, ui::DEFAULT_LAYER_STACK);
}
t.setLayer(control, 0x40000000)