2454 Commits

Author SHA1 Message Date
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
Paul McLean
fd7d31087b Merge "Implement USB Audio across Nexus Devices Fix issues with connecting non-audio USB devices." 2014-04-11 21:18:51 +00:00
Paul McLean
d1d7c49160 Merge "Revert "Revert "Initial implementation of USB Audio output.""" 2014-04-11 21:18:35 +00:00
Paul McLean
df3614693d Implement USB Audio across Nexus Devices
Fix issues with connecting non-audio USB devices.

https://b.corp.google.com/issue?id=13745966
https://b.corp.google.com/issue?id=8281454
https://b.corp.google.com/issue?id=13751080
https://b.corp.google.com/issue?id=4643412

Change-Id: I1186f69a6c5f50279a1225a77fb5d4f7a8eda3cb
2014-04-11 12:18:44 -07:00
Elliott Hughes
f873e7858c am c2bd3687: am 70bba904: am b093e485: Merge "generateProjectThumbnail can fail to close output stream"
* commit 'c2bd3687dc381e10b45ab938e088dab6d824fa84':
  generateProjectThumbnail can fail to close output stream
2014-04-11 17:48:11 +00:00
Elliott Hughes
c2bd3687dc am 70bba904: am b093e485: Merge "generateProjectThumbnail can fail to close output stream"
* commit '70bba904fc50f44cb4a695cf76e423534c835cf6':
  generateProjectThumbnail can fail to close output stream
2014-04-11 17:44:51 +00:00
Elliott Hughes
b093e485bb Merge "generateProjectThumbnail can fail to close output stream" 2014-04-11 17:37:54 +00:00
Jean-Michel Trivi
f51e113469 MediaFocusControl: fix comment
Comment about role of audio focus isn't valid anymore.

Change-Id: I608d8cf9d5d9c4449384e2788e5eb5ea42c97eca
2014-04-10 15:05:44 -07:00
Paul McLean
c837a45194 Revert "Revert "Initial implementation of USB Audio output.""
This reverts commit f2f80c09b668176b3b1e619457ae628432636507.
2014-04-09 09:04:43 -07:00
Jean-Michel Trivi
b416838051 Audio focus doesn't affect RemoteController
The top of the stack of PlayerRecord instances is the "promoted"
 instance whose RemoteControlClient information is available
 to RemoteController objects, only when it also has audio focus.

This change removes the condition on audio focus ownership:
- whenever the player record stack ordering changes, no need to
  check if it also has audio focus
- since the player record and audio focus stacks operate separately,
  there is no need to synchronize access to both stacks.

Change-Id: I668f2aa2950f19f8c2a30bc59c7352246edcc56e
2014-04-08 16:35:54 -07:00
Eric Laurent
f2f80c09b6 Revert "Initial implementation of USB Audio output."
This reverts commit 3af0fe0c9df2fc1e0a4d6bcd827a4d7aa28dbdeb
while investigating issues 13751080 and 13883978.

Bug: 13751080.
2014-04-07 18:01:29 -07:00
Glenn Kasten
b951af64eb Merge "Simplify and document AudioTrack gain" 2014-04-04 15:31:10 +00:00
Jeff Tinker
9de8c1d82b resolved conflicts for merge of 4f342e87 to master
Change-Id: I2cdb238759beb49fede2de703df8defee92d316f
2014-04-03 11:51:37 -07:00
Glenn Kasten
78cbd451fd Simplify and document AudioTrack gain
also deprecate setStereoVolume

Bug: 12534920
Change-Id: I009ab91c5b73b93fbd961691e5764744ce37cae6
2014-04-03 17:45:29 +00:00
Jeff Tinker
65c94e6959 Add signature|system permission to MediaDrm signer APIs
Also addresses style issues noted in post-submit review from
https://googleplex-android-review.git.corp.google.com/#/c/439054/

Change-Id: If177b11dbcc049bc271529c119bc5c36ae0107b5
related-to-bug: 12702350
2014-04-02 16:43:10 -07:00
Jeff Tinker
53c90cf916 am 6dc8063d: am 433a0633: Merge "Support CAST V2 Authentication in MediaDrm" into klp-modular-dev
* commit '6dc8063d2a06017f249181b4b5b07c54ce645943':
  Support CAST V2 Authentication in MediaDrm
2014-04-01 22:23:21 +00:00
Jeff Tinker
e4095a80b6 Support CAST V2 Authentication in MediaDrm
Java API version

Update frameworks to enable support for CAST
V2 Authentication in the DRM Plugin.

Change-Id: I23cfbbbc89c1226b7a3968ce8bc1e2d4bd41014a
related-to-bug: 12702350
2014-04-01 14:25:35 -07:00
Glenn Kasten
5c2f20394e Merge "Don't ignore return value of setAuxEffectSendLevel()" 2014-04-01 17:49:39 +00:00
Glenn Kasten
3009f0b911 Don't ignore return value of setAuxEffectSendLevel()
Change-Id: I1383c913304430146e6f40d89df623dd0d582e50
2014-04-01 09:46:03 -07:00
Paul McLean
6f127c9b6c Merge "Initial implementation of USB Audio output." 2014-04-01 16:15:47 +00:00
Paul McLean
3af0fe0c9d Initial implementation of USB Audio output.
Change-Id: I7fbbe421285d628fa49591c6469ac50efec77ccf
2014-03-31 16:41:33 -07:00
Glenn Kasten
877ffde5f6 Merge "Synchronize channel masks in AudioFormat with system/audio.h" 2014-03-31 17:58:36 +00:00
Glenn Kasten
167d1a2771 Fix typo
Change-Id: I7c2fb560b8d8778afad237aadd97e8e94dd865e7
2014-03-28 15:22:11 -07:00
Glenn Kasten
c806050a07 Synchronize channel masks in AudioFormat with system/audio.h
AudioFormat channel mask comments

Change-Id: I8b43cb58cd9d3a33bf02aa0455bbfc16ed29f9ae
2014-03-28 15:16:50 -07:00
Marco Nelissen
1632fae376 Make setServer() safe to call multiple times
This makes it safe to call setServer() multiple times with the same
server, different servers, or null.

b/13622801

Change-Id: Id04440df720f830e67106eb543653ace42430d97
2014-03-27 13:25:14 -07:00
Jean-Michel Trivi
dda1c4040c Continue refactoring MediaFocusControl
Rename MediaController to PlayerRecord.

Change-Id: Icf474b4107649f501341309bf7ec520aa1e71586
2014-03-25 17:25:25 -07:00
Jean-Michel Trivi
7d3168cef2 Continue refactoring of MediaFocusControl
Move RemoteControlClient death handler and remote playback state
 inside MediaController class.
Make MediaController data fields private. Document which accessors
 can be removed once the audio focus and media button receiver
 mechanisms are dissociated.

Change-Id: Icd14fb0d99bf74512c8f8552d124c0353ce1f06d
2014-03-25 16:27:23 -07:00
Jean-Michel Trivi
223fd631f6 Continue refactoring of MediaFocusControl
Close external access to MediaFocusControl event handler.

Change-Id: Id82718399806c246b5ac2cb3b49189286dcd8e89
2014-03-25 12:43:58 -07:00
Jean-Michel Trivi
de23f56360 Begin refactor of MediaFocusControl
Extract class that handles each entry in the remote control stack
  and move it to another file, MediaController.java.
Rename RemoteControlStackEntry to MediaController as each instance
  will not just encapsulate information about the corresponding
  (if any) RemoteControlClient.
This is just a CL for the renaming and extraction into a new file
  of existing code. Obvious required changes are labelled "FIXME".

Change-Id: Ifbdac1d70e4d279ab175eef03e9d792d44873c51
2014-03-25 10:47:58 -07:00
Jean-Michel Trivi
e10dd634e1 Merge "AudioTrack write from ByteBuffer updates position" 2014-03-21 16:49:55 +00:00
Jean-Michel Trivi
5d21f679c5 AudioTrack write from ByteBuffer updates position
Remove offset parameter.
Update buffer position when data is successfully written.

Bug 7919023

Change-Id: I1701532ef0a91e2ccecfc38b24de29bc4f64d035
2014-03-21 09:24:26 -07:00
Colin Cross
5e8ff02ec9 MediaHTTPConnection: use jlong to store native pointer
Change-Id: Ic4f391a8e658498e63c26ea2af4c7413ed387360
2014-03-19 17:28:42 -07:00
Lajos Molnar
e128ca437a am 0dc08486: am f7b33e86: Merge "MediaPlayer: fix int overflow issue in MediaTimeProvider" into klp-dev
* commit '0dc084865313a416246915c72b29c13cc3f404d4':
  MediaPlayer: fix int overflow issue in MediaTimeProvider
2014-03-19 20:52:03 +00:00
John Spurlock
1af30c7ac4 Add stream-level suppression to vibrate/audio services.
- Add new audio restriction layer to app-ops.  Restrictions add
additional constraints to audio operations at a stream-level.
Restrictions do not affect the persistable state, and are purely
additive: that is, they can only impose additional contstraints, not
enable something that has already been disabled.  Restrictions
also support a whitelisted set of exempt package names.

- Add new audio stream-level checks to app-ops.

- Implement a provisional OP_PLAY_AUDIO suppression to three
java entry points MediaPlayer, AudioTrack, & SoundPool.

- Enhance vibrator api to take stream information as an optional
hint - the constants correspond to AudioManager stream types.
OP_VIBRATE now supports the stream-level restriction check.

- Simplify Vibrator subclasses by adding default implementations
for two .vibrate calls.

- Migrate NoMan's zen-mode control to use the new app-ops
stream-level restriction mechanism.

Change-Id: Ifae8952647202f728cf1c73e881452660c704678
2014-03-19 15:32:51 -04:00
Lajos Molnar
0cab07d788 MediaPlayer: fix int overflow issue in MediaTimeProvider
Bug: 13394783
Change-Id: I228ded5cf198852fda867d136cd8b1aacd8b6584
2014-03-19 11:35:17 -07:00
Marco Nelissen
203a6ddb0c am 105c4792: am 10a07a04: Merge "Verify certificates" into klp-dev
* commit '105c47924f7af9319ec9242b952b4bf074585229':
  Verify certificates
2014-03-14 22:55:50 +00:00
Marco Nelissen
10a07a043f Merge "Verify certificates" into klp-dev 2014-03-14 22:27:23 +00:00
Zhihai Xu
57080be98e am bdd4c31a: am 60d7c995: Merge "DO NOT MERGE setAvrcpAbsoluteVolume is passed wrong unit parameter from AudioManager" into klp-dev
* commit 'bdd4c31a22b9a5395e9d727e9f39ce1dc689c0a7':
  DO NOT MERGE setAvrcpAbsoluteVolume is passed wrong unit parameter from AudioManager
2014-03-14 15:56:47 +00:00
Mike Lockwood
92b53bc2dd MTP: Add support for some audio specific object properties
This stops Windows 7 from putting up the
"Your device might not be able to play or view this file" dialog
when copying MP3 files to the device.

Bug: 3195286
Change-Id: Ic5b3fb75309893caae1a4f4b56068a543847f1f7
2014-03-13 15:15:26 -07:00
Marco Nelissen
7e435a011d Verify certificates
b/13418320

Change-Id: I39c81b1557a16c7a4666a4531a398efa91dcb00c
2014-03-13 14:18:59 -07:00
Zhihai Xu
7fb580ea4d DO NOT MERGE setAvrcpAbsoluteVolume is passed wrong unit parameter from AudioManager
setAvrcpAbsoluteVolume is passed wrong unit parameter from AudioManager.
It cause maximize volume in Bluetooth speaker/device.
The volume expected by Bluetooth Avrcp should be from 0 to 15.
But the current volume parameter passed to Bluetooth Avrcp is from 0 to 150.
It is scaled by 10 times than the correct volume.
index = rescaleIndex(index * 10, streamType, streamTypeAlias);
Should divide the volume by 10 before pass to Bluetooth Avrcp.

bug:12495379
Change-Id: I4160588e92ee384e21a75d63036d8bd6ccb30621
2014-03-12 16:08:31 -07:00
RoboErik
4224e83642 Merge "Adds a TransportController and TransportPerformer to session" 2014-03-12 22:14:50 +00:00
RoboErik
8ae0f34db9 Adds a TransportController and TransportPerformer to session
This makes transport controls a primitive interface on sessions with
a way to create the performer, register callbacks, and send commands
and updates between controllers and performers. This still needs some
cleanup but has been tested with OneMedia.

Change-Id: I373d35f7ccc383b8421bd14044457467d80425f3
2014-03-12 15:09:42 -07:00
Mike Lockwood
5b568aa04a Merge "MTP: Add support for battery level device property" 2014-03-12 17:58:05 +00:00
Mike Lockwood
56c85244b9 MTP: Add support for battery level device property
Bug: 7342482

Change-Id: I810e55fe9695e2206816f57334ad14f65e9c641d
2014-03-12 08:46:47 -07:00
Jean-Michel Trivi
7ca2b89585 Merge "AudioTrack write method with data in ByteBuffer" 2014-03-11 17:12:59 +00:00
Jean-Michel Trivi
7ca0452fa6 AudioTrack write method with data in ByteBuffer
New write method with data in ByteBuffer. Allows blocking and
 non-blocking write.
If the ByteBuffer is not direct, the implementation uses the
 existing implementation with a byte array.

Bug 7919023

Change-Id: I6935e3e05783d7d7672614b194941a87abbb50cf
2014-03-11 01:34:03 +00:00
Lajos Molnar
7246fa5610 MediaPlayer: fix int overflow issue in MediaTimeProvider
Bug: 13394783
Change-Id: I228ded5cf198852fda867d136cd8b1aacd8b6584
2014-03-10 17:23:45 -07:00
Robert Shih
f0768d71bd Merge "MediaMuxer: added WebM filetype; open output file RW." 2014-03-10 19:02:34 +00:00
Marco Nelissen
b2c45abc1d am 233e7e9f: am 98a6bcf4: Merge "ExifInterface: fix class load failure" into klp-dev
* commit '233e7e9f64be5e85196dd959824bce9a69b2fd99':
  ExifInterface: fix class load failure
2014-03-07 01:31:22 +00:00