summaryrefslogtreecommitdiff
path: root/cmds/bootanimation/BootAnimation.cpp
diff options
context:
space:
mode:
authorWeijie Wang <weijiew@codeaurora.org>2020-02-12 01:41:03 +0000
committerWeijie Wang <weijiew@codeaurora.org>2020-02-12 01:41:03 +0000
commitcbaba0f9c55924239c24bb9c7aa8a9296898cd05 (patch)
tree91efe69dee9711ed870cd7936f9756f91824c779 /cmds/bootanimation/BootAnimation.cpp
parent7b580ef87b3de7e15830061e1ca14e56158958ad (diff)
parentf0ee1b9e89c7ef40c79c3a1179638acd53e1cfd7 (diff)
[automerger] BootAnimation: Add bootanimation configuration prop am: f0ee1b9e89
Change-Id: I8c9506273be50e59946977f5c4cfb770921f02f7
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
-rw-r--r--cmds/bootanimation/BootAnimation.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 2537edaf9e81..9af2a96cbe13 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -404,6 +404,17 @@ void BootAnimation::findBootAnimationFile() {
}
}
+ std::string custAnimProp = !mShuttingDown ?
+ android::base::GetProperty("persist.sys.customanim.boot", ""):
+ android::base::GetProperty("persist.sys.customanim.shutdown", "");
+ const char *custAnim = custAnimProp.c_str();
+ ALOGD("Animation customzation path: %s", custAnim);
+ if (access(custAnim, R_OK) == 0) {
+ mZipFileName = custAnim;
+ ALOGD("%sAnimation customzation path: %s", mShuttingDown ? "Shutdown" : "Boot", mZipFileName.c_str());
+ return;
+ }
+
const bool playDarkAnim = android::base::GetIntProperty("ro.boot.theme", 0) == 1;
static const char* bootFiles[] =
{APEX_BOOTANIMATION_FILE, playDarkAnim ? PRODUCT_BOOTANIMATION_DARK_FILE : PRODUCT_BOOTANIMATION_FILE,