Make scanSingleFile behave the same way as scanMtpFile, by taking into
account whether there's a .nomedia file guarding the file being scanned.
Without this, downloaded (or otherwise explicitly scanned) images/video/music
will appear in Gallery and Music even if a .nomedia file is hiding them.
Change-Id: Ib9ad4bda1b9a942f79a37ccd8e6a54d57710f528
The mime type name is unfortunate since it implies that the data
should be provided as a LATM bitstream, which it should not.
Change-Id: I3c997025342e3298729db2bfaeace9fcac001af9
In line with ongoing effort of adding vpx encoder to
stagefright (https://android-review.googlesource.com/50893)
we need to add profile and level values for VP8.
VP8 profiles and levels are defined in OMX IL 1.1.2
extension headers, which is also being added here
https://android-review.googlesource.com/51272
This alters the public API.
Change-Id: I2bbb91c0b8b522b90c3cdfadaba0d18134800408
Signed-off-by: Kunter Gultekin <kuntergultekin@google.com>
related-to-bug: 8226783
# By Henrik Engström
# Via Android Git Automerger (2) and others
* commit 'c28fde57f0c7762913615b16d651d4e7991d6175':
Fix possible integer overflow in MtpStorage
# By Henrik Engström
# Via Gerrit Code Review (1) and Henrik Baard (1)
* commit '3cfca67b0f1e3f464274fa5d3b2e31e5288d8f38':
Fix possible integer overflow in MtpStorage
Implemented reading and writing state to retain information
across boots, API to retrieve state from it, improved location
manager interaction to monitor both coarse and fine access
and only note operations when location data is being delivered
back to app (not when it is just registering to get the data at
some time in the future).
Also implement tracking of read/write ops on contacts and the
call log. This involved tweaking the content provider protocol
to pass over the name of the calling package, and some
infrastructure in the ContentProvider transport to note incoming
calls with the app ops service. The contacts provider and call
log provider turn this on for themselves.
This also implements some of the mechanics of being able to ignore
incoming provider calls... all that is left are some new APIs for
the real content provider implementation to be involved with
providing the correct behavior for query() (return an empty
cursor with the right columns) and insert() (need to figure out
what URI to return).
Change-Id: I36ebbcd63dee58264a480f3d3786891ca7cbdb4c
- add mirrored version of the icons
- make VolumePanel respond to layout direction changes
- make AudioService propagate layout direction changes to the VolumePanel
Change-Id: Ibb884ab81641c319a9b7bea1381066f3f19581f0
When converting the MB value MtpReserveSpace value to bytes there is a
possible integer overflow since 3 integer values are multiplied, even
though the result is stored in a long variable. This would be visible when
the value is more than 2 GB. This is solved by making the constants
longs instead of ints.
Change-Id: I799129f7076a6e331cece17b5c05aed210499648
Iterate over entries in the media button stack from the top
for remote volume-related operations as the stack entry being
looked for is more likely at the top of the stack.
Change-Id: Iaa2685ebb297d2184dd2c63498d7bd2b811ce744
The remote control stack in AudioService is responsible for handling
which application receives media button events. When an application
"registers" its media button receiver, it gets placed at the top
of the remote control stack. If the app also has audio focus (is
at top of focus stack), this will also cause the information of
the attached remote control client (RCC) to be displayed on the
lockscreen.
If an app doesn't re-register its button receiver when it wants
to receive the button events, it might have lost its place at the
top of the remote control stack, and would not show up in the
lockscreen anymore.
This change consists in using the playstate reported by the RCC
to change the remote control stack. If an RCC reports a "playing"
state (e.g. playing, fast forwarding), it is safe to assume the
application is actively being used, and should be the one that
receives the transport control buttons. This CL uses the reported
playstate to conditionally move the corresponding stack entry
to the top of the stack.
Bug 7311023
Change-Id: I1505f01664c16e108b22d33e3f47f0056343676e
Iterate of remote control stack entries from the top of the stack
for cases where the condition being checked is more likely at
the top of the stack, as opposed to the bottom, which is first
accessed when using an iterator.
Change-Id: I625bee59021c2d652e9d6355b48dc0c11e36093f
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 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