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

Commit 55a9b008 authored by Arunesh Mishra's avatar Arunesh Mishra
Browse files

Fix moduleProperties in SoundTriggerInternal.

Change-Id: Ie7ea74ca39894f78875768dbc3e504b32f262fe6
parent a8b42780
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -298,6 +298,10 @@ public class SoundTriggerHelper implements SoundTrigger.StatusListener {
        }
    }

    public ModuleProperties getModuleProperties() {
        return moduleProperties;
    }

    //---- SoundTrigger.StatusListener methods
    @Override
    public void onRecognition(RecognitionEvent event) {
+1 −6
Original line number Diff line number Diff line
@@ -44,9 +44,6 @@ public abstract class SoundTriggerInternal {
    public static final int STATUS_ERROR = SoundTrigger.STATUS_ERROR;
    public static final int STATUS_OK = SoundTrigger.STATUS_OK;

    /** The {@link ModuleProperties} for the system, or null if none exists. */
    private ModuleProperties moduleProperties;

    /**
     * Starts recognition for the given keyphraseId.
     *
@@ -76,9 +73,7 @@ public abstract class SoundTriggerInternal {
     */
    public abstract void stopAllRecognitions();

    public ModuleProperties getModuleProperties() {
        return moduleProperties;
    }
    public abstract ModuleProperties getModuleProperties();

    public abstract void dump(FileDescriptor fd, PrintWriter pw, String[] args);
}
+6 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.hardware.soundtrigger.IRecognitionStatusCallback;
import android.hardware.soundtrigger.SoundTrigger;
import android.hardware.soundtrigger.SoundTrigger.GenericSoundModel;
import android.hardware.soundtrigger.SoundTrigger.KeyphraseSoundModel;
import android.hardware.soundtrigger.SoundTrigger.ModuleProperties;
import android.hardware.soundtrigger.SoundTrigger.RecognitionConfig;
import android.os.Parcel;
import android.os.ParcelUuid;
@@ -179,6 +180,11 @@ public class SoundTriggerService extends SystemService {
            mSoundTriggerHelper.stopAllRecognitions();
        }

        @Override
        public ModuleProperties getModuleProperties() {
            return mSoundTriggerHelper.getModuleProperties();
        }

        @Override
        public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
            mSoundTriggerHelper.dump(fd, pw, args);