67765 Commits

Author SHA1 Message Date
Jason Sams
e158f203d2 Merge "Rename three header files to free namespace for api." 2012-02-17 12:04:20 -08:00
Glenn Kasten
c35761e15c Merge "Remove bit fields to improve performance" 2012-02-17 10:45:02 -08:00
Jeff Brown
ba217ef207 Merge "Ignore broken input channel when finishing input event." 2012-02-17 10:30:50 -08:00
Jeff Brown
9806a2307f Ignore broken input channel when finishing input event.
There are occasional races during application shut down where the
input dispatcher will close an input channel before the application
has finished its last event.  So just ignore EPIPE.

Also tweak the logging for failed input event injection to make
it clearer which pid was trying to perform the injection.

Bug: 6013004
Change-Id: I7bbb01441d41762b03eafd4d39dcf0323e1cadf3
2012-02-17 10:28:09 -08:00
Philip Milne
580d079101 Merge "Fix remaining issue with bug #5904777" 2012-02-17 10:06:47 -08:00
Mike Lockwood
abfac6a559 Merge "Revert "The com.android.athome api classes are moving android.support.place."" 2012-02-17 09:53:30 -08:00
Mike Lockwood
9dede89795 Revert "The com.android.athome api classes are moving android.support.place."
to fix the build

This reverts commit 1aeecce8e9fe2749d1ad7ec86e40fe5a892f8f05
2012-02-17 09:53:17 -08:00
Mike Lockwood
51723c821a Merge "New clock sync control loop." 2012-02-17 09:47:47 -08:00
Kent Ryhorchuk
11bc45fcba New clock sync control loop.
Change clock sync control to velicity form PI loop. Tuned for office LAN and
WiFi conditions, will probably perform better in clean environments.
Improve packet filtering to prevent clock sync on bad rtt.
Changed diag interface to take rtt times, P, I, D are no longer supported.

Change-Id: Iad2b26eb44cd222ec5f219b49669e2d6baec9d1c
2012-02-17 09:46:37 -08:00
Glenn Kasten
4f22c05eac Remove bit fields to improve performance
uint16_t enabled is (mostly) changed to bool in a separate CL

Change-Id: Ied9f8c034b2479cee9a8778cee7b8ff92ae75b7b
2012-02-17 09:41:56 -08:00
Glenn Kasten
e13ac73a38 Merge "Simplify code" 2012-02-17 09:40:43 -08:00
Glenn Kasten
7d3be3a3c1 Simplify code
Use DefaultKeyedVector::valueFor to avoid extra test
Make local variables as local as possible
No double parentheses
No typedef for single use
No parentheses around indirect function call
No AudioFlinger:: prefix when not needed
Remove unnecessary casts
Remove block with only one line

Saves 128 bytes

Change-Id: I3a87430eeb01b81e7b81a1c38f6fdd3274ec48f3
2012-02-17 09:39:07 -08:00
Mike Lockwood
e7c84be432 Merge "Put a bandaid on a segfault in timed audio track handling." 2012-02-17 09:20:43 -08:00
Mike Lockwood
20e1907beb Merge "The com.android.athome api classes are moving android.support.place." 2012-02-17 09:20:12 -08:00
Glenn Kasten
df344b6f78 Merge "Fixed possible heap corruption in EffectDesc" 2012-02-17 09:19:49 -08:00
Eric Fischer
bfa6291dc4 Merge "Import translations." 2012-02-16 21:10:27 -08:00
Jeff Brown
eb563e4783 Merge "Don't throw on EPIPE in consumeBatchedInputEvents." 2012-02-16 20:31:29 -08:00
Jeff Brown
b503f1eea1 Don't throw on EPIPE in consumeBatchedInputEvents.
Bug: 6014825
Change-Id: I59bd98a1fba5d86f9793fd6e9d9f0a271ac1c789
2012-02-16 20:15:22 -08:00
Christian Robertson
e03283d25f Merge "Update DroidNaskh font" 2012-02-16 19:59:08 -08:00
Jeff Brown
2bf372888c Merge "Mark input and sensor messages as asynchronous." 2012-02-16 19:49:14 -08:00
Jeff Brown
aa917f8522 Merge "Improve MessageQueue sync barrier implementation." 2012-02-16 19:49:03 -08:00
Jeff Brown
50eb3b9bf9 Merge "Encapsulate the ViewRootImpl's handler." 2012-02-16 19:43:43 -08:00
Bart Sears
5626a69aab Update DroidNaskh font
Monotype has released a new version of DroidNaskh.  This version
has *no* changes in any of the glyphs.  The change is to remove
the following tables from the .ttf files.  These tables are not
used by Android and are not included in any of our other Droid
font files.  These tables are not part of the TrueType Font file
specification.  Removing these tables reduces the size of the
font files from ~370K to ~93K.  Monotype did not bump the version
because there were no user visible changes.

ASCP and TSI0 through TSI5

Change-Id: I4f9ce63b60353e2c3b6378929fba0ed9ced456e5
2012-02-16 19:26:35 -08:00
Fabrice Di Meglio
101d5aade4 Fix #5050417 Update View class Javadoc for padding start / end
Change-Id: Iec9533616d94e4a738378bafeb1867dd74e53127
2012-02-16 18:36:40 -08:00
Jeff Brown
e0dbd00275 Mark input and sensor messages as asynchronous.
Set a barrier on traversals.

Vsync is still not enabled by default in this patch so there
should be no observable effect from these changes.

Change-Id: Ie12081b95a8f1e81ed686edf747cc62f2e044b7e
2012-02-16 18:19:56 -08:00
Bart Sears
4d5f5f8c7b Merge "New version of DroidSansFallback" 2012-02-16 18:01:38 -08:00
Dianne Hackborn
b9ee4f4425 Merge "Revert "Don't wait for current activity to pause before resuming next."" 2012-02-16 18:01:31 -08:00
Joe Onorato
1aeecce8e9 The com.android.athome api classes are moving android.support.place.
Change-Id: Ibb9b8cfc8e7d0676df43359f5abaaed5e9e1112d
2012-02-16 17:59:30 -08:00
John Grossman
8c010615bf Put a bandaid on a segfault in timed audio track handling.
Add a bandaid to prevent a segfault which can occur while handling
timed audio buffers.  There is a deeper problem which should
eventually be addressed, but for now this fix should prevent any
crashing.

The deeper problem is as follows.

When the AudioFlinger mixer gets data to mix from an AudioTrack, it
ends up getting a structure filled out which points into an IMemory
region owned by the AudioTrack.  Unfortunately, this structure is not
holding a refcount on the IMemory which it points into.  If the
IMemory refcount hits 0 and the chunk of RAM is retuned to the binder
heap it came from, there can still be a Buffer object being held by
the AudioFlinger mixer which points into the region of memory which
was retuned to the binfer heap.  If AF reads from this buffer, it
could read corrupt data (if the region of memory gets handed back out
to a writer), or it could segfault (if the heap has been freed and the
pages unmapped).  Similar problems could happen if AF attempts to
write to the buffer, heap corruption in one case, segfaulting in the
other.

In the past, this has not been an issue for AF, because tracks
allocate a single IMemory (which serves as a ring buffer) and the
IMemory lives for as long as the track lives.  As an artifact of the
way the code came out, the mixer cannot be holding a Buffer structure
pointing into the IMemory which used to be owned by a track if the
track no longer exists.  Tracks cannot come into or out of existence
during a mix operation, which is the only thing which makes this safe.

TimedTracks work differently, however.  Timed tracks each allocate a
small binder heap, and then hand out IMemory instances  broken out of
this heap.  The heap lives as long as the track, so the worst which
could happen here is that a TimedTrack's IMemory gets returned to the
heap while there is still a buffer structure in flight pointing into
the memory region, then the region gets handed out again and
overwritten by new data causing the mixer to mix the wrong audio.  The
timing to cause this to happen is very difficult to encounter, and you
to generate the timing conditions required, you need to be in a pretty
bad failure state where audio is already breaking up and skipping, so
its unlikely that anyone would notice (which is why I'm band-aiding
the segfault and letting the deeper issue slide for now).

In general, however, it might be a good idea to revisit this buffering
design.  On principal, if someone is going to hold pointers into a
refcounted object, they should be holding a ref on the object at the
same time.  Failure to do this will usually lead to a situation where
there are corruption or segfault issues, or to a system where the
refcounted object's lifetime must be implicitly managed very carefully
in ways which are usually non-obvious and are easy to break by new
engineers on a project.

Change-Id: Ib391075395ed0ef46a03c37aa38a82d09e88abeb
2012-02-16 17:59:30 -08:00
Philip Milne
6216e87fe8 Fix remaining issue with bug #5904777
LEFT alignment in an RTL environment had the wrong 'gravity'.

This was due to a modelling error in GridLayout which is fixed in this CL.

Also apply some very minor simplifications and refactorings following the
addition of RTL support.

Change-Id: I153bc06d3c22dcb9954e4cbdfa89625823239b89
2012-02-16 17:23:31 -08:00
Jason Sams
1d6983af33 Rename three header files to free namespace for api.
Change-Id: Ie9ef65a477373c30b2d5b02248f62e768b6f27ae
2012-02-16 17:14:06 -08:00
Dianne Hackborn
621e2fecb5 Revert "Don't wait for current activity to pause before resuming next."
This reverts commit cbb722ed06092a9e2be37150aa8bc635f0fe21da.
2012-02-16 17:07:33 -08:00
Fabrice Di Meglio
30e2fbe0d2 Merge "Improve textDirection APIs" 2012-02-16 16:58:47 -08:00
Glenn Kasten
afe9833de9 Fixed possible heap corruption in EffectDesc
"EffectDesc *effect = new EffectDesc(*effects[i]);" was relying on the
default copy constructor for EffectDesc, but the default copy constructor
does a member-by-member copy.  This works OK for mUuid, but a member
copy of mName and mParams shares pointers.  This could result in heap
corruption later on due to a double free.  Changed to add an explicit
copy constructor that does a deep copy of both mName and mParams.

A malloc() and strdup() were being freed by delete, but the correct
matching API for these is free().  Fortunately our current memory runtime
implementation ignores the difference. Changed to use free().

EffectDesc and InputSourceDesc member fields were being torn down by
the code that does delete.  Changed to do the tear-down in ~EffectDesc()
and ~InputSourceDesc().

Added constructor EffectDesc() with name and UUID parameters, rather
than having caller fill in the object after construction.

Made ~EffectDesc() and ~InputSourceDesc() non-virtual to save memory,
since they have no subclasses.

Change-Id: Ibb5cc2e6760d72e0c4cf537068ac4432c717bafd
2012-02-16 16:57:44 -08:00
Romain Guy
add3239ffb Merge "Ensure we always reset graphics modifiers Bug #6025838" 2012-02-16 16:52:53 -08:00
Romain Guy
445c83c775 Ensure we always reset graphics modifiers
Bug #6025838

If a modifier is setup and not reset crashes can occur.

Change-Id: I715524fb46928f1f06499cc1402499ef59f4a050
2012-02-16 16:43:07 -08:00
Fabrice Di Meglio
6d3d5057b4 Improve textDirection APIs
Change-Id: I8bff30f5adb0ab4077145d83ac4a716e04f289ac
2012-02-16 16:42:20 -08:00
Fabrice Di Meglio
9efedcbbab Merge "Fix Javadoc for View" 2012-02-16 15:50:39 -08:00
Fabrice Di Meglio
069bbe79fb Fix Javadoc for View
Change-Id: Iccae458320273253637017c6f32329150bae479e
2012-02-16 15:49:18 -08:00
Amith Yamasani
3c3155abea Merge "Fix Power Control widget" 2012-02-16 15:48:14 -08:00
John Grossman
06c51e2f48 Merge "Really fix the build this time." 2012-02-16 15:28:44 -08:00
John Grossman
ba2ff9c223 Really fix the build this time.
Cannot try to include <limits> on git_master-without-vendor.  The file
just does not exist.

Change-Id: Iae383465c59d1cf59a9ba3f729f8f074971f7ce4
2012-02-16 15:25:51 -08:00
Selim Gurun
e800892c4b Merge "Act on credential storage updates." 2012-02-16 15:13:12 -08:00
Amith Yamasani
67cf7d314b Fix Power Control widget
Some changes in AppWidgetService were interfering with widget permissions.

Added some hidden methods in Context to communicate the requesting user
information instead of using the calling uid.

Bug: 6019296
Change-Id: I5e519fd3fbbfa5b3fcc5c297b729c671dac8e7c7
2012-02-16 15:03:42 -08:00
Jeff Brown
0f85ce3837 Improve MessageQueue sync barrier implementation.
Instead of acquiring and releasing a barrier using an up/down
counter, we post a message to the queue that represents the
barrier.  This is a more natural representation of the barrier
and better matches what we want to do with it: stall messages
behind the barrier in the queue while allowing messages earlier
in the queue to run as usual.

Refactored the MessageQueue a little bit to simplify the quit
logic and to better encapsulate the invariant that all
messages within the queue must have a valid target.  Messages
without targets are used to represent barriers.

Bug: 5721047
Change-Id: Id297d9995474b5e3f17d24e302c58168e0a00394
2012-02-16 14:58:33 -08:00
John Grossman
27526f236a Merge "Fix the build." 2012-02-16 14:57:54 -08:00
John Grossman
b8525e9a76 Fix the build.
Looks like not all flavors of the android build include support for
std::numeric_limits.  Fix the build by using a simple macro for now.
A more elegant solution can be searched for once the build is green
again.

Change-Id: I18329cd0d26ca69de6a52df9a1c6eeb3ba063b48
2012-02-16 14:56:08 -08:00
Dianne Hackborn
7729a8c48b am e669d666: am 1db7eeac: am 06a591cd: Fix last change -- don\'t call startInputInner() with lock held.
* commit 'e669d6666ae0c41742716bc2564266c1bab3f855':
2012-02-16 14:48:53 -08:00
Dianne Hackborn
a3b5f6c29b am 804aa297: am 01810bbb: am 06a591cd: Fix last change -- don\'t call startInputInner() with lock held.
* commit '804aa297950949985882e4841303cd6e12fae06e':
  Fix last change -- don't call startInputInner() with lock held.
2012-02-16 14:48:48 -08:00
Dianne Hackborn
e669d6666a am 1db7eeac: am 06a591cd: Fix last change -- don\'t call startInputInner() with lock held.
* commit '1db7eeac74d1455991e1dc0f532b47276d0c679c':
2012-02-16 14:46:41 -08:00