Loading services/voiceinteraction/java/com/android/server/voiceinteraction/DspTrustedHotwordDetectorSession.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.voiceinteraction; package com.android.server.voiceinteraction; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_DETECTED_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_ERROR_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_ERROR_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_PROCESS_RESTARTED_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_PROCESS_RESTARTED_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_REJECTED_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_REJECTED_EXCEPTION; Loading Loading @@ -139,6 +140,10 @@ final class DspTrustedHotwordDetectorSession extends DetectorSession { "Security exception occurs in #onDetected method.")); "Security exception occurs in #onDetected method.")); } catch (RemoteException e1) { } catch (RemoteException e1) { notifyOnDetectorRemoteException(); notifyOnDetectorRemoteException(); HotwordMetricsLogger.writeDetectorEvent( HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_DSP, HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_ERROR_EXCEPTION, mVoiceInteractionServiceUid); throw e1; throw e1; } } return; return; Loading @@ -165,6 +170,10 @@ final class DspTrustedHotwordDetectorSession extends DetectorSession { + " bits from hotword trusted process"); + " bits from hotword trusted process"); } catch (RemoteException e) { } catch (RemoteException e) { notifyOnDetectorRemoteException(); notifyOnDetectorRemoteException(); HotwordMetricsLogger.writeDetectorEvent( HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_DSP, HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_DETECTED_EXCEPTION, mVoiceInteractionServiceUid); throw e; throw e; } } if (mDebugHotwordLogging) { if (mDebugHotwordLogging) { Loading Loading @@ -202,6 +211,10 @@ final class DspTrustedHotwordDetectorSession extends DetectorSession { externalCallback.onRejected(result); externalCallback.onRejected(result); } catch (RemoteException e) { } catch (RemoteException e) { notifyOnDetectorRemoteException(); notifyOnDetectorRemoteException(); HotwordMetricsLogger.writeDetectorEvent( HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_DSP, HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_REJECTED_EXCEPTION, mVoiceInteractionServiceUid); throw e; throw e; } } mLastHotwordRejectedResult = result; mLastHotwordRejectedResult = result; Loading services/voiceinteraction/java/com/android/server/voiceinteraction/SoftwareTrustedHotwordDetectorSession.java +14 −0 Original line number Original line Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.server.voiceinteraction; import static android.service.voice.HotwordDetectionService.AUDIO_SOURCE_MICROPHONE; import static android.service.voice.HotwordDetectionService.AUDIO_SOURCE_MICROPHONE; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_DETECTED_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_ERROR_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_PROCESS_RESTARTED_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_PROCESS_RESTARTED_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__START_SOFTWARE_DETECTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__START_SOFTWARE_DETECTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED__RESULT__DETECTED; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED__RESULT__DETECTED; Loading Loading @@ -131,6 +133,10 @@ final class SoftwareTrustedHotwordDetectorSession extends DetectorSession { "Security exception occurs in #onDetected method.")); "Security exception occurs in #onDetected method.")); } catch (RemoteException e1) { } catch (RemoteException e1) { notifyOnDetectorRemoteException(); notifyOnDetectorRemoteException(); HotwordMetricsLogger.writeDetectorEvent( HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_SOFTWARE, HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_ERROR_EXCEPTION, mVoiceInteractionServiceUid); throw e1; throw e1; } } return; return; Loading @@ -148,6 +154,10 @@ final class SoftwareTrustedHotwordDetectorSession extends DetectorSession { "Copy audio stream failure.")); "Copy audio stream failure.")); } catch (RemoteException e1) { } catch (RemoteException e1) { notifyOnDetectorRemoteException(); notifyOnDetectorRemoteException(); HotwordMetricsLogger.writeDetectorEvent( HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_SOFTWARE, HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_ERROR_EXCEPTION, mVoiceInteractionServiceUid); throw e1; throw e1; } } return; return; Loading @@ -156,6 +166,10 @@ final class SoftwareTrustedHotwordDetectorSession extends DetectorSession { mSoftwareCallback.onDetected(newResult, null, null); mSoftwareCallback.onDetected(newResult, null, null); } catch (RemoteException e1) { } catch (RemoteException e1) { notifyOnDetectorRemoteException(); notifyOnDetectorRemoteException(); HotwordMetricsLogger.writeDetectorEvent( HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_SOFTWARE, HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_DETECTED_EXCEPTION, mVoiceInteractionServiceUid); throw e1; throw e1; } } Slog.i(TAG, "Egressed " + HotwordDetectedResult.getUsageSize(newResult) Slog.i(TAG, "Egressed " + HotwordDetectedResult.getUsageSize(newResult) Loading Loading
services/voiceinteraction/java/com/android/server/voiceinteraction/DspTrustedHotwordDetectorSession.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.voiceinteraction; package com.android.server.voiceinteraction; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_DETECTED_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_ERROR_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_ERROR_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_PROCESS_RESTARTED_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_PROCESS_RESTARTED_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_REJECTED_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_REJECTED_EXCEPTION; Loading Loading @@ -139,6 +140,10 @@ final class DspTrustedHotwordDetectorSession extends DetectorSession { "Security exception occurs in #onDetected method.")); "Security exception occurs in #onDetected method.")); } catch (RemoteException e1) { } catch (RemoteException e1) { notifyOnDetectorRemoteException(); notifyOnDetectorRemoteException(); HotwordMetricsLogger.writeDetectorEvent( HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_DSP, HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_ERROR_EXCEPTION, mVoiceInteractionServiceUid); throw e1; throw e1; } } return; return; Loading @@ -165,6 +170,10 @@ final class DspTrustedHotwordDetectorSession extends DetectorSession { + " bits from hotword trusted process"); + " bits from hotword trusted process"); } catch (RemoteException e) { } catch (RemoteException e) { notifyOnDetectorRemoteException(); notifyOnDetectorRemoteException(); HotwordMetricsLogger.writeDetectorEvent( HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_DSP, HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_DETECTED_EXCEPTION, mVoiceInteractionServiceUid); throw e; throw e; } } if (mDebugHotwordLogging) { if (mDebugHotwordLogging) { Loading Loading @@ -202,6 +211,10 @@ final class DspTrustedHotwordDetectorSession extends DetectorSession { externalCallback.onRejected(result); externalCallback.onRejected(result); } catch (RemoteException e) { } catch (RemoteException e) { notifyOnDetectorRemoteException(); notifyOnDetectorRemoteException(); HotwordMetricsLogger.writeDetectorEvent( HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_DSP, HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_REJECTED_EXCEPTION, mVoiceInteractionServiceUid); throw e; throw e; } } mLastHotwordRejectedResult = result; mLastHotwordRejectedResult = result; Loading
services/voiceinteraction/java/com/android/server/voiceinteraction/SoftwareTrustedHotwordDetectorSession.java +14 −0 Original line number Original line Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.server.voiceinteraction; import static android.service.voice.HotwordDetectionService.AUDIO_SOURCE_MICROPHONE; import static android.service.voice.HotwordDetectionService.AUDIO_SOURCE_MICROPHONE; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_DETECTED_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_ERROR_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_PROCESS_RESTARTED_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_PROCESS_RESTARTED_EXCEPTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__START_SOFTWARE_DETECTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_EVENTS__EVENT__START_SOFTWARE_DETECTION; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED__RESULT__DETECTED; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED__RESULT__DETECTED; Loading Loading @@ -131,6 +133,10 @@ final class SoftwareTrustedHotwordDetectorSession extends DetectorSession { "Security exception occurs in #onDetected method.")); "Security exception occurs in #onDetected method.")); } catch (RemoteException e1) { } catch (RemoteException e1) { notifyOnDetectorRemoteException(); notifyOnDetectorRemoteException(); HotwordMetricsLogger.writeDetectorEvent( HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_SOFTWARE, HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_ERROR_EXCEPTION, mVoiceInteractionServiceUid); throw e1; throw e1; } } return; return; Loading @@ -148,6 +154,10 @@ final class SoftwareTrustedHotwordDetectorSession extends DetectorSession { "Copy audio stream failure.")); "Copy audio stream failure.")); } catch (RemoteException e1) { } catch (RemoteException e1) { notifyOnDetectorRemoteException(); notifyOnDetectorRemoteException(); HotwordMetricsLogger.writeDetectorEvent( HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_SOFTWARE, HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_ERROR_EXCEPTION, mVoiceInteractionServiceUid); throw e1; throw e1; } } return; return; Loading @@ -156,6 +166,10 @@ final class SoftwareTrustedHotwordDetectorSession extends DetectorSession { mSoftwareCallback.onDetected(newResult, null, null); mSoftwareCallback.onDetected(newResult, null, null); } catch (RemoteException e1) { } catch (RemoteException e1) { notifyOnDetectorRemoteException(); notifyOnDetectorRemoteException(); HotwordMetricsLogger.writeDetectorEvent( HotwordDetector.DETECTOR_TYPE_TRUSTED_HOTWORD_SOFTWARE, HOTWORD_DETECTOR_EVENTS__EVENT__CALLBACK_ON_DETECTED_EXCEPTION, mVoiceInteractionServiceUid); throw e1; throw e1; } } Slog.i(TAG, "Egressed " + HotwordDetectedResult.getUsageSize(newResult) Slog.i(TAG, "Egressed " + HotwordDetectedResult.getUsageSize(newResult) Loading