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

Commit 5e0f4e2e authored by Jae Seo's avatar Jae Seo Committed by android-build-merger
Browse files

Merge "TIF: Release an existing audio patch before creating a new one" into nyc-dev

am: bd2b9e0d

* commit 'bd2b9e0d':
  TIF: Release an existing audio patch before creating a new one

Change-Id: I85a8f3e89feb7953100b9a56cf4306aef78cd530
parents e96afc7b bd2b9e0d
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -742,9 +742,12 @@ class TvInputHardwareManager implements TvInputHal.Callback {
                synchronized (mImplLock) {
                    mAudioSource = null;
                    mAudioSink.clear();
                    if (mAudioPatch != null) {
                        mAudioManager.releaseAudioPatch(mAudioPatch);
                        mAudioPatch = null;
                    }
                }
            }
        };
        private int mOverrideAudioType = AudioManager.DEVICE_NONE;
        private String mOverrideAudioAddress = "";
@@ -980,6 +983,9 @@ class TvInputHardwareManager implements TvInputHal.Callback {
            }
            if (shouldRecreateAudioPatch) {
                mCommittedVolume = volume;
                if (mAudioPatch != null) {
                    mAudioManager.releaseAudioPatch(mAudioPatch);
                }
                mAudioManager.createAudioPatch(
                        audioPatchArray,
                        new AudioPortConfig[] { sourceConfig },