Exit boot animation cleanly.
The desc.txt file can now mark parts as 'must finish cleanly' by using 'c' as the part line prefix rather than 'p'. If so indicated, if the bootanimation is asked to quit it will do so only after waiting to finish that part. I considered either making init.c service killing smarter or promoting bootanim to be a bindable service with a requestExit method. However, these changes are probably too big/risky given our ship date. So I used a property as a mailbox between SurfaceFlinger and bootanim. Bug: 6679877 Change-Id: Id7dca22caa50b450fff25ca94f7242d971034f41
This commit is contained in:
parent
7c24b1d4da
commit
a67e418e1f
@ -148,7 +148,7 @@ void SurfaceFlinger::binderDied(const wp<IBinder>& who)
|
|||||||
setTransactionState(state, eOrientationDefault, 0);
|
setTransactionState(state, eOrientationDefault, 0);
|
||||||
|
|
||||||
// restart the boot-animation
|
// restart the boot-animation
|
||||||
property_set("ctl.start", "bootanim");
|
startBootAnim();
|
||||||
}
|
}
|
||||||
|
|
||||||
sp<IMemoryHeap> SurfaceFlinger::getCblk() const
|
sp<IMemoryHeap> SurfaceFlinger::getCblk() const
|
||||||
@ -201,7 +201,9 @@ void SurfaceFlinger::bootFinished()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// stop boot animation
|
// stop boot animation
|
||||||
property_set("ctl.stop", "bootanim");
|
// formerly we would just kill the process, but we now ask it to exit so it
|
||||||
|
// can choose where to stop the animation.
|
||||||
|
property_set("service.bootanim.exit", "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint16_t pack565(int r, int g, int b) {
|
static inline uint16_t pack565(int r, int g, int b) {
|
||||||
@ -306,11 +308,17 @@ status_t SurfaceFlinger::readyToRun()
|
|||||||
mReadyToRunBarrier.open();
|
mReadyToRunBarrier.open();
|
||||||
|
|
||||||
// start boot animation
|
// start boot animation
|
||||||
property_set("ctl.start", "bootanim");
|
startBootAnim();
|
||||||
|
|
||||||
return NO_ERROR;
|
return NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SurfaceFlinger::startBootAnim() {
|
||||||
|
// start boot animation
|
||||||
|
property_set("service.bootanim.exit", "0");
|
||||||
|
property_set("ctl.start", "bootanim");
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
bool SurfaceFlinger::authenticateSurfaceTexture(
|
bool SurfaceFlinger::authenticateSurfaceTexture(
|
||||||
|
@ -351,6 +351,8 @@ private:
|
|||||||
void debugFlashRegions();
|
void debugFlashRegions();
|
||||||
void drawWormhole() const;
|
void drawWormhole() const;
|
||||||
|
|
||||||
|
void startBootAnim();
|
||||||
|
|
||||||
void listLayersLocked(const Vector<String16>& args, size_t& index,
|
void listLayersLocked(const Vector<String16>& args, size_t& index,
|
||||||
String8& result, char* buffer, size_t SIZE) const;
|
String8& result, char* buffer, size_t SIZE) const;
|
||||||
void dumpStatsLocked(const Vector<String16>& args, size_t& index,
|
void dumpStatsLocked(const Vector<String16>& args, size_t& index,
|
||||||
|
Loading…
Reference in New Issue
Block a user