summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/speech/SpeechRecognitionManagerServiceImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/speech/SpeechRecognitionManagerServiceImpl.java b/services/core/java/com/android/server/speech/SpeechRecognitionManagerServiceImpl.java
index 6d580e97d578..8b57f87f5df3 100644
--- a/services/core/java/com/android/server/speech/SpeechRecognitionManagerServiceImpl.java
+++ b/services/core/java/com/android/server/speech/SpeechRecognitionManagerServiceImpl.java
@@ -280,12 +280,12 @@ final class SpeechRecognitionManagerServiceImpl extends
return null;
}
- if (getSessionCountByUidLocked(callingUid) >= MAX_CONCURRENT_CONNECTIONS_BY_CLIENT) {
+ if (getSessionCountByUidLocked(callingUid) == MAX_CONCURRENT_CONNECTIONS_BY_CLIENT) {
Slog.w(TAG, "Number of sessions exceeded for uid: " + callingUid);
Counter.logIncrementWithUid(
"speech_recognition.value_exceed_session_count",
callingUid);
- return null;
+ // TODO(b/297249772): return null early to refuse the new connection
}
if (servicesForClient != null) {