diff options
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index c9445e7b16..9e25e0739d 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -338,6 +338,9 @@ sp<IGraphicBufferAlloc> SurfaceFlinger::createGraphicBufferAlloc() void SurfaceFlinger::bootFinished() { + if (mStartBootAnimThread->join() != NO_ERROR) { + ALOGE("Join StartBootAnimThread failed!"); + } const nsecs_t now = systemTime(); const nsecs_t duration = now - mBootTime; ALOGI("Boot is finished (%ld ms)", long(ns2ms(duration)) ); @@ -579,16 +582,22 @@ void SurfaceFlinger::init() { mRenderEngine->primeCache(); - // start boot animation - startBootAnim(); + mStartBootAnimThread = new StartBootAnimThread(); + if (mStartBootAnimThread->Start() != NO_ERROR) { + ALOGE("Run StartBootAnimThread failed!"); + } ALOGV("Done initializing"); } void SurfaceFlinger::startBootAnim() { - // start boot animation - property_set("service.bootanim.exit", "0"); - property_set("ctl.start", "bootanim"); + // Start boot animation service by setting a property mailbox + // if property setting thread is already running, Start() will be just a NOP + mStartBootAnimThread->Start(); + // Wait until property was set + if (mStartBootAnimThread->join() != NO_ERROR) { + ALOGE("Join StartBootAnimThread failed!"); + } } size_t SurfaceFlinger::getMaxTextureSize() const { |