61189 Commits

Author SHA1 Message Date
Christopher Tate
c51bb4d394 Merge "XML parsing optimizations" into ics-mr1 2011-11-11 16:19:29 -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
be70785f9b Make activity manager more robust in the face of app activity leaks.
This came up from bug #5601885: Memory increase (leak?) in system_server
Stingray MR1

This isn't *really* a leak in the system process -- it is a leak in an
application process that is causing the system process to keep around
a bunch of ActivityRecord objects longer than it should, until that app
process is ultimately killed.

Unfortunately these days leaking an ActivityRecord also often means
leaking a thumbnail, which is a big slab of memory.

So make the activity manager better about this, using a weak reference
from the handle the object has so we can still clean away most of the
state associated with the ActivityRecord even if the client side leaks
its own reference.

Change-Id: Idbab45e09749cdfb54899203da7981e7b3576e25
2011-11-11 15:05:59 -08:00
Robert Greenwalt
24597eb77e Merge "Tone down Tethering logs." into ics-mr1 2011-11-11 14:37:18 -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
Robert Greenwalt
fd1be2bc1e Tone down Tethering logs.
bug:5601582
Change-Id: I66c0a5a06a2c13a7cf93ea264d156b37df23745f
2011-11-11 14:09:45 -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
Peter Ng
20d8c5ed96 Merge "Making the quicksettings notifications icon the right opacity" into ics-mr1 2011-11-11 11:57:41 -08:00
Dianne Hackborn
be425ccea4 Merge "Fix issue #5522658: Menu button shown on lock screen if app underneath requests it" into ics-mr1 2011-11-11 11:36:14 -08:00
James Dong
b7a000a6fb Merge "Unhide the key to retriever location information in 3gp/mp4 files" into ics-mr1 2011-11-11 10:49:24 -08:00
Andreas Huber
2321718274 Merge "Didn't mean to check this in..." into ics-mr1 2011-11-11 10:46:02 -08:00
Andreas Huber
54c7efa4dd Didn't mean to check this in...
Change-Id: Ie5a1902ff2613cd349ca5724f63a3fe3306640c7
2011-11-11 10:17:00 -08:00
Robert Greenwalt
424781e2e1 Fix NPE in ConnectivityService.
If it's configured with a defined network but can't create a network state tracker
for it, it would NPE and restart the framework whenever a default network
disconnects.

bug:5603268
Change-Id: I816c4f522d766e0353a713623f6635b03395b01e
2011-11-11 09:56:03 -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
Eric Laurent
1f8c621279 Merge "visualizer: reset buffer if playback is idle" into ics-mr1 2011-11-11 08:17:22 -08:00
Andreas Huber
cd556b82fd Merge "Instead of asserting, signal a runtime error if the session doesn't contain" into ics-mr1 2011-11-11 07:39:25 -08:00
Andreas Huber
5d42075e45 Merge "DO NOT MERGE: Instead of asserting, remove active streams if their sockets" into ics-mr1 2011-11-11 07:39:18 -08:00
Andreas Huber
d9f25bc941 Merge "Disconnect on socket error on the RTSP control connection." into ics-mr1 2011-11-11 07:39:11 -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
James Dong
00aa51b355 Unhide the key to retriever location information in 3gp/mp4 files
Change-Id: I71c651b403955c0f6f8df096e995a5f5f4e39130
related-to-bug: 5560253
2011-11-11 01:49:01 -08:00
James Dong
08e42967b9 Merge "Add support for retrieving location information in mp4/3gpp files" into ics-mr1 2011-11-11 01:44:06 -08: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
Chet Haase
ab51626f22 am 30f03ac6: (-s ours) DO NOT MERGE. Fix leak in LayoutTransition
* commit '30f03ac650f2ffaafe9cc49942a4a8a7858dbd88':
  DO NOT MERGE. Fix leak in LayoutTransition
2011-11-11 08:02:27 +00:00
Jamie Gennis
787e2c276a am ca5c8813: Merge "SystemUI: Disable HW acceleration for status bar" into ics-mr0
* commit 'ca5c881374d051361eb5f9a191d51b5716ef2366':
  SystemUI: Disable HW acceleration for status bar
2011-11-11 08:02:26 +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
Daniel Sandler
992e77af11 Merge "Fold WiMAX state into the mobile RSSI." into ics-mr1 2011-11-10 20:16:47 -08:00
Daniel Sandler
8b50bd8c9b Merge "Remove dedicated wimax icon to fix RSSI layout." into ics-mr1 2011-11-10 20:16:38 -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
Dianne Hackborn
4eff8d37da Fix issue #5522658: Menu button shown on lock screen if app underneath requests it
Drive the menu button off of the currently focused window.  That is, after all,
the one that is going to receive the menu key event.

Change-Id: I61cac1e274602e5ea53402ab15bd63a9cd89e9cd
2011-11-10 19:38:40 -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
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
Martijn Coenen
99898de902 Merge "Fix NdefRecord byte-stream constructor." into ics-mr1 2011-11-10 17:40:20 -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
Robert Greenwalt
7c9f8005e2 Merge "Fix Wimax-less build." into ics-mr1 2011-11-10 17:22:14 -08:00
Robert Greenwalt
6537b02875 Fix Wimax-less build.
A build with the wimax network type defined but wimax disabled
causes an NPE in ConnectivityService's constructor.

bug:5237167
Change-Id: I929eac217e1afa0e61346fdbc3e96a7d3ad09a54
2011-11-10 17:14:05 -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
Mathias Agopian
de62d9cbe0 Merge "boot animation is dithered and scaled" into ics-mr1 2011-11-10 16:38:42 -08:00