Merge "Fix moduleProperties in SoundTriggerInternal."

This commit is contained in:
Arunesh Mishra
2016-02-01 23:15:25 +00:00
committed by Android (Google) Code Review
3 changed files with 11 additions and 6 deletions

View File

@@ -298,6 +298,10 @@ public class SoundTriggerHelper implements SoundTrigger.StatusListener {
}
}
public ModuleProperties getModuleProperties() {
return moduleProperties;
}
//---- SoundTrigger.StatusListener methods
@Override
public void onRecognition(RecognitionEvent event) {

View File

@@ -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);
}

View File

@@ -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);