From de36313b0b80c019c2784edd9d41f6761fe80685 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 28 Jul 2009 15:27:39 -0700 Subject: fix [1981759] -no-boot-anim has no effect --- cmds/bootanimation/bootanimation_main.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'cmds') diff --git a/cmds/bootanimation/bootanimation_main.cpp b/cmds/bootanimation/bootanimation_main.cpp index 675ea81..a8359c4 100644 --- a/cmds/bootanimation/bootanimation_main.cpp +++ b/cmds/bootanimation/bootanimation_main.cpp @@ -16,6 +16,8 @@ #define LOG_TAG "BootAnimation" +#include + #include #include #include @@ -41,12 +43,20 @@ int main(int argc, char** argv) setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_DISPLAY); #endif - sp proc(ProcessState::self()); - ProcessState::self()->startThreadPool(); + char value[PROPERTY_VALUE_MAX]; + property_get("debug.sf.nobootanimation", value, "0"); + int noBootAnimation = atoi(value); + LOGI_IF(noBootAnimation, "boot animation disabled"); + if (!noBootAnimation) { + + sp proc(ProcessState::self()); + ProcessState::self()->startThreadPool(); + + // create the boot animation object + sp boot = new BootAnimation(); - // create the boot animation object - sp boot = new BootAnimation(); + IPCThreadState::self()->joinThreadPool(); - IPCThreadState::self()->joinThreadPool(); + } return 0; } -- cgit v1.1