2528 Commits

Author SHA1 Message Date
Eric Laurent
0abcc5a0bb DO NOT MERGE - AudioManager: audio routing extensions
Added API and classes allowing framework components
to have direct control over audio routing and volumes.

Change-Id: I28225a6ebad86a7836e1ed749d93c0e964e215f1
2014-05-28 14:41:28 -07:00
Jean-Michel Trivi
1ad0192800 DO NOT MERGE temporary hide of AudioAttributes
Bug 15089989

Change-Id: I6077d4906d5624be4dd2b8a5c3378a04c848b6d8
2014-05-27 12:44:05 -07:00
John Spurlock
8600534df6 VolumeZen: combine ringer/notification volume and zen.
- Implement a new volume panel widget, combining volume and
  zen mode + conditions.
- Show zen mode + conditions when modifying ringer or notification
  streams.
- Host the volume panel widget in a dialog when being controlled
  by the audio service / volume keys.
- Remove support for multiple sliders in the volume panel.
- Remove support for separate ringer + notification volumes
  in the volume panel.
- Move volume panel resources up to SystemUI.
- Create a new combined Notifications quick settings tile.
- Host the volume panel widget in the quick settings panel under
  Notifications.
- When the quick settings detail panel is visible, route the volume
  keys to the embedded widget instead of showing a redundant dialog.
- Create common styles for quick settings text to be closer to spec.
- Update the framework resources for the ringer stream.
- Show the ringer icons in global actions.
- Add "until you turn this off" back as a separate zen condition.
- Disable time condition buttons when they are N/A.
- Don't allow volume changes to set ringer mode silent.

Bug:15186070
Change-Id: Id5e321dd1d5e7c4cf3917027ffbdf7e80d38b00d
2014-05-27 10:08:00 -04:00
Ruben Brunk
b6079005ed camera2: Move DngCreator to hardware/camera2.
Bug: 15091253
Change-Id: Ibe2ee376436e5c796e33c0b782ea68278589f2e6
2014-05-22 22:57:11 +00:00
RoboErik
02014c8faa Switch to using int stream instead of AudioAttributes
This is an alternate to the submitted API which doesn't use the new
AudioAttributes class and just takes the AudioManager.STREAM instead.

Change-Id: I0365bc6fb9196fc33852ba6b202ca553efe0cc85
2014-05-21 19:04:08 -07:00
RoboErik
33983a9011 Add stream/volume apis to sessions
This adds RemoteVolumeProviders which handle volume change
events and a way to switch a session between local stream
playback and remote playback handling.

This also adds a way for an app to specify the PendingIntent
to launch when we want to show their ongoing playback UI.

Change-Id: I3a72bf2ec7ca55f61f50859ddc2988eebd491e9d
2014-05-21 17:43:18 -07:00
RoboErik
5b53148a4e Merge changes I1cbdff1d,I23906b4c
* changes:
  Handle headsethook voice launching
  Add 5s timeout to wakelock
2014-05-21 19:59:11 +00:00
Glenn Kasten
486918b415 Update android.media.AudioTrack.getTimestamp API documentation
Change-Id: I0928c73c147ce843ae46565883da209b278fb3b4
2014-05-21 09:36:41 -07:00
John Spurlock
3346a80208 VolumeZen: SystemUI now hosts the volume dialog.
- Allow SystemUI to set the volume controller interface using
  a new binder call to audio service.
- Remove VolumePanel's dependency on AudioService.
- Host the base VolumePanel in the SystemUI process.

Change-Id: I095d5a1a579d42b68d0f81abb4087bd0c754b876
2014-05-21 09:58:41 -04:00
RoboErik
418c10ca9d Add 5s timeout to wakelock
Also filed a b/15110168 to anr the app if it doesn't finish with the
button event in 5s.

Change-Id: I23906b4c7f17d3d3a29eef92b523d8653c87017e
2014-05-20 14:57:46 -07:00
Eric Laurent
c0e439f1b7 Merge "AudioSystem: add new audio device definitions" 2014-05-20 21:39:23 +00:00
RoboErik
23a42810e3 Merge "Add getMediaSession to RCC" 2014-05-20 21:02:18 +00:00
RoboErik
5f31737c68 Add getMediaSession to RCC
This is to make integration with Media notifications easier.

Change-Id: I783ae5c2620ff0e11bf5584604b9c9623850e2f0
2014-05-20 14:00:53 -07:00
Eric Laurent
948d32748c AudioSystem: add new audio device definitions
Change-Id: Ib7675bc33771365b2dbb7694c522469317b11457
2014-05-19 18:43:49 -07:00
Rachad
c9550f2ce8 Merge "Add HEVC decoder support ot MediaCodec bug: 14571712" 2014-05-19 23:00:29 +00:00
RoboErik
b19c192654 Merge "Rename session classes to have media prefix, hide routes" 2014-05-19 19:29:06 +00:00
RoboErik
b4f4f69e4c Merge "Move media key processing to sessions" 2014-05-19 19:28:54 +00:00
Ruben Brunk
f967a5486a camera2: Plumb DngCreator to native library.
Change-Id: Ic58bf6cf5086808b503460ef8e451fc0d6f1f850
2014-05-16 23:25:51 -07:00
RoboErik
42ea7eecd1 Rename session classes to have media prefix, hide routes
This renames several of the core session classes to be prefixed
with Media. It also adds @hide to all route references for now.

Change-Id: Idb42897d490cf24626e4e93ca975b2cb93ec054c
2014-05-16 16:40:17 -07:00
Eric Laurent
bc11a696f6 AudioSystem: native to JAVA status translation
Regroup status code translation from native to JAVA in AudioSystem.
The same codes will be used by AudioTrack, AudioRecord, AudioManager
and defined in a single place in AudioSystem.

Change-Id: I7d3f39f30e3bb8e53f33f4408bcb0672df8af42b
2014-05-16 15:50:42 -07:00
RoboErik
8a2cfc309a Move media key processing to sessions
Send all media key events over to the MediaSessionService instead
of AudioManager. This does not affect volume handling yet, so it
is possible to get into a state where volume will be handled by
a different thing than media buttons. Except for corner cases
this shouldn't be noticable.

Change-Id: I00a576175d9c82937f0836e509b9a98d5cb77b83
2014-05-16 15:10:27 -07:00
Sungsoo Lim
07d5e7d5fa Merge "Implements TtmlRenderer." 2014-05-16 01:56:17 +00:00
Rachad
aca5de7ca1 Add HEVC decoder support ot MediaCodec
bug: 14571712

Change-Id: Ic65e1ffd7583f7286728332686dbb92090b5a413
2014-05-14 22:47:16 +00:00
RoboErik
4646d28882 Add UserRecords to separate user interactions
Each user record maintains the list of sessions and providers that
are running under that user. Lifecycle for providers has been modified
to stop discovery when the user is no longer current but keep the
binder connection open so long as there's a session that has selected
a route from that provider. When a user is stopped all providers on
that user will be unbound even if they were still in use.

Change-Id: Iadf1efded3415f7ecf384d3a73513883de9c86b0
2014-05-14 13:19:48 -07:00
Sungsoo Lim
ba3699b568 Implements TtmlRenderer.
Change-Id: I99772745c5c005ee1eefbc29187116f0c2820988
2014-05-14 21:28:14 +09:00
RoboErik
f33e99828f Merge "Make sessions aware of user id" 2014-05-12 21:20:49 +00:00
Jean-Michel Trivi
d60e875a97 Define audio attributes
AudioAttributes is a class to associate a collection of attributes
  describing information about an audio player.

Change-Id: I031aca1c79353abdfa0d7272c5dee0c2376c519a
2014-05-12 09:54:51 -07:00
Lajos Molnar
7c513b6bef Added MediaCodec.releaseOutputBuffer() method with render timestamp
Bug: 11784827
Change-Id: I67097c8e69b40ef3baa436f0e7731d28c696735c
2014-05-09 20:43:30 +00:00
Glenn Kasten
4b0c34600c Merge "Unhide AudioTrack support for ENCODING_PCM_FLOAT" 2014-05-09 17:42:04 +00:00
Glenn Kasten
7d60bcd2d9 Unhide AudioTrack support for ENCODING_PCM_FLOAT
Change-Id: I77423ff1845d0e05c117ab2a0b31699b32b871be
2014-05-08 16:39:19 -07:00
Eric Laurent
82af2b9e51 Merge "AudioService/WireAccessoryManager: change boot completion detection method" 2014-05-08 23:25:49 +00:00
Glenn Kasten
54955e33c8 Add hidden support for ENCODING_PCM_FLOAT to AudioTrack
Change-Id: I15e6d6ab34846366e7f5cbf948fd3cb327e72632
2014-05-08 16:11:42 -07:00
RoboErik
a5b0232920 Make sessions aware of user id
This tags all sessions with the user id that they were created for. It
also adds API for creating and querying sessions for a specific user.

This does not wrap providers per user yet which will be done in a
separate CL.

Change-Id: Icdaf701b0614a95301657998602c45208d548c27
2014-05-08 14:24:14 -07:00
Jean-Michel Trivi
8b520c8f8e Fix javadoc reference in AudioTrack write modes
Javadoc for blocking/non blocking write modes was referring
 to the old signature of one of the write methods.

Change-Id: Ie919e3e0a976b0c915dacd490ae66005703789a3
2014-05-08 17:01:40 +00:00
Jean-Michel Trivi
a713814f17 Unhide AudioTrack.write() method for non-blocking and ByteBuffer
Unhide the write mode constants.
Unhide the write method where data is stored in a ByteBuffer.

Bug 7919023

Change-Id: Ie9e24c744067f164d1a3e3363c7718b0a70e1cae
2014-05-07 12:10:06 -07:00
RoboErik
153187d05b Merge "Add a class for managing Session priority" 2014-05-07 17:26:28 +00:00
RoboErik
780bee2633 Merge "Add APIs for creating a system priority session and getting controllers" 2014-05-07 17:26:16 +00:00
RoboErik
a8f9514627 Add a class for managing Session priority
Priority is given first to the system priorty session, then to
active local sessions, then to active remote sessions, then to
the rest of the sessions. Ordering within categories is by whoever
last performed an action we associate with the user.

The stack has methods for getting filtered sets of this priority.

This also:
-Changes publish to setActive(boolean)
-Adds a flag for handling media buttons.
-Adds a flag for transport controls instead of enabling once.
-Unhides the setFlags API.
-Updates the legacy helper to use the flags.

Change-Id: I6ebeb27410de1b24149fd6e1785613ac444f0774
2014-05-06 17:26:06 -07:00
Glenn Kasten
313f59887b Add AudioFormat.ENCODING_PCM_FLOAT
Change-Id: I030d2c74224ac8573a4d30d980ae94fa4e280aeb
2014-05-06 17:24:26 -07:00
RoboErik
e7880d8eb1 Add APIs for creating a system priority session and getting controllers
This adds a hidden call to set flags and a flag for making a session an
exclusive high priority session. This will cause all media button events
to be sent to that session as long as it is stillr egistered. This
requires the MODIFY_PHONE_STATE permission like the old forCalls API.

This also adds a way to get controllers for all the ongoing sessions.
This is protected by the MEDIA_CONTENT_CONTROL permission like the
old RemoteController APIs.

Change-Id: I51540e8dcf3a7dbe02a0f8ee003821e40af653a3
2014-05-06 14:06:29 -07:00
Eric Laurent
4a5eeb9c72 AudioService/WireAccessoryManager: change boot completion detection method
BOOT_COMPLETED intent is not a reliable way for system services
to detect boot completion. The intent broadcast can be significantly
delayed and there is no guaranty that system services
receive it before apps.

Use a systemReady() method called by SystemServer instead.

Bug: 14323903.
Change-Id: I781596a3545e7a1e719799982347cbcd9a4c9009
2014-05-06 10:49:04 -07:00
Glenn Kasten
34a37bdebb Add AudioFormat.getBytesPerSample and use it
Change-Id: I90a40987ea99006af4a6e31136078c04976eb54d
2014-05-06 09:11:52 -07:00
RoboErik
4f854e0d0b Merge "Add playback state and metadata to dump" 2014-05-02 20:07:07 +00:00
Lajos Molnar
74b3cda9e0 Merge "MediaHTTPConnection: support header android-allow-cross-domain-redirect" 2014-05-02 18:02:45 +00:00
RoboErik
66dea73906 Add playback state and metadata to dump
Change-Id: I813ff23c496f75776c8bd63f78bbe87683b19bc0
2014-05-01 16:16:00 -07:00
RoboErik
cf43d9baab Fix sdk build
Missed a doc tag.

Change-Id: Ic02c5fe83a28055bde544434c7b9f3e0c7060191
2014-05-01 15:35:40 -07:00
Natalie Silvanovich
e872a2f69f Merge "Bounds Check in onPlaySoundEffect" 2014-05-01 22:03:58 +00:00
Natalie Silvanovich
559c76dbc3 Bounds Check in onPlaySoundEffect
Prevents system crash

Bug: 13514877
Change-Id: Id03561779611d9eb7402ff206fd877b39bb2f035
2014-05-01 14:36:44 -07:00
RoboErik
6e6a6e863d Merge "Add Session API calls to RCC and AudioManager" 2014-05-01 17:14:56 +00:00
RoboErik
f1372428f2 Add Session API calls to RCC and AudioManager
This makes RCC and MediaButtonReceiver (via AudioManager) also use the new Session APIs in parallel to their existing code. This will allow us to bring up the Session compatibility pieces without disrupting the old behavior and then switch everything over to just using the new APIs when ready.

Change-Id: I33ce0a044dea3ec763f2302b91a5e415be27d4a4
2014-05-01 17:14:01 +00:00