Merge "Check for null callback" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1ffa981ea5
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user