diff options
author | Ricardo Cerqueira <ricardo@cyngn.com> | 2015-10-01 20:11:14 +0100 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-10-26 16:09:10 -0700 |
commit | ed292165842f2c71e2a35f043258f757f0edef6e (patch) | |
tree | 919fb4078871d535cb5b2662a7bf48403341952b /cmds/bootanimation | |
parent | 9bc1f489d7a895c30e4e4050d139ee02bb71ef08 (diff) | |
download | frameworks_base-ed292165842f2c71e2a35f043258f757f0edef6e.zip frameworks_base-ed292165842f2c71e2a35f043258f757f0edef6e.tar.gz frameworks_base-ed292165842f2c71e2a35f043258f757f0edef6e.tar.bz2 |
bootanim: Display SKU-specific variants if present
TICKET: CYNGNOS-1175
Change-Id: I159fd71254e009e20dc811ca7eb0fe2f2bcf8af9
Diffstat (limited to 'cmds/bootanimation')
-rw-r--r-- | cmds/bootanimation/BootAnimation.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 934539e..5c60008 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -903,9 +903,20 @@ char *BootAnimation::getAnimationFileName(ImageID image) SYSTEM_SHUTDOWN_ANIMATION_FILE, SYSTEM_ENCRYPTED_SHUTDOWN_ANIMATION_FILE} }; int state; + char sku[PROPERTY_VALUE_MAX]; + char skusuffix[PATH_MAX]; state = checkBootState() ? 0 : 1; + property_get("ro.prebundled.mcc", sku, "000"); + sprintf(skusuffix,"-%s",sku); + + String16 skuPath(fileName[state][image]); + skuPath.insert(skuPath.size()-4,String16(skusuffix)); + + if (access(String8(skuPath).string(), R_OK) == 0) + return (char *)String8(skuPath).string(); + return fileName[state][image]; } |