Loading services/core/java/com/android/server/speech/RemoteSpeechRecognitionService.java +5 −11 Original line number Diff line number Diff line Loading @@ -206,22 +206,16 @@ final class RemoteSpeechRecognitionService extends ServiceConnector.Impl<IRecogn synchronized (mLock) { ClientState clientState = mClients.get(listener.asBinder()); if (clientState == null) { if (DEBUG) { Slog.w(TAG, "#cancel called with no preceding #startListening - ignoring."); } return; } if (clientState != null) { clientState.mRecordingInProgress = false; // Temporary reference to allow for resetting the hard link mDelegatingListener to null. // Temporary reference to allow for resetting mDelegatingListener to null. final IRecognitionListener delegatingListener = clientState.mDelegatingListener; run(service -> service.cancel(delegatingListener, isShutdown)); } // If shutdown, remove the client info from the map. Unbind if that was the last client. if (isShutdown) { removeClient(listener); if (mClients.isEmpty()) { if (DEBUG) { Slog.d(TAG, "Unbinding from the recognition service."); Loading Loading
services/core/java/com/android/server/speech/RemoteSpeechRecognitionService.java +5 −11 Original line number Diff line number Diff line Loading @@ -206,22 +206,16 @@ final class RemoteSpeechRecognitionService extends ServiceConnector.Impl<IRecogn synchronized (mLock) { ClientState clientState = mClients.get(listener.asBinder()); if (clientState == null) { if (DEBUG) { Slog.w(TAG, "#cancel called with no preceding #startListening - ignoring."); } return; } if (clientState != null) { clientState.mRecordingInProgress = false; // Temporary reference to allow for resetting the hard link mDelegatingListener to null. // Temporary reference to allow for resetting mDelegatingListener to null. final IRecognitionListener delegatingListener = clientState.mDelegatingListener; run(service -> service.cancel(delegatingListener, isShutdown)); } // If shutdown, remove the client info from the map. Unbind if that was the last client. if (isShutdown) { removeClient(listener); if (mClients.isEmpty()) { if (DEBUG) { Slog.d(TAG, "Unbinding from the recognition service."); Loading