summaryrefslogtreecommitdiff
path: root/tests/SoundTriggerTestApp
diff options
context:
space:
mode:
authorArunesh Mishra <arunesh@google.com>2016-01-27 13:29:12 -0800
committerArunesh Mishra <arunesh@google.com>2016-01-27 13:37:27 -0800
commitc722ec4105f7a4733a22fb9004e784347ee36663 (patch)
tree2461f5dc1a138a73ac84d41c5369362177ff379d /tests/SoundTriggerTestApp
parenta0d65dc0db93c63e1a1dd19ca0bfff6f1fef14a9 (diff)
Fix SoundTriggerModel uses to GenericSoundModel.
Change-Id: I30308b39536864d7b9640367861730e3b1b12129
Diffstat (limited to 'tests/SoundTriggerTestApp')
-rw-r--r--tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerUtil.java10
-rw-r--r--tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java10
2 files changed, 10 insertions, 10 deletions
diff --git a/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerUtil.java b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerUtil.java
index 98713bd2c6f9..4702835eae43 100644
--- a/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerUtil.java
+++ b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerUtil.java
@@ -19,7 +19,7 @@ package com.android.test.soundtrigger;
import android.annotation.Nullable;
import android.content.Context;
import android.hardware.soundtrigger.SoundTrigger;
-import android.hardware.soundtrigger.SoundTrigger.SoundTriggerModel;
+import android.hardware.soundtrigger.SoundTrigger.GenericSoundModel;
import android.media.soundtrigger.SoundTriggerManager;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -54,7 +54,7 @@ public class SoundTriggerUtil {
*
* @param soundModel The sound model to add/update.
*/
- public boolean addOrUpdateSoundModel(SoundTriggerModel soundModel) {
+ public boolean addOrUpdateSoundModel(GenericSoundModel soundModel) {
try {
mSoundTriggerService.updateSoundModel(soundModel);
} catch (RemoteException e) {
@@ -71,14 +71,14 @@ public class SoundTriggerUtil {
* Gets the sound model for the given keyphrase, null if none exists.
* If a sound model for a given keyphrase exists, and it needs to be updated,
* it should be obtained using this method, updated and then passed in to
- * {@link #addOrUpdateSoundModel(SoundTriggerModel)} without changing the IDs.
+ * {@link #addOrUpdateSoundModel(GenericSoundModel)} without changing the IDs.
*
* @param modelId The model ID to look-up the sound model for.
* @return The sound model if one was found, null otherwise.
*/
@Nullable
- public SoundTriggerModel getSoundModel(UUID modelId) {
- SoundTriggerModel model = null;
+ public GenericSoundModel getSoundModel(UUID modelId) {
+ GenericSoundModel model = null;
try {
model = mSoundTriggerService.getSoundModel(new ParcelUuid(modelId));
} catch (RemoteException e) {
diff --git a/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java
index 82890c1717c4..966179b8dbd5 100644
--- a/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java
+++ b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java
@@ -21,7 +21,7 @@ import java.util.UUID;
import android.app.Activity;
import android.hardware.soundtrigger.SoundTrigger;
-import android.hardware.soundtrigger.SoundTrigger.SoundTriggerModel;
+import android.hardware.soundtrigger.SoundTrigger.GenericSoundModel;
import android.media.soundtrigger.SoundTriggerManager;
import android.os.Bundle;
import android.os.UserManager;
@@ -56,7 +56,7 @@ public class TestSoundTriggerActivity extends Activity {
// Generate a fake model to push.
byte[] data = new byte[1024];
mRandom.nextBytes(data);
- SoundTriggerModel model = new SoundTriggerModel(mModelUuid, mVendorUuid, data);
+ GenericSoundModel model = new GenericSoundModel(mModelUuid, mVendorUuid, data);
boolean status = mSoundTriggerUtil.addOrUpdateSoundModel(model);
if (status) {
@@ -78,7 +78,7 @@ public class TestSoundTriggerActivity extends Activity {
* Clears the enrollment information for the user.
*/
public void onUnEnrollButtonClicked(View v) {
- SoundTriggerModel soundModel = mSoundTriggerUtil.getSoundModel(mModelUuid);
+ GenericSoundModel soundModel = mSoundTriggerUtil.getSoundModel(mModelUuid);
if (soundModel == null) {
Toast.makeText(this, "Sound model not found!!!", Toast.LENGTH_SHORT).show();
return;
@@ -99,7 +99,7 @@ public class TestSoundTriggerActivity extends Activity {
* Uses the previously enrolled sound model and makes changes to it before pushing it back.
*/
public void onReEnrollButtonClicked(View v) {
- SoundTriggerModel soundModel = mSoundTriggerUtil.getSoundModel(mModelUuid);
+ GenericSoundModel soundModel = mSoundTriggerUtil.getSoundModel(mModelUuid);
if (soundModel == null) {
Toast.makeText(this, "Sound model not found!!!", Toast.LENGTH_SHORT).show();
return;
@@ -107,7 +107,7 @@ public class TestSoundTriggerActivity extends Activity {
// Generate a fake model to push.
byte[] data = new byte[2048];
mRandom.nextBytes(data);
- SoundTriggerModel updated = new SoundTriggerModel(soundModel.uuid,
+ GenericSoundModel updated = new GenericSoundModel(soundModel.uuid,
soundModel.vendorUuid, data);
boolean status = mSoundTriggerUtil.addOrUpdateSoundModel(updated);
if (status) {