From fad7266a4d603dbc9654d10c276b201dcdf1d4b6 Mon Sep 17 00:00:00 2001 From: Charles Chen Date: Wed, 14 Dec 2022 18:50:48 +0000 Subject: [PATCH] Add tag attribute for VisualQueryDetectionService The tag attribute is added to distinguish the VisualQueryDetectionService that VoiceInteractor is using to build service conncetion to. This is a prestep necessary of developing and test the upcoming CLs regarding the implementation of VQDS. Bug: 261783491 Test: Manual Change-Id: I04855911256aa458be45707b49f369dc54c506de --- core/api/system-current.txt | 1 + .../service/voice/VoiceInteractionServiceInfo.java | 8 ++++++++ core/res/res/values/attrs.xml | 4 ++++ core/res/res/values/public-staging.xml | 1 + 4 files changed, 14 insertions(+) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index dbd6cac45e9e7..2a070685b5ce8 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -388,6 +388,7 @@ package android { field public static final int sdkVersion = 16844304; // 0x1010610 field public static final int supportsAmbientMode = 16844173; // 0x101058d field public static final int userRestriction = 16844164; // 0x1010584 + field public static final int visualQueryDetectionService; } public static final class R.bool { diff --git a/core/java/android/service/voice/VoiceInteractionServiceInfo.java b/core/java/android/service/voice/VoiceInteractionServiceInfo.java index ff03cc14e73b1..af29961c98bc0 100644 --- a/core/java/android/service/voice/VoiceInteractionServiceInfo.java +++ b/core/java/android/service/voice/VoiceInteractionServiceInfo.java @@ -46,6 +46,7 @@ public class VoiceInteractionServiceInfo { private String mSessionService; private String mRecognitionService; private String mHotwordDetectionService; + private String mVisualQueryDetectionService; private String mSettingsActivity; private boolean mSupportsAssist; private boolean mSupportsLaunchFromKeyguard; @@ -137,6 +138,8 @@ public class VoiceInteractionServiceInfo { R.styleable.VoiceInteractionService_supportsLocalInteraction, false); mHotwordDetectionService = array.getString(com.android.internal.R.styleable .VoiceInteractionService_hotwordDetectionService); + mVisualQueryDetectionService = array.getString(com.android.internal.R.styleable + .VoiceInteractionService_visualQueryDetectionService); array.recycle(); if (mSessionService == null) { mParseError = "No sessionService specified"; @@ -190,4 +193,9 @@ public class VoiceInteractionServiceInfo { public String getHotwordDetectionService() { return mHotwordDetectionService; } + + @Nullable + public String getVisualQueryDetectionService() { + return mVisualQueryDetectionService; + } } diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 2d832bc71684d..c8b0601621ed8 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -8987,6 +8987,10 @@ + + +