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

Commit d661476c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "SoundTriggerHelpoer: Send pause events on abort if a model is running." into nyc-mr1-dev

parents bf9fa828 d0a83b89
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -696,8 +696,13 @@ public class SoundTriggerHelper implements SoundTrigger.StatusListener {
        Slog.w(TAG, "Recognition aborted");
        MetricsLogger.count(mContext, "sth_recognition_aborted", 1);
        ModelData modelData = getModelDataForLocked(event.soundModelHandle);
        if (modelData != null) {
        if (modelData != null && modelData.isModelStarted()) {
            modelData.setStopped();
            try {
                modelData.getCallback().onRecognitionPaused();
            } catch (RemoteException e) {
                Slog.w(TAG, "RemoteException in onRecognitionPaused", e);
            }
        }
    }