From e13b58e15b561b1b85788800e0c3af48fa80463e Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Thu, 31 Aug 2017 14:50:44 -0700 Subject: Use new SurfaceFlinger transaction API. For now we reimplement global transactions in the Java side JNI layer. Bug: 64815723 Bug: 64816140 Bug: 64815766 Test: Existing tests pass. go/wm-smoke Change-Id: I6c0a7b5e65b1b6cc844ac61f3269629af60a4244 --- cmds/bootanimation/BootAnimation.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmds/bootanimation/BootAnimation.cpp') diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 6526123aba13..d1af71d8886e 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -260,9 +260,9 @@ status_t BootAnimation::readyToRun() { sp control = session()->createSurface(String8("BootAnimation"), dinfo.w, dinfo.h, PIXEL_FORMAT_RGB_565); - SurfaceComposerClient::openGlobalTransaction(); - control->setLayer(0x40000000); - SurfaceComposerClient::closeGlobalTransaction(); + SurfaceComposerClient::Transaction t; + t.setLayer(control, 0x40000000) + .apply(); sp s = control->getSurface(); -- cgit v1.2.3-59-g8ed1b From c521bb33acf9312192785469f56ae9ad718fb602 Mon Sep 17 00:00:00 2001 From: Jaekyun Seok Date: Tue, 30 Jan 2018 11:52:47 +0900 Subject: Load bootanimation from /product partition Bug: 72667033 Test: tested loading /product/media/bootanimation.zip after moving it from from /system/media to /product/media on sailfish Change-Id: I10612dd77da7c2c67b02b00b7f0eb2b28e49cc98 --- cmds/bootanimation/BootAnimation.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'cmds/bootanimation/BootAnimation.cpp') diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index d1af71d8886e..54785ca13185 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -66,9 +66,12 @@ namespace android { static const char OEM_BOOTANIMATION_FILE[] = "/oem/media/bootanimation.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"; static const char SYSTEM_ENCRYPTED_BOOTANIMATION_FILE[] = "/system/media/bootanimation-encrypted.zip"; static const char OEM_SHUTDOWNANIMATION_FILE[] = "/oem/media/shutdownanimation.zip"; +static const char PRODUCT_SHUTDOWNANIMATION_FILE[] = "/product/media/shutdownanimation.zip"; static const char SYSTEM_SHUTDOWNANIMATION_FILE[] = "/system/media/shutdownanimation.zip"; static const char SYSTEM_DATA_DIR_PATH[] = "/data/system"; @@ -308,14 +311,20 @@ status_t BootAnimation::readyToRun() { bool encryptedAnimation = atoi(decrypt) != 0 || !strcmp("trigger_restart_min_framework", decrypt); - if (!mShuttingDown && encryptedAnimation && - (access(SYSTEM_ENCRYPTED_BOOTANIMATION_FILE, R_OK) == 0)) { - mZipFileName = SYSTEM_ENCRYPTED_BOOTANIMATION_FILE; - return NO_ERROR; + if (!mShuttingDown && encryptedAnimation) { + static const char* encryptedBootFiles[] = + {PRODUCT_ENCRYPTED_BOOTANIMATION_FILE, SYSTEM_ENCRYPTED_BOOTANIMATION_FILE}; + for (const char* f : encryptedBootFiles) { + if (access(f, R_OK) == 0) { + mZipFileName = f; + return NO_ERROR; + } + } } - static const char* bootFiles[] = {OEM_BOOTANIMATION_FILE, SYSTEM_BOOTANIMATION_FILE}; + static const char* bootFiles[] = + {PRODUCT_BOOTANIMATION_FILE, OEM_BOOTANIMATION_FILE, SYSTEM_BOOTANIMATION_FILE}; static const char* shutdownFiles[] = - {OEM_SHUTDOWNANIMATION_FILE, SYSTEM_SHUTDOWNANIMATION_FILE}; + {PRODUCT_SHUTDOWNANIMATION_FILE, OEM_SHUTDOWNANIMATION_FILE, SYSTEM_SHUTDOWNANIMATION_FILE}; for (const char* f : (!mShuttingDown ? bootFiles : shutdownFiles)) { if (access(f, R_OK) == 0) { -- cgit v1.2.3-59-g8ed1b