From dfa7c3b0dc623d6394b068ccd66b2fa7ddd6aa57 Mon Sep 17 00:00:00 2001 From: Chris Thornton Date: Thu, 30 Jun 2016 22:05:51 -0700 Subject: [PATCH] Updates to the sound trigger test app Moved the logic for talking to the system service into a service in the app - this now lets you close the activity and still be able to receive events. Additionally, we get CLI support using commands with the intent com.android.intent.action.MANAGE_SOUND_TRIGGER. Bug: 29073629 Change-Id: Ie904b73b4414f2c9fded013aeb5e6c6c3a67f5d3 --- tests/SoundTriggerTestApp/AndroidManifest.xml | 19 +- tests/SoundTriggerTestApp/res/layout/main.xml | 148 ++-- .../res/values/strings.xml | 9 +- .../SoundTriggerTestActivity.java | 329 ++++++++ .../soundtrigger/SoundTriggerTestService.java | 720 ++++++++++++++++++ .../test/soundtrigger/SoundTriggerUtil.java | 17 +- .../TestSoundTriggerActivity.java | 400 ---------- 7 files changed, 1157 insertions(+), 485 deletions(-) create mode 100644 tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerTestActivity.java create mode 100644 tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerTestService.java delete mode 100644 tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java diff --git a/tests/SoundTriggerTestApp/AndroidManifest.xml b/tests/SoundTriggerTestApp/AndroidManifest.xml index 71d6001c3a567..87f3e92b3a60d 100644 --- a/tests/SoundTriggerTestApp/AndroidManifest.xml +++ b/tests/SoundTriggerTestApp/AndroidManifest.xml @@ -1,25 +1,28 @@ - + + - + + + + + diff --git a/tests/SoundTriggerTestApp/res/layout/main.xml b/tests/SoundTriggerTestApp/res/layout/main.xml index 06949a0b63285..0fd8b12fafd7a 100644 --- a/tests/SoundTriggerTestApp/res/layout/main.xml +++ b/tests/SoundTriggerTestApp/res/layout/main.xml @@ -18,81 +18,107 @@ - + android:orientation="vertical"> -