1870 Commits

Author SHA1 Message Date
Jeff Tinker
54cfbd6dc2 Implement async event callout from drm plugin to Java app
Change-Id: I451b7c6f766aafac39ce432a71ef5a03bffe29f1
2013-04-03 12:01:59 -07:00
Jeff Tinker
16b8cffb28 MediaDrm API update
Clarify offline usage of sessions and keys and implement
implement CryptoSession to support additional crypto use
cases.

Change-Id: Id3f8c706e9e3034b09af8e2a6a2f26bd74a49f93
2013-04-01 21:59:35 -07:00
Eric Laurent
5d3eb44a74 AudioService: rewrite sound effects loading
Handle all access to SoundPool in the message Handler to
synchronize load/unload and play requests.

Add a timeout to load operations in case a problem occurs while loading
a sample and the SoundPool callback is not called.

Bug 6633095

Change-Id: I39949e4c8b2f7ca2d8b760b1f92c7e0fcd0a46e1
2013-03-25 16:28:35 -07:00
Eric Laurent
7c566bf3e4 Merge "audio service: add config option for fixed volume" into jb-mr2-dev 2013-03-25 17:08:28 +00:00
Dianne Hackborn
961cae9254 New media button API.
This allows sending media buttons to any PendingIntent,
so they can be captured with a registered receiver.

Also add some new ViewTreeObserver APIs; this is all for
a new support library API to watch media buttons while an
app has input focus.

Change-Id: I3c51cef59460662b008c9a2cc87d6a6383c21855
2013-03-22 14:49:28 -07:00
Eric Laurent
83a017b6b7 audio service: add config option for fixed volume
Add a boolean configuration option config_useFixedVolume indicating if
stream volumes or master volume can be modified.
If the option is true, the AudioManager volume and mute APIs will be no ops and the
volumes will be maxed out.
To be consistent:
- the ringer mode is forced to normal and cannot be modified
- volume panel is never displayed
- volume settings are not available
- ringer mode global action is not displayed.

The default for this option if false.

This is useful for a class of devices intended for connection to a digital
audio output only, where the volume is directly controlled on the audio sink.

Bug 8161458

Change-Id: I2571d5ee79952ef0914d8fd1985816467a80adcd
2013-03-21 18:43:00 -07:00
Eric Laurent
fc7c9b484a Merge "audio service: allow touch sounds customization" into jb-mr2-dev 2013-03-21 00:05:08 +00:00
ztenghui
1e7298b250 Merge "Add the orientation hint to the MediaMuxer" into jb-mr2-dev 2013-03-20 20:53:01 +00:00
Eric Laurent
e78fced559 audio service: allow touch sounds customization
Added audio_assets.xml resource listing the
audio asset files for each touch sound effect.
This resource can be overlayed to customize the
touch sounds for a given device.

Bug 8339000

Change-Id: I8c156f0ce7f8769a58d77442fbd9c46b57c202e9
2013-03-20 10:38:07 -07:00
Jeff Tinker
d4a2118585 Merge "Implementing MediaDrm APIs" into jb-mr2-dev 2013-03-20 16:48:52 +00:00
ztenghui
effc9b4839 Add the orientation hint to the MediaMuxer
bug:7991013

Change-Id: I7e3e513851589e4ba7983d2c416152b2b08cbcfb
2013-03-19 13:10:25 -07:00
ztenghui
faf0e89ce3 Merge "Make release() behaves the same way as other part of media framework" into jb-mr2-dev 2013-03-15 18:41:34 +00:00
ztenghui
a83df76859 Make release() behaves the same way as other part of media framework
bug:7991013

Change-Id: Ib3efa94c0a6a599f71517f80fb7c3842d8d4e74f
2013-03-14 16:02:45 -07:00
Jean-Michel Trivi
a1cebc1f8a Merge "Fix race in media button intent registration" into jb-mr2-dev 2013-03-14 21:36:16 +00:00
Jean-Michel Trivi
eefee43964 Fix race in media button intent registration
AudioManager.registerMediaButtonEventReceiver maps to
  AudioService.registerMediaButtonIntent
AudioManager.registerRemoteControlClient maps to
  AudioService.registerRemoteControlClient
To use RemoteControlClient, an application needs to have
 first registered its button event receiver. Therefore
 registerMediaButtonEventReceiver() needs to have
 completed registration when returning, otherwise the
 RemoteControlClient registration can sometimes fail due
 to the lack of association between the button event
 receiver and the RemoteControlClient.

Bug 8315459

Change-Id: I82c196c3f21a65e38bad275085ed4f9ec0ec60dd
2013-03-14 14:30:25 -07:00
Jeff Tinker
8a0c80fdcc Implementing MediaDrm APIs
Change-Id: Ib6eeb9c04c5c5cf1d485f9004cd3e6a1047a1d19
2013-03-13 13:40:56 -07:00
Eric Laurent
f5a1fc3c0f audio service: fix regression in startBluetoothSco
Commit 2a57ca93 introduced a regression in startBluetoothSco()
where the calling pid was cleared before creating the entry for
the client app. The pid in the entry was always the system server pid
and the SCO client verification logic was broken preventing the activation
of the BT SCO connection.

Change-Id: I4e024b22fceb350f829ff0d8664703faeef7af48
2013-03-12 21:40:25 +00:00
Jean-Michel Trivi
7c8aeadd9a Merge "Support multiple IRemoteControlDisplay" into jb-mr2-dev 2013-03-12 16:40:22 +00:00
Eric Laurent
5ef14b259f Merge "audio service: fix BT SCO intent permission" into jb-mr2-dev 2013-03-11 22:40:48 +00:00
ztenghui
68ccf103a1 Java API for MediaMuxer
Implement the Java API for MediaMuxer.

bug:7991013

Change-Id: Ibf3aa256cc1d89f1c7636b74c9fb53073d173636
2013-03-11 12:30:56 -07:00
Jean-Michel Trivi
4a57005561 Support multiple IRemoteControlDisplay
Modify RemoteControlClient and AudioService to support multiple
 simulataneous IRemoteControlDisplay interfaces active at the
 same time.

Change-Id: I9f200a488afdd62a5e6957e64624d745e0f28149
2013-03-08 14:22:42 -08:00
Andy McFadden
01eaa2d545 Merge "Tweak comment." into jb-mr2-dev 2013-03-08 17:51:24 +00:00
Andy McFadden
47a2db4943 Tweak comment.
Change-Id: Ic99fefde512fa3a5b1fca2bc65cd37c8170e7f2c
2013-03-07 17:56:40 -08:00
Andy McFadden
dd3e75fa6b Merge "Publish new MediaCodec API" into jb-mr2-dev 2013-03-08 01:50:00 +00:00
Eric Laurent
2a57ca931f audio service: fix BT SCO intent permission
Clear calling identity before calling BluetoothHeadset
methods from binder call.
Also send BT SCO audio state intents from the
message handler, not from binder calls.

Bug 8242429

Change-Id: I742ba8dc47a258dbee6fb9d57db302f2bffaafd7
2013-03-07 17:29:27 -08:00
Andy McFadden
34f17dd1f6 Publish new MediaCodec API
Un-hide two new methods in MediaCodec, one new constant, and a new
EGL extension.

Bug 7991062
Bug 8191230

Change-Id: I028669132d9ffda1e4b34a561bab3997bbd7dae5
2013-03-07 14:20:46 -08:00
Jeff Brown
3afc18af2c Enhance MediaRouter API.
The support library MediaRouter implementation needs a couple
of extra generally useful APIs in the platform MediaRouter to ensure
that it can safely synchronize its state.

Change-Id: I72c5652e10f3b6de48800abfa922affbefbd250f
2013-03-07 13:26:40 -08:00
Andy McFadden
43abdc486d Merge "Implement Surface input to MediaCodec." into jb-mr2-dev 2013-03-05 17:39:29 +00:00
Marco Nelissen
daa95754a5 am 056c610c: am b6a2978a: Merge "Performance increase in thumbnail handling"
* commit '056c610c9ba83fbf68e15fa4557620dc7820f087':
  Performance increase in thumbnail handling
2013-03-05 05:40:40 +00:00
Marco Nelissen
b6a2978a51 Merge "Performance increase in thumbnail handling" 2013-03-05 00:06:33 +00:00
Dave Burke
c9b6be7c40 Add nullness check.
Bug: 8313121
Change-Id: Id2221e1c77eaf749ab4c4f6ec4cfa6684927c751
2013-03-04 15:20:42 -08:00
Andy McFadden
2621e40d0e Implement Surface input to MediaCodec.
Adds two new public methods to MediaCodec, and one new public
constant to MediaCodecInfo (currently @hidden).

Bug 7991062

Change-Id: I830a9794e92334ad05c870cc5fc90be4652147a5
2013-03-04 15:04:12 -08:00
Marco Nelissen
66dfcd465c When scanning a single file, take .nomedia into account
Make scanSingleFile behave the same way as scanMtpFile, by taking into
account whether there's a .nomedia file guarding the file being scanned.
Without this, downloaded (or otherwise explicitly scanned) images/video/music
will appear in Gallery and Music even if a .nomedia file is hiding them.

Change-Id: Ib9ad4bda1b9a942f79a37ccd8e6a54d57710f528
2013-02-27 16:53:47 -08:00
John Spurlock
aac753dcf8 DO NOT MERGE - Small documentation fix for AudioManager.java
Correct typo + copy-paste description issue.

Cherry-pick of CL Idce7cfeb7255d96aef91efc40d19f077dde3e9a5 from
master.

Change-Id: I1b6f378d58eafdd4a265672a12189273b41f72d6
2013-02-26 14:18:08 -05:00
Eino-Ville Talvala
788717ca59 Camera and MediaRecorder: Support AppOps
- Allow media processes to update AppOps state
- Pass package name to media services

Bug: 8181262
Change-Id: I115d39f0b306cb9eb7cd3d3e663c680b7322fd3f
2013-02-25 09:27:42 -08:00
Kunter Gultekin
e72409fe77 Adds vp8 profile and levels to MediaCodecInfo.
In line with ongoing effort of adding vpx encoder to
stagefright (https://android-review.googlesource.com/50893)
we need to add profile and level values for VP8.

VP8 profiles and levels are defined in OMX IL 1.1.2
extension headers, which is also being added here
https://android-review.googlesource.com/51272

This alters the public API.

Change-Id: I2bbb91c0b8b522b90c3cdfadaba0d18134800408
Signed-off-by: Kunter Gultekin <kuntergultekin@google.com>
related-to-bug: 8226783
2013-02-20 09:35:57 -08:00
Jeff Sharkey
c058a380de Open file:// Uris on client side of MediaPlayer.
Bug: 7962739
Change-Id: I674b437593fa083eb66ff3ca57b898cf9bd4a3e9
2013-02-19 15:10:41 -08:00
Jean-Michel Trivi
679d5046f2 Add support for querying whether the music stream is active remotely
Bug 7485803

Change-Id: I554b44bd35b017fa4030a0d89779066c96594f2b
2013-02-11 10:15:47 -08:00
Eric Laurent
78c2d8b356 Merge "AudioRecord: allow front + back mic capture" 2013-01-31 22:33:37 +00:00
Amith Yamasani
6d2def71e0 am c28fde57: am 0b515aec: am 3cfca67b: Merge "Fix possible integer overflow in MtpStorage"
# By Henrik Engström
# Via Android Git Automerger (2) and others
* commit 'c28fde57f0c7762913615b16d651d4e7991d6175':
  Fix possible integer overflow in MtpStorage
2013-01-28 10:33:55 -08:00
Amith Yamasani
0b515aece6 am 3cfca67b: Merge "Fix possible integer overflow in MtpStorage"
# By Henrik Engström
# Via Gerrit Code Review (1) and Henrik Baard (1)
* commit '3cfca67b0f1e3f464274fa5d3b2e31e5288d8f38':
  Fix possible integer overflow in MtpStorage
2013-01-28 10:28:38 -08:00
Eric Laurent
6809afe1c2 AudioRecord: allow front + back mic capture
Change-Id: Id75c9b420198092f5f5d255bd5512ec5a7a2c502
2013-01-17 17:43:35 -08:00
Dianne Hackborn
35654b61e8 More work on App Ops service.
Implemented reading and writing state to retain information
across boots, API to retrieve state from it, improved location
manager interaction to monitor both coarse and fine access
and only note operations when location data is being delivered
back to app (not when it is just registering to get the data at
some time in the future).

Also implement tracking of read/write ops on contacts and the
call log.  This involved tweaking the content provider protocol
to pass over the name of the calling package, and some
infrastructure in the ContentProvider transport to note incoming
calls with the app ops service.  The contacts provider and call
log provider turn this on for themselves.

This also implements some of the mechanics of being able to ignore
incoming provider calls...  all that is left are some new APIs for
the real content provider implementation to be involved with
providing the correct behavior for query() (return an empty
cursor with the right columns) and insert() (need to figure out
what URI to return).

Change-Id: I36ebbcd63dee58264a480f3d3786891ca7cbdb4c
2013-01-16 12:11:01 -08:00
Jean-Michel Trivi
26bf4d9020 Merge "Optimize media button stack traversal for remote volume" 2013-01-11 11:30:30 -08:00
Fabrice Di Meglio
9003007d35 Merge "Fix Volume icons for RTL languages" 2013-01-11 11:10:00 -08:00
Fabrice Di Meglio
8c02884c8c Fix Volume icons for RTL languages
- add mirrored version of the icons
- make VolumePanel respond to layout direction changes
- make AudioService propagate layout direction changes to the VolumePanel

Change-Id: Ibb884ab81641c319a9b7bea1381066f3f19581f0
2013-01-09 18:25:20 -08:00
Marco Nelissen
299942002b Fix media scan NPE
b/7966288

Change-Id: I066bc9f00bccf070332d87d6f1bf3d6054b31136
2013-01-09 09:46:54 -08:00
Henrik Engström
6393b07134 Fix possible integer overflow in MtpStorage
When converting the MB value MtpReserveSpace value to bytes there is a
possible integer overflow since 3 integer values are multiplied, even
though the result is stored in a long variable. This would be visible when
the value is more than 2 GB. This is solved by making the constants
longs instead of ints.

Change-Id: I799129f7076a6e331cece17b5c05aed210499648
2013-01-09 09:27:59 +01:00
Jean-Michel Trivi
5df0e6ad26 Optimize media button stack traversal for remote volume
Iterate over entries in the media button stack from the top
 for remote volume-related operations as the stack entry being
 looked for is more likely at the top of the stack.

Change-Id: Iaa2685ebb297d2184dd2c63498d7bd2b811ce744
2013-01-07 12:07:06 -08:00
Jean-Michel Trivi
a578c48e6c Use playback state to update remote control stack
The remote control stack in AudioService is responsible for handling
 which application receives media button events. When an application
 "registers" its media button receiver, it gets placed at the top
 of the remote control stack. If the app also has audio focus (is
 at top of focus stack), this will also cause the information of
 the attached remote control client (RCC) to be displayed on the
 lockscreen.
If an app doesn't re-register its button receiver when it wants
 to receive the button events, it might have lost its place at the
 top of the remote control stack, and would not show up in the
 lockscreen anymore.
This change consists in using the playstate reported by the RCC
 to change the remote control stack. If an RCC reports a "playing"
 state (e.g. playing, fast forwarding), it is safe to assume the
 application is actively being used, and should be the one that
 receives the transport control buttons. This CL uses the reported
 playstate to conditionally move the corresponding stack entry
 to the top of the stack.

Bug 7311023

Change-Id: I1505f01664c16e108b22d33e3f47f0056343676e
2013-01-02 12:31:56 -08:00