Loading core/java/android/service/voice/VoiceInteractionService.java +9 −16 Original line number Diff line number Diff line Loading @@ -913,8 +913,6 @@ public class VoiceInteractionService extends Service { * sandboxed process. * @param callback The callback to notify of detection events. * @return An instanece of {@link VisualQueryDetector}. * @throws UnsupportedOperationException if only single detector is supported. Multiple detector * is only available for apps targeting {@link Build.VERSION_CODES#TIRAMISU} and above. * @throws IllegalStateException when there is an existing {@link VisualQueryDetector}, or when * there is a non-trusted hotword detector running. * Loading @@ -935,10 +933,6 @@ public class VoiceInteractionService extends Service { throw new IllegalStateException("Not available until onReady() is called"); } synchronized (mLock) { if (!CompatChanges.isChangeEnabled(MULTIPLE_ACTIVE_HOTWORD_DETECTORS)) { throw new UnsupportedOperationException("VisualQueryDetector is only available if " + "multiple detectors are allowed"); } else { if (mActiveVisualQueryDetector != null) { throw new IllegalStateException( "There is already an active VisualQueryDetector. " Loading @@ -951,7 +945,6 @@ public class VoiceInteractionService extends Service { + "at the same time."); } } } VisualQueryDetector visualQueryDetector = new VisualQueryDetector(mSystemService, executor, callback); Loading Loading
core/java/android/service/voice/VoiceInteractionService.java +9 −16 Original line number Diff line number Diff line Loading @@ -913,8 +913,6 @@ public class VoiceInteractionService extends Service { * sandboxed process. * @param callback The callback to notify of detection events. * @return An instanece of {@link VisualQueryDetector}. * @throws UnsupportedOperationException if only single detector is supported. Multiple detector * is only available for apps targeting {@link Build.VERSION_CODES#TIRAMISU} and above. * @throws IllegalStateException when there is an existing {@link VisualQueryDetector}, or when * there is a non-trusted hotword detector running. * Loading @@ -935,10 +933,6 @@ public class VoiceInteractionService extends Service { throw new IllegalStateException("Not available until onReady() is called"); } synchronized (mLock) { if (!CompatChanges.isChangeEnabled(MULTIPLE_ACTIVE_HOTWORD_DETECTORS)) { throw new UnsupportedOperationException("VisualQueryDetector is only available if " + "multiple detectors are allowed"); } else { if (mActiveVisualQueryDetector != null) { throw new IllegalStateException( "There is already an active VisualQueryDetector. " Loading @@ -951,7 +945,6 @@ public class VoiceInteractionService extends Service { + "at the same time."); } } } VisualQueryDetector visualQueryDetector = new VisualQueryDetector(mSystemService, executor, callback); Loading