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

Commit baa22c7a authored by mike dooley's avatar mike dooley Committed by Michael Dooley
Browse files

Limit GetModelState API to generic sound models (ie music detector)

This limitation is being added to increase privacy protection.

Bug: 70619678
Bug: 117213117
Test: built android
Change-Id: Ic6ceed60a9687204fc7bf440becaa344a42d8e74
parent a7423ca9
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -558,18 +558,15 @@ public class SoundTriggerService extends SystemService {
                    return ret;
                }
                switch (soundModel.type) {
                    case SoundModel.TYPE_KEYPHRASE:
                        ret = mSoundTriggerHelper.getKeyphraseModelState(soundModel.uuid);
                        break;
                    case SoundModel.TYPE_GENERIC_SOUND:
                        ret = mSoundTriggerHelper.getGenericModelState(soundModel.uuid);
                        break;
                    default:
                        Slog.e(TAG, "Unknown model type");

                        // SoundModel.TYPE_KEYPHRASE is not supported to increase privacy.
                        Slog.e(TAG, "Unsupported model type, " + soundModel.type);
                        sEventLogger.log(new SoundTriggerLogger.StringEvent(
                                "getModelState(): Unknown model type"));

                                "getModelState(): Unsupported model type, "
                                + soundModel.type));
                        break;
                }