Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19610927 authored by Nicholas Ambur's avatar Nicholas Ambur Committed by Automerger Merge Worker
Browse files

Merge "fix calling SoundTriggerMiddleware in safeMode" into rvc-dev am: de1f2643

Change-Id: I96ce36d56ecf61737aa99e5bb9395d78a655f995
parents a48f2e72 de1f2643
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -346,14 +346,17 @@ public class SoundTriggerService extends SystemService {
            sEventLogger.log(new SoundTriggerLogger.StringEvent("deleteSoundModel(): id = "
                    + soundModelId));

            if (isInitialized()) {
                // Unload the model if it is loaded.
                mSoundTriggerHelper.unloadGenericSoundModel(soundModelId.getUuid());
            mDbHelper.deleteGenericSoundModel(soundModelId.getUuid());

            // Stop recognition if it is started.
                // Stop tracking recognition if it is started.
                mSoundModelStatTracker.onStop(soundModelId.getUuid());
            }

            mDbHelper.deleteGenericSoundModel(soundModelId.getUuid());
        }

        @Override
        public int loadGenericSoundModel(GenericSoundModel soundModel) {
            enforceCallingPermission(Manifest.permission.MANAGE_SOUND_TRIGGER);