21208 Commits

Author SHA1 Message Date
Mangesh Ghiware
4fdfdeedc6 Merge "Revert change to setInitialScale() to take display density into account." into ics-mr1 2011-11-16 18:01:35 -08:00
satok
e5febfd5bd Merge "Clean up the spell checker framework" into ics-mr1 2011-11-16 17:35:54 -08:00
satok
060677f468 Clean up the spell checker framework
Change-Id: I64c0d813e53a4ebf8d7e63463e36f6900f1aa7d3
2011-11-17 09:40:56 +09:00
Dianne Hackborn
717a25dc2a Add new ManagedEGLContext class to help apps participate in memory trimming.
This class provides an API for an application to know when it is time to
destroy its EGL context when memory is being trimmed.  By having this in
the framework, we can still detect whether it will be useful to destroy
any EGL contexts (because we know if doing so will destroy all of them).

Change-Id: I1eac8d640052778052926b875c7928008f752182
2011-11-16 14:04:53 -08:00
Mangesh Ghiware
e832b63c97 Revert change to setInitialScale() to take display density into account.
Updated WebView documentation to clarify this behavior.

Additionally, if target-densityDpi is specified in the meta viewport
tag, update the display density in ZoomManager.

Bug: 5477652
Bug: 5327492
Change-Id: I176e87489f76a2ee6595d76a006e302b07595de1
2011-11-16 13:31:56 -08:00
Gilles Debunne
de8c5ec889 Merge "IME action (done, next...) correctly handled" into ics-mr1 2011-11-16 10:31:40 -08:00
Gilles Debunne
efbad5fb90 IME action (done, next...) correctly handled
Bugs 5599728 and 5319237.

mInputContentType should be set for a "modern" cupcake
environment says a comment in TextView.

However, it is possible to call onEditorAction on a
TextView that didn't use any of the method that lazily
create that field. This is for instance achieved using
the extracted mode in landscape (Done, Next actions)
or in Contacts, that feature a Next/Done button in the
IME.

As a result, the action is ignored.

The patch is to force the creation of the mInputContentType
when the EditText is associated to the IME.

Change-Id: I5beec5a52e9eec0c209af37d68791bb6ff83d6f6
2011-11-16 17:38:48 +01:00
Jeff Brown
3e7497b4ec Merge "Eliminate hw.keyboards system properties." into ics-mr1 2011-11-15 19:17:09 -08:00
Jeff Brown
1e08fe90df Eliminate hw.keyboards system properties.
Stop using system properties to publish information about
the key character map path.  Instead, we can retrieve it
on demand by asking the window manager.

It was possible to exhaust the supply of system properties
when repeatedly adding and removing input devices.

Bug: 5532806
Change-Id: Idd361a24ad7db2edc185c8546db7fb05f9c28669
2011-11-15 18:00:10 -08:00
Gilles Debunne
8a440477fd Merge "Clean-up in TextView" into ics-mr1 2011-11-15 09:59:45 -08:00
John Reck
a0c6bf5af6 Merge "Call onScrollChanged when scrolling layers" into ics-mr1 2011-11-15 09:56:17 -08:00
Wu-cheng Li
b90a70d154 Merge "Improve camera face detection javadoc." into ics-mr1 2011-11-15 06:14:11 -08:00
Wu-cheng Li
8c13670c13 Improve camera face detection javadoc.
bug:4460717
Change-Id: I6e040911ce802e597e77dfdde1c92b75d51975c8
2011-11-15 17:55:37 +08:00
Jeff Brown
ddaa9ac896 Fix races when content providers are acquired and released.
This change fixes race conditions that occur very regularly when
content providers are accessed from multiple threads at the same
time.

When a content provider is not already in the application's cache,
the application needs to ask the ActivityManager to obtain it.
Meanwhile, another thread can come along and do the same thing.
This can cause problems because the application attempts to
install two copies of the provider and the reference counts
and other bookkeeping can get muddled.

Similarly, there are races between releasing the last reference
to a content provider and acquiring the content provider.  It's
possible for one thread to snatch the content provider from the
jaws of death.  We need to handle this explicitly to ensure that
the content provider does not accidentally get released right
after it was acquired by the other thread.

This change ensures that the reference count bookkeeping and
provider map are maintained in parallel while holding the same lock.
Previously because the lock was dropped and reacquired in the
middle of acquisition and removal, it was possible for a
content provider with a zero reference count to be returned
to the application.  Likewise, it was possible for a content
provider with a non-zero reference count to be disposed!

This change also performs compensatory actions when races are
detected to ensure that the necessary invariants are maintained
throughout.  In particular, it ensures that the application
drops a duplicate reference to a content provider when no
longer needed.

Another way to solve this problem would be to explicitly prevent
the races from happening in the first place by maintaining a
table of content providers that are in the process of being
acquired.  The first thread to attempt to acquire the provider
would store a record.  The next thread would find the record
and block until the first thread was finished.  I chose not
to implement the code in that manner because we would still
have needed to perform compensatory actions in the case where
the same provider binder has multiple logical names.  Also,
it could cause deadlocks if the attempt to acquire
a content provider were re-entrant for some bizarre reason.

Bug: 5547357
Change-Id: I2ad39a8acc30aaf7ae5354decd0a0a41e9b9c3da
2011-11-14 18:31:13 -08:00
Daisuke Miyakawa
d8f5e6badb Merge "Allow ContactsProvider to remove dulicates" into ics-mr1 2011-11-14 17:54:17 -08:00
John Reck
83b9e1d99d Call onScrollChanged when scrolling layers
Bug: 5533389
 Treat layer scrolling as a no-op scroll by calling
 onScrollChanged with old scroll == new scroll

Change-Id: I1dc2b94b37c65bf088806b8d28be32883e3b8bee
2011-11-14 16:17:54 -08:00
Jim Miller
ff95f65725 Merge "Fix 5579440: Add transport control view to tablet unlock screens" into ics-mr1 2011-11-14 16:14:07 -08:00
Adam Cohen
6066a2b4de Merge "Fix uncaught exception in WindowManager#setWallpaperOffsets (issue 5613241)" into ics-mr1 2011-11-14 14:33:06 -08:00
Jim Miller
faed16030d Fix 5579440: Add transport control view to tablet unlock screens
This updated tablet layouts to support showing album art and transport
control views in PIN, pattern and password screens of lock screen.

It also allows the addition of a background protect asset and
the ability to show the system wallpaper on layouts that define a
transport_bg_protect view.

Also updated layout to use new ICS-style buttons on lock screen and
fixed bug with "forgot pattern" button where we were showing the
emergency call icon.

To avoid problems with leading ones in the mono-space clock font,
we now right-justify status text on tablet and remove the AM/PM
indicator.

Status font size adjusted by UX.

Added background protection drop shadow to transport control.

Fixed portrait mode to be right-justified when transport is showing.

Change-Id: I790292fc39f4588f87adc9d9241706817ae6baab
2011-11-14 14:09:05 -08:00
Adam Cohen
8e2e572224 Fix uncaught exception in WindowManager#setWallpaperOffsets (issue 5613241)
Change-Id: I4646095f4cde9514425be8ab2dbf805d9788aa5c
2011-11-14 13:28:50 -08:00
Daisuke Miyakawa
19352e0852 Allow ContactsProvider to remove dulicates
Bug: 5484956
Change-Id: Ie88af0c3d21919ca201f4fcdd46ca09e9f8d94c0
2011-11-14 13:16:07 -08:00
Dave Burke
7077506f99 Revert "Discard framebuffer rendering queues when discarding layers"
This reverts commit da96f8ac2c1c35a54f3f36e6d776cb386a251d03.
2011-11-14 11:39:30 -08:00
Mathias Agopian
2858749704 Merge "Discard framebuffer rendering queues when discarding layers Bug #5581817" into ics-mr1 2011-11-14 00:52:09 -08:00
Adam Powell
a8743f152a Fix bug 5425280 - Two ActionBar icons show up
Change-Id: Ic82f8ce648f9314a0800eeff326df7d8dfe5027b
2011-11-11 18:35:53 -08:00
Christopher Tate
60201f2b4e XML parsing optimizations
Traceview showed approximately 10% of total parse time inside the
synthetic 'trampoline' methods generated to provide inner classes
with access to their outer class's private fields.  The bottleneck
in this particular case is in XmlBlock and its inner class Parser.

Making the bottlneck outer-class members and methods package-scope
instead of private removes that 10% overhead being spent within
these access trampolines.

Traceview tends to overemphasize the significance of very small
methods such as these trampolines.  That said, the measured speed
gain on the ParseLargeXmlResFg op due to this patch is between
5% and 6%.

Change-Id: Ia0e3ae5408d1f9992b46e6e30dd2407090379b07
2011-11-11 16:10:42 -08:00
Dianne Hackborn
d400d03f4a Merge "Fix issue #5595933: GREF leak due to race condition in..." into ics-mr1 2011-11-11 14:24:58 -08:00
Christopher Tate
847fbbeaf9 Merge "Localized optimizations in views and bitmaps" into ics-mr1 2011-11-11 14:24:53 -08:00
Nick Pelly
48b651cb2a Merge "Changes for access control." into ics-mr1 2011-11-11 13:06:44 -08:00
Christopher Tate
1373a8eb58 Localized optimizations in views and bitmaps
* Don't call context.getResources() redundantly when unnecessary;
  similarly for Resources.getCompatibilityInfo()

* During bitmap creation, don't bother clearing to 0: it's unnecessary
  because now that the raw bits are stored in a VM-side byte array, it
  was cleared at initialization time.  Also, don't use the sanity-
  checking public entry point to erase to a color, because we know
  that we're by definition in a "legal" path to erase to the initial
  contents and don't need to incur the overhead of the (inappropriate)
  sanity checking.

Change-Id: Idaca4d64fdecefd5d51337646ead32e1db510e02
2011-11-11 12:46:48 -08:00
Dianne Hackborn
5a6ef737ed Fix issue #5595933: GREF leak due to race condition in...
...LoadedApk.ServiceDispatcher.connected , LoadedApk.forgetServiceDispatcher

Don't be stupid if we receive a new binding to a ServiceConnection after it
has already been unbound.

Change-Id: I85a49de97372bf9af55542a89031f0b7a2ac8fbb
2011-11-11 12:31:52 -08:00
Matthew Xie
a303f0ecfc Merge "Send CONNECT_OTHER_PROFILE to Device profile for hfp and a2dp incoming connect" into ics-mr1 2011-11-11 12:16:41 -08:00
Matthew Xie
98f06da8ed Send CONNECT_OTHER_PROFILE to Device profile for hfp and a2dp incoming connect
Send CONNECT_OTHER_PROFILE to Device profile for low priority hfp and a2dp
incoming connect. In the case when HFP autoconnect is off but a2dp autoconnect
is on, if HF autoconnect to HFP, phone will reject HFP but connect a2dp.
Before this fix, phone reject HFP. A2dp will not get connected unless the HF do
media auto-connect, which most carkits do not do.
Also do similar change for incoming a2dp connection
bug 5091838

Change-Id: Ife1815f527bcd94e0d9ffc645028484fa9c49a43
2011-11-11 12:11:35 -08:00
Jeff Hamilton
bb951c8939 Changes for access control.
The package name is now required when using the
NFC extras APIs so the context is stored away
and used to derive the package name to be sent
to the NfcService.

Bug: 4515759
Change-Id: I1a3aba3fc026e0090a914b0686fc4b8dec25b927
2011-11-11 08:55:26 -08:00
Narayan Kamath
754c72ed9e Notifiy callers when a speech synthesis error occurs.
bug:5589877
Change-Id: Ideca8966ea1caa6789b3273e388dd1f25c1e2758
2011-11-11 14:21:43 +00:00
Svetoslav Ganov
d00e75e94d am 7b8bec28: Merge "PopupWindow dismiss() can get into a recursive loop." into ics-mr0
* commit '7b8bec280f20e8a5863d8214bbc195497335eba6':
  PopupWindow dismiss() can get into a recursive loop.
2011-11-11 08:02:27 +00:00
Svetoslav Ganov
7b8bec280f Merge "PopupWindow dismiss() can get into a recursive loop." into ics-mr0 2011-11-11 00:00:02 -08:00
Jeff Sharkey
51c00a57f4 Merge "Clamp non-monotonic stats instead of dropping." into ics-mr1 2011-11-10 20:31:03 -08:00
Adam Powell
0ddcad0b4e Merge "Make the overridden ImageView#setVisibility remotable" into ics-mr1 2011-11-10 19:56:03 -08:00
Adam Powell
b241b4c6ab Make the overridden ImageView#setVisibility remotable
Change-Id: Idaf061ea8c2a06ec8abaf74cf865446d9092afa2
2011-11-10 19:48:23 -08:00
Adam Cohen
d562d300cd Merge "Deferring wallpaper update to improve workspace scrolling (issue 5506959)" into ics-mr1 2011-11-10 19:27:58 -08:00
Romain Guy
da96f8ac2c Discard framebuffer rendering queues when discarding layers
Bug #5581817

Change-Id: If612846ec5f7793710fc4df152791fb32c506551
2011-11-10 19:23:58 -08:00
John Reck
9490fe4095 Merge "Fix lastVisible/global rects" into ics-mr1 2011-11-10 17:58:27 -08:00
Jeff Sharkey
d4ef8c8fc9 Clamp non-monotonic stats instead of dropping.
When encountering non-monotonic stats rows, recover remaining data by
clamping to 0.  In particular, this avoids edge-case where persisting
threshold checks would never trigger.  Also recover when tethering
snapshots are missing.

Bug: 5600785, 5433871, 5600678
Change-Id: I1871954ce3955cc4ac8846f9841bae0066176ffe
2011-11-10 17:54:23 -08:00
Chet Haase
30f03ac650 DO NOT MERGE. Fix leak in LayoutTransition
LayoutTransition was making an incorrect assumption that there could
only be one transition animation on a child of a transitioning container.
But if multiple children are added/removed to/from that container, there would
be multiple calls to set up changing animations for each existing child
of that container. This meant that the child would have multiple, new
OnLayoutChangeListeners added to it as part of the setup process.

Meanwhile, we would cache only the latest listener in a hashmap that used
the child as a key for the listener. Then when we cleaned up the hashmap later,
we would remove only the latest listener from the child, leaving the rest there
for eternity.

The fix is to skip the setup entirely for children that already have listeners
set on them; they must, if that's the case, already have been set up and are
already listening for layout changes. Setting up the animation is redundant,
and adding another listener is a leak.

issue #5588509: memory leak in systemui

Change-Id: Ie2192593d84702be7243c18760dfdb3a027b761c
2011-11-10 17:53:31 -08:00
Chet Haase
692fda9da3 Merge "Fix leak in LayoutTransition" into ics-mr1 2011-11-10 17:33:31 -08:00
John Reck
9f9fac0ad2 Fix lastVisible/global rects
Bug: 5601629
 References tend to always be equal to the things they are referencing,
 use copies instead.

Change-Id: I0827878e91ef1fa6e0abe2d6499d55f4a211d890
2011-11-10 17:33:24 -08:00
Romain Guy
50a66f0e9c Merge "Terminate EGL when an app goes in the background" into ics-mr1 2011-11-10 17:10:41 -08:00
Chet Haase
8a22e59311 Fix leak in LayoutTransition
LayoutTransition was making an incorrect assumption that there could
only be one transition animation on a child of a transitioning container.
But if multiple children are added/removed to/from that container, there would
be multiple calls to set up changing animations for each existing child
of that container. This meant that the child would have multiple, new
OnLayoutChangeListeners added to it as part of the setup process.

Meanwhile, we would cache only the latest listener in a hashmap that used
the child as a key for the listener. Then when we cleaned up the hashmap later,
we would remove only the latest listener from the child, leaving the rest there
for eternity.

The fix is to skip the setup entirely for children that already have listeners
set on them; they must, if that's the case, already have been set up and are
already listening for layout changes. Setting up the animation is redundant,
and adding another listener is a leak.

issue #5588509: memory leak in systemui

Change-Id: I2c9f312cc2bcf4f2d08ac6b5d8f8e495aa4f3597
2011-11-10 17:03:12 -08:00
Adam Cohen
041a0baba7 Deferring wallpaper update to improve workspace scrolling (issue 5506959)
-> On the Xoom, this change gets us back up to 60 fps. The
   change is really more of a workaround for the fact that we don't
   have vsync, and we ought to be able to change it back once we do.

Change-Id: I80888f18887bf5f2fed72c19641ed430ef6dbfcf
2011-11-10 16:53:26 -08:00
Romain Guy
8ff6b9ebee Terminate EGL when an app goes in the background
This does not happen on high end gfx devices. This happens
only if only one EGL context is initialized in the current
process.

Change-Id: Ibd1737efdf84eef8a84108b05795440d1ae9964e
2011-11-10 16:44:49 -08:00