Iterate over the remote control stack from top to bottom
when (un)registering a remote control client (RCC).
When unregistering an RCC, stop traversing the stack when
match found. If match was at top of the stack, update
the remote control display (RCD).
Change-Id: If64acf102bdf328085d707f9e0f7e86cf4d4001a
Iterate over the media button receiver stack from top to bottom
when removing or adding a receiver.
Update comments and name to reflect that the corresponding methods
must be synchronized on audio focus and remote control.
Change-Id: I1fb7f682a999aa66d92d56ca6ecd8b37eeff8ac9
Add comments to reflect where and why the audio focus and media
button stacks are traversed with an iterator, which traverses
the stack from bottom to top.
Change-Id: I462a522195e742295d13eff5fc727e59a5d7e830
The C++ class names don't match what the classes do, so rename
ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to
GLConsumer.
Bug 7736700
Change-Id: I08e677faf2ebb418ef131d0a8008e01037db0e50
The mediascanner member mIsDrm was never set
according to the drmframework canHandle call.
This subsequently caused that the isdrm column
in mediastore was never set, and was defaulted
to false for all files.
mIsDrm is now set according to drmframework
canHandle result for each files that is scanned.
Change-Id: Id557d921c4e3e3dfc35da56b69471f4bd6b3c8bf
Fixes the following problems with safe headphone volume warning message:
- Do not display the warning dialog when screen is off.
- Use the same 3 second timeout as for the volume slider to dismiss the dialog.
- Do not dismiss the warning dialog when touching outside of the slider window
but inside the warning window.
- Disable the volume slider when the warning message is displayed.
- When setting volume directly (touching the volume slider), and the warning
is displayed, save the requested volume and apply it if acknowledged by the user.
- Do not display the warning message when restoring safe volume after 20h of
cumulative listenening
Bug 7658641.
Change-Id: Ib3d1315193a433dad918aa5df78fa071062b2394
getMinBufferSize():
Simplify native_get_min_buff_size error checks and handle more errors.
setPlaybackHeadPosition():
Disallow for streaming mode [underlying AudioTrack C++ requires this].
Disallow setPlaybackHeadPosition before write().
Remove unnecessary synchronization around native_set_position().
setLoopPoints():
As setLoopPoints() is effectively a variant of setPlaybackHeadPosition(), do the same error checks.
write():
Don't set "write completed" state if write() parameters are invalid or native write fails.
It was setting "write completed" flag too early, and ignoring native write return value.
Detect integer overflow.
reloadStaticData():
Disallow reloadStaticData() before write().
Change-Id: Iec36fc0ea67095e18a2c238b148dad5545c102c1
Modified AudioService to add the possibility to mute/unmute music
with volume keys while playing over fixed volume devices (HDMI, digital dock).
VOL- forces volume to 0 and VOL+ forces volume to maximum.
Bug 7377764.
Change-Id: Ibaf805d76c30e3c0e395547cd3ce0087dbfb9f30
Allow for 160*120 thumbnails which is what cameras commonly
generates. The constants for the micro thumbnail were set to other
values, resulting in recalculations of the thumbnais, which
takes time.
This change only affects the maximum size of the temporary image,
when choosing whether to use the EXIF thumbnail or decoding and
downsampling the full image. Without this change, it will choose
an x16 downsampling of the full image over an x2 downsampling of
the EXIF thumbnail, after the change it will prefer the EXIF
thumbnail.
Cf the DCF specifications at http://www.exif.org/dcf.PDF,
"3.3.6. DCF basic thumbnail data structure, (C) Pixel count"
Tested by running DDMS and measuring the time required to create
a thumbnail. This was 220-280 ms prior to change, < 20 ms after.
Change-Id: I59c753493f947e920bad3fde5eeed5d49d509863
Before directly inserting an item that is the default ringtone, alarm or
notification, flush the MediaInserter, since a parent of the inserted item
might not have been flushed yet.
b/7650557
Change-Id: Icdd25bd9cac8b43a75e63318b936246562744c59
* commit '800c8ab68d695f1b6c5332c80a32316cdca69954':
MediaCodec: Allow getting the codec info directly
MediaCodec: Allow getting the chosen component name
* commit '2644494a9841c1f842d790b60911699f09eb63d1':
MediaCodec: Allow getting the codec info directly
MediaCodec: Allow getting the chosen component name