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

Commit 3f1bd14d 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

am: 5e0f4e2e

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

Change-Id: I5dec46babcd88685c37f2754d5eb1179f4061cbb
parents 4c7db551 5e0f4e2e
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 },