This should fix a bunch of problems introduced in the original bulk insert implementation
Also reverted two changes that are no longer necessary:
Revert "MediaScanner: Add virtual NO_MEDIA column to fix support for .nomedia files"
This reverts commit 92e1314ad9ddbacfb806405e9aceeea4a8aae19f.
Revert "MediaScanner: fix breakage in updates"
This reverts commit 45aaa2a345292bb6d600822db602f25e261c0e50.
Change-Id: Ibed66393467761c2c1ce48deb09bcac505b7d221
Implemented different silent mode behaviors for tablets and phones.
The behavior inherited from Honeycomb was for tablets only and
was muting music in silent mode.
Change-Id: Ib053e7b70ca02190debc87648ab8a163f9d39577
I believe the the synchronized block is required to allow
other threads to observe changes to mPlayState in a timely
manner.
Change-Id: I502b7401196c42932c9667ef73eb4cae16c3da16
Added getAudioSessionId() method to AudioRecord class so that applications can
retrieve the AudioRecord's session ID and attach audio pre processes.
Change-Id: I1914770f0e54d97c9aef6a9eb36fff69b6d31552
To facilitate bulk inserts, we changed the media scanner to use the file URI
instead of the audio, video or image media URIs.
However we should still use the media URIs for updating existing records
Bug: 5021925
Change-Id: I6143dc1d00350192170428a5e951b52ef9223734
Signed-off-by: Mike Lockwood <lockwood@android.com>
There is nothing in this file that requires a global lock.
Furthermore, the lock can cause timeouts in native_finalize if one instance
is being garbage collected while another is busy in processDirectory
Bug: 5002520
Change-Id: I8717f8edeb932200d9f76b3d98915cfbe18b6ec6
Signed-off-by: Mike Lockwood <lockwood@android.com>
To do this we need to move the logic for determining media type to MediaProvider
Make some things in MediaFile public so they can be used from MediaProvider
Bug: 4948188
Change-Id: I6ab168b6b4d45b2fc91ea8bd52ca58283b0efc14
Signed-off-by: Mike Lockwood <lockwood@android.com>
- Add one more column in MediaStore to indicate whether a
media file is drm-protected.
- Remove old DRM code from Ringtone
- Use the new DRM code in RingtoneManager
Change-Id: I1311fd1c04841c2cd47df6c901589966cf55a692
The purpose of ICameraRecordingProxy and ICameraRecordingProxyListener is to
allow applications using the camera during recording.
Camera service allows only one client at a time. Since camcorder application
needs to own the camera to do things like zoom, the media recorder cannot
access the camera directly during recording. So ICameraRecordingProxy is a proxy
of ICamera, which allows the media recorder to start/stop the recording and
release recording frames. ICameraRecordingProxyListener is an interface that
allows the recorder to receive video frames during recording.
ICameraRecordingProxy
startRecording()
stopRecording()
releaseRecordingFrame()
ICameraRecordingProxyListener
dataCallbackTimestamp()
The camcorder app opens the camera and starts the preview. The app passes
ICamera and ICameraRecordingProxy to the media recorder by
MediaRecorder::setCamera(). The recorder uses ICamera to setup the camera in
MediaRecorder::start(). After setup, the recorder disconnects from camera
service. The recorder calls ICameraRecordingProxy::startRecording() and
passes a ICameraRecordingProxyListener to the app. The app connects back to
camera service and starts the recording. The app owns the camera and can do
things like zoom. The media recorder receives the video frames from the
listener and releases them by ICameraRecordingProxy::releaseRecordingFrame.
The recorder calls ICameraRecordingProxy::stopRecording() to stop the
recording.
The call sequences are as follows:
1. The app: Camera.unlock().
2. The app: MediaRecorder.setCamera().
3. Start recording
(1) The app: MediaRecorder.start().
(2) The recorder: ICamera.unlock() and ICamera.disconnect().
(3) The recorder: ICameraRecordingProxy.startRecording().
(4) The app: ICamera.reconnect().
(5) The app: ICamera.startRecording().
4. During recording
(1) The recorder: receive frames from ICameraRecordingProxyListener.dataCallbackTimestamp()
(2) The recorder: release frames by ICameraRecordingProxy.releaseRecordingFrame().
5. Stop recording
(1) The app: MediaRecorder.stop()
(2) The recorder: ICameraRecordingProxy.stopRecording().
(3) The app: ICamera.stopRecording().
bug:2644213
Change-Id: I15269397defc25cbbcae16abc071c8349c123122
1. Extract 3GPP global format descriptions
2. Extract 3GPP local format descriptions
3. Define data structure (TimedText) for applications to
retrieve the format metadata
Change-Id: I6eac2a78df29ee15beee456656331fdd83b24e8e
o This patch allows us to use the logic from MediaMetadataRetriever to extract a thumbnail instead of extracting
the thumbnail from a fixed position (@500 ms).
Change-Id: I81e8378d9bed80894cc622479679021dce3d52e5
related-to-bug: 3485609
These calls did not correctly handle some variants of the arguments,
which showed up when running in PTP mode.
Change-Id: Iedbaefebfa39111c8bcaee7c6cc3820a65d6c98f
Signed-off-by: Mike Lockwood <lockwood@android.com>
This adds support for setting a SurfaceTexture as the MediaPlayer video
sink by using a ParcelSurfaceTexture object. The goal is to enable a
SurfaceTexture to pass through Binder (via ParcelSurfaceTexture) and then
be set on the MediaPlayer.
Change-Id: Ife5689ce673eb4bee1c377019db761685217b71d
PTP mode will be implemented as a separate USB function instead.
Change-Id: I9304c1936c70604ab2ed9704c6b95e11b61f5ba2
Signed-off-by: Mike Lockwood <lockwood@android.com>
o The intended failure happens if stop() call comes immediately after start() call
before any media data from the output of the encoder is received.
Change-Id: I62fad123ac67e2f566ba555e84c0c3faf2adfd99
AudioService does not need to unconditionally stop virtual calls
when the audio mode is changed from normal. Only stop virtual calls
that have been started from AudioService.
Change-Id: I75992d3655661e5910536a62dc8a8e0256d835e8
The AudioManager API to control bluetooth SCO did not provide an easy way for
applications to handle SCO connection errors. When a request to activate SCO with
AudioManager.startBluetoothSco() failed, no state change was indicated via
AudioManager.ACTION_SCO_AUDIO_STATE_CHANGED intent. The application had to
implement a timeout to handle connection failures.
The API change consists in defining a new intent AudioManager.ACTION_SCO_AUDIO_STATE_UPDATED
and deprecate AudioManager.ACTION_SCO_AUDIO_STATE_CHANGED. The new intent
will broacast a new state CONNECTING when the SCO connection is initiated.
The application can monitor changes from CONNECTING to either CONNECTED or DISCONNECTED
states to detect connection success or failure.
An extra indicating the previous state is also added to the new intent.
Also improved BluetoothHeadset service management in AudioService. A disconnection
from the service is not considered as a device or SCO link disconnection. Instead, if the
service interface is not present when a request to activate SCO is received, an
attempt is made to reconnect to the service.
Change-Id: I005fda1caaf74bb7de64fece44e9c7e628e828db