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

Commit e909d94e authored by Arunesh Mishra's avatar Arunesh Mishra Committed by Android (Google) Code Review
Browse files

Merge "Fix moduleProperties in SoundTriggerInternal."

parents d7e4acba 55a9b008
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);