616 Commits

Author SHA1 Message Date
Dianne Hackborn
68a3b8b660 am 24eca800: Merge change I887f355f into eclair-mr2
Merge commit '24eca800d4b34e7d13fbcbc1ab74c9d91ff6a4e1' into eclair-mr2-plus-aosp

* commit '24eca800d4b34e7d13fbcbc1ab74c9d91ff6a4e1':
  Propagate background scheduling class across processes.
2009-12-09 15:49:02 -08:00
Jean-Michel Trivi
ed3e7ab3bf am 86ed86d2: Merge change I0f73439a into eclair
Merge commit '86ed86d2260932bdf2217b1d8431ac9e04d47534' into eclair-plus-aosp

* commit '86ed86d2260932bdf2217b1d8431ac9e04d47534':
  Partially fix bug 2111240 Detect docking / undocking event by reporting
2009-12-09 11:50:36 -08:00
Android (Google) Code Review
e6c0e99334 Merge change I129483f8 into eclair-mr2
* changes:
  Optional use of UTF-8 strings in resource bundles
2009-12-08 13:41:38 -08:00
Jean-Michel Trivi
6154412ee8 Partially fix bug 2111240 Detect docking / undocking event by reporting
to the AudioPolicyManager a new forced usage AudioSystem::FOR_DOCK
which can take the FORCE_NONE, FORCE_BT_DOCK or FORCE_WIRED_ACCESSORY
values. This CL is complemented by an update of the APM to take into
account the FOR_DOCK usage.
2009-12-07 20:42:52 -08:00
Dianne Hackborn
887f355f99 Propagate background scheduling class across processes.
This is a very simply implementation: upon receiving an IPC, if the handling
thread is at a background priority (the driver will have taken care of
propagating this from the calling thread), then stick it in to the background
scheduling group.  Plus an API to turn this off for the process, which is
used by the system process.

This also pulls some of the code for managing scheduling classes out of
the Process JNI wrappers and in to some convenience methods in thread.h.
2009-12-07 19:11:14 -08:00
Kenny Root
19138468ca Optional use of UTF-8 strings in resource bundles
Allows the use of UTF-8 for packing resources instead of the
default of UTF-16 for Java. When strings are extracted from the
ResStringPool, they are converted to UTF-16 and the result is
cached for subsequent calls.

When using aapt to package, add in the "-8" switch to pack the
resources using UTF-8. This will result in the value, key, and
type strings as well as the compiled XML string values taking
significantly less space in the final application package in
most scenarios.

Change-Id: I129483f8b3d3b1c5869dced05cb525e494a6c83a
2009-12-07 15:14:15 -08:00
Andreas Huber
f553a58425 am 5921fb51: Merge change I91eb0354 into eclair-mr2
Merge commit '5921fb51e0219ddd7cad439a73495f320c57d50e' into eclair-mr2-plus-aosp

* commit '5921fb51e0219ddd7cad439a73495f320c57d50e':
  Change OMXCodec::Create to return an sp<MediaSource> instead of an sp<OMXCodec>, this is more general and does not sacrifice any functionality as the remaining OMXCodec APIs are not meant to be public anyway.
2009-12-07 10:01:06 -08:00
Andreas Huber
91eb035404 Change OMXCodec::Create to return an sp<MediaSource> instead of an sp<OMXCodec>, this is more general and does not sacrifice any functionality as the remaining OMXCodec APIs are not meant to be public anyway. 2009-12-07 09:43:00 -08:00
Andreas Huber
5d676ad5d9 am 52f410e2: Merge change Ifef6435a into eclair-mr2
Merge commit '52f410e2ebba103220cffce05b895f0c38a56665' into eclair-mr2-plus-aosp

* commit '52f410e2ebba103220cffce05b895f0c38a56665':
  Enable proper cleanup of OMX nodes managed through stagefright.
2009-12-04 13:41:15 -08:00
Andreas Huber
fef6435a06 Enable proper cleanup of OMX nodes managed through stagefright. 2009-12-04 12:52:40 -08:00
Andreas Huber
9ee55cc1bc am 2d6d609c: Merge change I74bf38a0 into eclair-mr2
Merge commit '2d6d609c9ede7ed8924001df00af9c13effab8ad' into eclair-mr2-plus-aosp

* commit '2d6d609c9ede7ed8924001df00af9c13effab8ad':
  Squashed commit of the following:
2009-12-03 16:40:04 -08:00
Andreas Huber
874c508c53 am bfb9fb14: Refactor MediaScanner. Some steps on the way towards being able to build the tree without OpenCore.
Merge commit 'bfb9fb143b67c2d0307af2bce9af3c08f362b29a' into eclair-mr2-plus-aosp

* commit 'bfb9fb143b67c2d0307af2bce9af3c08f362b29a':
  Refactor MediaScanner. Some steps on the way towards being able to build the tree without OpenCore.
2009-12-03 16:39:27 -08:00
Android (Google) Code Review
2d6d609c9e Merge change I74bf38a0 into eclair-mr2
* changes:
  Squashed commit of the following:
2009-12-03 13:27:08 -08:00
Andreas Huber
bfb9fb143b Refactor MediaScanner. Some steps on the way towards being able to build the tree without OpenCore. 2009-12-03 13:21:54 -08:00
Andreas Huber
b0caf946b7 Squashed commit of the following:
commit 543e192bf2ae13f573dc4c4e53b239ed4ea00e81
Author: Andreas Huber <andih@google.com>
Date:   Thu Dec 3 11:33:57 2009 -0800

    stagefright now acts as the OMX Master, vendors supply their own plugins through libstagefrighthw. In OpenCore-enabled builds we now sit on top of PVMaster...

commit 3cbfdbd9cecadbb77b63125c62883bf1065884fe
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 2 12:39:07 2009 -0800

    More OMX infrastructure, stagefright is now taking over the OMX Master, multiplexing all contributing OMX implementations under a common interface.
2009-12-03 12:49:09 -08:00
Andreas Huber
ae34cf92db am 781ac162: Merge change I8768f2cc into eclair-mr2
Merge commit '781ac16283574ec07cd7b13d67b54b7b4c2c15cb' into eclair-mr2-plus-aosp

* commit '781ac16283574ec07cd7b13d67b54b7b4c2c15cb':
  A small sample tool to encode pcm audio data to amr, decode it again and play it. Some changes to OMXCodec to properly configure the AMR decoder(s).
2009-12-01 17:10:19 -08:00
Andreas Huber
8768f2ccef A small sample tool to encode pcm audio data to amr, decode it again and play it. Some changes to OMXCodec to properly configure the AMR decoder(s). 2009-12-01 15:26:54 -08:00
Andreas Huber
5493df919b am bbd6cb46: Merge change Ib1b7bce4 into eclair-mr2
Merge commit 'bbd6cb463b405fc90912dee470fe6c7b8c6b1f54' into eclair-mr2-plus-aosp

* commit 'bbd6cb463b405fc90912dee470fe6c7b8c6b1f54':
  Squashed commit of the following:
2009-11-23 10:51:41 -08:00
Andreas Huber
27366fc954 Squashed commit of the following:
commit 1efc38dc3c33fef57b759002db3965ed07a28cb0
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 19 14:36:14 2009 -0800

    Sending the SEEK-COMPLETE notification temporarily broke seeking backwards in time behaviour. This is now fixed.

    Also, get rid of the semi-random delay after posting buffers to surface flinger in favour of delaying the buffer release until the next frame is displayed.

commit 51973062eb5ee63fd64b845d72bac517cc3369cf
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 18 14:01:43 2009 -0800

    Fix one more unit test, properly send seek-complete notification only after seek actually completed.

commit cb22250b34b1fcfe1bf459723a761fd003950229
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 18 12:31:36 2009 -0800

    Fix seek-while-paused in AwesomePlayer, revert to using FileSource if MmapSource fails.

commit 25eb9241138ddf7bb27ce90657116c5f8a94d880
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 18 12:30:40 2009 -0800

    Support seeking and duration in AMRExtractor, assuming all frames are the same size.

commit 44192f2ebb7ea3bbd3ba5910025692dbc6a08faa
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 18 10:21:44 2009 -0800

    MediaPlayerImpl is dead, long live AwesomePlayer.

commit c5b52d3c0674f5dc94db506afbce52401cceddac
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 18 09:42:23 2009 -0800

    New implementation of the stagefright mediaplayer.
2009-11-23 10:44:30 -08:00
Eric Laurent
8652646105 am 949c572a: am e7800946: Merge change I49f02be9 into eclair
Merge commit '949c572a16881aa40079a42bf7682637b23eb16a' into eclair-mr2-plus-aosp

* commit '949c572a16881aa40079a42bf7682637b23eb16a':
  Issue 2265163: Audio still reported routed through earpiece on sholes
2009-11-21 00:26:09 -08:00
Eric Laurent
7d4cc41ad2 am e7800946: Merge change I49f02be9 into eclair
Merge commit 'e7800946a42c0ebe8e0b3f6eba04a96a9641aaff' into eclair-plus-aosp

* commit 'e7800946a42c0ebe8e0b3f6eba04a96a9641aaff':
  Issue 2265163: Audio still reported routed through earpiece on sholes
2009-11-21 00:22:06 -08:00
Eric Laurent
949c572a16 am e7800946: Merge change I49f02be9 into eclair
Merge commit 'e7800946a42c0ebe8e0b3f6eba04a96a9641aaff' into eclair-mr2

* commit 'e7800946a42c0ebe8e0b3f6eba04a96a9641aaff':
  Issue 2265163: Audio still reported routed through earpiece on sholes
2009-11-21 00:21:15 -08:00
Android (Google) Code Review
e7800946a4 Merge change I49f02be9 into eclair
* changes:
  Issue 2265163: Audio still reported routed through earpiece on sholes
2009-11-21 00:18:24 -08:00
Eric Laurent
49f02be9d7 Issue 2265163: Audio still reported routed through earpiece on sholes
This is a second attempt to fix the audio routed to earpiece syndrom.
The root cause identified this time is the crash of an application having an active AudioTrack playing on the VOICE_CALL stream type.
When this happens, the AudioTrack destructor is not called and the audio policy manager is not notified of the track stop.
Results a situation where the VOICE_CALL stream is considered as always in use by audio policy manager which makes that audio is routed to earpiece.

The fix consists in moving the track start/stop/close notification to audio policiy manager from AudioTrack to AudioFlinger Track objet.
The net result is that in the case of a client application crash, the AudioFlinger TrackHandle object (which implements the remote side of the IAudioTrack binder interface) destructor is called which in turn destroys the Track object and we can notify the audio policy manager of the track stop and removal.

The same modification is made for AudioRecord although no bug related to record has been reported yet.
Also fixed a potential problem if record stop is called while the record thread is exiting.
2009-11-19 23:57:45 -08:00
Andreas Huber
8b49e97db9 am f854e077: Merge change I8134d6ed into eclair
Merge commit 'f854e0770207e93ef9d1bf6d50ed18537a107ca4' into eclair-plus-aosp

* commit 'f854e0770207e93ef9d1bf6d50ed18537a107ca4':
  DO NOT MERGE: Instead of inserting semi-random delays after submission to surface flinger, delay releasing buffers to the next display time to avoid flickering.
2009-11-19 15:01:45 -08:00
Andreas Huber
d66a901e6a DO NOT MERGE: Instead of inserting semi-random delays after submission to surface flinger, delay releasing buffers to the next display time to avoid flickering. 2009-11-19 11:24:18 -08:00
Andreas Huber
39dc51040f am 2c766498: Merge change Iea6a38c6 into eclair-mr2
Merge commit '2c7664989f7388c0c6cf0ec7d80ffa2704c8c2be' into eclair-mr2-plus-aosp

* commit '2c7664989f7388c0c6cf0ec7d80ffa2704c8c2be':
  Squashed commit of the following:
2009-11-17 10:50:22 -08:00
Android (Google) Code Review
2c7664989f Merge change Iea6a38c6 into eclair-mr2
* changes:
  Squashed commit of the following:
2009-11-17 10:46:41 -08:00
Andreas Huber
775508d97f am 744043fc: Update FileSource to also accept a file descriptor and a range.
Merge commit '744043fcbf48c32c2051f222eca552fa2df5dfcb' into eclair-mr2-plus-aosp

* commit '744043fcbf48c32c2051f222eca552fa2df5dfcb':
  Update FileSource to also accept a file descriptor and a range.
2009-11-17 10:36:27 -08:00
Andreas Huber
744043fcbf Update FileSource to also accept a file descriptor and a range. 2009-11-17 10:21:03 -08:00
Andreas Huber
ea6a38c63b Squashed commit of the following:
commit 333057b355f8c260c549553b9a0634755c838b6a
Author: Andreas Huber <andih@google.com>
Date:   Fri Nov 13 15:35:48 2009 -0800

    Some more tweaks to AVC encoding on sholes.

commit 9981d0ee52ec5b8b0182aae733d1571e3ebb8390
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 12 16:36:57 2009 -0800

    Support for avc encoding, including sholes specific tweaks to pick the right colorspace for the camera to not require transcoding.

commit 5ba0ebbbd4efca51f3ae1f60e2ca31e7d2cf136d
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 11 09:50:03 2009 -0800

    Enable actual (camera) video-only recording using h.263 or mpeg4 encoding.

commit 3fd59c3526a37fe7c696f4a978925d1831c09313
Author: Andreas Huber <andih@google.com>
Date:   Tue Nov 10 14:57:48 2009 -0800

    Allow switching between the PV recorder implementation and one supported by stagefright.

    This is controlled through the property "media.stagefright.enable-record".
2009-11-16 15:43:38 -08:00
Mathias Agopian
70a37eac62 am 35ede78e: am 91e40e78: Merge change I18e02606 into eclair
Merge commit '35ede78ede13fc2c4e7d343f50ca20372a404e06' into eclair-mr2-plus-aosp

* commit '35ede78ede13fc2c4e7d343f50ca20372a404e06':
  fix some aspects of [2258746] native crash in launcher2
2009-11-13 17:37:42 -08:00
Mathias Agopian
35ede78ede am 91e40e78: Merge change I18e02606 into eclair
Merge commit '91e40e7838d183cb2a9e750edf0a6572f21da21d' into eclair-mr2

* commit '91e40e7838d183cb2a9e750edf0a6572f21da21d':
  fix some aspects of [2258746] native crash in launcher2
2009-11-13 17:33:52 -08:00
Mathias Agopian
dca4b15747 am 91e40e78: Merge change I18e02606 into eclair
Merge commit '91e40e7838d183cb2a9e750edf0a6572f21da21d' into eclair-plus-aosp

* commit '91e40e7838d183cb2a9e750edf0a6572f21da21d':
  fix some aspects of [2258746] native crash in launcher2
2009-11-13 17:33:35 -08:00
Mathias Agopian
18e026066a fix some aspects of [2258746] native crash in launcher2
Surface::validate() could sometimes dereference a null pointer before checking it wasn't null.
This will prevent the application to crash when given bad parameters or used incorrectly.
However, the bug above probably has another cause.
2009-11-13 15:26:29 -08:00
Eric Laurent
355743c70d am 609acfd2: am 1aa9f3ca: Merge change I923d7d72 into eclair
Merge commit '609acfd2a1067f49e51925776484b070a24d8301' into eclair-mr2-plus-aosp

* commit '609acfd2a1067f49e51925776484b070a24d8301':
  Fix issue 2242614: Wired headset not recognized: bogus "state" in ACTION_HEADSET_PLUG broadcast.
2009-11-13 09:27:55 -08:00
Eric Laurent
609acfd2a1 am 1aa9f3ca: Merge change I923d7d72 into eclair
Merge commit '1aa9f3cac31a7c2b50fcb3c9259cead8d638ae54' into eclair-mr2

* commit '1aa9f3cac31a7c2b50fcb3c9259cead8d638ae54':
  Fix issue 2242614: Wired headset not recognized: bogus "state" in ACTION_HEADSET_PLUG broadcast.
2009-11-12 23:10:18 -08:00
Eric Laurent
e8302a64c7 am 1aa9f3ca: Merge change I923d7d72 into eclair
Merge commit '1aa9f3cac31a7c2b50fcb3c9259cead8d638ae54' into eclair-plus-aosp

* commit '1aa9f3cac31a7c2b50fcb3c9259cead8d638ae54':
  Fix issue 2242614: Wired headset not recognized: bogus "state" in ACTION_HEADSET_PLUG broadcast.
2009-11-12 22:49:51 -08:00
Android (Google) Code Review
1aa9f3cac3 Merge change I923d7d72 into eclair
* changes:
  Fix issue 2242614: Wired headset not recognized: bogus "state" in ACTION_HEADSET_PLUG broadcast.
2009-11-12 22:45:50 -08:00
Eric Laurent
923d7d721d Fix issue 2242614: Wired headset not recognized: bogus "state" in ACTION_HEADSET_PLUG broadcast.
The headset state indicated by HeadsetObserver in the broadcast intent ACTION_HEADSET_PLUG was not 0 or 1 as specified in the java doc but contained a bit field indicating the type of headset connected.

Modified HeadsetObserver to broacast a state conforming to java doc.
Added an extra to intent ACTION_HEADSET_PLUG to indicate if headset has a microphone or not.
Removed handling of non standard headset indications from HeadsetObserver.
Removed platform specific devices from output devices defined in AudioSystem.
Modified AudioService to use new ACTION_HEADSET_PLUG intent extra instead of bitfield in state.
2009-11-12 12:09:06 -08:00
Andreas Huber
bfdb1e88ef am d0f3228d: resolved conflicts for merge of c66d53f9 to eclair-mr2
Merge commit 'd0f3228daa9ea26ec959cb79451e6f150648bce8' into eclair-mr2-plus-aosp

* commit 'd0f3228daa9ea26ec959cb79451e6f150648bce8':
  Delegate the platform dependent hardware renderer implementation to a shared library provided by the vendor.
2009-11-12 10:43:31 -08:00
Andreas Huber
d0f3228daa resolved conflicts for merge of c66d53f9 to eclair-mr2 2009-11-12 10:32:26 -08:00
Andreas Huber
4719963c86 am c66d53f9: Merge change I880541a8 into eclair
Merge commit 'c66d53f97b1fe635f576642d5720dcd441e34cce' into eclair-plus-aosp

* commit 'c66d53f97b1fe635f576642d5720dcd441e34cce':
  Delegate the platform dependent hardware renderer implementation to a shared library provided by the vendor.
2009-11-12 10:00:02 -08:00
Andreas Huber
c8d7c1492e Delegate the platform dependent hardware renderer implementation to a shared library provided by the vendor. 2009-11-12 09:36:10 -08:00
Andreas Huber
76bd517ed2 am 05eca1d4: Merge change Ie80e2381 into eclair
Merge commit '05eca1d46a45723a57899dabad698537b7faef82' into eclair-plus-aosp

* commit '05eca1d46a45723a57899dabad698537b7faef82':
  DO NOT MERGE: Squashed commit of the following:
2009-11-05 13:58:55 -08:00
Andreas Huber
dcaa220ff5 DO NOT MERGE: Squashed commit of the following:
commit 08259dd3dc9026887f9bbfedaf45866eb56ea9bc
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 5 12:02:31 2009 -0800

    DO NOT MERGE: Use PV for metadata extraction even if stagefright is used for playback.

commit 991832fe4dc012e51d3d9ed8d647c7f09991858f
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 5 11:24:11 2009 -0800

    DO NOT MERGE: Do not assert if we encounter OMX_StateInvalid. All bets are off though.

commit cec45cf302d9218fe79956cbe8a462d7ca3a10bb
Author: Andreas Huber <andih@google.com>
Date:   Mon Oct 26 16:11:54 2009 -0700

    DO NOT MERGE: When freeing an OMX node, attempt to transition it from its current state all the way to "Loaded" in order to properly free any allocated buffers.

commit 34a1e885ef9113d68acbc26d36fcc47fdebbed84
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 5 11:10:49 2009 -0800

    DO NOT MERGE: Fix heap corruptin in OMXNodeInstance.

commit 5a47f7439a1298b330541a7e4e647a8b44487388
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 5 11:08:19 2009 -0800

    DO NOT MERGE: Fix seek-on-initial-read behaviour of OMXCodec.

commit 45bed64722501b9f411a2940aff5aff4cc4d2e98
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 5 11:02:23 2009 -0800

    DO NOT MERGE: Renaming string.h to stagefright_string.h to avoid conflicts.

commit 6738e306a50196f31a73d4fc7b7c45faff639903
Author: Andreas Huber <andih@google.com>
Date:   Thu Oct 15 13:46:54 2009 -0700

    DO NOT MERGE: Reimplement the OMX backend for stagefright.

    Besides a major cleanup and refactoring, OMX is now a singleton living in the media server, it listens for death notifications of node observers/clients that allocated OMX nodes and performs/attempts cleanup.

    Changed APIs to conform to the rest of the system.
2009-11-05 13:06:17 -08:00
Eric Laurent
653d5d415c am fcae6c71: am 67b69292: Merge change I93f500a5 into eclair
Merge commit 'fcae6c71794696a074cabf20beeb02fd87853e30' into eclair-mr2-plus-aosp

* commit 'fcae6c71794696a074cabf20beeb02fd87853e30':
  Fix issue 2203561: Sholes: audio playing out of earpiece.
2009-11-05 01:55:51 -08:00
Eric Laurent
d889f189b5 am 67b69292: Merge change I93f500a5 into eclair
Merge commit '67b692920c18f99b096dce285adc6f7439fa866c' into eclair-plus-aosp

* commit '67b692920c18f99b096dce285adc6f7439fa866c':
  Fix issue 2203561: Sholes: audio playing out of earpiece.
2009-11-05 00:01:50 -08:00
Eric Laurent
fcae6c7179 am 67b69292: Merge change I93f500a5 into eclair
Merge commit '67b692920c18f99b096dce285adc6f7439fa866c' into eclair-mr2

* commit '67b692920c18f99b096dce285adc6f7439fa866c':
  Fix issue 2203561: Sholes: audio playing out of earpiece.
2009-11-05 00:01:33 -08:00
Android (Google) Code Review
67b692920c Merge change I93f500a5 into eclair
* changes:
  Fix issue 2203561: Sholes: audio playing out of earpiece.
2009-11-05 02:55:26 -05:00