Merge "bootanim: audioplay: do not start audio thread if it is not allowed"

This commit is contained in:
Mike McCreavy
2023-03-08 23:24:03 +00:00
committed by Android (Google) Code Review

View File

@@ -334,6 +334,11 @@ class AudioAnimationCallbacks : public android::BootAnimation::Callbacks {
public:
void init(const Vector<Animation::Part>& parts) override {
const Animation::Part* partWithAudio = nullptr;
if (!playSoundsAllowed()) {
return;
}
for (const Animation::Part& part : parts) {
if (part.audioData != nullptr) {
partWithAudio = &part;