2503 Commits

Author SHA1 Message Date
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
RoboErik
67e2196d07 Merge "Add dump to MediaSessionService" 2014-05-01 17:11:34 +00:00
Jean-Michel Trivi
18bfd887f6 Merge "Fix MediaFocusControl index management for PlayerRecord" 2014-04-30 23:58:02 +00:00
Jean-Michel Trivi
0d90876893 Fix MediaFocusControl index management for PlayerRecord
When updating the PlayerRecord stack on playstate changes and
 media button event receiver registrations, evaluate the index
 of the stack entry to remove against the index of the last playing
 entry as this index was valid before the entry was removed.
 This affects the insertion index.

Change-Id: Iec58d2df6bcbd8f55925e9e0f9d48f698f7cf4e5
2014-04-30 15:38:32 -07:00
Lajos Molnar
c446dc3274 MediaHTTPConnection: support header android-allow-cross-domain-redirect
If present and set to false, media http redirects across domains
will not be followed.  As long as domains are identical, redirects
across protocols or ports will still be followed.

Also fail more seriously if redirection fails or is not supported,
so that media client does not keep retrying the connection.

Bug: 12573548
Change-Id: Ifd2539ad3a90f669d43bd0e82845dbc8ae0b4a3e
2014-04-29 17:25:52 -07:00
RoboErik
a278ea7cec Add dump to MediaSessionService
Adds a dump implementation for debugging MediaSessionService. Also
fixes some synchronize calls that weren't using the same lock object.

Change-Id: I14343f853398749c8ce7ebf91f72729abc9132d9
2014-04-29 11:08:57 -07:00
Glenn Kasten
ecdc6fdb64 Merge "Add CHANNEL_OUT_QUAD_SIDE and CHANNEL_OUT_5POINT1_SIDE" 2014-04-29 16:14:43 +00:00
Elliott Hughes
10596fbcce resolved conflicts for merge of 3ce4f3d0 to master
Change-Id: Id5c5997ad8f801b32e1dbd97413ea42e38c27210
2014-04-28 13:53:25 -07:00
Elliott Hughes
3ce4f3d0af am 685a0a72: am bbd87eb9: Merge "Track libcore.os\' move to android.system."
* commit '685a0a72d445515167a2071330679cdf9b53a62d':
  Track libcore.os' move to android.system.
2014-04-28 18:36:53 +00:00
Elliott Hughes
34385d352d Track libcore.os' move to android.system.
(This is partial, but should cover everything in AOSP master except
for the zygote.)

Change-Id: I1042c99245765746a744c44e714095cb2c6cb75d
2014-04-28 11:11:32 -07:00
Marco Nelissen
c806d5393f am ebd6a2d2: am eded9e3b: am adcf38c9: Merge "Release DrmManagerClient resources"
* commit 'ebd6a2d2710ebf7196a399d6d5a2f0745844310b':
  Release DrmManagerClient resources
2014-04-25 14:55:11 +00:00
Marco Nelissen
ebd6a2d271 am eded9e3b: am adcf38c9: Merge "Release DrmManagerClient resources"
* commit 'eded9e3b7f6f30526365461a25624b841611af28':
  Release DrmManagerClient resources
2014-04-25 14:52:18 +00:00
Ruben Brunk
87cfaca476 Merge "camera2: Add DNG creator class." 2014-04-25 01:10:08 +00:00
Ruben Brunk
ab6c9f75ff camera2: Add DNG creator class.
Change-Id: I11a0e5990adeca6012778f0dc71a421b85cbf53a
2014-04-24 16:18:47 -07:00
Lajos Molnar
f74de0b6f3 Merge "Remove VideoEditor" 2014-04-22 18:37:50 +00:00
Jean-Michel Trivi
1990fe4e96 PlayerRecord: remove obsolete accessors
Change-Id: I0a7789e28c1427b6e9f770368f9bab9c097b3594
2014-04-22 18:05:03 +00:00
Jean-Michel Trivi
0456e3aab1 Merge "MediaFocusControl: priority to playing players for media button" 2014-04-22 17:36:10 +00:00
Jean-Michel Trivi
8be88d1144 MediaFocusControl: priority to playing players for media button
When registering a media button event receiver (through
 AudioManager.registerMediaButtonEventReceiver()), do not
 always push the receiver to the top of the stack of event
 receivers:
 - only push to the top if the associated RemoteControlClient
   is in a playing state
 - otherwise push it below the entries at the top of the stack
   that are in a playing state
When changing the playstate of a RemoteControlClient:
 - push to the top of the stack the corresponding PlayerRecord
   is the state is a playing state
 - otherwise push it below the entries at the top of the stack
   that are in a playing state

When AudioService starts (e.g. after boot) and the last media
 button receiver is restored, it goes in the stack.
After this CL, this entry is not "orphaned" anymore after the
 same application registers itself to receive media buttons:
 the entry from the restoration is now properly associated with
 the registration from the application.

Bug 10749554

Change-Id: I985f9cc17b64a60ed4f2f2f6d03e117fb4e27570
2014-04-22 09:46:59 -07:00
Lajos Molnar
e0e77cb5bb Remove VideoEditor
remove android.media.videoeditor.*

No longer supported and should not be used.

Bug: 13542518
Change-Id: I12de122443f0289ab1dfdd8b553e572a830cf412
2014-04-21 16:11:51 -07:00
Simon Wilson
3e2cb07d52 am ef059b03: am 3c8bbe24: Check that mRemotePlayer is not null before use
* commit 'ef059b039407610fa00e6463b8354cbcc21b6ee9':
  Check that mRemotePlayer is not null before use
2014-04-17 22:59:55 +00:00
RoboErik
07c7077c54 Add RouteProviders to the new Media APIs
Compiles and works with OneMedia. This currently is a rough test of
the system for finding, connecting to, and sending messages to routes.
This will just connect to the first route it finds when a request to
open the route picker is made (and disconnect when another request is
made).

Change-Id: I5de5521a079471b9e02664be4654c0591dfd9a6d
2014-04-17 15:02:33 -07:00
Simon Wilson
ef059b0394 am 3c8bbe24: Check that mRemotePlayer is not null before use
* commit '3c8bbe245e7b0f937c36620c1427726fe9de50a6':
  Check that mRemotePlayer is not null before use
2014-04-17 21:33:44 +00:00
Simon Wilson
3c8bbe245e Check that mRemotePlayer is not null before use
Bug: 14138829
Change-Id: Ie7ddb54ef3b82b9566ac41d4f0ff335976d3c907
2014-04-17 14:16:52 -07:00
Lajos Molnar
72bbe6cca6 media: don't rely on Java 6 parseInt error on leading '+' sign
Also add revision of draft that was used for the implementation.

Related-bug: 5239391
Change-Id: I48c25a6af6a5a1bca83876b97f205c5cef9ebd09
2014-04-16 12:08:23 -07:00
Glenn Kasten
f8d5e7af74 Add CHANNEL_OUT_QUAD_SIDE and CHANNEL_OUT_5POINT1_SIDE
Change-Id: I6d5ff001ee55399a67380a4f63b037f367b93b1f
2014-04-15 10:48:23 -07:00
Mattias Nilsson
1b37c3bddc Release DrmManagerClient resources
Call release for DrmManagerClient to avoid resource leaks

Introduced by following commit (5d143ad4a8f...),
"Media scanner support for FL(Forward Lock) DRM file types"

Change-Id: Ic3c458579f4e99b3b072a2e13362d1996b982589
2014-04-15 14:03:45 +09:00