Use ui::LayerStack
Bug: 182939859
Test: Build
Change-Id: I4658471996939713a6330a9c4a7d05cf4c91833a
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 3109c5c..5c75d14 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -448,16 +448,15 @@
// 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)