Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee71ebd1 authored by Greg Kaiser's avatar Greg Kaiser
Browse files

audioflinger: Initialize field in constructor

We want to avoid using mThreadType uninitialized.

Test: TreeHugger
Bug: 204742569
Change-Id: I4b95139f1f1d9e4efac51a57be3729d2fd75204b
parent 3de17646
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -565,6 +565,12 @@ private:
            : mChain(owner)
            , mThread(thread)
            , mAudioFlinger(*gAudioFlinger) {
            sp<ThreadBase> base = thread.promote();
            if (base != nullptr) {
                mThreadType = base->type();
            } else {
                mThreadType = ThreadBase::MIXER;  // assure a consistent value.
            }
        }

        status_t createEffectHal(const effect_uuid_t *pEffectUuid,