History log of /frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a5fd0294c76c1faa3479a2093ae3e5f0838791ad 06-Mar-2018 Philip P. Moltmann <moltmann@google.com> Expose SoundTriggerManager and SoundTrigger APIs

These APIs require a system permissions, hence SystemAPI.

As SoundTrigger is now partially SystemApi and partially internal API a
lot of @hide tags are needed to keep hiding the still internal classes,
fields and methods. As SoundTrigger is heavily used via reflection no
structural change to this class can be made.

The MANAGE_SOUND_TRIGGER permission should be visible to the apps as
the apps need to know which permission to request in their manifest.
If it wouldn't be exposed it would just be a magic string.

Test: built
Change-Id: Ic93d67639e2605c26c961acdd827c14cb0a68f47
Bug: 73829108, 71981721
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
ea04e8fe75b6a369b487f0f9a1cc180f5227ca3c 03-Mar-2016 Ryan Bavetta <bavetta@google.com> Fix soundtrigger test, adds null pointer check

BUG:27461735
Change-Id: I95ea641e41bcaefce15004f508ddb4bed0b5f2a8
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
f47f173b06e2972bb376da8ff11db3a83c21d10b 19-Feb-2016 Arunesh Mishra <arunesh@google.com> Fix AlwaysOnHotwordDetector recognition event bug.

Parcelables don't work well with inheritance. So changed the
IRecognitionStatusCallback to have onKeyphraseDetected() and
onGenericSoundTriggerDetected() for those respective events.

Made corresponding changes to AlwaysOnHotwordDetector and SoundTriggerDetector.

Bug: 27250528
Change-Id: Ic08a431e7cc4248c688b05c865348170246de576
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
a772e5fc062c8de48cb9c1d61755110f6b2e189b 25-Jan-2016 Arunesh Mishra <arunesh@google.com> SoundTrigger API improvements.

This CL implements the SoundTrigger API improvements as given in b/22860713. Only the java-level
parts are implemented in this CL.

Key changes include:

* Addition of a SoundTriggerManager/SoundTriggerDetector system API to manage
the sound-trigger based sound models.
* Addition of a SoundTriggerService service that manages all sound models
including voice (keyphrase) and sound-trigger based models.
* Includes logic to write sound-trigger based models to the database.
* VoiceInteractionManager service now uses SoundTriggerService instead of
SoundTriggerHelper.

Bug: 22860713
Change-Id: I7b5c0ed80702527c4460372efeb5e542d3693a69
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
8ea56f68517ffa42bd5f43ab67f4ebfcfcb0cd23 07-Jul-2015 Lazar Trsic <Lazar.Trsic@imgtec.com> Replace hard-coded errno values with OsConstants

Errno values have been hard-coded inside java code. On the native side
however, bionic's errno.h is used (through utils/Errors.h). Some of
the numbers are architecture dependent (EOPNOTSUPP, ETIMEDOUT...).

This causes Camera app to crash on MIPS devices. There is a check for
expected errors, in CameraBinderDecorator.throwOnError, but the error
(EOPNOTSUPP) is not recognized and an exception is thrown.

Change-Id: I8bcac8f1ced50c76614f566a6e624967a18a25e1
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
45c00b5877e908f44853783b42deb437cfd30d94 17-Oct-2014 Sandeep Siddhartha <sansid@google.com> Don't unload the sound model on stopRecognition

This helps us in majority of the scenarios where the sound model doesn't
change across start/stop calls.

Bug: 17954633
Change-Id: Ibff817bb69bc69d2bb3a2603460fed596688b892
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
75b433f737c3f45ac111a13876c0fd450b0b94ec 13-Sep-2014 Eric Laurent <elaurent@google.com> SoundTrigger: fix KeyphraseRecognitionEvent parceling

Always include the Audioformat in the parcel if not
null.

Bug: 17489186.
Change-Id: I8bea031942b55078e5637959d5bf70961d134733
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
39fcca0a503658f91a14b4b1d35dfc4ac9fce9d9 06-Sep-2014 Eric Laurent <elaurent@google.com> SoundTrigger: fix capture format in recognition event

Also include capture format in recognition event
if capture is available for streaming. It was only
included if trigger was contained in event.

Bug: 17409062
Bug: 16731718
Change-Id: I5bf566e6bda57f23c870b4a1293e9b6d15d51e5a
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
d3b8223377b8046280e4c09e728edc600171f941 30-Jul-2014 Eric Laurent <elaurent@google.com> SoundTrigger API update.

Add sound model update callback.
Add native service state change callback.
Add vendor UUID in sound model description.
Add coarse confidence level in recognition event.
Add capture format in recognition event.

Bug: 12378680.

Change-Id: Id63437819ec7b9a4a69e1ff6185b747e20cad95e
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
2c0273e50a3162595e9a54030166f2369b039a5a 01-Aug-2014 Sandeep Siddhartha <sansid@google.com> Add a flag for multiple triggers with same recognition session

Also annotate the flags with @IntDef to make things clearer and safer

Add more debug logging

Revert to start/stop being synchronous since telephony and microphone will
need to be handled internally.

Bug: 16731586
Bug: 16514535
Bug: 16549061
Change-Id: I83695d52e9547269c95d443e4d921c9238b7401e
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
6817337118655d5792e36e954b123e6daa4174a6 28-Jul-2014 Sandeep Siddhartha <sansid@google.com> Read the keyphrase ID from the recognition event

Bug: 16516658
Change-Id: Ibeee81c9543aa1091bb075066cfc2269107f13c0
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
39c12fab49075b715c253c68c84b5c10c3150197 26-Jul-2014 Sandeep Siddhartha <sansid@google.com> Use blob (shared memory) for large data in sound model/recognition event/config

Also add a missing null check in writeBlob

Bug: 16516353
Change-Id: Ie702f8daae541cab7c2cee6e13d49e7fc84c84e1
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
110f569b47bc21fb38ec25b6110ee302ce137e06 20-Jul-2014 Sandeep Siddhartha <sansid@google.com> Fix synchronization issues in AlwaysOnHotwordDetector

- Remove unnecessary recognition status from AlwaysOnHotwordDetector

- Remove unnecessary recognition started callback from IRecognitionStatusCallback

- Fix a bug around the fact that we weren't picking up enrollment at runtime because
we were storing the availability at instantiation time.

- Handle 0-length arrays in SoundTrigger classes while parceling/unparceling

- Fix issue in SoundTrigger helper where we were not comparing binders for start/stop calls

- Unload the previous model when starting a new recognition

- Add more debug logging

Change-Id: Icc56d7f3dd1ffa49a8cfeea49080e3ab4d342c32
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
055897208d659e9734a82def88be4a806ff55448 18-Jul-2014 Sandeep Siddhartha <sansid@google.com> Move sound trigger calls to VoiceInteractionManagerService

- This ensures that any data being loaded on the DSP comes from the framework

Change-Id: Ie15f0994850ba8f298ca07c49fe0b89e066d9e2b
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
d7018200312e4e4dc3f67cf33dc90bf7ce585844 11-Jul-2014 Sandeep <sansid@google.com> Always on hotword changes

Add model management API skeleton to VoiceInteractionManagerService
Add an "interactor" for all always-on APIs

- The VoiceInteractionService will get an interactor for the given
keyphrase and locale.
- It can then check the availability and call methods to start and
stop recognition on this interactor.

- Add a common class to deal with SoundTrigger APIs

- Cleanup the keyphrase representation:
We now have separate representations for the keyphrase metadata and
a keyphrase being used for recognition.
This'll also help us to handle custom keyphrases in the
future easily.
This also ensures that for use within the framework,
we rely on the ID of the KeyphraseInfo rather than comparing the
text everytime.

Add a callback for the AlwaysOnHotwordDetector

This callback should be passed in by the VoiceInteractionService and is used to notify it
of recognition events.

Change-Id: I26252298773024f53a10cdd2af4404a4e6d74aae
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
013f66b92db609fceeff9c8171daca13d057cc95 07-Jul-2014 Eric Laurent <elaurent@google.com> SoundTrigger: update API

class Keyphrase: replaced number of users by list of user IDs.
class RecognitionEvent: added capture preamble duration.
class KeyphraseRecognitionEvent: add keyphrase ID and explicit list of
user ID/confidence level pairs.
startRecognition(): takes a RecognitionConfig specifying the list of
keyphrases to listen to as well as for each keyphrase the recognition mode,
users and min confidence levels for each user.

Bug: 12378680.
Change-Id: I57036cc83b5d9e90512b8bb3f951af3a4a74c0ce
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
d4233c68fc17f0909e9e36494db85a634f8e2665 13-Jun-2014 Sandeep Siddhartha <sansid@google.com> Initial code for listing/storing sound models

- We use a DB to store and persist the sound models.
- This'll be used by SoundTriggerModelManager, a service that lists,
deletes and registers new models. This'll be used by the enrollment
client to enroll and unenroll users.

- This needs the unique identifiers for sound model & keyphrases to be
present in the respective data structures

This is very early stage so please point out any concerns.

Change-Id: I82962895bf326167458f20e6ba995295551de025
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java
e48188ce35f613f64b513e5d8ce24fada1212d8e 19-Apr-2014 Eric Laurent <elaurent@google.com> Add SoundTrigger native service interface

Add JAVA framework interface for native sound trigger service.
The interface allows for:
- enumeration of sound trigger hardware modules and their properties
- load/unload sound models
- start, stop and receive recognition events on sound models.

Change-Id: I51542f38f5359ffbbf79d2cbd7c9ea1ee10c9c18
/frameworks/base/core/java/android/hardware/soundtrigger/SoundTrigger.java