summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Philip Junker <philipjunker@google.com> 2020-11-25 18:16:16 +0100
committer Philip Junker <philipjunker@google.com> 2020-11-26 15:00:23 +0100
commit60600569a07350f0449b6ecdf95af5871e9eef1c (patch)
tree72984801ba3eb608a445edcb2b3f92d09ca9959c
parent54bfaf7af9a1cc95467d44f2880e959cb04cdfe5 (diff)
Send shutdown callback only during animation destruction
The shutdown callback is currently used only by audioplay.cpp to destroy the audio player. Sending shutdown when the animation is destructed makes sure the audio player is not being destroyed before its boot animation part is being displayed. Test: Modified bootanimation, sound in second last part of bootanimation plays Bug: 157407957 Change-Id: I47f57643791e73e4a4fa1597309dccb1f52f2316
-rw-r--r--cmds/bootanimation/BootAnimation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 046145f90808..3b4823e799ce 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -605,6 +605,7 @@ bool BootAnimation::threadLoop() {
result = movie();
}
+ mCallbacks->shutdown();
eglMakeCurrent(mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
eglDestroyContext(mDisplay, mContext);
eglDestroySurface(mDisplay, mSurface);
@@ -691,7 +692,6 @@ void BootAnimation::checkExit() {
int exitnow = atoi(value);
if (exitnow) {
requestExit();
- mCallbacks->shutdown();
}
}