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

Commit bf4caf3b authored by Felix Oghina's avatar Felix Oghina Committed by Android (Google) Code Review
Browse files

Merge "[hotword] call destroy listener outside of lock" into main

parents 453bae34 286569b3
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -199,8 +199,12 @@ abstract class AbstractDetector implements HotwordDetector {
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
        Consumer<AbstractDetector> onDestroyListener;
        synchronized (mLock) {
            mOnDestroyListener.accept(this);
            onDestroyListener = mOnDestroyListener;
        }
        if (onDestroyListener != null) {
            onDestroyListener.accept(this);
        }
    }