Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e08aa556 authored by Charles Chen's avatar Charles Chen
Browse files

Remove changeId checking for VisualQueryDetectionService

The service needs to be enabled even if multiple detector is disabled.

Bug: 279544077
Test: atest CtsVoiceInteractionTestCases
Change-Id: Icb77819226ed7b9266ab20a44220016daf52c469
parent f0a75620
Loading
Loading
Loading
Loading
+9 −16
Original line number Diff line number Diff line
@@ -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.
     *
@@ -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. "
@@ -951,7 +945,6 @@ public class VoiceInteractionService extends Service {
                                    + "at the same time.");
                }
            }
            }

            VisualQueryDetector visualQueryDetector =
                    new VisualQueryDetector(mSystemService, executor, callback);