summaryrefslogtreecommitdiff
path: root/cmds/bootanimation/BootAnimationUtil.cpp
diff options
context:
space:
mode:
authorRobert Horvath <robhor@google.com>2021-04-12 16:51:56 +0200
committerRobert Horvath <robhor@google.com>2021-04-15 16:47:59 +0200
commit8c878d61bb6724f4f69c577ae03ebba90bc262a2 (patch)
treebb3ff44340781b72125538b3d27c740f3d6e5c65 /cmds/bootanimation/BootAnimationUtil.cpp
parentb4f9164e5c7577e0c816ad660df1bc8aa5ca7873 (diff)
Conditionally show bootanimation for quiescent boots
Allow bootanimation to play if the boot is quiescent and the system property ro.bootanim.quiescent.enabled is set to true. This allows the bootanimation to become visible if the display is turned on during the bootanimation. If OEMs want this behavior and the device implements suppression of video/audio during quiescent boot, they can set the system property ro.bootanim.quiescent.enabled. Bug: 185118020 Test: PRODUCT_PRODUCT_PROPERTIES += ro.bootanim.quiescent.enabled=true adb reboot quiescent Spam `adb shell input keyevent POWER` during boot Test: Repeat the above test with the property set to 0 Change-Id: I54a4ad552704106ca06c4992fed4a2d501aa3fa5
Diffstat (limited to 'cmds/bootanimation/BootAnimationUtil.cpp')
-rw-r--r--cmds/bootanimation/BootAnimationUtil.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmds/bootanimation/BootAnimationUtil.cpp b/cmds/bootanimation/BootAnimationUtil.cpp
index 1e417e938359..4f56e5a88c4c 100644
--- a/cmds/bootanimation/BootAnimationUtil.cpp
+++ b/cmds/bootanimation/BootAnimationUtil.cpp
@@ -49,7 +49,14 @@ bool bootAnimationDisabled() {
}
property_get("ro.boot.quiescent", value, "0");
- return atoi(value) > 0;
+ if (atoi(value) > 0) {
+ // Only show the bootanimation for quiescent boots if this system property is set to enabled
+ if (!property_get_bool("ro.bootanim.quiescent.enabled", false)) {
+ return true;
+ }
+ }
+
+ return false;
}
void waitForSurfaceFlinger() {