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

Commit 78a22682 authored by Nicholas Ambur's avatar Nicholas Ambur
Browse files

disable SoundTriggerService in safe mode

Bug: 150569186
Test: confirm `dumpsys voiceinteraction` shows no active service
&& confirm `dumpsys soundtrigger_middleware` shows no API calls.

Change-Id: I6b5879c662826e86a6f41f3c3aea444f0674f24c
parent 1e03bc05
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -207,7 +207,13 @@ public class SoundTriggerService extends SystemService {

    @Override
    public void onBootPhase(int phase) {
        if (PHASE_SYSTEM_SERVICES_READY == phase) {
        Slog.d(TAG, "onBootPhase: " + phase + " : " + isSafeMode());
        if (PHASE_DEVICE_SPECIFIC_SERVICES_READY == phase) {
            if (isSafeMode()) {
                Slog.w(TAG, "not enabling SoundTriggerService in safe mode");
                return;
            }

            initSoundTriggerHelper();
            mLocalSoundTriggerService.setSoundTriggerHelper(mSoundTriggerHelper);
        } else if (PHASE_THIRD_PARTY_APPS_CAN_START == phase) {