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

Commit f0220201 authored by Ytai Ben-Tsvi's avatar Ytai Ben-Tsvi
Browse files

Fix bug in registering death listener

Bug: 151190218
Test: Manual verification of AGSA/Now Playing
Change-Id: Icffc91debb3ba692ae455e402b7ee2c4c2568f35
parent 9c493f47
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -377,7 +377,7 @@ public class SoundTriggerMiddlewareValidation implements ISoundTriggerMiddleware
            mCallback = callback;
            mHandle = handle;
            try {
                mCallback.asBinder().linkToDeath(null, 0);
                mCallback.asBinder().linkToDeath(this, 0);
            } catch (RemoteException e) {
                throw e.rethrowAsRuntimeException();
            }
@@ -680,7 +680,7 @@ public class SoundTriggerMiddlewareValidation implements ISoundTriggerMiddleware
            try {
                mDelegate.detach();
                mDelegate = null;
                mCallback.asBinder().unlinkToDeath(null, 0);
                mCallback.asBinder().unlinkToDeath(this, 0);
                mModules.get(mHandle).remove(this);
            } catch (RemoteException e) {
                throw e.rethrowAsRuntimeException();