24164 Commits

Author SHA1 Message Date
James Dong
c3ae937a95 Add lost frame handling in AudioSource
- Also collect stats on lost audio frames instead of time spent on reading

Change-Id: I6380b143e4fbdcd894491aaae523331e90d0f04f
2010-07-30 14:35:37 -07:00
Dianne Hackborn
31b5d5485f Merge "Fix a bug where we cleaned an apps external data when upgrading it. :(" into gingerbread 2010-07-29 14:07:14 -07:00
Dianne Hackborn
fb1f103191 Fix a bug where we cleaned an apps external data when upgrading it. :(
Change-Id: I0eee1e7062d334c66d6daa3c43e11a292263aada
2010-07-29 13:58:32 -07:00
Christopher Tate
571180c4c7 Merge "Attempt to fix the SDK build" into gingerbread 2010-07-29 13:53:37 -07:00
Christopher Tate
466b22b76e Attempt to fix the SDK build
On the assumption that the local min() function declaration is in
conflict with some 'min' #define floating around, rename the local
function to min_of().

Change-Id: I62aa27f213c6093cc78805de611cf4aa75f0eef2
2010-07-29 13:42:45 -07:00
Jeff Brown
aab985b951 Fix touch input in landscape mode.
Change-Id: I7d47e9b02e6443ed604a6bf842028a5db934d90d
2010-07-29 13:05:52 -07:00
Jeff Brown
6ec402b5ae DO NOT MERGE: Fix input event injection ANRs on UI thread.
Added a new asynchronous injection mode and made the existing
synchronization mechanism more robust.

Change-Id: Ia4aa04fd9b75ea2461a844c5b7933c831c1027e6
2010-07-29 12:54:27 -07:00
Andreas Huber
6dea6f4e71 am 16263d9f: Squashed commit of the following:
Merge commit '16263d9f8cc01392c2f3678b381ce897647c8c81' into gingerbread

* commit '16263d9f8cc01392c2f3678b381ce897647c8c81':
  Squashed commit of the following:
2010-07-29 11:07:49 -07:00
Andreas Huber
16263d9f8c Squashed commit of the following:
commit 4abf16bb04dc9695fedf4007a84f903074312ccd
Author: Andreas Huber <andih@google.com>
Date:   Tue Jul 20 09:21:17 2010 -0700

    Support a single format change at the beginning of audio playback. This way the AAC+ decoder may change its output format from what is originally encoded in the audio stream and we'll still play it back correctly.

    Change-Id: Icc790122744745e9a88099788d4818ca1e265a82
    related-to-bug: 2826841

commit 09c74da63e6ad5cb5dafb70f62696d75d2978967
Author: James Dong <jdong@google.com>
Date:   Sun Jul 18 17:57:01 2010 -0700

    Fix MPEG4Extractor to extract sampling frequency correctly when SBR is enabled.

    Change-Id: I883c81dad3ea465e71cb5590e89d763671a90ff8

commit f672bf2a782dc7d5fb6325d611a7fe17045dfe9a
Author: James Dong <jdong@google.com>
Date:   Thu Jul 8 20:56:13 2010 -0700

    Enable the support for decoding audio with AAC+ and eAAC+ features

    bug - 282684

    Change-Id: I73c8377af3cc4edd3ee7cea86dc3b1c369fbd78b

Change-Id: I012f1179e933b6d1345d2368f357576c722485f7
2010-07-29 09:45:06 -07:00
Mike Lockwood
8dc16c27e2 Fix typo in GPS mode logic.
MS-Assisted support should not be required for using MS-Based mode.

Change-Id: Ia6ee219674de3e9cc13190b753f8776305a4fa90
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-29 11:39:55 -04:00
Eric Laurent
a54d7d3d7d Fixed underrun in audioflinger mixer.
When all audio tracks have been disabled and the mixer is running idle before the output stream is placed in standby,
the mixer sometimes fails to write to the output stream on time to avoid underrun.

This is because the sleep period used to wait before the next write to output stream is too close to the actual buffer duration.
In fact this sleep time is not critical as if we write too early to the output stream, the kernel driver will wait for free buffers
from the audio DSP DMA and we will sleep anyways.

The fix consists in dividing the calculated wait period by 2 to increase the margin.

Change-Id: I5730887dc2ccce2a511bc858494a6f7da6b392a0
2010-07-29 06:50:24 -07:00
Eric Laurent
493941b8d8 Allow creation of an audio effect on a session with no audio tracks.
This is necessary to allow creating and enabling an effect attached to a particular player
session before the playback is started. As a matter of fact, the implementation of the mediaplayer
does not create the AudioTrack before playback starts.

Change-Id: I1266e8885f9d756acc949303321aaac0fbf83e34
2010-07-29 02:34:40 -07:00
Chris Tate
7b40518e56 Merge "Change unistd.h to stddef.h to be correct" into gingerbread 2010-07-28 18:14:51 -07:00
Adam Powell
a0ae8bc5c6 Merge "Fix a bug that could cause flings to last too long using a Scroller" into gingerbread 2010-07-28 16:56:13 -07:00
Kenny Root
a4879bad70 Change unistd.h to stddef.h to be correct
size_t should be defined through inclusion of stddef.h instead of unistd.h

Change-Id: Ieaadacfca1e1c44c2533ea95f73fc060c1519b52
2010-07-28 16:46:12 -07:00
Adam Powell
1b088be8bb Fix a bug that could cause flings to last too long using a Scroller
Bug 2866552

Change-Id: I6979b3da54ca2aeaf4583629e28ee81fa5bd70da
2010-07-28 16:43:45 -07:00
Kenny Root
3de27d5a56 Merge "Add stdint.h to fix sim-eng" into gingerbread 2010-07-28 16:41:49 -07:00
Kenny Root
e30de4e6a3 Add stdint.h to fix sim-eng
Change-Id: I82cebe3e769aa4db99bd758bd2f182b0d462de6f
2010-07-28 16:41:02 -07:00
Kenny Root
8c5d9430d2 Merge "Add unistd.h for size_t typedef to fix sim-eng" into gingerbread 2010-07-28 16:37:20 -07:00
Kenny Root
9d90ed71cc Add unistd.h for size_t typedef to fix sim-eng
Change-Id: Ida4f1742547f39539b601f13182c722aa7cf863e
2010-07-28 16:31:24 -07:00
Mathias Agopian
9f2a91bc2b Merge "fix [2873058] Surface::dequeueBuffer blocks on last buffer, i.e. cannot dequeue all allocated buffers at once." into gingerbread 2010-07-28 16:30:56 -07:00
Christopher Tate
bae6fe242f Merge "Support streaming of compressed assets > 1 megabyte" into gingerbread 2010-07-28 15:36:48 -07:00
Christopher Tate
b100cbf178 Support streaming of compressed assets > 1 megabyte
Compressed assets larger than one megabyte are now decompressed on demand
rather than being decompressed in their entirety and held in memory.  Reading
the data in order is relatively efficient, as is seeking forward in the stream.
Seeking backwards is supported, but requires reprocessing the compressed data
from the beginning, so is very inefficient.

In addition, the size limit on compressed assets has been eliminated.

Change-Id: I6e68247957e6c53e7e8ba70d12764695f1723bad
2010-07-28 15:33:28 -07:00
James Dong
bc1daf0160 Merge "Eliminate the linear cost associated with mSampleSizes.size()" into gingerbread 2010-07-28 15:28:54 -07:00
James Dong
e991e5f334 Eliminate the linear cost associated with mSampleSizes.size()
- The linear cost associated with mSampleSizes.size() call causes the
  CPU load to increase overtime as more and more audio/video samples
  are recorded.

- Other Lists used in the MP4 file writer may have similar issues, but
  the size() call is not made for each output audio/video output sample,
  or the size of the list is bounded (not linear to the total number
  of audio/video output samples). As for now, we can live with the small
  cost (tested with 30 minutes long recording).

Change-Id: I23bd93ea4256cb0be0c1649760e39e6809eb4946
2010-07-28 15:21:59 -07:00
Kenny Root
f369a9b5f7 Remove stale temporary ASEC containers
When a temporary container is created, its existence should be
ephemeral. However, if there is an error that causes system_server to be
killed during the process of creating a finalized ASEC, delete the stale
containers on the next start-up of system_server.

Change-Id: I7be8f94638a824295474c9a95960594848cb726b
2010-07-28 14:48:58 -07:00
Kenny Root
56c02dc3d3 Merge "Fix getTempContainerId()" into gingerbread 2010-07-28 14:48:40 -07:00
Kenny Root
c78a807974 Fix getTempContainerId()
getTempContainerId() would always return "smdl2tmp1" unless you had
MAX_CONTAINERS number of SD card SDKs, because of an array sort that put
all the zeros at the beginning.

Switch from trying to find a hole in the series of numbers to just
getting a number that's one larger than the previous. This reduces the
algorithmic complexity and the memory requirements.

Bug: 2832580
Change-Id: I32dc75ef5a6645f594ea47b032d7402e8860ebcd
2010-07-28 14:45:14 -07:00
Scott Main
b1bb7180ec am 3bf5c4cd: Merge "fix markup error bug:2871538" into froyo
Merge commit '3bf5c4cd30f8bd598842d8ded5f1655406b5c27a' into gingerbread

* commit '3bf5c4cd30f8bd598842d8ded5f1655406b5c27a':
  fix markup error
2010-07-28 14:23:16 -07:00
Scott Main
3bf5c4cd30 Merge "fix markup error bug:2871538" into froyo 2010-07-28 14:20:18 -07:00
Jeff Brown
6d0fec2de3 Refactor input reader to support new device types more easily.
Refactored the input reader so that each raw input protocol is handled
by a separate subclass of the new InputMapper type.  This way, behaviors
pertaining to keyboard, trackballs, touchscreens, switches and other
devices are clearly distinguished for improved maintainability.

Added partial support for describing capabilities of input devices
(incomplete and untested for now, will be fleshed out in later commits).

Simplified EventHub interface somewhat since InputReader is taking over
more of the work.

Cleaned up some of the interactions between InputManager and
WindowManagerService related to reading input state.

Fixed swiping finger from screen edge into display area.

Added logging of device information to 'dumpsys window'.

Change-Id: I17faffc33e3aec3a0f33f0b37e81a70609378612
2010-07-28 14:16:15 -07:00
Scott Main
8a52f3d683 fix markup error
bug:2871538

Change-Id: I7ab4a9bb722ee8b3e5d740f79143776be8b56a6f
2010-07-28 14:15:26 -07:00
Dan Egnor
b350bec514 am 17876aa5: Minor changes to ContentProvider javadoc to improve consistency.
Merge commit '17876aa586cc9acfb3e5b909c14b9e73537a1a8d' into gingerbread

* commit '17876aa586cc9acfb3e5b909c14b9e73537a1a8d':
  Minor changes to ContentProvider javadoc to improve consistency.
2010-07-28 12:40:16 -07:00
Dan Egnor
17876aa586 Minor changes to ContentProvider javadoc to improve consistency.
Change-Id: I710f618c94ffd5d6368ef04a39ac08f675bec11b
2010-07-28 12:28:04 -07:00
James Dong
7e397842d5 Reduce memory usage by the MP4 file writer
- Don't store timestamp for each output sample
- Don't store timestamp for statistical data collection if the collection of statistical data is not requested

TODO:
1. Reduce CPU load by elimnating the list cost associated with List.size() call.

Change-Id: I590bc17176596a65952c982574b82ee3b15b7d1c
2010-07-28 12:02:57 -07:00
James Dong
5587bb7e37 Merge "Interleave the audio and video by default - default interleave duration is set to 1 second" into gingerbread 2010-07-28 11:58:12 -07:00
James Dong
63299c0387 Interleave the audio and video by default
- default interleave duration is set to 1 second

This can dramatically reduce the memory usage
by the MP4 file writer.

Change-Id: Ia3ff202cabfcd2d3f183065d31e4596617c2dded
2010-07-28 10:08:03 -07:00
Joe Onorato
0c39b6c65b Merge "Add a missing break; to restore old functionality and not turn off the screen after 30secs regardless of system preference." into gingerbread 2010-07-28 09:53:12 -07:00
Eric Laurent
62d83a0c89 Merge "Audio effects: modified command() parameter types." into gingerbread 2010-07-28 07:48:49 -07:00
Eric Laurent
a4c72acfbc Audio effects: modified command() parameter types.
The type of the cmd, cmdSize and *pReplySize parameters of the effect control interface command()
function have been modified from int to uint32_t. This is more consistent with their role.

Change-Id: I84d289fc262d6753747910f06f485597dfee6591
2010-07-28 05:49:21 -07:00
Mike Lockwood
c40d714ca5 Merge "Tethering: Use new ACTION_USB_STATE broadcast to monitor USB connected state" into gingerbread 2010-07-28 04:04:18 -07:00
Mathias Agopian
51c70e3e41 fix [2873058] Surface::dequeueBuffer blocks on last buffer, i.e. cannot dequeue all allocated buffers at once.
this situation happened when the last buffer needed to be resized
(or allocated, the first time). the assumption was that the buffer
was in use by SF itself as the current buffer (obviously, this
assumption made no sense when the buffer had never been allocated, btw).

the system would wait until some other buffer became the "front" buffer.

we fix this problem by entirely removing the requirement that the
buffer being resized cannot be the front buffer. instead, we just
allocate a new buffer and replace the front buffer by the new one.

the downside is that this uses more memory (an extra buffer) for a
brief amount of time while the old buffer is being reallocated and
before it has actually been replaced.

Change-Id: I022e4621209474ceb1c671b23deb4188eaaa7285
2010-07-27 20:11:35 -07:00
Brad Fitzpatrick
b73045935c Merge "Cap the size of StrictMode buffering we do before calling DropBox." into gingerbread 2010-07-27 18:34:08 -07:00
Steve Howard
9b8e5566f9 Merge "One last change to current.xml for new download manager API" into gingerbread 2010-07-27 16:55:14 -07:00
Brad Fitzpatrick
e73eb53125 Cap the size of StrictMode buffering we do before calling DropBox.
Change-Id: I46ea767bd0153c745e9b7eff945dacf5130f8807
2010-07-27 16:54:39 -07:00
Brad Fitzpatrick
4d5443762b am 86c035f0: Merge "COMMENT ONLY change to clarify ContentProvider documentation." into froyo
Merge commit '86c035f0d176be9cb06b1e4f2390c25701417586' into gingerbread

* commit '86c035f0d176be9cb06b1e4f2390c25701417586':
  COMMENT ONLY change to clarify ContentProvider documentation.
2010-07-27 16:52:12 -07:00
Steve Howard
f547d722f9 One last change to current.xml for new download manager API
Change-Id: If88984ad64880a81e4dbb4ef9f8118cc52bb891f
2010-07-27 16:50:07 -07:00
Andreas Huber
84047bc295 Add a missing break; to restore old functionality and not turn off the screen after 30secs regardless of system preference.
Change-Id: I6d160a1851e1f73bac3775d24cf70d46da59aa47
2010-07-27 16:49:10 -07:00
Brad Fitzpatrick
86c035f0d1 Merge "COMMENT ONLY change to clarify ContentProvider documentation." into froyo 2010-07-27 16:44:53 -07:00
Dan Egnor
6fcc0f073d COMMENT ONLY change to clarify ContentProvider documentation.
Gets a little more specific about thread behavior, and makes
pointed comments about not doing too much work in onCreate().

Change-Id: I682f0eb7d7559babee901ed26642751a6ba0a1ea
2010-07-27 16:32:17 -07:00