62345 Commits

Author SHA1 Message Date
Dianne Hackborn
7ddf38a5bf am be70785f: Make activity manager more robust in the face of app activity leaks.
* commit 'be70785f9b2dbd2c52fd8676d99bc64b22784201':
  Make activity manager more robust in the face of app activity leaks.
2011-11-11 16:13:46 -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
Jeff Brown
06daa7b6b2 Improve the logging in TextLayoutCache.
Also deleted some dead code.

Change-Id: I1feb5744177ae751ff1417f49f3c45139a35246b
2011-11-11 15:46:05 -08:00
Jeff Brown
f1f0c873b1 Fix bug in TextLayoutCacheKey handling embedded nulls.
We were not passing the length of the UTF-16 string to
String16::setTo.  As a result, it was copying the contents of
the text up to the first null it found.

First problem, these strings are not typically null terminated!

Second problem, if the string contained a null character, then
we might truncate it.  However, we only truncated the string
when the copy constructor was invoked (say, when we called
get() on the cache) but not in internalTextCopy() (before
adding the key to the cache).

As a result of the second problem, we would first search
the cache for a key that matched a partially copied truncated
string (potentially reading uninitialized memory that followed it).
Finding none, we would add the entry to the cache using
the correct key.

If the cache already had a value associated with the correct key,
then the put would fail, returning false.  Charging ever onwards,
we would add the size of the entry to the cache size.

Proceeding in this manner, it was possible for the cache to
believe it had less remaining space than it really did.  At that
point, it was possible for the cache to evict all entries and
yet still not think it had room to add a new one, so it would
continue trying to make space indefinitely.

Bug: 5576812
Change-Id: I05251594f6b2da0a5dc09f7200f04fe9100ec766
2011-11-11 15:41:40 -08:00
Jeff Brown
5043441c4f Merge "Include the build fingerprint in bug reports." 2011-11-11 15:41:05 -08:00
Jeff Brown
0f6ba9267f Merge "Seems to break text views all over. Particularly noticeable is that the labels in launcher icons appear left-justified. Multi-line text fields also wrap after every character." 2011-11-11 15:30:45 -08:00
Jeff Brown
033a001a61 Seems to break text views all over. Particularly noticeable is that the labels in launcher icons appear left-justified. Multi-line text fields also wrap after every character.
Revert "Fix bug #5387832 [UI/Visual] Address of the website is not displayed properly(second line of the address is partly shown)"

This reverts commit caa8c06de5f94db69faca35d666c04b82d3f420b
2011-11-11 15:30:16 -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
Jeff Brown
ad5b28a768 Include the build fingerprint in bug reports.
We need the build fingerprint to decode the native stacks
that appear within the bug report.

Change-Id: Ia337addb5e4942c1ec7bcee3407b6a4f6b7e89ab
2011-11-11 14:56:27 -08:00
Adam Powell
6200a4b7eb Merge "DO NOT MERGE Cherry pick from ics-mr1 - Bug 5275928 - Don't try to open an overflow menu under invalid circumstances." into ics-mr0 2011-11-11 14:54:02 -08:00
The Android Automerger
317ff787c2 merge in ics-mr0-release history after reset to ics-mr0 2011-11-11 14:46:55 -08:00
Robert Greenwalt
7a8e78f4d3 am 3100e2b0: am 24597eb7: Merge "Tone down Tethering logs." into ics-mr1
* commit '3100e2b01792e6868698e06ecf275f47f187d537':
  Tone down Tethering logs.
2011-11-11 14:41:18 -08:00
Robert Greenwalt
3100e2b017 am 24597eb7: Merge "Tone down Tethering logs." into ics-mr1
* commit '24597eb77e1a88994b83c5b1f45d5b72383943b8':
  Tone down Tethering logs.
2011-11-11 14:38:34 -08:00
Robert Greenwalt
24597eb77e Merge "Tone down Tethering logs." into ics-mr1 2011-11-11 14:37:18 -08:00
Dianne Hackborn
942d51f6a6 am 0b554bab: am d400d03f: Merge "Fix issue #5595933: GREF leak due to race condition in..." into ics-mr1
* commit '0b554bab585fe2d7eaaca8692106e0cbbc3aabe4':
  Fix issue #5595933: GREF leak due to race condition in...
2011-11-11 14:28:57 -08:00
Christopher Tate
951aa9d8ea am 9acae658: am 847fbbea: Merge "Localized optimizations in views and bitmaps" into ics-mr1
* commit '9acae658e179796beee91d673f9f70af49ae3c9b':
  Localized optimizations in views and bitmaps
2011-11-11 14:28:55 -08:00
Dianne Hackborn
0b554bab58 am d400d03f: Merge "Fix issue #5595933: GREF leak due to race condition in..." into ics-mr1
* commit 'd400d03f4a6384449f8b0d3c8a9aa7e1e8aa5a16':
  Fix issue #5595933: GREF leak due to race condition in...
2011-11-11 14:26:30 -08:00
Christopher Tate
9acae658e1 am 847fbbea: Merge "Localized optimizations in views and bitmaps" into ics-mr1
* commit '847fbbeaf9e3ba187a45d0a631f0c087ce25b7f6':
  Localized optimizations in views and bitmaps
2011-11-11 14:26:28 -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
34059a9125 am 4780228f: am 48b651cb: Merge "Changes for access control." into ics-mr1
* commit '4780228fb2476304e29ddf9a118c460ac4eb96ee':
  Changes for access control.
2011-11-11 13:59:09 -08:00
Matthew Xie
44ada1845d am 5a8ad071: am a303f0ec: Merge "Send CONNECT_OTHER_PROFILE to Device profile for hfp and a2dp incoming connect" into ics-mr1
* commit '5a8ad0717dad332cab4b2d9f7a6030b76cb8d6bb':
  Send CONNECT_OTHER_PROFILE to Device profile for hfp and a2dp incoming connect
2011-11-11 13:42:42 -08:00
Peter Ng
6c934436d4 am b88cd4be: am 20d8c5ed: Merge "Making the quicksettings notifications icon the right opacity" into ics-mr1
* commit 'b88cd4bea3bd1dc3497b79e6da187ae0f858f266':
  Making the quicksettings notifications icon the right opacity
2011-11-11 13:42:36 -08:00
Robert Ly
5f8b7269d6 docs: fix typo
Change-Id: I86ebd8bced2ca133fc6faff43c2e69205f0c9862
2011-11-11 13:39:34 -08:00
Jamie Gennis
b7928463a3 EGL: add the ANDROID suffix to the blob cache ext
This change adds the ANDROID suffix to the all the types and functions
defined by the EGL_ANDROID_blob_cache extension.

Change-Id: I087875b96d9a7053efb9c8d5614f9f765eed799d
2011-11-11 13:17:03 -08:00
Nick Pelly
4780228fb2 am 48b651cb: Merge "Changes for access control." into ics-mr1
* commit '48b651cb2a3afab979c2a46185fd7edfa5424387':
  Changes for access control.
2011-11-11 13:08:37 -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
5a8ad0717d am a303f0ec: Merge "Send CONNECT_OTHER_PROFILE to Device profile for hfp and a2dp incoming connect" into ics-mr1
* commit 'a303f0ecfc5472d3b2e65cb7de9f7413a9a83d9a':
  Send CONNECT_OTHER_PROFILE to Device profile for hfp and a2dp incoming connect
2011-11-11 12:18:22 -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
Robert Ly
5ad6f646fb Merge "docs: ndk r7 rel notes" into ics-mr0 2011-11-11 12:06:39 -08:00
Adam Powell
63464c5229 DO NOT MERGE Cherry pick from ics-mr1 - Bug 5275928 - Don't try to open an
overflow menu under invalid circumstances.

Change-Id: Ifb847b914b880ffb21dd5fc6efa833f46466f224
2011-11-11 12:02:01 -08:00
Peter Ng
b88cd4bea3 am 20d8c5ed: Merge "Making the quicksettings notifications icon the right opacity" into ics-mr1
* commit '20d8c5ed96d6fb81d14cbce5221025ed6c954d6e':
  Making the quicksettings notifications icon the right opacity
2011-11-11 11:59:40 -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
4bae1f6602 am 8f45e3e2: am be425cce: Merge "Fix issue #5522658: Menu button shown on lock screen if app underneath requests it" into ics-mr1
* commit '8f45e3e280fa84494d5d45c73697645d20dea101':
  Fix issue #5522658: Menu button shown on lock screen if app underneath requests it
2011-11-11 11:51:21 -08:00
James Dong
c512fd065c am 9a176507: am b7a000a6: Merge "Unhide the key to retriever location information in 3gp/mp4 files" into ics-mr1
* commit '9a176507a96ceb3640a56a5449e96fc3e406a765':
  Unhide the key to retriever location information in 3gp/mp4 files
2011-11-11 11:51:19 -08:00
Andreas Huber
3dc44d9afe am 8a065423: am 23217182: Merge "Didn\'t mean to check this in..." into ics-mr1
* commit '8a0654231ff36d938bc3451190cf67231195f1d0':
  Didn't mean to check this in...
2011-11-11 11:51:17 -08:00
Robert Greenwalt
41904b1e58 am 2c41bce3: am 424781e2: Fix NPE in ConnectivityService.
* commit '2c41bce3f2134159ce64d589ff1bb298b9939178':
  Fix NPE in ConnectivityService.
2011-11-11 11:51:16 -08:00
Eric Laurent
ff1fa5ef93 am 2c29a5cf: am 1f8c6212: Merge "visualizer: reset buffer if playback is idle" into ics-mr1
* commit '2c29a5cf1658532bca4e34f816fa30312241a336':
  visualizer: reset buffer if playback is idle
2011-11-11 11:51:14 -08:00
Andreas Huber
d8ad2fab90 am 40461ee7: am cd556b82: Merge "Instead of asserting, signal a runtime error if the session doesn\'t contain" into ics-mr1
* commit '40461ee70161d8568663332f72be2353b04c34e7':
  Instead of asserting, signal a runtime error if the session doesn't contain
2011-11-11 11:51:12 -08:00
Andreas Huber
5dd4c6bcb4 am 9a87a838: (-s ours) am 5d42075e: Merge "DO NOT MERGE: Instead of asserting, remove active streams if their sockets" into ics-mr1
* commit '9a87a838028f3911a066a729cdb5ec688903a5ae':
  DO NOT MERGE: Instead of asserting, remove active streams if their sockets
2011-11-11 11:51:11 -08:00
Andreas Huber
ff0bd468d8 am 9c981cd3: am d9f25bc9: Merge "Disconnect on socket error on the RTSP control connection." into ics-mr1
* commit '9c981cd3d53238f10842368c1cd82d625b701a47':
  Disconnect on socket error on the RTSP control connection.
2011-11-11 11:51:09 -08:00
Narayan Kamath
e5fe1b302d am 405fcc87: am 754c72ed: Notifiy callers when a speech synthesis error occurs.
* commit '405fcc87b247d91ce2b54623f351e91b740813c0':
  Notifiy callers when a speech synthesis error occurs.
2011-11-11 11:51:07 -08:00
Alex Sakhartchouk
93c47f1028 Fixing a race condition in RSSurfaceView. Bug 5601083
When destroy is called shortly after creation, RS tries to set a surface on a partially destroyed context.

Change-Id: I7a382a701efde3264e5cd9b9a9b428ade5eb4a9a
2011-11-11 11:49:45 -08:00
Dianne Hackborn
8f45e3e280 am be425cce: Merge "Fix issue #5522658: Menu button shown on lock screen if app underneath requests it" into ics-mr1
* commit 'be425ccea47c13d3f8f3d877fdbdcb3c074f7e8b':
  Fix issue #5522658: Menu button shown on lock screen if app underneath requests it
2011-11-11 11:48:33 -08:00
James Dong
9a176507a9 am b7a000a6: Merge "Unhide the key to retriever location information in 3gp/mp4 files" into ics-mr1
* commit 'b7a000a6fb84ae75847e730332bae62ba1234999':
  Unhide the key to retriever location information in 3gp/mp4 files
2011-11-11 11:48:27 -08:00
Andreas Huber
8a0654231f am 23217182: Merge "Didn\'t mean to check this in..." into ics-mr1
* commit '23217182743521063655c6fb1b1580d3558cfbe7':
  Didn't mean to check this in...
2011-11-11 11:48:16 -08:00