1687 Commits

Author SHA1 Message Date
Eric Laurent
f1a457d06c Do not turn safe volume on upon headset connection
It is not a requirement to force headphone volume limitation
back on when a headset is plugged in. Only turn it back on
when the device is power off or after 20 hours of cumulative
music listening.

Bug 7064975.

Change-Id: Idabd417a9a9b8096552119c0ff528ba193cfdb5d
2012-09-21 09:22:26 -07:00
Glenn Kasten
d86077c379 Merge "Expose android.media.AudioManager.getProperty()" into jb-mr1-dev 2012-09-20 12:45:45 -07:00
Glenn Kasten
62796aac59 Expose android.media.AudioManager.getProperty()
Also fix minor documentation errors.

Bug: 6635041
Change-Id: I6bbbf1b7c5ab705ac374436ea0c098cb3c27fd4a
2012-09-20 12:28:20 -07:00
Eric Laurent
f9fac2c5fe Merge "Add multi user volume management" into jb-mr1-dev 2012-09-20 11:18:17 -07:00
Eric Laurent
bc0fab1fc2 Add multi user volume management
Notification and Alarm volumes are per user: they are saved and restored
when the foreground user changes.
Media volume is global: it is still saved and restored per user for
implentation reasons but is copied from one user to the next to ensure
media playback volume continuity when switching users.

Ringer mode (silent, vibrate...) is now a global setting.

Bug 7128886.

Change-Id: I9f4f5a0a3985552bca61c2cc3bbe5a144db755a6
2012-09-19 14:16:08 -07:00
Glenn Kasten
549be8bead Merge "New API for querying audio properties" into jb-mr1-dev 2012-09-19 11:13:58 -07:00
Mike Lockwood
954a5d61a2 Merge "AudioService: Send "becoming noisy" intent when USB accessory audio is disconnected" into jb-mr1-dev 2012-09-18 17:12:37 -07:00
Mike Lockwood
db45484e4b AudioService: Send "becoming noisy" intent when USB accessory audio is disconnected
Bug: 7051259

Change-Id: I5b5fb3ad7c7e38dbf49700d893fd49354eaecf51
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-09-18 14:55:52 -07:00
Mike Lockwood
465d72073c am ad23333f: am 945080b5: am 1e86994c: Merge "MtpData bmp format file can\'t recognize when copy bmp into DUT"
* commit 'ad23333f728471a7f2c49cd1c9575f1cea2503f6':
  MtpData bmp format file can't recognize when copy bmp into DUT
2012-09-18 11:01:32 -07:00
Mike Lockwood
945080b5b6 am 1e86994c: Merge "MtpData bmp format file can\'t recognize when copy bmp into DUT"
* commit '1e86994cd0e13f9084d3f4bd0060b9e34c935490':
  MtpData bmp format file can't recognize when copy bmp into DUT
2012-09-18 10:53:11 -07:00
Mike Lockwood
1e86994cd0 Merge "MtpData bmp format file can't recognize when copy bmp into DUT" 2012-09-18 10:25:42 -07:00
Glenn Kasten
228c9847a3 New API for querying audio properties
Bug: 6635041
Change-Id: I66e87c75af7c84cdb23cb25a958e79bba8e53baa
2012-09-17 08:54:11 -07:00
Eric Laurent
c34dcc1e1e headphone volume limitation
Limit music volume when headphones or headset are inserted.
Display warning message when user wants to increase the volume
above a platform specific volume and request user acknowledgement
before proceeding.

TODO: exact wording of the warning message must be defined by UX.

Change-Id: I00f429f602534c6d8783126b929371c4d432e6e2
2012-09-16 17:44:45 -07:00
Mike Lockwood
f6f1661457 MtpDatabase: Use actual file size instead of media database size column
Fixes problems with file transfer from device to host that can occur
if the database size value is wrong.

Bug: 6954446

Change-Id: I03c3dd4b75267d1f4613f0b588c8899ded9a70be
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-09-12 15:50:59 -07:00
Mike Lockwood
25da9375fd Merge "MtpDatabase: Fix typo affecting parent and format queries" into jb-mr1-dev 2012-09-11 10:57:41 -07:00
Mike Lockwood
58e6831ccb MtpDatabase: Fix typo affecting parent and format queries
Bug: 7114350

Change-Id: I80269cfcebf521ea13cae30c1c9bd477d76adbd1
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-09-11 10:49:34 -07:00
Jean-Michel Trivi
2ac2afeac9 Add support for controlling remote submix audio routing
Add method in AudioManager to control remote submix through
  AudioService.
AudioService controls remote submxi: enabling/disabling
 remote submix will:
 - make the sink audio device available/unavailable
 - make the audio source available/unavailable
 - force/unforce media streams to be routed to WFD

Change-Id: I05d9cc7c3e8a720318ec1385737cbd46a21a3207
2012-09-10 12:29:09 -07:00
Jeff Brown
7017e48380 Merge "Add support for Wifi display." into jb-mr1-dev 2012-09-07 16:00:13 -07:00
Jeff Brown
cbad976b2a Add support for Wifi display.
Change-Id: I99693786cf9d07d07d3400046c55eb4933730b80
2012-09-07 13:26:31 -07:00
Eric Laurent
53082eced9 AudioSystem: new audio device enums
Update audio device enums to match new definitions in
native framework.

Change-Id: Ie257ab0423e3567f4af5a02b03e128af6c714da6
2012-09-07 10:41:03 -07:00
Jean-Baptiste Queru
c67fb6c39e am 657dba9e: am 4aa83ec3: am bb60bc26: Merge "Musicplayer application can not display DRM files of internal storage."
* commit '657dba9e66ff02785c2bf034ebecc3c357cbc333':
  Musicplayer application can not display DRM files of internal storage.
2012-09-06 09:18:20 -07:00
Jean-Baptiste Queru
4aa83ec3ee am bb60bc26: Merge "Musicplayer application can not display DRM files of internal storage."
* commit 'bb60bc26020f3aabc50aa93ad9bf812af7f48f9c':
  Musicplayer application can not display DRM files of internal storage.
2012-09-06 09:12:17 -07:00
Jan Bjernler
20c38ea9fd Musicplayer application can not display DRM files of internal storage.
Make DRM-protected files transferred over MTP be detected.
Previously it was inserted into the database as MEDIA_TYPE_NONE,
the result of this was that the file was not detected properly.
With this fix the file is scanned from the beginning.

Change-Id: Idf17d39e3d529394cd4a03d71fb250e69b395533
2012-08-31 11:51:38 +02:00
Dianne Hackborn
73365695e4 Merge "Improve multi-user broadcasts." into jb-mr1-dev 2012-08-30 14:56:11 -07:00
Teng-Hui Zhu
4dc187b43a Merge "Fix a typo in the sample code" into jb-mr1-dev 2012-08-30 14:54:24 -07:00
Teng-Hui Zhu
a242deb1de Fix a typo in the sample code
Change-Id: I27ee1b0ef8abf5decefae1ec1706a9f142016344
2012-08-30 14:36:58 -07:00
Dianne Hackborn
5ac72a2959 Improve multi-user broadcasts.
You can now use ALL and CURRENT when sending broadcasts, to specify
where the broadcast goes.

Sticky broadcasts are now correctly separated per user, and registered
receivers are filtered based on the requested target user.

New Context APIs for more kinds of sending broadcasts as users.

Updating a bunch of system code that sends broadcasts to explicitly
specify which user the broadcast goes to.

Made a single version of the code for interpreting the requested
target user ID that all entries to activity manager (start activity,
send broadcast, start service) use.

Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
2012-08-30 14:33:22 -07:00
Eric Laurent
794da7a054 AudioService: pause music when undocked
Send becomming noisy event also when disconnecting a dock
(analog, digital or USB) or HDMI.

Bug 6760590.

Change-Id: I497df35a3c6817d2b300f532d4cc3f12e3ce9ace
2012-08-30 11:30:16 -07:00
Jean-Baptiste Queru
c77c6898b3 am 3221b333: am 26ad1e78: am 03d16e12: Merge "Make setCaptureRate locale safe"
* commit '3221b33322b480fe9d4ba9dc0e7cd684ebe8c96a':
  Make setCaptureRate locale safe
2012-08-27 13:10:57 -07:00
Jean-Baptiste Queru
3221b33322 am 26ad1e78: am 03d16e12: Merge "Make setCaptureRate locale safe"
* commit '26ad1e7874f3151ec331e142fdcb8b3a22ddc26a':
  Make setCaptureRate locale safe
2012-08-27 11:29:29 -07:00
Johan Redestig
1c7928e8c6 Make setCaptureRate locale safe
Dont use the default String.format in setCaptureRate as it is both
locale unsafe and less efficient than regular string concatenation
in this case.

Change-Id: I29418ec0352ef8c79967592b6eb8ff66cc9c99f0
2012-08-27 14:24:10 +02:00
James Dong
2adac496a8 Added some common error codes in MediaPlayer.java
o related-to-bug: 6770717

Change-Id: Iea8ba6943755a9af8df5b6e91284c7c1b32c3c6c
2012-08-26 14:15:57 -07:00
Marco Nelissen
c209a06cfd Let apps provide a custom data source for extractors
Adds android.media.DataSource, which is modeled after its native namesake,
and a new method on MediaExtractor that lets apps specify their implementation
of a DataSource as the source of data for the extractor.

Change-Id: If1b169bd18d2691ebc4f8996494dfc8ee0894b6c
2012-08-24 10:36:51 -07:00
bo huang
240582eabe MtpData bmp format file can't recognize when copy bmp into DUT
add support for bmp format.

Change-Id: I67d4703b43cd32abad638bae57bbceb65b4be6de
Author: bo huang <bo.b.huang@intel.com>
Signed-off-by: bo huang <bo.b.huang@intel.com>
Signed-off-by: Wu, Hao <hao.wu@intel.com>
Singed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 24555
2012-08-17 10:28:51 +08:00
Jean-Baptiste Queru
d0604565ee am d2388b50: am 53ad027c: Merge "MtpStorage: correct the size of reserve space for MTP"
* commit 'd2388b50a5c16b920bdd656448107a21e49d753b':
  MtpStorage: correct the size of reserve space for MTP
2012-08-10 12:44:09 -07:00
Jean-Baptiste Queru
d2388b50a5 am 53ad027c: Merge "MtpStorage: correct the size of reserve space for MTP"
* commit '53ad027c46bf578e26e5db70319b17a671ce8a36':
  MtpStorage: correct the size of reserve space for MTP
2012-08-10 09:26:47 -07:00
Jean-Baptiste Queru
53ad027c46 Merge "MtpStorage: correct the size of reserve space for MTP" 2012-08-10 09:03:42 -07:00
Jean-Baptiste Queru
6736cca08d am 52410be8: Merge "mediacodec: Don\'t suggest calling getOutputFormat() immediately"
* commit '52410be8ec092bfa7e84f2d8facdc161d6107ac3':
  mediacodec: Don't suggest calling getOutputFormat() immediately
2012-08-08 13:08:21 -07:00
James Dong
aef4af4cd1 Merge "Add MEDIA_ERROR_SERVER_DIED error constant to MediaRecorder.java class" into jb-mr1-dev 2012-08-08 11:38:05 -07:00
James Dong
a35379ae98 Add MEDIA_ERROR_SERVER_DIED error constant to MediaRecorder.java class
o As a result, applications can listen for death notification from MediaRecorder onError callbacks

Change-Id: I49896c4ae8130bd67b52deff6eb97a22b43d3f32
2012-08-07 19:15:35 -07:00
Mike Lockwood
2d286f4984 MediaFile: Fix case sensitive file extension matching for computing MTP format code
Bug: 6939136

Change-Id: Iefd4083aefbd4b175a2f8c860a9e13c99ded9c82
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-08-07 14:43:59 -07:00
Martin Storsjo
b529e4c9ca mediacodec: Don't suggest calling getOutputFormat() immediately
Calling getOutputFormat() at this point currently crashes in
native code. (After a fix to the native code, this gives an
IllegalStateException instead.)

Change-Id: Ia45c4820bb3d9ed435a0aeef1ff8c230524f2e1f
2012-08-07 11:07:12 -07:00
bo huang
3b60dacb4e MtpStorage: correct the size of reserve space for MTP
According to description in frameworks/base/core/res/res/xml/storage_list.xml,
"mtpReserve: (integer) number of megabytes of storage MTP should reserve for free storage".
Mtpstorage class use it directly and doesn't change it to correct size in megabyes.
Mtp initor can not get correct storage information from android.

Change-Id: Icf59eb1eb478e67ea5990be96a9decb41aa55504
Signed-off-by: Bo Huang <bo.b.huang@intel.com>
Signed-off-by: Jack Ren<jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-08-07 13:02:59 +08:00
Marco Nelissen
8ab2dc2f96 Improve scan time for some cases
When the path being matched has a sqlite wildcard character in it, a "like"
match will be quite slow. Unfortunately this is fairly common, since "_"
is a wildcard character. However, because in most cases the case of the path
in the database will match the case on disk, an "=" match will work, so it
is worthwhile to try an "=" match first, before trying a "like".

If there are no wildcard characters, the "like" will be as fast as the "=",
because of the case-insensitive index on the _data column, so there is no
need to try "=" first in that case.

b/6751354

Change-Id: I1cd4efbd56a37886cb44a86acb73eb9a3c9f303d
2012-08-02 12:32:05 -07:00
James Dong
9984833191 Added a key to retrieve the rotation angle in MediaMetadataRetriever.java class
o related-to-bug: 6872687

Change-Id: I94569bb8357c39e8309974ede8284b33a996866c
2012-07-31 14:50:49 -07:00
James Dong
b10ec1f4b1 Fix a typo (dependant => dependent)
Change-Id: I0337bec1a26e852c32ea9f1ce54f270f79ee3ab1
2012-07-30 15:45:50 -07:00
Jean-Michel Trivi
1f9196a8e5 Relax rules for media apps to stay on RemoteControlDisplay
The playback of notification would make the display of the
 RemoteControlClient disappear from the lockscreen.

Fixed by modifying which AudioFocus owner to consider when
 reevaluating how the RemoteControlDisplay needs to be updated:
 use the first (starting from the top of the AudioFocus stack) that
 uses STREAM_MUSIC, or that uses any other stream type for a short
 period.

Change-Id: Id7cef00c5eed1f6ebfa59634eea8e2c9b2f3f5eb
2012-07-27 11:34:02 -07:00
Jeff Smith
ddd88726a2 am 71930dd7: am a45746ef: Fix several cases of broken droiddoc syntax external issue 35214
* commit '71930dd77e4dc6f6be5c648019d2ab0da5f0584c':
  Fix several cases of broken droiddoc syntax external issue 35214
2012-07-25 15:05:23 -07:00
Jeff Smith
71930dd77e am a45746ef: Fix several cases of broken droiddoc syntax external issue 35214
* commit 'a45746efadd11bb7dfab026fb3c81a25fae74ca4':
  Fix several cases of broken droiddoc syntax external issue 35214
2012-07-25 10:56:03 -07:00
Jeff Smith
a45746efad Fix several cases of broken droiddoc syntax
external issue 35214

patch contributed by Jeff Smith <whydoubt@yahoo.com>

Change-Id: I70dcee88a140699bf3e1ab369bed6dcd2fdd3d83
2012-07-25 10:49:25 -07:00