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

Commit 99c61c6b authored by Eric Laurent's avatar Eric Laurent
Browse files

Audio: SpatializerHelper: fix native audio server death handling

Make sure that the native spatializer interface reference
if cleared when the native audio server dies so that is is properly
re-created by SpatializerHelper.init().

Bug: 224701940
Test: enable spatial audio and kill native audio server
Change-Id: Ib409e35f6aee9c149d6a998878f53209d74c54ad
parent adc12a62
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -176,6 +176,7 @@ public class SpatializerHelper {
     */
    synchronized void reset(boolean featureEnabled) {
        Log.i(TAG, "Resetting");
        releaseSpat();
        mState = STATE_UNINITIALIZED;
        mSpatLevel = Spatializer.SPATIALIZER_IMMERSIVE_LEVEL_NONE;
        mCapableSpatLevel = Spatializer.SPATIALIZER_IMMERSIVE_LEVEL_NONE;
@@ -517,10 +518,10 @@ public class SpatializerHelper {
            try {
                mSpat.registerHeadTrackingCallback(null);
                mSpat.release();
                mSpat = null;
            } catch (RemoteException e) {
                Log.e(TAG, "Can't set release spatializer cleanly", e);
            }
            mSpat = null;
        }
    }