5156 Commits

Author SHA1 Message Date
Jean-Michel Trivi
5a586199ce Merge "Fix leak of global references and AudioFocusDeathHandler objects." 2011-08-14 14:24:09 -07:00
Jean-Michel Trivi
061214bb71 Fix leak of global references and AudioFocusDeathHandler objects.
Need to call unlinkToDeath() for the object to be garbage collected.
Save the object in the FocusStackEntry, unlink to death when we remove it from the stack.
See http://b/issue?id=5048400

Change-Id: I84c5ba46017d0a8744b5e7509a7c7a5c8dd918fb
author: olivier@google.com
2011-08-14 11:37:24 -07:00
Mike Lockwood
f2e2b523dd MediaScanner: Clear file path before deleting records to avoid accidental file deletions
Bug: 5140112
See also http://code.google.com/p/android/issues/detail?id=3692

Change-Id: I971eea83a2f3986a0b0ea018b7211f2525b914ab
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-08-14 10:35:54 -07:00
Eric Laurent
497b3fe725 Issue 5081351: isWiredHeadsetOn() permission.
AudioManager.isWiredHeadsetOn() should not require permission MODIFY_AUDIO_SETTINGS.
Remove permission checks on all getters in audio policy manager as permission enforcement
is really usefull for setters.
Also deprecate AudioManager.isWiredHeadsetOn() which name and implementation are deceptive.

Change-Id: I38f8df7c26c0d417bf0e2b74e4c11c2d143f2ecd
2011-08-12 17:43:35 -07:00
James Dong
65de903a88 Merge "If release has been called before finalize, do not expect MediaPlayer still exists" 2011-08-12 16:41:56 -07:00
James Dong
43ef913815 If release has been called before finalize, do not expect MediaPlayer still exists
o also, we should releae the surface object when release is called, not wait until finalize is called.

related-to-bug: 5157956

Change-Id: I0233ad61d8349c3e3800de68b752b9548ece1742
2011-08-12 16:39:47 -07:00
Jason Simmons
d9792ac752 Add a null check to handle failure of android::createPlayer
Change-Id: Id56bd0c16104e46d8dc71f13d8a44aefe251fad4
2011-08-12 13:46:55 -07:00
Eric Laurent
c498ad6eac Merge "Fix issue 5144429: CTS test fails for AudioEffects" 2011-08-12 12:49:42 -07:00
Andreas Huber
02bb0e4e3b Merge "Fix the software AAC decoder's AAC+ detection to ignore malformed frames" 2011-08-12 12:37:26 -07:00
Andreas Huber
f77493e656 Fix the software AAC decoder's AAC+ detection to ignore malformed frames
at the beginning of the stream.

Change-Id: Ib990848c696896e7d43c80dec8119dec35704b74
related-to-bug: 5122512
2011-08-12 11:38:24 -07:00
Jean-Michel Trivi
bb04910893 Merge "Pass flags on remote control client information change in intent" 2011-08-12 09:21:27 -07:00
Ted Bonkenburg
1ee60119c4 Remove ParcelSurfaceTexture and update MediaPlayer
This removes the ParcelSurfaceTexture class since that functionality has been
folded into Surface.java. The change also updates the MediaPlayer to get rid
of setParcelSurfaceTexture() and modifies setTexture() to use the new Surface
functionality in order to simplify the code.

Change-Id: Iafa75ea3188263928128325d8a726786971b4de4
2011-08-11 19:58:25 -07:00
Eric Laurent
09f1735fad Fix issue 5144429: CTS test fails for AudioEffects
android_media_AudioEffect_native_setup() was not initializing
properly the effect descriptor for audio pre processings.

AudioEffect tests should create per processing effects on a valid
AudioRecord session.

Change-Id: Ia1862ca91c98e272f9374b9225a7d4ce7ef132fc
2011-08-11 18:06:18 -07:00
Jamie Gennis
35c6ec2eba Stagefright: fix a compiler warning
Change-Id: Ia6b2027dfe80960450156d918bdd7fe1567cafea
2011-08-11 17:59:24 -07:00
Marco Nelissen
bcbddd9342 Only set the ringtones and such if this is the first media scan
b/5126979

Change-Id: Ibef2bd5a3a1a288fc1137694e858d87628d780c0
2011-08-11 15:44:38 -07:00
Eric Laurent
45bd6086cc Merge "Audio effects: track CPU and memory use separately" 2011-08-11 14:40:04 -07:00
Eric Laurent
6752ec80b2 Audio effects: track CPU and memory use separately
Before this change, CPU and memory usage for an audio effect were
registered and checked against the limit by audio policy manager
upon effect instantiation. Even if an effect was not enabled
it would prevent another effect to be created if the CPU load budget
was exceeded, which was too restrictive.

This change adds a method to register/unregister CPU load only when
an effect is enabled or disabled.
It also adds a mechanism to place all effects on the global output mix
in suspend state (disabled) when an effect is enabled on a specific session.
This will allow applications using session effects to have the priority
over others using global effects.

Also fixes some issues with suspend/restore mechanism:
- avoid taking actions when an effect is disconnected and was not enabled.
- do not remove a session from the suspended sessions list when corresponding
effect chain is destroyed.

Change-Id: I5225278aba1ae13d0d0997bfe26a0c9fb46b17d3
2011-08-11 14:33:45 -07:00
Jean-Michel Trivi
b5f04d6dbf Pass flags on remote control client information change in intent
Pass the flags about what information changed in the remote
 control client in the intent used by the remote control display.
Also pass the IRemoteControlClient to verify it is still current
 before sending the intent.

Marked some logs as to be removed before release.

Change-Id: Ib3aa22d061e5dfaf80a9c4c78774c931a2cf0fbd
2011-08-11 10:50:43 -07:00
Marco Nelissen
ef02abd505 Add Bluetooth SCO test app
Change-Id: I6c0c267fbb546b6db544e5ddb03e65276895e0e0
2011-08-11 10:42:17 -07:00
Kristian Monsen
62b3503b22 Merge "Testing for bug 5122864 libwebcore related libraries increased by 3MB in ICS vs HCMR2" 2011-08-11 03:02:29 -07:00
Marco Nelissen
a962544fce Merge "Check pids instead of IBinders" 2011-08-10 15:48:53 -07:00
Gloria Wang
458a572109 Merge "To reduce the bytes need to be buffered before start playing the streaming video. We might revert this change if too many spinnings were introduced. For bug 4448008." 2011-08-10 14:52:36 -07:00
Marco Nelissen
f1ddd51f9c Check pids instead of IBinders
There can be multiple AudioManagers per process (because each Context has
its own cache of services), so AudioService should protect SCO activation
based on whether the pids match, not whether the IBinders match.

b/5044873

Change-Id: Ibec81365f95fec11f34b47becd0e473762bf06ad
2011-08-10 14:32:45 -07:00
Gloria Wang
7096f5502b To reduce the bytes need to be buffered before start playing the streaming video.
We might revert this change if too many spinnings were introduced.
For bug 4448008.

Change-Id: I3248bba9237d71c2bd99feebc9c73f7bd45260de
2011-08-10 14:19:05 -07:00
Andreas Huber
e963ebdb44 Merge "When using "secure input buffer mode" we instantiate a different OMX component" 2011-08-10 13:03:29 -07:00
Andreas Huber
96d8a6f8ec Merge "Revert "Notify the OMX component that it's going to be used in "secure" mode."" 2011-08-10 13:03:24 -07:00
Andreas Huber
753fd9a3c7 When using "secure input buffer mode" we instantiate a different OMX component
We form the new component name by appending the suffix ".secure".

Change-Id: I509848b50ae92edb179a941493ca611f923213ec
2011-08-10 12:53:59 -07:00
Andreas Huber
422e3f7496 Revert "Notify the OMX component that it's going to be used in "secure" mode."
This reverts commit 7616178271e95f009452a21ea45e7225997dc27a.
2011-08-10 12:45:24 -07:00
James Dong
d1fe10cdb5 Merge "Fix initial 0 duration video sample in the recorded videos" 2011-08-10 11:47:38 -07:00
Mike Lockwood
bdbe6939ff Merge "Use video/webm mime type for WEBM files" 2011-08-10 10:28:25 -07:00
Mike Lockwood
b33e079aca Merge "MediaScanner: Disable bulk inserts" 2011-08-10 10:28:18 -07:00
Gloria Wang
cd7f0d7f72 Merge "To support for switching from a non-null surface/ surface texture to a null one, and vice versa. Fix for bug 5137445." 2011-08-10 09:28:50 -07:00
Jean-Michel Trivi
cbeb69ebb3 Merge "AudioService: don't use a soft reference on IRemoteControlClient" 2011-08-10 09:19:20 -07:00
Mike Lockwood
ff53591482 Use video/webm mime type for WEBM files
Bug: 5042137

Change-Id: I677af1b4f34c37c78f84229551a8d82f1a7bf245
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-08-10 12:16:40 -04:00
Mike Lockwood
3410b46565 MediaScanner: Disable bulk inserts
We are still finding bugs related to the bulk insert support,
so lets disable it for now.

Bug: 5026233

Change-Id: I436cd8fc5dbe9fcf220a623f1c070cf901c6d38c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-08-10 12:13:30 -04:00
Kristian Monsen
578b50173a Testing for bug 5122864 libwebcore related libraries increased by 3MB in ICS vs HCMR2
Trying to build with static libchromium on the build server.

Change-Id: Ib88ce1803f3d36ef97a627c1454ed83239a3afee
2011-08-10 15:10:23 +01:00
Ashish Sharma
5414a1673a Merge "Network traffic accounting for chromium stack support in mediaserver." 2011-08-09 23:21:11 -07:00
Jean-Michel Trivi
17da769e98 AudioService: don't use a soft reference on IRemoteControlClient
In the remote control stack, don't use a SoftReference to the
 IRemoteControlClient because the client live in a different
 process, which causes the reference to become null at the
 earliest opportunity.

Change-Id: I7f7733f9a1a043825cd5e8769282b535657dd82d
2011-08-09 18:44:00 -07:00
Gloria Wang
91784c996f To support for switching from a non-null surface/ surface texture to
a null one, and vice versa.
Fix for bug 5137445.

Change-Id: Ifca2997f8ad27a843abbdaa7e89a56329bc40fde
2011-08-09 15:31:30 -07:00
Mathias Agopian
f6d08b9528 Merge changes Ie06e73e5,I7ac6b5b0
* changes:
  free all buffers when ANativeWindow::disconnect is called
  return correct value from query after connecting a surface
2011-08-09 15:23:19 -07:00
James Dong
2c8e8508d2 Fix initial 0 duration video sample in the recorded videos
o Patch suggested by pmehendale@nvidia.com

Change-Id: Ibf516ba83b721b0d0ab55bb7637fe9b7b2958214
related-to-bug: 5117434
2011-08-09 11:17:49 -07:00
James Dong
0ed837a7a3 Merge "Do not release recording frames if camera is gone" 2011-08-09 11:14:06 -07:00
Marco Nelissen
c74b93fdf3 Keep effects sessions active when the caller dies.
Don't remove effects until the session they are in goes away or all
AudioEffects have been explicitly released. This allows the control
panel process to die without stopping the effects.

Change-Id: I4496e5df080230ca1af149dec95c1309ab8ea888
2011-08-09 10:21:10 -07:00
Mathias Agopian
053b02df2d return correct value from query after connecting a surface
the first time a surface was connected, the values returned
by query NATIVE_WINDOW_DEFAULT_{WIDTH|HEIGHT} and
NATIVE_WINDOW_TRANSFORM_HINT were wrong until a call
to queueBuffer was performed.

Bug: 5137366, 5121607
Change-Id: I7ac6b5b0daa876638f6bed7c20f286a6e6d984f6
2011-08-08 20:25:44 -07:00
Andreas Huber
7616178271 Notify the OMX component that it's going to be used in "secure" mode.
Change-Id: Id87c4b295eb38f7d24045918e73df298d7b842f9
related-to-bug: 5137212
2011-08-08 15:28:21 -07:00
Neel Parekh
8d4ed0d8e1 Prevent NPE when registering a remote control client
Change-Id: Ia22b456b1cbdd89736118c7e68b7c68dd6e59c64
2011-08-08 13:25:46 -07:00
Jean-Michel Trivi
7b6198cacc Bug 5045498 API for client to notify remote control info changed
Update to API for a client to notify what type of information
 changed (e.g. playstate, metadata) to optimize small updates
 without the remote control display having to do expensive
 queries such as album art.

When the remote control display retrieves the flags about
 what information changed, the flag gets cleared.

Change-Id: I7d3d8d3eecd1da44695d84905ed9e7b70fe38b86
2011-08-07 17:44:47 -07:00
Jean-Michel Trivi
5d49678841 Merge "Make retrieving remote control client go through binder interface" 2011-08-07 13:48:04 -07:00
James Dong
0a5825edf5 Do not release recording frames if camera is gone
Change-Id: Ia6038c1a3ca17207e43a955ec47c42cdff1f5a76
related-to-bug: 5129465
2011-08-05 17:19:29 -07:00
Mike Lockwood
43b076bb75 MediaScanner: Fix UnsupportedOperationException when scanning internal media
The media scanner was crashing while tring to insert genre data in the internal
media database, which does not support genres.
This resulted in some or all of the built in ringtones being unavailable

Bug: 5124718

Change-Id: Ib306348dd9808e59477b327b4adcb413957d8d24
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-08-05 19:20:44 -04:00