Loading services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerHelper.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -470,7 +470,7 @@ public class SoundTriggerHelper implements SoundTrigger.StatusListener { ModelData modelData = getKeyphraseModelDataLocked(keyphraseId); ModelData modelData = getKeyphraseModelDataLocked(keyphraseId); if (modelData == null || !modelData.isKeyphraseModel()) { if (modelData == null || !modelData.isKeyphraseModel()) { Slog.e(TAG, "No model exists for given keyphrase Id " + keyphraseId); Slog.w(TAG, "No model exists for given keyphrase Id " + keyphraseId); return STATUS_ERROR; return STATUS_ERROR; } } Loading services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerService.java +16 −16 Original line number Original line Diff line number Diff line Loading @@ -142,7 +142,7 @@ public class SoundTriggerService extends SystemService { } } if (stat.mIsStarted) { if (stat.mIsStarted) { Slog.e(TAG, "error onStart(): Model " + id + " already started"); Slog.w(TAG, "error onStart(): Model " + id + " already started"); return; return; } } Loading @@ -154,12 +154,12 @@ public class SoundTriggerService extends SystemService { public synchronized void onStop(UUID id) { public synchronized void onStop(UUID id) { SoundModelStat stat = mModelStats.get(id); SoundModelStat stat = mModelStats.get(id); if (stat == null) { if (stat == null) { Slog.e(TAG, "error onStop(): Model " + id + " has no stats available"); Slog.w(TAG, "error onStop(): Model " + id + " has no stats available"); return; return; } } if (!stat.mIsStarted) { if (!stat.mIsStarted) { Slog.e(TAG, "error onStop(): Model " + id + " already stopped"); Slog.w(TAG, "error onStop(): Model " + id + " already stopped"); return; return; } } Loading Loading @@ -314,7 +314,7 @@ public class SoundTriggerService extends SystemService { GenericSoundModel model = getSoundModel(parcelUuid); GenericSoundModel model = getSoundModel(parcelUuid); if (model == null) { if (model == null) { Slog.e(TAG, "Null model in database for id: " + parcelUuid); Slog.w(TAG, "Null model in database for id: " + parcelUuid); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "startRecognition(): Null model in database for id: " + parcelUuid)); "startRecognition(): Null model in database for id: " + parcelUuid)); Loading Loading @@ -409,7 +409,7 @@ public class SoundTriggerService extends SystemService { try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { enforceCallingPermission(Manifest.permission.MANAGE_SOUND_TRIGGER); enforceCallingPermission(Manifest.permission.MANAGE_SOUND_TRIGGER); if (soundModel == null || soundModel.getUuid() == null) { if (soundModel == null || soundModel.getUuid() == null) { Slog.e(TAG, "Invalid sound model"); Slog.w(TAG, "Invalid sound model"); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "loadGenericSoundModel(): Invalid sound model")); "loadGenericSoundModel(): Invalid sound model")); Loading Loading @@ -445,7 +445,7 @@ public class SoundTriggerService extends SystemService { try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { enforceCallingPermission(Manifest.permission.MANAGE_SOUND_TRIGGER); enforceCallingPermission(Manifest.permission.MANAGE_SOUND_TRIGGER); if (soundModel == null || soundModel.getUuid() == null) { if (soundModel == null || soundModel.getUuid() == null) { Slog.e(TAG, "Invalid sound model"); Slog.w(TAG, "Invalid sound model"); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "loadKeyphraseSoundModel(): Invalid sound model")); "loadKeyphraseSoundModel(): Invalid sound model")); Loading @@ -453,7 +453,7 @@ public class SoundTriggerService extends SystemService { return STATUS_ERROR; return STATUS_ERROR; } } if (soundModel.getKeyphrases() == null || soundModel.getKeyphrases().length != 1) { if (soundModel.getKeyphrases() == null || soundModel.getKeyphrases().length != 1) { Slog.e(TAG, "Only one keyphrase per model is currently supported."); Slog.w(TAG, "Only one keyphrase per model is currently supported."); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "loadKeyphraseSoundModel(): Only one keyphrase per model" "loadKeyphraseSoundModel(): Only one keyphrase per model" Loading Loading @@ -513,7 +513,7 @@ public class SoundTriggerService extends SystemService { synchronized (mLock) { synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); if (soundModel == null) { if (soundModel == null) { Slog.e(TAG, soundModelId + " is not loaded"); Slog.w(TAG, soundModelId + " is not loaded"); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "startRecognitionForService():" + soundModelId + " is not loaded")); "startRecognitionForService():" + soundModelId + " is not loaded")); Loading @@ -525,7 +525,7 @@ public class SoundTriggerService extends SystemService { existingCallback = mCallbacks.get(soundModelId.getUuid()); existingCallback = mCallbacks.get(soundModelId.getUuid()); } } if (existingCallback != null) { if (existingCallback != null) { Slog.e(TAG, soundModelId + " is already running"); Slog.w(TAG, soundModelId + " is already running"); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "startRecognitionForService():" "startRecognitionForService():" Loading Loading @@ -580,7 +580,7 @@ public class SoundTriggerService extends SystemService { synchronized (mLock) { synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); if (soundModel == null) { if (soundModel == null) { Slog.e(TAG, soundModelId + " is not loaded"); Slog.w(TAG, soundModelId + " is not loaded"); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "stopRecognitionForService(): " + soundModelId "stopRecognitionForService(): " + soundModelId Loading @@ -593,7 +593,7 @@ public class SoundTriggerService extends SystemService { callback = mCallbacks.get(soundModelId.getUuid()); callback = mCallbacks.get(soundModelId.getUuid()); } } if (callback == null) { if (callback == null) { Slog.e(TAG, soundModelId + " is not running"); Slog.w(TAG, soundModelId + " is not running"); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "stopRecognitionForService(): " + soundModelId "stopRecognitionForService(): " + soundModelId Loading Loading @@ -648,7 +648,7 @@ public class SoundTriggerService extends SystemService { synchronized (mLock) { synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); if (soundModel == null) { if (soundModel == null) { Slog.e(TAG, soundModelId + " is not loaded"); Slog.w(TAG, soundModelId + " is not loaded"); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "unloadSoundModel(): " + soundModelId + " is not loaded")); "unloadSoundModel(): " + soundModelId + " is not loaded")); Loading Loading @@ -715,7 +715,7 @@ public class SoundTriggerService extends SystemService { synchronized (mLock) { synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); if (soundModel == null) { if (soundModel == null) { Slog.e(TAG, soundModelId + " is not loaded"); Slog.w(TAG, soundModelId + " is not loaded"); sEventLogger.log(new SoundTriggerLogger.StringEvent("getModelState(): " sEventLogger.log(new SoundTriggerLogger.StringEvent("getModelState(): " + soundModelId + " is not loaded")); + soundModelId + " is not loaded")); Loading Loading @@ -777,7 +777,7 @@ public class SoundTriggerService extends SystemService { synchronized (mLock) { synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); if (soundModel == null) { if (soundModel == null) { Slog.e(TAG, soundModelId + " is not loaded. Loaded models: " Slog.w(TAG, soundModelId + " is not loaded. Loaded models: " + mLoadedModels.toString()); + mLoadedModels.toString()); sEventLogger.log(new SoundTriggerLogger.StringEvent("setParameter(): " sEventLogger.log(new SoundTriggerLogger.StringEvent("setParameter(): " Loading Loading @@ -810,7 +810,7 @@ public class SoundTriggerService extends SystemService { synchronized (mLock) { synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); if (soundModel == null) { if (soundModel == null) { Slog.e(TAG, soundModelId + " is not loaded"); Slog.w(TAG, soundModelId + " is not loaded"); sEventLogger.log(new SoundTriggerLogger.StringEvent("getParameter(): " sEventLogger.log(new SoundTriggerLogger.StringEvent("getParameter(): " + soundModelId + " is not loaded")); + soundModelId + " is not loaded")); Loading Loading @@ -841,7 +841,7 @@ public class SoundTriggerService extends SystemService { synchronized (mLock) { synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); if (soundModel == null) { if (soundModel == null) { Slog.e(TAG, soundModelId + " is not loaded"); Slog.w(TAG, soundModelId + " is not loaded"); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "queryParameter(): " "queryParameter(): " Loading Loading
services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerHelper.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -470,7 +470,7 @@ public class SoundTriggerHelper implements SoundTrigger.StatusListener { ModelData modelData = getKeyphraseModelDataLocked(keyphraseId); ModelData modelData = getKeyphraseModelDataLocked(keyphraseId); if (modelData == null || !modelData.isKeyphraseModel()) { if (modelData == null || !modelData.isKeyphraseModel()) { Slog.e(TAG, "No model exists for given keyphrase Id " + keyphraseId); Slog.w(TAG, "No model exists for given keyphrase Id " + keyphraseId); return STATUS_ERROR; return STATUS_ERROR; } } Loading
services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerService.java +16 −16 Original line number Original line Diff line number Diff line Loading @@ -142,7 +142,7 @@ public class SoundTriggerService extends SystemService { } } if (stat.mIsStarted) { if (stat.mIsStarted) { Slog.e(TAG, "error onStart(): Model " + id + " already started"); Slog.w(TAG, "error onStart(): Model " + id + " already started"); return; return; } } Loading @@ -154,12 +154,12 @@ public class SoundTriggerService extends SystemService { public synchronized void onStop(UUID id) { public synchronized void onStop(UUID id) { SoundModelStat stat = mModelStats.get(id); SoundModelStat stat = mModelStats.get(id); if (stat == null) { if (stat == null) { Slog.e(TAG, "error onStop(): Model " + id + " has no stats available"); Slog.w(TAG, "error onStop(): Model " + id + " has no stats available"); return; return; } } if (!stat.mIsStarted) { if (!stat.mIsStarted) { Slog.e(TAG, "error onStop(): Model " + id + " already stopped"); Slog.w(TAG, "error onStop(): Model " + id + " already stopped"); return; return; } } Loading Loading @@ -314,7 +314,7 @@ public class SoundTriggerService extends SystemService { GenericSoundModel model = getSoundModel(parcelUuid); GenericSoundModel model = getSoundModel(parcelUuid); if (model == null) { if (model == null) { Slog.e(TAG, "Null model in database for id: " + parcelUuid); Slog.w(TAG, "Null model in database for id: " + parcelUuid); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "startRecognition(): Null model in database for id: " + parcelUuid)); "startRecognition(): Null model in database for id: " + parcelUuid)); Loading Loading @@ -409,7 +409,7 @@ public class SoundTriggerService extends SystemService { try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { enforceCallingPermission(Manifest.permission.MANAGE_SOUND_TRIGGER); enforceCallingPermission(Manifest.permission.MANAGE_SOUND_TRIGGER); if (soundModel == null || soundModel.getUuid() == null) { if (soundModel == null || soundModel.getUuid() == null) { Slog.e(TAG, "Invalid sound model"); Slog.w(TAG, "Invalid sound model"); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "loadGenericSoundModel(): Invalid sound model")); "loadGenericSoundModel(): Invalid sound model")); Loading Loading @@ -445,7 +445,7 @@ public class SoundTriggerService extends SystemService { try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { enforceCallingPermission(Manifest.permission.MANAGE_SOUND_TRIGGER); enforceCallingPermission(Manifest.permission.MANAGE_SOUND_TRIGGER); if (soundModel == null || soundModel.getUuid() == null) { if (soundModel == null || soundModel.getUuid() == null) { Slog.e(TAG, "Invalid sound model"); Slog.w(TAG, "Invalid sound model"); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "loadKeyphraseSoundModel(): Invalid sound model")); "loadKeyphraseSoundModel(): Invalid sound model")); Loading @@ -453,7 +453,7 @@ public class SoundTriggerService extends SystemService { return STATUS_ERROR; return STATUS_ERROR; } } if (soundModel.getKeyphrases() == null || soundModel.getKeyphrases().length != 1) { if (soundModel.getKeyphrases() == null || soundModel.getKeyphrases().length != 1) { Slog.e(TAG, "Only one keyphrase per model is currently supported."); Slog.w(TAG, "Only one keyphrase per model is currently supported."); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "loadKeyphraseSoundModel(): Only one keyphrase per model" "loadKeyphraseSoundModel(): Only one keyphrase per model" Loading Loading @@ -513,7 +513,7 @@ public class SoundTriggerService extends SystemService { synchronized (mLock) { synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); if (soundModel == null) { if (soundModel == null) { Slog.e(TAG, soundModelId + " is not loaded"); Slog.w(TAG, soundModelId + " is not loaded"); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "startRecognitionForService():" + soundModelId + " is not loaded")); "startRecognitionForService():" + soundModelId + " is not loaded")); Loading @@ -525,7 +525,7 @@ public class SoundTriggerService extends SystemService { existingCallback = mCallbacks.get(soundModelId.getUuid()); existingCallback = mCallbacks.get(soundModelId.getUuid()); } } if (existingCallback != null) { if (existingCallback != null) { Slog.e(TAG, soundModelId + " is already running"); Slog.w(TAG, soundModelId + " is already running"); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "startRecognitionForService():" "startRecognitionForService():" Loading Loading @@ -580,7 +580,7 @@ public class SoundTriggerService extends SystemService { synchronized (mLock) { synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); if (soundModel == null) { if (soundModel == null) { Slog.e(TAG, soundModelId + " is not loaded"); Slog.w(TAG, soundModelId + " is not loaded"); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "stopRecognitionForService(): " + soundModelId "stopRecognitionForService(): " + soundModelId Loading @@ -593,7 +593,7 @@ public class SoundTriggerService extends SystemService { callback = mCallbacks.get(soundModelId.getUuid()); callback = mCallbacks.get(soundModelId.getUuid()); } } if (callback == null) { if (callback == null) { Slog.e(TAG, soundModelId + " is not running"); Slog.w(TAG, soundModelId + " is not running"); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "stopRecognitionForService(): " + soundModelId "stopRecognitionForService(): " + soundModelId Loading Loading @@ -648,7 +648,7 @@ public class SoundTriggerService extends SystemService { synchronized (mLock) { synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); if (soundModel == null) { if (soundModel == null) { Slog.e(TAG, soundModelId + " is not loaded"); Slog.w(TAG, soundModelId + " is not loaded"); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "unloadSoundModel(): " + soundModelId + " is not loaded")); "unloadSoundModel(): " + soundModelId + " is not loaded")); Loading Loading @@ -715,7 +715,7 @@ public class SoundTriggerService extends SystemService { synchronized (mLock) { synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); if (soundModel == null) { if (soundModel == null) { Slog.e(TAG, soundModelId + " is not loaded"); Slog.w(TAG, soundModelId + " is not loaded"); sEventLogger.log(new SoundTriggerLogger.StringEvent("getModelState(): " sEventLogger.log(new SoundTriggerLogger.StringEvent("getModelState(): " + soundModelId + " is not loaded")); + soundModelId + " is not loaded")); Loading Loading @@ -777,7 +777,7 @@ public class SoundTriggerService extends SystemService { synchronized (mLock) { synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); if (soundModel == null) { if (soundModel == null) { Slog.e(TAG, soundModelId + " is not loaded. Loaded models: " Slog.w(TAG, soundModelId + " is not loaded. Loaded models: " + mLoadedModels.toString()); + mLoadedModels.toString()); sEventLogger.log(new SoundTriggerLogger.StringEvent("setParameter(): " sEventLogger.log(new SoundTriggerLogger.StringEvent("setParameter(): " Loading Loading @@ -810,7 +810,7 @@ public class SoundTriggerService extends SystemService { synchronized (mLock) { synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); if (soundModel == null) { if (soundModel == null) { Slog.e(TAG, soundModelId + " is not loaded"); Slog.w(TAG, soundModelId + " is not loaded"); sEventLogger.log(new SoundTriggerLogger.StringEvent("getParameter(): " sEventLogger.log(new SoundTriggerLogger.StringEvent("getParameter(): " + soundModelId + " is not loaded")); + soundModelId + " is not loaded")); Loading Loading @@ -841,7 +841,7 @@ public class SoundTriggerService extends SystemService { synchronized (mLock) { synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); if (soundModel == null) { if (soundModel == null) { Slog.e(TAG, soundModelId + " is not loaded"); Slog.w(TAG, soundModelId + " is not loaded"); sEventLogger.log(new SoundTriggerLogger.StringEvent( sEventLogger.log(new SoundTriggerLogger.StringEvent( "queryParameter(): " "queryParameter(): " Loading