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

Commit cf2c2647 authored by Nicholas Ambur's avatar Nicholas Ambur
Browse files

fix return behavior of deleteKeyphraseSoundModel

When deleting an enrolled keyphrase sound model that is not actively
started, the model is never removed from the framework database, and an
incorrect value is returned.

Test: gts-tradefed run gts -m GtsAssistIntentTestCases \
-t com.google.android.assist.gts.KeyphraseModelManagerTest \
\#testUpdateAndRemoveKeyphraseSoundModel
Bug: 169628490

Change-Id: I469fe1fd05e386095ec646e1506fcb191b93c46f
parent 5d2e6c3c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1048,9 +1048,9 @@ public class VoiceInteractionManagerService extends SystemService {
                    if (unloadStatus != SoundTriggerInternal.STATUS_OK) {
                        Slog.w(TAG, "Unable to unload keyphrase sound model:" + unloadStatus);
                    }
                }
                deleted = mDbHelper.deleteKeyphraseSoundModel(keyphraseId, callingUserId,
                        bcp47Locale);
                }
                return deleted ? SoundTriggerInternal.STATUS_OK : SoundTriggerInternal.STATUS_ERROR;
            } finally {
                if (deleted) {