Merge "Check for null callback" into tm-dev

This commit is contained in:
Ytai Ben-tsvi
2022-03-23 16:36:16 +00:00
committed by Android (Google) Code Review

View File

@@ -923,7 +923,10 @@ public class SoundTriggerHelper implements SoundTrigger.StatusListener {
if (modelData != null && modelData.isModelStarted()) {
modelData.setStoppedLocked();
try {
modelData.getCallback().onRecognitionPaused();
IRecognitionStatusCallback callback = modelData.getCallback();
if (callback != null) {
callback.onRecognitionPaused();
}
} catch (DeadObjectException e) {
forceStopAndUnloadModelLocked(modelData, e);
} catch (RemoteException e) {