fix [1981759] -no-boot-anim has no effect

This commit is contained in:
Mathias Agopian
2009-07-28 15:27:39 -07:00
parent e640d259c2
commit de36313b0b

View File

@@ -16,6 +16,8 @@
#define LOG_TAG "BootAnimation" #define LOG_TAG "BootAnimation"
#include <cutils/properties.h>
#include <utils/IPCThreadState.h> #include <utils/IPCThreadState.h>
#include <utils/ProcessState.h> #include <utils/ProcessState.h>
#include <utils/IServiceManager.h> #include <utils/IServiceManager.h>
@@ -41,6 +43,12 @@ int main(int argc, char** argv)
setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_DISPLAY); setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_DISPLAY);
#endif #endif
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<ProcessState> proc(ProcessState::self()); sp<ProcessState> proc(ProcessState::self());
ProcessState::self()->startThreadPool(); ProcessState::self()->startThreadPool();
@@ -48,5 +56,7 @@ int main(int argc, char** argv)
sp<BootAnimation> boot = new BootAnimation(); sp<BootAnimation> boot = new BootAnimation();
IPCThreadState::self()->joinThreadPool(); IPCThreadState::self()->joinThreadPool();
}
return 0; return 0;
} }