summaryrefslogtreecommitdiff
path: root/cmds/bootanimation/BootAnimation.cpp
diff options
context:
space:
mode:
authorHuihong Luo <huisinro@google.com>2020-01-16 15:56:33 -0800
committerHuihong Luo <huisinro@google.com>2020-01-17 19:38:25 +0000
commitd4a217e00ed2b0eeabba8b97d84b1f844b9be580 (patch)
treecece924c3929438eb2d6185f0375ccc5997df0cb /cmds/bootanimation/BootAnimation.cpp
parentcd8332ac17a7041fb8333ea1870e4ee139ad1db1 (diff)
Rename system property
to be persist.service.bootanim.displays to control which displays can show bootanimations. This way a user can change the proeprty to be persistent across reboot. Bug: 132892728 Test: manual Change-Id: I2b98a689aafcb2f2c32f0a675624feb72ca18470
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
-rw-r--r--cmds/bootanimation/BootAnimation.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 459520a3eb27..d5057015c61a 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -100,6 +100,7 @@ static constexpr size_t FONT_NUM_ROWS = FONT_NUM_CHARS / FONT_NUM_COLS;
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 DISPLAYS_PROP_NAME[] = "persist.service.bootanim.displays";
static const int ANIM_ENTRY_NAME_MAX = ANIM_PATH_MAX + 1;
static constexpr size_t TEXT_POS_LEN_MAX = 16;
@@ -291,10 +292,10 @@ status_t BootAnimation::readyToRun() {
// this guest property specifies multi-display IDs to show the boot animation
// multiple ids can be set with comma (,) as separator, for example:
- // setprop boot.animation.displays 19260422155234049,19261083906282754
+ // setprop persist.boot.animation.displays 19260422155234049,19261083906282754
Vector<uint64_t> physicalDisplayIds;
char displayValue[PROPERTY_VALUE_MAX] = "";
- property_get("boot.animation.displays", displayValue, "");
+ property_get(DISPLAYS_PROP_NAME, displayValue, "");
bool isValid = displayValue[0] != '\0';
if (isValid) {
char *p = displayValue;
@@ -306,7 +307,7 @@ status_t BootAnimation::readyToRun() {
p ++;
}
if (!isValid)
- SLOGE("Invalid syntax for the value of system prop: boot.animation.displays");
+ SLOGE("Invalid syntax for the value of system prop: %s", DISPLAYS_PROP_NAME);
}
if (isValid) {
std::istringstream stream(displayValue);