7356 Commits

Author SHA1 Message Date
Jean-Michel Trivi
b5edb0bd60 Merge "Event handler should be private in MediaFocusControl" 2013-08-06 22:37:45 +00:00
Glenn Kasten
86fad47e68 Update audio comments
Change-Id: If470efd77ed886da8d83a1b427c132bad77e668b
2013-08-06 13:38:16 -07:00
Mathias Agopian
52a9a10b6b Clearly separate consumer and producer interfaces
Bug: 9265647
Change-Id: Ic68e91788d0a05251e1d2fb9f9d4de403c7099bf
2013-08-06 13:07:42 -07:00
Jeff Brown
445b5f460f Merge "Minor style cleanups." 2013-08-06 19:31:23 +00:00
Jean-Michel Trivi
55e1bc6c58 Event handler should be private in MediaFocusControl
Change-Id: I034224d42a3cfed8c49bfee55b332068796f9977
2013-08-06 12:01:03 -07:00
Jean-Michel Trivi
34077aa6bb Merge "Reorder and comment MediaFocusControl code" 2013-08-06 18:40:55 +00:00
Jean-Michel Trivi
73673ab798 Reorder and comment MediaFocusControl code
Change-Id: Iacc03a7233789bd1588e9f7d2ca5df10a756fb0d
2013-08-06 10:42:45 -07:00
Zhijun He
708e359503 ImageReader: Add RGB format support.
Bug: 10155122
Change-Id: Id53d6ec815488e73bde6ca62b42c92d16bc813c9
2013-08-06 09:44:29 -07:00
Jeff Brown
ef96121559 Minor style cleanups.
A few changes to demonstrate a slightly cleaner way to write
JNI code in the framework especially when multiple types are
involved.  We use this pattern in many other places outside
of the media stack.

Added more detail to the UnsupportedOperationException that
occurs when buffer formats don't match.

Change-Id: Ic894dc1bd71b387f1be6ea1798fa59e533e9574f
2013-08-05 20:39:29 -07:00
Xia Wang
373673abd6 am 3a5e2013: am ebbcc18e: am 4032217e: Merge "Add option for video playback test to accept media source path." into jb-mr2-dev
* commit '3a5e2013a1296065a4674bdc43f357d3a352a6e9':
  Add option for video playback test to accept media source path.
2013-08-05 16:03:01 -07:00
Xia Wang
3a5e2013a1 am ebbcc18e: am 4032217e: Merge "Add option for video playback test to accept media source path." into jb-mr2-dev
* commit 'ebbcc18eaa8a69579fadae484630aa1ba447c031':
  Add option for video playback test to accept media source path.
2013-08-05 15:58:48 -07:00
Glenn Kasten
f239d9d7bb Merge "Don't doubly initialize fields in constructor" 2013-08-05 16:22:07 +00:00
Glenn Kasten
0bd2667e20 Merge "Clean up imports" 2013-08-05 16:18:25 +00:00
Glenn Kasten
07ede35514 Merge "Clean up throws in AudioRecord and AudioTrack" 2013-08-05 15:55:33 +00:00
Jeff Tinker
3ed38266c1 Define error codes for MediaCodec.CryptoException
Define specific failure cases so apps have the information they
need to deal with these conditions.

Also adds a new ResourceBusyException to MediaDrm

Change-Id: Iaecf269d58108f28179974b05671bf29b9fe4b7d
related-to-bug: 10157154
related-to-bug: 9695816
2013-08-03 10:23:41 -07:00
Elliott Hughes
a81dcd03dc am b56f10aa: am 32c308a5: Merge "If media wants ASCII lowercasing, it needs to ask for it."
* commit 'b56f10aa66914aeb880c624ed6e938e1941ff820':
  If media wants ASCII lowercasing, it needs to ask for it.
2013-08-02 17:58:31 -07:00
Zhijun He
111fd86c7a Merge "MediaFrameworkTest: Add camera capture result callback test" 2013-08-02 23:38:24 +00:00
Zhijun He
693e21d605 MediaFrameworkTest: Add camera capture result callback test
Also refactor the code to reduce code duplication.

Change-Id: I428ad73510043ebf9e62cd7841bfdb683c96f9bc
2013-08-02 15:24:45 -07:00
Glenn Kasten
97d50425a4 Don't doubly initialize fields in constructor
Change-Id: Id3b4911a7954a5a908764683cc7b8d8515d4482a
2013-08-02 15:12:04 -07:00
Glenn Kasten
896a7f5fee Clean up throws in AudioRecord and AudioTrack
Remove dead assignments to member fields in constructor prior to throw.
Execution doesn't continue execution, so no need to initialize fields.

throw doesn't need parentheses.

Fix indentation.

Change-Id: I2bf1b8bfa2c836e53a41eea67552cba40dc6fd43
2013-08-02 15:05:00 -07:00
Glenn Kasten
83db9ed199 Clean up imports
No need to import java.lang.*;
these imports are implicit in the language.

Change-Id: Ia903fb9546f2a295605dbc80ba69c4e6778627d6
2013-08-02 12:39:51 -07:00
Elliott Hughes
dcb1a58cf9 If media wants ASCII lowercasing, it needs to ask for it.
http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html

Use toLowerCase(Locale.ROOT) if you want ASCII for machine consumption,
and use toLowerCase(Locale.getDefault()) if you want the user's locale's
casing rules for human consumption.

Bug: https://code.google.com/p/android/issues/detail?id=58359
Change-Id: Id9005a17e34217a81bef3b40031b9e2e6272f45d
2013-08-02 10:03:53 -07:00
Jean-Michel Trivi
68d6dedcc3 Remove whitespace in IAudioService.aidl
Change-Id: I537a2ad8356b04fec25bd7a5a8934f0bc343c1f6
2013-08-01 15:14:10 -07:00
Jean-Michel Trivi
3523a06375 Remove outdated comment in MediaFocusControl
The stream type is used in audio focus to better deal with
  RemoteControlClient/Display in the case of notifications
  during media playback. This comment is therefore outdated.

Change-Id: Ifa33bc4c0fbf065d8288ff5fdfaf1bc67b2a337e
2013-08-01 14:36:32 -07:00
Jean-Michel Trivi
9171db2798 Unhide android.media.AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE
Unhide android.media.AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE
Update android.media.AudioManager.requestAudioFocus() javadoc for the
  new focus type.

Bug 8251963

Change-Id: I7cd69faaf5f0169ee462b91d0aaa75dc6b092107
2013-08-01 09:19:58 -07:00
Jean-Michel Trivi
2380566deb Notification muting conditional to exclusive audio focus request
Summary of feature:
Do not mute notifications when speech recognition recording is
  active, but when an app has requested audio focus with
  AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE.

Implementation:
Move definition of AUDIOFOCUS_NONE to AudioManager where other
  audio focus codes are defined.
Add support for querying the current audio focus type.
When audio focus is requested as GAIN_TRANSIENT_EXCLUSIVE, make
  the corresponding loss by LOSS_TRANSIENT.
Before playing a notification, check whether GAIN_TRANSIENT_EXCLUSIVE
  has been requested.

Bug 8251963

Change-Id: I41edc77326b70639d2fdcb4642c53109995b72a8
2013-07-31 14:37:19 -07:00
jangwon.lee
3ed02535fd When deleting a db file,
Context.deleteDatabase() has to be called instead of File.delete()
to guarantee all db related files
like journal, wal, shm, etc are deleted together.

Signed-off-by: jangwon.lee<jangwon.lee@lge.com>

Change-Id: I3c3d7dfa13ffbe709ab7d8a5c7cfe6cfa2864fea
2013-07-31 07:18:25 +00:00
Jean-Michel Trivi
cbb212ff6f Focus gain sends focus loss through the focus stack
When a new focus owner lands on the stack, don't just make the
 previous top of the stack lose focus, propagate the loss throughout
 the stack.
Only dispatch focus loss on focus loss state change
Remove canDispatchFocus() method as it now doesn't need to be known
 (and shouldn't be known) outside of the implementation.
Fix error where the focus code for a focus gain request should
 always be a focus loss code.

Bug 8315302

Change-Id: I92c8f51fdcc090851d34d00fefed916e25da40c1
2013-07-30 17:13:00 -07:00
Jean-Michel Trivi
53e6e287ff Focus loss value takes into account previous loss
Implement a state machine to represent how to transition to the
 next audio focus loss state, given the current focus loss (state)
 and the given external focus gain (transition).

Bug 8315302

Change-Id: I4a3d5a4a53c842caceaa876206a993c4e5446681
2013-07-30 14:21:34 -07:00
Jean-Michel Trivi
fec4a907b1 Merge "Audio focus request managed by FocusRequester class" 2013-07-30 18:54:48 +00:00
Eino-Ville Talvala
92ed645159 Merge "Camera2 API: Rename package to android.hardware.camera2" 2013-07-30 18:42:20 +00:00
Eino-Ville Talvala
2f1a2e423e Camera2 API: Rename package to android.hardware.camera2
Change-Id: I77b7939e199f9fe8e12a59393c24cff08097448c
2013-07-30 11:37:31 -07:00
Jean-Michel Trivi
783cea4658 Merge "More refactor of audio focus, keep track of focus loss" 2013-07-30 18:31:13 +00:00
Jean-Michel Trivi
83283f23eb Audio focus request managed by FocusRequester class
Move all audio focus request functionality under a new class/file.
Clean up encapsulation of data related to the request.

Change-Id: I989796e1ee1a5fc99799a64e1612294e0e40fa6d
2013-07-30 11:27:08 -07:00
Marco Nelissen
4d4a137bf5 am 51cf3661: am f38b5287: Merge "MediaFormat: Explain that KEY_COLOR_FORMAT is used with decoders as well"
* commit '51cf3661fa658d7cec6a08ed3f916ce98203027c':
  MediaFormat: Explain that KEY_COLOR_FORMAT is used with decoders as well
2013-07-30 10:28:38 -07:00
Marco Nelissen
f38b528701 Merge "MediaFormat: Explain that KEY_COLOR_FORMAT is used with decoders as well" 2013-07-30 17:11:55 +00:00
Jean-Michel Trivi
00bf4b1817 More refactor of audio focus, keep track of focus loss
Move more audio focus-specific functionality into the class
  representing each audio focus owner, FocusStackEntry.
Keep track of how each FocusStackEntry instance lost focus.

Change-Id: I35df0717765a26ec747cb0110e2e951d155d1525
2013-07-29 18:15:29 -07:00
Jean-Baptiste Queru
0350f4167f am 00157c0d: am 6c0fe0df: Merge "MediaFormat: Fix the documentation link to the AAC profile constants"
* commit '00157c0d466786e7f125f58257ff706e132c52ef':
  MediaFormat: Fix the documentation link to the AAC profile constants
2013-07-29 16:40:21 -07:00
Jean-Baptiste Queru
6c0fe0df4e Merge "MediaFormat: Fix the documentation link to the AAC profile constants" 2013-07-29 23:03:00 +00:00
Chong Zhang
d7c05c2ca9 Merge "Select BT route when currently selected route becomes unavailable" 2013-07-26 23:46:46 +00:00
Chong Zhang
2e5fbf5521 Select BT route when currently selected route becomes unavailable
Bug: 10003524
Change-Id: I5de740fac9f2bc2a56125296defe892a8deb505e
2013-07-26 15:36:37 -07:00
Marco Nelissen
3f44fae1dd am 77802977: am 161b3624: Merge "Fix NullpointerException in MediaMetadataRetriever"
* commit '778029776bac60856af7e97e19deb7b1f42b1984':
  Fix NullpointerException in MediaMetadataRetriever
2013-07-26 14:55:00 -07:00
Oscar Rydhé
425916e4c5 Fix NullpointerException in MediaMetadataRetriever
According to the API documentation and the ICS implementation
the setDataSource(String) method throws an
IllegalArgumentException if path is null. In JB a
NullpointerException is thrown instead. This fix restores
the earlier behaviour.

Change-Id: Ic47baadf91076acc227d92d84f6b8d1d6ecd0c03
2013-07-26 18:18:17 +00:00
Martin Storsjo
816af56eac MediaFormat: Fix the documentation link to the AAC profile constants
Change-Id: If1780436baa2884cea05ccd8ab74745af790eb17
2013-07-25 12:53:46 +03:00
Martin Storsjo
158754b1bf MediaFormat: Explain that KEY_COLOR_FORMAT is used with decoders as well
If reading the decoded pixel data (instead of letting the system
render it), this is critical for interpreting the data correctly.

The video MediaCodec CTS tests use this MediaFormat key in this
way as well.

Therefore, make sure the documentation reflects the actual use of
this field - claiming that it is encoder-only is misleading.

Change-Id: I9bfd295a95dd3e7d1fa3189886fd243b07bb82cc
2013-07-25 10:52:54 +03:00
Jean-Michel Trivi
2e01220647 Merge "More info in audio focus stack entry" 2013-07-24 22:35:30 +00:00
Glenn Kasten
1bd84bd3d5 Merge "Rename mChannels to mChannelMask to avoid ambiguity" 2013-07-24 22:35:11 +00:00
Glenn Kasten
44097837df Merge "Match AudioRecord.getChannelConfiguration docs" 2013-07-24 22:30:20 +00:00
Jean-Michel Trivi
caa2c5bba8 More info in audio focus stack entry
Add fields in an audio focus stack entry to track what type of audio
 focus was requested, and why it was lost.
Make audio focus dump easier to read.

Change-Id: I61f6e43c13a32328a07125a2ba0dce1053872c86
2013-07-24 14:52:57 -07:00
Glenn Kasten
33c437df39 Rename mChannels to mChannelMask to avoid ambiguity
This clarifies that it's a channel mask, as opposed to a count.

Also no need to initialize the field in the declaration,
as it's initialized in the constructor.

Include channel mask in error logs.

Change-Id: Ifc02668cf922dc8826a9fb042b3ca52fad377ba6
2013-07-24 12:20:52 -07:00