Loading services/voiceinteraction/java/com/android/server/voiceinteraction/DetectorSession.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -510,6 +510,8 @@ abstract class DetectorSession { try { try { enforcePermissionsForDataDelivery(); enforcePermissionsForDataDelivery(); } catch (SecurityException e) { } catch (SecurityException e) { Slog.w(TAG, "Ignoring #onDetected due to a " + "SecurityException", e); HotwordMetricsLogger.writeDetectorEvent( HotwordMetricsLogger.writeDetectorEvent( getDetectorType(), getDetectorType(), EXTERNAL_SOURCE_DETECT_SECURITY_EXCEPTION, EXTERNAL_SOURCE_DETECT_SECURITY_EXCEPTION, Loading @@ -525,6 +527,8 @@ abstract class DetectorSession { newResult = mHotwordAudioStreamCopier newResult = mHotwordAudioStreamCopier .startCopyingAudioStreams(triggerResult); .startCopyingAudioStreams(triggerResult); } catch (IOException e) { } catch (IOException e) { Slog.w(TAG, "Ignoring #onDetected due to a " + "IOException", e); // TODO: Write event // TODO: Write event callback.onError(new HotwordDetectionServiceFailure( callback.onError(new HotwordDetectionServiceFailure( CALLBACK_ONDETECTED_STREAM_COPY_ERROR, CALLBACK_ONDETECTED_STREAM_COPY_ERROR, Loading services/voiceinteraction/java/com/android/server/voiceinteraction/DspTrustedHotwordDetectorSession.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -126,7 +126,7 @@ final class DspTrustedHotwordDetectorSession extends DetectorSession { enforcePermissionsForDataDelivery(); enforcePermissionsForDataDelivery(); enforceExtraKeyphraseIdNotLeaked(result, recognitionEvent); enforceExtraKeyphraseIdNotLeaked(result, recognitionEvent); } catch (SecurityException e) { } catch (SecurityException e) { Slog.i(TAG, "Ignoring #onDetected due to a SecurityException", e); Slog.w(TAG, "Ignoring #onDetected due to a SecurityException", e); HotwordMetricsLogger.writeKeyphraseTriggerEvent( HotwordMetricsLogger.writeKeyphraseTriggerEvent( HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_DSP, HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_DSP, METRICS_KEYPHRASE_TRIGGERED_DETECT_SECURITY_EXCEPTION, METRICS_KEYPHRASE_TRIGGERED_DETECT_SECURITY_EXCEPTION, Loading @@ -141,6 +141,7 @@ final class DspTrustedHotwordDetectorSession extends DetectorSession { try { try { newResult = mHotwordAudioStreamCopier.startCopyingAudioStreams(result); newResult = mHotwordAudioStreamCopier.startCopyingAudioStreams(result); } catch (IOException e) { } catch (IOException e) { Slog.w(TAG, "Ignoring #onDetected due to a IOException", e); externalCallback.onDetectionFailure(new HotwordDetectionServiceFailure( externalCallback.onDetectionFailure(new HotwordDetectionServiceFailure( CALLBACK_ONDETECTED_STREAM_COPY_ERROR, CALLBACK_ONDETECTED_STREAM_COPY_ERROR, "Copy audio stream failure.")); "Copy audio stream failure.")); Loading services/voiceinteraction/java/com/android/server/voiceinteraction/SoftwareTrustedHotwordDetectorSession.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -118,6 +118,7 @@ final class SoftwareTrustedHotwordDetectorSession extends DetectorSession { try { try { enforcePermissionsForDataDelivery(); enforcePermissionsForDataDelivery(); } catch (SecurityException e) { } catch (SecurityException e) { Slog.w(TAG, "Ignoring #onDetected due to a SecurityException", e); HotwordMetricsLogger.writeKeyphraseTriggerEvent( HotwordMetricsLogger.writeKeyphraseTriggerEvent( HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_SOFTWARE, HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_SOFTWARE, METRICS_KEYPHRASE_TRIGGERED_DETECT_SECURITY_EXCEPTION, METRICS_KEYPHRASE_TRIGGERED_DETECT_SECURITY_EXCEPTION, Loading @@ -132,6 +133,7 @@ final class SoftwareTrustedHotwordDetectorSession extends DetectorSession { try { try { newResult = mHotwordAudioStreamCopier.startCopyingAudioStreams(result); newResult = mHotwordAudioStreamCopier.startCopyingAudioStreams(result); } catch (IOException e) { } catch (IOException e) { Slog.w(TAG, "Ignoring #onDetected due to a IOException", e); // TODO: Write event // TODO: Write event mSoftwareCallback.onError(new HotwordDetectionServiceFailure( mSoftwareCallback.onError(new HotwordDetectionServiceFailure( CALLBACK_ONDETECTED_STREAM_COPY_ERROR, CALLBACK_ONDETECTED_STREAM_COPY_ERROR, Loading Loading
services/voiceinteraction/java/com/android/server/voiceinteraction/DetectorSession.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -510,6 +510,8 @@ abstract class DetectorSession { try { try { enforcePermissionsForDataDelivery(); enforcePermissionsForDataDelivery(); } catch (SecurityException e) { } catch (SecurityException e) { Slog.w(TAG, "Ignoring #onDetected due to a " + "SecurityException", e); HotwordMetricsLogger.writeDetectorEvent( HotwordMetricsLogger.writeDetectorEvent( getDetectorType(), getDetectorType(), EXTERNAL_SOURCE_DETECT_SECURITY_EXCEPTION, EXTERNAL_SOURCE_DETECT_SECURITY_EXCEPTION, Loading @@ -525,6 +527,8 @@ abstract class DetectorSession { newResult = mHotwordAudioStreamCopier newResult = mHotwordAudioStreamCopier .startCopyingAudioStreams(triggerResult); .startCopyingAudioStreams(triggerResult); } catch (IOException e) { } catch (IOException e) { Slog.w(TAG, "Ignoring #onDetected due to a " + "IOException", e); // TODO: Write event // TODO: Write event callback.onError(new HotwordDetectionServiceFailure( callback.onError(new HotwordDetectionServiceFailure( CALLBACK_ONDETECTED_STREAM_COPY_ERROR, CALLBACK_ONDETECTED_STREAM_COPY_ERROR, Loading
services/voiceinteraction/java/com/android/server/voiceinteraction/DspTrustedHotwordDetectorSession.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -126,7 +126,7 @@ final class DspTrustedHotwordDetectorSession extends DetectorSession { enforcePermissionsForDataDelivery(); enforcePermissionsForDataDelivery(); enforceExtraKeyphraseIdNotLeaked(result, recognitionEvent); enforceExtraKeyphraseIdNotLeaked(result, recognitionEvent); } catch (SecurityException e) { } catch (SecurityException e) { Slog.i(TAG, "Ignoring #onDetected due to a SecurityException", e); Slog.w(TAG, "Ignoring #onDetected due to a SecurityException", e); HotwordMetricsLogger.writeKeyphraseTriggerEvent( HotwordMetricsLogger.writeKeyphraseTriggerEvent( HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_DSP, HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_DSP, METRICS_KEYPHRASE_TRIGGERED_DETECT_SECURITY_EXCEPTION, METRICS_KEYPHRASE_TRIGGERED_DETECT_SECURITY_EXCEPTION, Loading @@ -141,6 +141,7 @@ final class DspTrustedHotwordDetectorSession extends DetectorSession { try { try { newResult = mHotwordAudioStreamCopier.startCopyingAudioStreams(result); newResult = mHotwordAudioStreamCopier.startCopyingAudioStreams(result); } catch (IOException e) { } catch (IOException e) { Slog.w(TAG, "Ignoring #onDetected due to a IOException", e); externalCallback.onDetectionFailure(new HotwordDetectionServiceFailure( externalCallback.onDetectionFailure(new HotwordDetectionServiceFailure( CALLBACK_ONDETECTED_STREAM_COPY_ERROR, CALLBACK_ONDETECTED_STREAM_COPY_ERROR, "Copy audio stream failure.")); "Copy audio stream failure.")); Loading
services/voiceinteraction/java/com/android/server/voiceinteraction/SoftwareTrustedHotwordDetectorSession.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -118,6 +118,7 @@ final class SoftwareTrustedHotwordDetectorSession extends DetectorSession { try { try { enforcePermissionsForDataDelivery(); enforcePermissionsForDataDelivery(); } catch (SecurityException e) { } catch (SecurityException e) { Slog.w(TAG, "Ignoring #onDetected due to a SecurityException", e); HotwordMetricsLogger.writeKeyphraseTriggerEvent( HotwordMetricsLogger.writeKeyphraseTriggerEvent( HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_SOFTWARE, HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_SOFTWARE, METRICS_KEYPHRASE_TRIGGERED_DETECT_SECURITY_EXCEPTION, METRICS_KEYPHRASE_TRIGGERED_DETECT_SECURITY_EXCEPTION, Loading @@ -132,6 +133,7 @@ final class SoftwareTrustedHotwordDetectorSession extends DetectorSession { try { try { newResult = mHotwordAudioStreamCopier.startCopyingAudioStreams(result); newResult = mHotwordAudioStreamCopier.startCopyingAudioStreams(result); } catch (IOException e) { } catch (IOException e) { Slog.w(TAG, "Ignoring #onDetected due to a IOException", e); // TODO: Write event // TODO: Write event mSoftwareCallback.onError(new HotwordDetectionServiceFailure( mSoftwareCallback.onError(new HotwordDetectionServiceFailure( CALLBACK_ONDETECTED_STREAM_COPY_ERROR, CALLBACK_ONDETECTED_STREAM_COPY_ERROR, Loading