diff options
author | Beverly <beverlyt@google.com> | 2019-05-17 11:03:54 -0400 |
---|---|---|
committer | Beverly <beverlyt@google.com> | 2019-05-20 18:21:29 -0400 |
commit | 34ffe253cebada34609c320fe5d11761be039a80 (patch) | |
tree | 11e178f8cd04b439deaf4ffeb9bd7cd90178f4d1 /cmds/bootanimation/BootAnimation.cpp | |
parent | 2f9ad0c42e599b0786a63d60c534bc1c2dac220a (diff) |
Write system property persist.sys.provisioned
When the device is provisioned, write a system property
to indicate device provisioned.
Test: manual
Bug: 131702833
Change-Id: I7ade97770658b3aa67d642446dd66c410ec4c5a3
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
-rw-r--r-- | cmds/bootanimation/BootAnimation.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 8e7277c55ed8..16af0719d9dd 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -66,6 +66,7 @@ namespace android { static const char OEM_BOOTANIMATION_FILE[] = "/oem/media/bootanimation.zip"; +static const char PRODUCT_BOOTANIMATION_DARK_FILE[] = "/product/media/bootanimation-dark.zip"; static const char PRODUCT_BOOTANIMATION_FILE[] = "/product/media/bootanimation.zip"; static const char SYSTEM_BOOTANIMATION_FILE[] = "/system/media/bootanimation.zip"; static const char PRODUCT_ENCRYPTED_BOOTANIMATION_FILE[] = "/product/media/bootanimation-encrypted.zip"; @@ -141,7 +142,6 @@ sp<SurfaceComposerClient> BootAnimation::session() const { return mSession; } - void BootAnimation::binderDied(const wp<IBinder>&) { // woah, surfaceflinger died! @@ -355,8 +355,11 @@ void BootAnimation::findBootAnimationFile() { } } } + + const bool playDarkAnim = android::base::GetIntProperty("ro.boot.theme", 0) == 1; static const char* bootFiles[] = - {PRODUCT_BOOTANIMATION_FILE, OEM_BOOTANIMATION_FILE, SYSTEM_BOOTANIMATION_FILE}; + {playDarkAnim ? PRODUCT_BOOTANIMATION_DARK_FILE : PRODUCT_BOOTANIMATION_FILE, + OEM_BOOTANIMATION_FILE, SYSTEM_BOOTANIMATION_FILE}; static const char* shutdownFiles[] = {PRODUCT_SHUTDOWNANIMATION_FILE, OEM_SHUTDOWNANIMATION_FILE, SYSTEM_SHUTDOWNANIMATION_FILE}; |