From 34ffe253cebada34609c320fe5d11761be039a80 Mon Sep 17 00:00:00 2001 From: Beverly Date: Fri, 17 May 2019 11:03:54 -0400 Subject: 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 --- cmds/bootanimation/BootAnimation.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cmds/bootanimation/BootAnimation.cpp') 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 BootAnimation::session() const { return mSession; } - void BootAnimation::binderDied(const wp&) { // 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}; -- cgit v1.2.3-59-g8ed1b