Add support for audio-focused notifications.
This is the compat "twin" to c/1702766 which added the
same features to Android O's Notification and RemoteInput classes.
Add extras keys and methos to Notification and RemoteInput for notifications
whose contents have an audio representation and whose RemoteInputs
can accept data as well (useful for, e.g., voice messaging
applications).
The motivator for this change is it enables an end-to-end flow for
audio messaging including
* System receives the audio message
* Replying to the message with the user's voice
* App receives the audio reply data
Note that this CL just adds the capabilities, but does not
add any UI or implementation to perform the above flow.
Note that this CL includes a workaround to a bug in
RemoteInput#addResultsToIntent for versions prior to SDK 26.
You can see that workaround in
RemoteInputCompatApi20#addResultsToIntent.
Test: Added in this CL
Change-Id: I5be31a8cfbbe44ba19657ccd57821d5855c9c8af
12 files changed