This will prevent MediaProvider from adding these files to the images table
Change-Id: Ice4756b64a067f3aceff08ab2c5e91665109dde5
Signed-off-by: Mike Lockwood <lockwood@android.com>
Previously we ignored any files and directories that had name started with '.'
and ignored any directories that contained a ".nomedia" file.
Now to support transferring any file via MTP, we now add these previously ignored files
to the media database, but will not mark them as audio, video, image or playlist files.
That way they will be included in the files table but will be hidden from the
audio, video, images and playlist views that are used by apps like Music and Gallery.
Bug: 3405327
Change-Id: Ib707f329be98878501952b6054998518a6eabbbd
Signed-off-by: Mike Lockwood <lockwood@android.com>
If a file was originally considered a video file (because it had
a .mp4 extension, for example), but was then discovered to have
only an audio track, it would update the type, but not the URI
for insertion into the media provider.
Change-Id: Ie589c9b52b436d73e295609d21238b2b3e829502
Signed-off-by: Mike Lockwood <lockwood@android.com>
- MTP support for multiple storage units
- Add storage_id column to media database for MTP storage ID
- Add framework resource for defining mount points and user visible descriptions
for multiple volumes
- Clean up locking in MtpServer JNI code
Change-Id: I53d501fd4891ebe27408135fb598027e06b7e495
Signed-off-by: Mike Lockwood <lockwood@android.com>
Fixes an ANR that occurred if we got a USB disconnected event
before the MTP service had started.
Bug: 4118033
Change-Id: I6cad4281a5911a9926cae923f34d3a6bf98346c5
Signed-off-by: Mike Lockwood <lockwood@android.com>
Do not call directly into AudioSystem in setBluetoothScoOn() but
send a message to the AudioService handler instead. As the
procedure to switch audio path to BT SCO can last some time we should
not block the caller which can run in the UI thread.
Change-Id: I6ac4b5a934d69781db3aebe5d0e8137b52a0ada4
After reviewing this class I decided it would be best not to include it in the public API
since it adds no functionality that cannot be done using MtpDevice and other APIs directly.
So I am moving it to the CameraBrowser sample instead.
Also changed CameraBrowser to build against the SDK to ensure all the necessary APIs for
PTP support have been made public.
Bug: 4067029
Change-Id: I585b06104084953176d018ced08bba0cb4607490
Signed-off-by: Mike Lockwood <lockwood@android.com>
UsbDevice is now just an immutable parcelable object like UsbInterface and
UsbEndpoint.
All IO related functionality is now contained in UsbDeviceConnection
and UsbRequest.
Bug: 4067029
Change-Id: Ia84da0b512a697acc940eee0c3566711c62e1a68
Signed-off-by: Mike Lockwood <lockwood@android.com>
New APIs:
UsbManager.hasPermission returns true if the caller has permission
for the given device or accessory
UsbManager.requestPermission poses a dialog to allow the user to give the caller
permission for the device or accessory.
Result is returned via a PendingIntent.
No dialog is displayed if the caller already has permission.
Also moved UsbResolverActivity to SystemUI package
BUG: 4069037
Change-Id: I93be769501a8776b49ac26e468af19f8fa2114c9
Use a death handler when audio focus changes are caused by audio
mode changes.
The bug comes from the fact that audio focus clients that use the
audio mode for automatic focus handling didn't register a death
handler, which was set to null. When such a client died, this
handler was compared against the one to remove from the
audio focus stack, which resulted in an NPE.
The fix consists in registering a valid IBinder object in the
audio focus stack, even for clients whose focus requests originate
from a change in audio mode, as implemented in the
handleFocusForCalls() method.
Change-Id: Id9e1d3d10afcd99969285f6d60fc4d7dde1e4a10
sqlite3 is overkill for what we are doing here, and more fragile.
BUG: 3512856
Change-Id: I83d86127949d894a3887db3456d91b013060e852
Signed-off-by: Mike Lockwood <lockwood@android.com>
Release all sco audio clients when the intent indicating
STATE_AUDIO_DISCONNECTED state is received.
Also clear mScoClients array when clients are released.
Change-Id: I63ec9d70fe72a102e09a4a473a367fb2e550b171
The heap memory dump is enabled when libc.debug.malloc property is 1.
Two .dump files are created in predefined path.
Memory leak report can be generated using nativeheapdump tool.
Change-Id: Ie03928b5a05993e72d4700a158657c514478ecd3
This change enables the use of a SurfaceTexture in place of a Surface
as the video sink for an android.media.MediaPlayer. The new API
MediaPlayer.setTexture is currently hidden.
This includes:
- New Java and C++ interfaces
- C++ plumbing and implementation (JNI, Binder)
- Stagefright AwesomePlayer and NuPlayer use ANativeWindow
(either Surface or SurfaceTextureClient)
Change-Id: I2b568bee143d9eaf3dfc6cc4533c1bebbd5afc51
These extras are also accessable via the UsbDevice and UsbAccessory classes,
which are also included as extras.
Since you can't filter Intents based on extras there is no point in duplicating
this information as separate extras.
Change-Id: I4c8d1e70d66023a1800b3f8f06118898da6b37af
Signed-off-by: Mike Lockwood <lockwood@android.com>
* commit 'd97c598ff4d902583f9083960b088b31350d0018':
Added more warnings in javadoc for failure to call MediaPlayer.release() immediately if a MediaPlayer is not needed
* commit '6c9b500fc59edd8cb3b5a9ac4a0ddadf54bdf525':
Added more warnings in javadoc for failure to call MediaPlayer.release() immediately if a MediaPlayer is not needed