summaryrefslogtreecommitdiffstats
path: root/media/java
Commit message (Collapse)AuthorAgeFilesLines
* Further optimize media scanner.Marco Nelissen2012-02-132-26/+55
| | | | | | | | | | | | Inserts of directories can be done in bulk as long as they're inserted before the files contained within. Extend MediaInserter to accommodate giving priority treatment to directories. Bulk deleting of entries can be further sped up (by a factor of ~3 in my tests) by deleting entries in database order. Switch the file cache to use LinkedHashMap instead of HashMap to allow iterating over the cache in database order. Also use bindArgs to allow for better caching of sql statements. Change-Id: Ieb9ffc4e866c6cd505bf795eb80ff5d03ffc56bd
* Add support for non-linear ramping of master volume adjustmentMike Lockwood2012-02-101-13/+27
| | | | | | | Bug: 5472584 Change-Id: I1227007d1563eca739fb78b6d9595febc04a3f03 Signed-off-by: Mike Lockwood <lockwood@google.com>
* Only send master volume or mute updates if the settings have changedJason Simmons2012-02-101-2/+4
|
* Make AudioManager.adjustMasterVolume public and hiddenJason Simmons2012-02-101-1/+2
|
* Restore persisted master volume if the media server restartsMike Lockwood2012-02-101-7/+14
| | | | | | Bug: 5755071 Signed-off-by: Mike Lockwood <lockwood@google.com>
* Don't allow changing master volume when mutedMike Lockwood2012-02-101-6/+1
| | | | | | Bug: 5793021 Signed-off-by: Mike Lockwood <lockwood@google.com>
* Defer persisting master data to avoid excessive database writesMike Lockwood2012-02-101-4/+26
| | | | | | Bug: 5705192 Signed-off-by: Mike Lockwood <lockwood@google.com>
* Remove reference counting and client death notification for master muteMike Lockwood2012-02-101-120/+3
| | | | | | | | | | The use case for master mute is to toggle it on and off from a KEYCODE_VOLUME_MUTE event, so this was unnecessary and prevented unmuting in certain cases Bug: 5724755 Signed-off-by: Mike Lockwood <lockwood@google.com>
* AudioService: Send broadcasts when master volume and mute state changeMike Lockwood2012-02-102-6/+81
| | | | Signed-off-by: Mike Lockwood <lockwood@google.com>
* AudioManager: Add wrapper methods for master volume supportMike Lockwood2012-02-101-0/+65
| | | | Signed-off-by: Mike Lockwood <lockwood@android.com>
* AudioManager: Add support for master muteMike Lockwood2012-02-103-9/+184
| | | | Signed-off-by: Mike Lockwood <lockwood@android.com>
* AudioManager: transparently convert volume settings for other streams to ↵Mike Lockwood2012-02-103-12/+51
| | | | | | | | | | master volume if config_useMasterVolume is set. This allows Music2 and other media apps to control master volume without changing their code Bug: 5567694 Signed-off-by: Mike Lockwood <lockwood@android.com>
* VolumePanel: Add support for master volumeMike Lockwood2012-02-103-8/+21
| | | | Signed-off-by: Mike Lockwood <lockwood@android.com>
* Save and restore master volume in the settings providerMike Lockwood2012-02-101-0/+12
| | | | Signed-off-by: Mike Lockwood <lockwood@android.com>
* Simple master volume supportMike Lockwood2012-02-104-21/+84
| | | | | | | Still needs integration with Settings (for persistence) and VolumePanel UI. Change-Id: I9eca92c4b1ef2df2564411006a35753ab9618dce Signed-off-by: Mike Lockwood <lockwood@android.com>
* am ec12ae99: am 79cfde69: am 52bfc243: docs: fix misc doc bugs from external ↵Scott Main2012-02-091-3/+3
|\ | | | | | | | | | | | | issue tracker * commit 'ec12ae9933e463181338834387caa7c58b330635': docs: fix misc doc bugs from external issue tracker
| * docs: fix misc doc bugs from external issue trackerScott Main2012-02-091-3/+3
| | | | | | | | Change-Id: If6ff3476670e42b321d56d4a1482ccff96d4d500
* | Merge "Delete entries in bulk"Marco Nelissen2012-02-081-10/+38
|\ \
| * | Delete entries in bulkMarco Nelissen2012-02-081-10/+38
| | | | | | | | | | | | | | | | | | | | | | | | Deleting entries from the database in bulk greatly speeds up the media scanner in some cases; removing 31k entries used to take about 2 hours, now it takes about 15 minutes. Change-Id: Ia8f3fd6d828289e3d67178e9ad10399ded8d70d2
* | | Merge "Make media scanner use new delete-parameter"Marco Nelissen2012-02-071-10/+8
|\ \ \ | |/ /
| * | Make media scanner use new delete-parameterMarco Nelissen2012-02-071-10/+8
| | | | | | | | | | | | | | | | | | This speeds up the media scan case where many files were deleted or moved. Change-Id: I86e6fc6d0968eebf24923c0b5587b90d309721bb
* | | Unhide AAC_ADTS file formatJames Dong2012-02-021-5/+11
|/ / | | | | | | | | | | o also actually decprecated RAW_AMR file format Change-Id: Ic8ef5b0dca6f793fddf9e79d431e79f5083f7bff
* | Enable media scanner bulk insertsMarco Nelissen2012-02-021-4/+2
| | | | | | | | Change-Id: I357162d0fe498a182ccb14630fe565daaa8bb0c1
* | Merge "Handle adding/removing/renaming nomedia paths"Marco Nelissen2012-01-302-0/+54
|\ \
| * | Handle adding/removing/renaming nomedia pathsMarco Nelissen2012-01-272-0/+54
| | | | | | | | | | | | | | | b/5849015 Change-Id: I3ec7419498d1ecc83db6d4605b3d7610349231f7
* | | Merge "Implement a cancelation mechanism for queries."Jeff Brown2012-01-273-16/+16
|\ \ \
| * | | Implement a cancelation mechanism for queries.Jeff Brown2012-01-273-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added new API to enable cancelation of SQLite and content provider queries by means of a CancelationSignal object. The application creates a CancelationSignal object and passes it as an argument to the query. The cancelation signal can then be used to cancel the query while it is executing. If the cancelation signal is raised before the query is executed, then it is immediately terminated. Change-Id: If2c76e9a7e56ea5e98768b6d4f225f0a1ca61c61
* | | | Use final on new member variablesGlenn Kasten2012-01-2713-30/+31
| | | | | | | | | | | | | | | | | | | | | | | | Use final for member fields initialized to a new and that are never modified. Change-Id: I042352c7bc21879613e7a50b1205b6923f8083cf
* | | | Merge "Bug 5567648 disassociate audio mode and audio focus"Jean-Michel Trivi2012-01-272-40/+40
|\ \ \ \ | |_|/ / |/| | |
| * | | Bug 5567648 disassociate audio mode and audio focusJean-Michel Trivi2012-01-272-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't automatically change the audio focus when the audio mode changes. This is best handled by the applications that change the audio mode so they can address their usecases as they please (for instance to define the behavior when switching calls). Replaced the implicit "mode to focus" behavior with two methods to request and abandon audio focus. These methods are only to be used by the framework, and maintain the logic in AudioService to prevent other apps to request audio focus during a call. A susequent change will update com.android.internal.telephony.CallManager to take advantage of these two methods. Change-Id: If84ebd508e985083e8cac82ece44940c72b5c669
* | | | Merge "Use audio_source_t consistently"Glenn Kasten2012-01-271-1/+4
|\ \ \ \ | |/ / / |/| | |
| * | | Use audio_source_t consistentlyGlenn Kasten2012-01-261-1/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Was a mix of audio_source_t, uint8_t, and int. Related fixes: - fix comments in MediaRecorder.java - AudioPolicyService server side was not checking source parameter at all, so if the client wrapper was bypassed, invalid values could be passed into audio HAL - JNI android_media_AudioRecord_setup was checking source for positive values, but not negative values. This test is redundant, since already checked at Java and now checked by AudioPolicyService also, but might as well make it correct. Change-Id: Ie5e25d646dcd59a86d7985aa46cfcb4a1ba64a4a
* | | Update AudioTrack.stop() javadocJean-Michel Trivi2012-01-241-2/+5
|/ / | | | | | | | | | | | | Add more information on the behavior of android.media.AudioTrack.stop() Change-Id: Id0f968e6bb8fe38765a86c43fc065908ee84edf1
* | Remove dead setRingerMode(mode, mask)Glenn Kasten2012-01-181-1/+0
| | | | | | | | Change-Id: Ia4cc8be8424a40b3dcb7ebd0264fdff4e5247f7f
* | audio framework: manage stream volume per deviceEric Laurent2012-01-172-119/+340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve volume management by keeping track of volume for each type of device independently. Volume for each stream (MUSIC, RINGTONE, VOICE_CALL...) is now maintained per device. The main changes are: - AudioService now keeps tracks of stream volumes per device: volume indexes are kept in a HashMap < device , index>. active device is queried from policy manager when a volume change request is received initalization, mute and unmute happen on all device simultaneously - Settings: suffixes is added to volume keys to store each device volume independently. - AudioSystem/AudioPolicyService/AudioPolicyInterface: added a device argument to setStreamVolumeIndex() and getStreamVolumeIndex() to address each device independently. - AudioPolicyManagerBase: keep track of stream volumes for each device and apply volume according to current device selection. Change-Id: I61ef1c45caadca04d16363bca4140e0f81901b3f
* | MediaScanner: Disable bulk insert for settingsSungsoo Lim2012-01-111-21/+33
| | | | | | | | | | | | | | | | Since the settings (notifications, ringtones, and alarms) request rowId after inserting into DB, do not use bulk insert for them. (Bulk insert does not return the rowId) Change-Id: I8faf993f8ac2da96672594a1c92ddc917f964d6f
* | Fix buildGlenn Kasten2012-01-091-4/+3
| | | | | | | | Change-Id: Ia140af1a61edf124ef3d48b60351f850a3475af1
* | Audio Java doc comment typos and minor changesGlenn Kasten2012-01-094-29/+35
| | | | | | | | Change-Id: Id6ea6dccb8054c9f05db9a9c045387ce813659e6
* | Merge "Fix race conditions related to ringer mode"Glenn Kasten2012-01-091-35/+54
|\ \
| * | Fix race conditions related to ringer modeGlenn Kasten2011-12-131-35/+54
| | | | | | | | | | | | | | | | | | Consistently protect all reads and writes of mRingerMode by mSettingsLock. Change-Id: I72675ff9009880cc212616f0f79f809a28eb6bff
* | | Merge "Also accept non-parenthesized genre numbers"Marco Nelissen2012-01-061-6/+46
|\ \ \
| * | | Also accept non-parenthesized genre numbersMarco Nelissen2012-01-051-6/+46
| | | | | | | | | | | | | | | | | | | | | | | | b/5790684 Change-Id: Ia13feebeaadd45d9196486c012538c5b80840163
* | | | ThumbnailUtils: To fix misuse of FileInputStream.Dongwon Kang2012-01-051-1/+12
|/ / / | | | | | | | | | | | | | | | | | | | | | We need to close it explicitly after using it. Without this, fd will be closed non-deterministically, and that will break the decode procedure. Bug: 5808889 Change-Id: Icf9ff9abd6e327b122c6916df9750016b3d1b616
* | | AudioService: simplified handler messages.Eric Laurent2011-12-201-45/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For historical reasons, messages to the AudioSystem handler in AudioService have a complex identifier combining several information. Messages for a particular stream contain the stream type as part of the message type. This complexity is not needed as the stream messages also carry a reference to the VolumeStreamState object which contains all necessary information, including the stream type. Also grouped parameters of MSG_PERSIST_VOLUME message into a single bit field to make room for further needs. Change-Id: Ia27af626b3447541e8f9eaceba21389a824d88e2
* | | Merge "Fix indentation and whitespace"Glenn Kasten2011-12-141-25/+25
|\ \ \
| * | | Fix indentation and whitespaceGlenn Kasten2011-12-141-25/+25
| |/ / | | | | | | | | | | | | | | | Use git diff -w to verify. Change-Id: Ib65be0a1ecf65d6cad516110604e3855bf68a638
* | | Fix typo in error message, missing spaceGlenn Kasten2011-12-141-1/+1
|/ / | | | | | | Change-Id: Icdddbf2fddb81a1db538dd94fb25cf859e44bfbd
* | Update onVideoSizeChanged() callback method Java doc to explicitly specify ↵James Dong2011-12-061-0/+3
| | | | | | | | | | | | | | | | | | the conditions under which the width/height passed to the callback could be 0. Change-Id: Ie921f0af8284eccfd02c4a5826ed41fe19f9676f related-to-bug: 5613451
* | am d49ec62c: am f3364080: Merge "New and improved silent mode on ↵Amith Yamasani2011-12-061-2/+8
|\ \ | |/ | | | | | | | | | | lockscreen." into ics-mr1 * commit 'd49ec62cfb0469c39f2b5d79cbf2a6f69cceb7d7': New and improved silent mode on lockscreen.
| * New and improved silent mode on lockscreen.Amith Yamasani2011-12-061-2/+8
| | | | | | | | | | | | | | | | | | 3-state item to toggle between Silent/Vibrate/Ringer in long-press power menu. No volume dialog on lockscreen, unless Power menu is up. Set VIBRATE_IN_SILENT=1 when upgrading device. Change-Id: I097d216f96c4abdbd83420e0c477106951b3607d