Loading core/api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -290,6 +290,7 @@ package android { public static final class R.attr { field public static final int allowClearUserDataOnFailedRestore = 16844288; // 0x1010600 field public static final int hotwordDetectionService = 16844326; // 0x1010626 field public static final int isVrOnly = 16844152; // 0x1010578 field public static final int minExtensionVersion = 16844305; // 0x1010611 field public static final int requiredSystemPropertyName = 16844133; // 0x1010565 Loading core/java/android/service/voice/VoiceInteractionServiceInfo.java +9 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.service.voice; import android.Manifest; import android.annotation.NonNull; import android.annotation.Nullable; import android.app.AppGlobals; import android.content.ComponentName; import android.content.pm.PackageManager; Loading @@ -44,6 +45,7 @@ public class VoiceInteractionServiceInfo { private ServiceInfo mServiceInfo; private String mSessionService; private String mRecognitionService; private String mHotwordDetectionService; private String mSettingsActivity; private boolean mSupportsAssist; private boolean mSupportsLaunchFromKeyguard; Loading Loading @@ -133,6 +135,8 @@ public class VoiceInteractionServiceInfo { false); mSupportsLocalInteraction = array.getBoolean(com.android.internal. R.styleable.VoiceInteractionService_supportsLocalInteraction, false); mHotwordDetectionService = array.getString(com.android.internal.R.styleable .VoiceInteractionService_hotwordDetectionService); array.recycle(); if (mSessionService == null) { mParseError = "No sessionService specified"; Loading Loading @@ -181,4 +185,9 @@ public class VoiceInteractionServiceInfo { public boolean getSupportsLocalInteraction() { return mSupportsLocalInteraction; } @Nullable public String getHotwordDetectionService() { return mHotwordDetectionService; } } core/res/res/values/attrs.xml +3 −0 Original line number Diff line number Diff line Loading @@ -8500,6 +8500,9 @@ interaction requests from an Activity. This flag is new in {@link android.os.Build.VERSION_CODES#N} and not used in previous versions. --> <attr name="supportsLocalInteraction" format="boolean" /> <!-- The service that provides {@link android.service.voice.HotwordDetectionService}. @hide @SystemApi --> <attr name="hotwordDetectionService" format="string" /> </declare-styleable> <!-- Use <code>voice-enrollment-application</code> Loading core/res/res/values/public.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3059,6 +3059,8 @@ <public name="hand_second" /> <public name="memtagMode" /> <public name="nativeHeapZeroInit" /> <!-- @hide @SystemApi --> <public name="hotwordDetectionService" /> </public-group> <public-group type="drawable" first-id="0x010800b5"> Loading services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java +12 −3 Original line number Diff line number Diff line Loading @@ -163,8 +163,13 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne mValid = true; mSessionComponentName = new ComponentName(service.getPackageName(), mInfo.getSessionService()); // TODO : Need to get the hotword detection service from the xml metadata final String hotwordDetectionServiceName = mInfo.getHotwordDetectionService(); if (hotwordDetectionServiceName != null) { mHotwordDetectionComponentName = new ComponentName(service.getPackageName(), hotwordDetectionServiceName); } else { mHotwordDetectionComponentName = null; } mIWindowManager = IWindowManager.Stub.asInterface( ServiceManager.getService(Context.WINDOW_SERVICE)); IntentFilter filter = new IntentFilter(); Loading Loading @@ -388,7 +393,11 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne if (DEBUG) { Slog.d(TAG, "setHotwordDetectionConfigLocked"); } if (mHotwordDetectionComponentName == null) { Slog.e(TAG, "Calling setHotwordDetectionConfigLocked, but hotword detection service" + " name not found"); return VoiceInteractionService.HOTWORD_CONFIG_FAILURE; } if (!isIsolatedProcessLocked(mHotwordDetectionComponentName)) { return VoiceInteractionService.HOTWORD_CONFIG_FAILURE; } Loading Loading
core/api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -290,6 +290,7 @@ package android { public static final class R.attr { field public static final int allowClearUserDataOnFailedRestore = 16844288; // 0x1010600 field public static final int hotwordDetectionService = 16844326; // 0x1010626 field public static final int isVrOnly = 16844152; // 0x1010578 field public static final int minExtensionVersion = 16844305; // 0x1010611 field public static final int requiredSystemPropertyName = 16844133; // 0x1010565 Loading
core/java/android/service/voice/VoiceInteractionServiceInfo.java +9 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.service.voice; import android.Manifest; import android.annotation.NonNull; import android.annotation.Nullable; import android.app.AppGlobals; import android.content.ComponentName; import android.content.pm.PackageManager; Loading @@ -44,6 +45,7 @@ public class VoiceInteractionServiceInfo { private ServiceInfo mServiceInfo; private String mSessionService; private String mRecognitionService; private String mHotwordDetectionService; private String mSettingsActivity; private boolean mSupportsAssist; private boolean mSupportsLaunchFromKeyguard; Loading Loading @@ -133,6 +135,8 @@ public class VoiceInteractionServiceInfo { false); mSupportsLocalInteraction = array.getBoolean(com.android.internal. R.styleable.VoiceInteractionService_supportsLocalInteraction, false); mHotwordDetectionService = array.getString(com.android.internal.R.styleable .VoiceInteractionService_hotwordDetectionService); array.recycle(); if (mSessionService == null) { mParseError = "No sessionService specified"; Loading Loading @@ -181,4 +185,9 @@ public class VoiceInteractionServiceInfo { public boolean getSupportsLocalInteraction() { return mSupportsLocalInteraction; } @Nullable public String getHotwordDetectionService() { return mHotwordDetectionService; } }
core/res/res/values/attrs.xml +3 −0 Original line number Diff line number Diff line Loading @@ -8500,6 +8500,9 @@ interaction requests from an Activity. This flag is new in {@link android.os.Build.VERSION_CODES#N} and not used in previous versions. --> <attr name="supportsLocalInteraction" format="boolean" /> <!-- The service that provides {@link android.service.voice.HotwordDetectionService}. @hide @SystemApi --> <attr name="hotwordDetectionService" format="string" /> </declare-styleable> <!-- Use <code>voice-enrollment-application</code> Loading
core/res/res/values/public.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3059,6 +3059,8 @@ <public name="hand_second" /> <public name="memtagMode" /> <public name="nativeHeapZeroInit" /> <!-- @hide @SystemApi --> <public name="hotwordDetectionService" /> </public-group> <public-group type="drawable" first-id="0x010800b5"> Loading
services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java +12 −3 Original line number Diff line number Diff line Loading @@ -163,8 +163,13 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne mValid = true; mSessionComponentName = new ComponentName(service.getPackageName(), mInfo.getSessionService()); // TODO : Need to get the hotword detection service from the xml metadata final String hotwordDetectionServiceName = mInfo.getHotwordDetectionService(); if (hotwordDetectionServiceName != null) { mHotwordDetectionComponentName = new ComponentName(service.getPackageName(), hotwordDetectionServiceName); } else { mHotwordDetectionComponentName = null; } mIWindowManager = IWindowManager.Stub.asInterface( ServiceManager.getService(Context.WINDOW_SERVICE)); IntentFilter filter = new IntentFilter(); Loading Loading @@ -388,7 +393,11 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne if (DEBUG) { Slog.d(TAG, "setHotwordDetectionConfigLocked"); } if (mHotwordDetectionComponentName == null) { Slog.e(TAG, "Calling setHotwordDetectionConfigLocked, but hotword detection service" + " name not found"); return VoiceInteractionService.HOTWORD_CONFIG_FAILURE; } if (!isIsolatedProcessLocked(mHotwordDetectionComponentName)) { return VoiceInteractionService.HOTWORD_CONFIG_FAILURE; } Loading