summaryrefslogtreecommitdiff
path: root/cmds/bootanimation/BootAnimation.cpp
diff options
context:
space:
mode:
author Rahul Banerjee <rahulbanerjee@google.com> 2024-10-04 15:22:15 -0700
committer Rahul Banerjee <rahulbanerjee@google.com> 2024-10-04 15:32:34 -0700
commitdcf939f76f2a2c35b17e1a15d66c9d9df0909466 (patch)
tree10e62389fe98662f1ae5daa29ee47cac23e40476 /cmds/bootanimation/BootAnimation.cpp
parentc09e63ed685f0d5406fce9a9ce725268a1ff576f (diff)
Remove defunct sysprop in preparation for multi-display bootanim.
Bug: 335406617 Test: Manual (build, flash, reboot) Change-Id: Id82aa1448a097bbc7dd32952a78f1a64ef1693a0
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
-rw-r--r--cmds/bootanimation/BootAnimation.cpp59
1 files changed, 4 insertions, 55 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index c2f6e3072507..87c9fa4dbe28 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -106,7 +106,6 @@ static const int TEXT_CENTER_VALUE = INT_MAX;
static const int TEXT_MISSING_VALUE = INT_MIN;
static const char EXIT_PROP_NAME[] = "service.bootanim.exit";
static const char PROGRESS_PROP_NAME[] = "service.bootanim.progress";
-static const char DISPLAYS_PROP_NAME[] = "persist.service.bootanim.displays";
static const char CLOCK_ENABLED_PROP_NAME[] = "persist.sys.bootanim.clock.enabled";
static const int ANIM_ENTRY_NAME_MAX = ANIM_PATH_MAX + 1;
static const int MAX_CHECK_EXIT_INTERVAL_US = 50000;
@@ -514,50 +513,9 @@ status_t BootAnimation::readyToRun() {
return NAME_NOT_FOUND;
}
- // this system property specifies multi-display IDs to show the boot animation
- // multiple ids can be set with comma (,) as separator, for example:
- // setprop persist.boot.animation.displays 19260422155234049,19261083906282754
- Vector<PhysicalDisplayId> physicalDisplayIds;
- char displayValue[PROPERTY_VALUE_MAX] = "";
- property_get(DISPLAYS_PROP_NAME, displayValue, "");
- bool isValid = displayValue[0] != '\0';
- if (isValid) {
- char *p = displayValue;
- while (*p) {
- if (!isdigit(*p) && *p != ',') {
- isValid = false;
- break;
- }
- p ++;
- }
- if (!isValid)
- SLOGE("Invalid syntax for the value of system prop: %s", DISPLAYS_PROP_NAME);
- }
- if (isValid) {
- std::istringstream stream(displayValue);
- for (PhysicalDisplayId id; stream >> id.value; ) {
- physicalDisplayIds.add(id);
- if (stream.peek() == ',')
- stream.ignore();
- }
-
- // the first specified display id is used to retrieve mDisplayToken
- for (const auto id : physicalDisplayIds) {
- if (std::find(ids.begin(), ids.end(), id) != ids.end()) {
- if (const auto token = SurfaceComposerClient::getPhysicalDisplayToken(id)) {
- mDisplayToken = token;
- break;
- }
- }
- }
- }
-
- // If the system property is not present or invalid, display 0 is used
+ mDisplayToken = SurfaceComposerClient::getPhysicalDisplayToken(ids.front());
if (mDisplayToken == nullptr) {
- mDisplayToken = SurfaceComposerClient::getPhysicalDisplayToken(ids.front());
- if (mDisplayToken == nullptr) {
- return NAME_NOT_FOUND;
- }
+ return NAME_NOT_FOUND;
}
DisplayMode displayMode;
@@ -577,17 +535,8 @@ status_t BootAnimation::readyToRun() {
ISurfaceComposerClient::eOpaque);
SurfaceComposerClient::Transaction t;
- if (isValid) {
- // In the case of multi-display, boot animation shows on the specified displays
- for (const auto id : physicalDisplayIds) {
- if (std::find(ids.begin(), ids.end(), id) != ids.end()) {
- if (const auto token = SurfaceComposerClient::getPhysicalDisplayToken(id)) {
- t.setDisplayLayerStack(token, ui::DEFAULT_LAYER_STACK);
- }
- }
- }
- t.setLayerStack(control, ui::DEFAULT_LAYER_STACK);
- }
+ t.setDisplayLayerStack(mDisplayToken, ui::DEFAULT_LAYER_STACK);
+ t.setLayerStack(control, ui::DEFAULT_LAYER_STACK);
t.setLayer(control, 0x40000000)
.apply();