67852 Commits

Author SHA1 Message Date
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
548cc0e973 Update prototype remote fifo. Tested primary connection
using only fifo data transport.

cleanup cl.

Change-Id: I9b5f5e5a256b7f66b387bd801c1da0e642761200
2012-02-16 17:21:32 -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
Dianne Hackborn
804aa29795 am 01810bbb: am 06a591cd: Fix last change -- don\'t call startInputInner() with lock held.
* commit '01810bbb67b7af741b0dde0d7ccdadb76a46ed63':
  Fix last change -- don't call startInputInner() with lock held.
2012-02-16 14:45:57 -08:00
Dianne Hackborn
1db7eeac74 am 06a591cd: Fix last change -- don\'t call startInputInner() with lock held.
* commit '06a591cdd6d90600db006906d5d1524d156d6529':
  Fix last change -- don't call startInputInner() with lock held.
2012-02-16 14:44:03 -08:00
Dianne Hackborn
01810bbb67 am 06a591cd: Fix last change -- don\'t call startInputInner() with lock held.
* commit '06a591cdd6d90600db006906d5d1524d156d6529':
  Fix last change -- don't call startInputInner() with lock held.
2012-02-16 14:43:43 -08:00
Fabrice Di Meglio
2367706473 Merge "Add View.onResolvePadding() as a public API" 2012-02-16 14:36:28 -08:00
Selim Gurun
93ba4fedeb Act on credential storage updates.
Bug: 6009802

Cherry pick fcd93b72a3dde2b20fa0d8b04d3f47311b0856a1
Listen to credential storage updates and clean state when necessary.

Change-Id: I2c63e6771e9373da8b39781fdcf3d21583c4e3b2
2012-02-16 14:24:10 -08:00
Svetoslav Ganov
b9345b9496 Merge "Fixing the build." 2012-02-16 14:18:46 -08:00
Svetoslav Ganov
09ff963b08 Fixing the build.
Change-Id: I9ba599adea16b68c3c3af166a2845979624aef80
2012-02-16 14:10:36 -08:00
Eric Fischer
16ab41808e Import translations.
Change-Id: I1e49ee47c0975b3462fea3a72152c978f3719619
2012-02-16 13:57:21 -08:00
John Grossman
d72031cee3 Upintegreate AAH TX and RX players from ICS_AAH
Upintegrate the android at home TX and RX players developed in the
ICS_AAH branch.

Change-Id: I8247d3702e30d8b0e215b31a92675d8ab28dccbb
Signed-off-by: John Grossman <johngro@google.com>
2012-02-16 13:45:12 -08:00
John Grossman
4fbe95ede2 Fix a segfault in AudioFlinger.
Check the string returned by a HAL's implementation of get_parameters
for NULL before attempting to make use of it.  That way, we won't
bring down the mediaserver because of a poorly written HAL.

Change-Id: Ic99d7b004520d7d6347842a681c0595e889b68ea
Signed-off-by: John Grossman <johngro@google.com>
2012-02-16 13:45:12 -08:00
John Grossman
3540a0197f Enhance Visualizer behavior in the case of mediaserver death.
Bring the Visualizer class into line with the SDK documentation by
returning ERROR_DEAD_OBJECT instead of ERROR_INVALID_OPERATION when
the Visualizer loses its binder connection to the mediaserver because
of a mediaserver restart.

Also add a new callback interface to allow clients to be
asynchronously notified in the case of server death.  Right now, the
interface definition and the registration method are flagged as hidden
pending API council review/approval.

See http://b/issue?id=5717519 for details.

Change-Id: Ic15856f27ed5a950a583ac11ca81f79bd7e9b1a0
Signed-off-by: John Grossman <johngro@google.com>
2012-02-16 13:45:11 -08:00
John Grossman
449725f9aa Reuse callback buffers in the Visualizer.
Don't re-allocate buffers used by Visualizer callbacks as this causes an
unacceptable amount of GC thrash.  Instead, lazily allocate the buffers and only
reallocate them when the required size changes.

See http://b/issue?id=5717519 for details.

Change-Id: Ibd157ed51f30687ce7c4ef0b4003258a484e0f5d
Signed-off-by: John Grossman <johngro@google.com>
2012-02-16 13:45:11 -08:00
John Grossman
d8cf2960d0 Upintegrate Audio Flinger changes from ICS_AAH
Bring in changes to audio flinger made to support timed audio tracks
and HW master volume control.

Change-Id: Ide52d48809bdbed13acf35fd59b24637e35064ae
Signed-off-by: John Grossman <johngro@google.com>
2012-02-16 13:45:11 -08:00
John Grossman
c157673a59 Add the CommonTimeManagementService.
Add a small service to the high level core set of system services to
control the configuration of the native common time service.  This
service is responsible for controlling policy regarding when the
common time service should be allowed to run, which networks it is
allowed to run on, what priority it runs at in the master election
algorithm, and so on.

Change-Id: I1fcd834c0286aea0df9557520693a3f42de59d69
Signed-off-by: John Grossman <johngro@google.com>
2012-02-16 13:45:10 -08:00
John Grossman
37237839e8 Add Java interfaces to the common_time services.
Add classes to handling binder marshalling to and from the native
common_time interfaces (config and clock)

Change-Id: I04fc429d9af27736c4f7f9b5468011ffdd4d7eaa
Signed-off-by: John Grossman <johngro@google.com>
2012-02-16 13:45:10 -08:00
Mike J. Chen
6c92951047 Upintegrate the common_time service from ics-aah.
Move the common_time service developed in the ics-aah branch back into
master.

The common_time service is a small service build to synchronize an
arbitrary timeline amongst peers on a local sub-net.  While running
and configured, the service will elect a master from the set of
available devices within the subnet, define a relationship between the
common_time timeline the local time timeline (provided by the local
time HAL), and then attempt to maintain synchronization between common
and local time by controlling the frequency of the local time clock
via the HAL, or by disciplining local time in the digital domain if
the local time HAL implementation does not support HW slewing.

On its own, the native common time service will do nothing until it is
configured.  The CommonTimeManagementService (running out of the
system server process) is responsible for implementing policy
regarding configuration and operation of the common_time service and
will be added in a subsequent CL.

Change-Id: I71292f9b9b1797665865689c4572c9d3a0552f64
Signed-off-by: John Grossman <johngro@google.com>
2012-02-16 13:45:10 -08:00
Svetoslav Ganov
cb46d80d21 Merge "Adding shell commands for modifying content." 2012-02-16 13:06:29 -08:00