Loading core/java/android/hardware/soundtrigger/KeyphraseEnrollmentInfo.java +8 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import java.io.IOException; import java.util.Arrays; import java.util.List; /** Loading Loading @@ -263,4 +264,11 @@ public class KeyphraseEnrollmentInfo { Slog.w(TAG, "Enrollment application doesn't support the given keyphrase/locale"); return null; } @Override public String toString() { return "KeyphraseEnrollmentInfo [Keyphrases=" + Arrays.toString(mKeyphrases) + ", EnrollmentPackage=" + mEnrollmentPackage + ", ParseError=" + mParseError + "]"; } } core/java/android/service/voice/AlwaysOnHotwordDetector.java +17 −4 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ import android.util.Slog; import com.android.internal.app.IVoiceInteractionManagerService; import java.io.FileDescriptor; import java.io.PrintWriter; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; Loading Loading @@ -490,7 +492,7 @@ public class AlwaysOnHotwordDetector { new RecognitionConfig(captureTriggerAudio, allowMultipleTriggers, recognitionExtra, null /* additional data */)); } catch (RemoteException e) { Slog.w(TAG, "RemoteException in startRecognition!"); Slog.w(TAG, "RemoteException in startRecognition!", e); } if (code != STATUS_OK) { Slog.w(TAG, "startRecognition() failed with error code " + code); Loading @@ -504,7 +506,7 @@ public class AlwaysOnHotwordDetector { code = mModelManagementService.stopRecognition( mVoiceInteractionService, mKeyphraseMetadata.id, mInternalCallback); } catch (RemoteException e) { Slog.w(TAG, "RemoteException in stopRecognition!"); Slog.w(TAG, "RemoteException in stopRecognition!", e); } if (code != STATUS_OK) { Loading Loading @@ -636,7 +638,7 @@ public class AlwaysOnHotwordDetector { dspModuleProperties = mModelManagementService.getDspModuleProperties(mVoiceInteractionService); } catch (RemoteException e) { Slog.w(TAG, "RemoteException in getDspProperties!"); Slog.w(TAG, "RemoteException in getDspProperties!", e); } // No DSP available if (dspModuleProperties == null) { Loading @@ -657,9 +659,20 @@ public class AlwaysOnHotwordDetector { return mModelManagementService.isEnrolledForKeyphrase( mVoiceInteractionService, keyphraseId); } catch (RemoteException e) { Slog.w(TAG, "RemoteException in listRegisteredKeyphraseSoundModels!"); Slog.w(TAG, "RemoteException in listRegisteredKeyphraseSoundModels!", e); } return false; } } /** @hide */ public void dump(String prefix, PrintWriter pw) { synchronized (mLock) { pw.print(prefix); pw.print("Text="); pw.println(mText); pw.print(prefix); pw.print("Locale="); pw.println(mLocale); pw.print(prefix); pw.print("Availability="); pw.println(mAvailability); pw.print(prefix); pw.print("KeyphraseMetadata="); pw.println(mKeyphraseMetadata); pw.print(prefix); pw.print("EnrollmentInfo="); pw.println(mKeyphraseEnrollmentInfo); } } } core/java/android/service/voice/VoiceInteractionService.java +16 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,9 @@ import android.provider.Settings; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.app.IVoiceInteractionManagerService; import java.io.FileDescriptor; import java.io.PrintWriter; /** * Top-level service of the current global voice interactor, which is providing Loading Loading @@ -244,4 +247,17 @@ public class VoiceInteractionService extends Service { // Ignore. } } @Override protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("VOICE INTERACTION"); synchronized (mLock) { pw.println(" AlwaysOnHotwordDetector"); if (mHotwordDetector == null) { pw.println(" NULL"); } else { mHotwordDetector.dump(" ", pw); } } } } services/voiceinteraction/java/com/android/server/voiceinteraction/SoundTriggerHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -159,7 +159,7 @@ public class SoundTriggerHelper implements SoundTrigger.StatusListener { try { mActiveListener.onError(STATUS_ERROR); } catch (RemoteException e) { Slog.w(TAG, "RemoteException in onDetectionStopped"); Slog.w(TAG, "RemoteException in onDetectionStopped", e); } mActiveListener = null; } Loading Loading
core/java/android/hardware/soundtrigger/KeyphraseEnrollmentInfo.java +8 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import java.io.IOException; import java.util.Arrays; import java.util.List; /** Loading Loading @@ -263,4 +264,11 @@ public class KeyphraseEnrollmentInfo { Slog.w(TAG, "Enrollment application doesn't support the given keyphrase/locale"); return null; } @Override public String toString() { return "KeyphraseEnrollmentInfo [Keyphrases=" + Arrays.toString(mKeyphrases) + ", EnrollmentPackage=" + mEnrollmentPackage + ", ParseError=" + mParseError + "]"; } }
core/java/android/service/voice/AlwaysOnHotwordDetector.java +17 −4 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ import android.util.Slog; import com.android.internal.app.IVoiceInteractionManagerService; import java.io.FileDescriptor; import java.io.PrintWriter; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; Loading Loading @@ -490,7 +492,7 @@ public class AlwaysOnHotwordDetector { new RecognitionConfig(captureTriggerAudio, allowMultipleTriggers, recognitionExtra, null /* additional data */)); } catch (RemoteException e) { Slog.w(TAG, "RemoteException in startRecognition!"); Slog.w(TAG, "RemoteException in startRecognition!", e); } if (code != STATUS_OK) { Slog.w(TAG, "startRecognition() failed with error code " + code); Loading @@ -504,7 +506,7 @@ public class AlwaysOnHotwordDetector { code = mModelManagementService.stopRecognition( mVoiceInteractionService, mKeyphraseMetadata.id, mInternalCallback); } catch (RemoteException e) { Slog.w(TAG, "RemoteException in stopRecognition!"); Slog.w(TAG, "RemoteException in stopRecognition!", e); } if (code != STATUS_OK) { Loading Loading @@ -636,7 +638,7 @@ public class AlwaysOnHotwordDetector { dspModuleProperties = mModelManagementService.getDspModuleProperties(mVoiceInteractionService); } catch (RemoteException e) { Slog.w(TAG, "RemoteException in getDspProperties!"); Slog.w(TAG, "RemoteException in getDspProperties!", e); } // No DSP available if (dspModuleProperties == null) { Loading @@ -657,9 +659,20 @@ public class AlwaysOnHotwordDetector { return mModelManagementService.isEnrolledForKeyphrase( mVoiceInteractionService, keyphraseId); } catch (RemoteException e) { Slog.w(TAG, "RemoteException in listRegisteredKeyphraseSoundModels!"); Slog.w(TAG, "RemoteException in listRegisteredKeyphraseSoundModels!", e); } return false; } } /** @hide */ public void dump(String prefix, PrintWriter pw) { synchronized (mLock) { pw.print(prefix); pw.print("Text="); pw.println(mText); pw.print(prefix); pw.print("Locale="); pw.println(mLocale); pw.print(prefix); pw.print("Availability="); pw.println(mAvailability); pw.print(prefix); pw.print("KeyphraseMetadata="); pw.println(mKeyphraseMetadata); pw.print(prefix); pw.print("EnrollmentInfo="); pw.println(mKeyphraseEnrollmentInfo); } } }
core/java/android/service/voice/VoiceInteractionService.java +16 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,9 @@ import android.provider.Settings; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.app.IVoiceInteractionManagerService; import java.io.FileDescriptor; import java.io.PrintWriter; /** * Top-level service of the current global voice interactor, which is providing Loading Loading @@ -244,4 +247,17 @@ public class VoiceInteractionService extends Service { // Ignore. } } @Override protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("VOICE INTERACTION"); synchronized (mLock) { pw.println(" AlwaysOnHotwordDetector"); if (mHotwordDetector == null) { pw.println(" NULL"); } else { mHotwordDetector.dump(" ", pw); } } } }
services/voiceinteraction/java/com/android/server/voiceinteraction/SoundTriggerHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -159,7 +159,7 @@ public class SoundTriggerHelper implements SoundTrigger.StatusListener { try { mActiveListener.onError(STATUS_ERROR); } catch (RemoteException e) { Slog.w(TAG, "RemoteException in onDetectionStopped"); Slog.w(TAG, "RemoteException in onDetectionStopped", e); } mActiveListener = null; } Loading