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

Commit 07045e3f authored by Charles Chen's avatar Charles Chen Committed by Automerger Merge Worker
Browse files

Merge "Add null checking when deleting hotword detectors" into udc-dev am: c3b7d1b2

parents 29fb2d0f c3b7d1b2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1066,7 +1066,9 @@ public class VoiceInteractionService extends Service {
        synchronized (mLock) {
            mActiveDetectors.forEach(detector -> {
                try {
                    if (detector != mActiveVisualQueryDetector.getInitializationDelegate()
                    // Skip destroying VisualQueryDetector if HotwordDetectors are created
                    if (!(mActiveVisualQueryDetector != null
                            && detector == mActiveVisualQueryDetector.getInitializationDelegate())
                            || shouldShutDownVisualQueryDetector) {
                        detector.destroy();
                    }