62345 Commits

Author SHA1 Message Date
Jack Palevich
80b3cd6bc6 Fix potential GLThread / GLSurfaceView memory leak.
Until now a leak was possible under the following scenario:

Create a GLSurfaceView
Register a renderer (this automatically starts a GLThread).
Discard the GLSurfaceView without installing it in the view system.

This scenario can occur when a device is rotated rapidly from
orientation A to orientation B to orientation C. In that scenario,
orientation B's GLSurfaceView might be discarded without ever being
attached to a window.

If this issue had been identified before GLSurfaceView had clients, one
possible fix would have been to delay the construction of the GLThread
until the GLSurfaceView was attached to a window. Unfortunately, it's
too late, and so making that change would lead to observable changes in
behavior, possibly breaking some clients.

Instead, fixed by making GLThread and EGLHelper static classes that hold
onto a weak reference to the GLSurfaceView. This allows the GLSurfaceView
to be garbage collected when it is no longer used, even if the GLThread
is active. GLSurfaceView's finalize method will manually stop the GLThread
if it is still running when the GLSurfaceView exits.

Part of this change was to remove the Renderer reference from GLThread,
because Renderer is a user-supplied class that could contain a reference
chain that points back to the GLSurfaceView.

Fixes b/5606613 "GLSurfaceView that's never added to a window will
leak threads and views, can leak activities"

Change-Id: Iafdc329eb6e9e40062358e7c119f5547ffe23d5e
2011-11-15 14:51:27 -08:00
Jeff Brown
96af5a054d am d3b98329: am d5713179: Merge "Override app requested orientation when docked." into ics-mr1
* commit 'd3b98329636ad089bb0b14cefa4b49d32e5ec678':
  Override app requested orientation when docked.
2011-11-15 14:51:08 -08:00
Jeff Brown
d3b9832963 am d5713179: Merge "Override app requested orientation when docked." into ics-mr1
* commit 'd5713179a0f68aa47a8cd966abc5324d43414b63':
  Override app requested orientation when docked.
2011-11-15 14:48:25 -08:00
Jeff Brown
d5713179a0 Merge "Override app requested orientation when docked." into ics-mr1 2011-11-15 14:46:17 -08:00
Dianne Hackborn
9864e0d81f am d9070a08: am 5f11d73c: Merge "Improve low memory dropbox reporting." into ics-mr1
* commit 'd9070a08807ee119d9d73052cc1ad1f1b29eb13d':
  Improve low memory dropbox reporting.
2011-11-15 14:44:54 -08:00
Dianne Hackborn
d9070a0880 am 5f11d73c: Merge "Improve low memory dropbox reporting." into ics-mr1
* commit '5f11d73c918de72368ac5605c50f5fb9ac0457cb':
  Improve low memory dropbox reporting.
2011-11-15 14:42:11 -08:00
Dianne Hackborn
5f11d73c91 Merge "Improve low memory dropbox reporting." into ics-mr1 2011-11-15 14:39:37 -08:00
Alex Sakhartchouk
38da5086a6 Followup to a bug fix.
Addtion of synchronized to the methods triggers an API change.
Per council advice, pushing synch block into the function body.

Change-Id: Iaa395d9720bce499259ab750fe97149715e9f271
2011-11-15 14:21:58 -08:00
Dianne Hackborn
d8c98fee02 Improve low memory dropbox reporting.
The msg is now constructed to try to bin these reports in
interesting ways.  We'll see.  Also change the tag name from
watchdog to lowmem, since sharkey is kindly taking care of
the back-end to handle this.

Improve how we put processes into low memory states to better
poke things like home and the previous app.

Also clean up some debug output, and add a few new am comment
options for controlling the current debug app.

Change-Id: I562a931a95244a2727bb7a6e1fd80dec259cdae2
2011-11-15 14:15:58 -08:00
Jeff Brown
dec6cf4f30 Override app requested orientation when docked.
Applies to docks, lid switch, HDMI and rotation lock.
We always choose a mode that is compatible with the application's
request, so if in a landscape dock, we might override a request
for seascape but we leave requests for portrait alone.

Bug: 5620454
Change-Id: Ib0c4f60f7f9e3aeafaba9c717233a950fccb8af2
2011-11-15 14:14:02 -08:00
Jeff Brown
78137d7799 Merge "Modify getState to prefer AKEY_STATE_DOWN and AKEY_STATE_UP over AKEY_STATE_UNKNOWN." 2011-11-15 13:52:47 -08:00
Jeff Brown
43d9e24853 Merge "POWER key is always a wake key." 2011-11-15 13:39:56 -08:00
Jake Hamby
7d4046e9b7 Merge "Fix 3GPP SMS send failure for 7-bit national language tables." into ics-mr0 2011-11-15 13:34:58 -08:00
Mathias Agopian
1fea891f00 am 556a406c: am 3aa684ec: Merge "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices" into ics-mr1
* commit '556a406cf4dd8a7faa318e0d522d899f8b9da7dc':
  enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices
2011-11-15 13:11:19 -08:00
Mathias Agopian
d6ae2ceedf am a0d32c4d: am 6b3ce09d: Merge "fix crash when validating an invalid EGL objects" into ics-mr1
* commit 'a0d32c4d094704fd6f4ccd3cba297a7c7d2f38fe':
  fix crash when validating an invalid EGL objects
2011-11-15 13:11:17 -08:00
Winson Chung
92c2fbd704 am 9ebb030a: am e5129d7f: Merge "Defer adding large icon until when we compose the final notification. (Bug 5566846)" into ics-mr1
* commit '9ebb030ad9eeb94bdf9e15b7a3f55d9792dda96b':
  Defer adding large icon until when we compose the final notification. (Bug 5566846)
2011-11-15 13:11:14 -08:00
Danielle Millett
d296b16762 am 8b6b92ea: (-s ours) am 49000016: am 8d8e669e: Merge "DO NOT MERGE cherry picking from MR0 cl 148223" into ics-mr0
* commit '8b6b92ea5e257cd9d5799b74f64e7e1cc1ca3ddc':
  DO NOT MERGE cherry picking from MR0 cl 148223
2011-11-15 13:11:08 -08:00
Eric Fischer
0988cddae5 am 66adcedb: (-s ours) am 3524831a: am 8d00c194: Merge "Import revised translations. DO NOT MERGE" into ics-mr0
* commit '66adcedbc635bbce37a849824d0cefceab810535':
  Import revised translations.  DO NOT MERGE
2011-11-15 13:10:56 -08:00
Tsu Chiang Chuang
8f62946310 am 06e4a400: am b3f2890a: am 047c4de2: Merge "Adding mobile microbenchmark tests." into ics-mr0
* commit '06e4a40017f1af75ec58d9d942ef0c4ddad20fd2':
  Adding mobile microbenchmark tests.
2011-11-15 13:07:26 -08:00
Gilles Debunne
6ec455211b am 7bc6600e: am 8a440477: Merge "Clean-up in TextView" into ics-mr1
* commit '7bc6600e60688ea37ee7f18b82cb16677c0f5e74':
  Clean-up in TextView
2011-11-15 13:07:14 -08:00
John Reck
a952f8abfd am 6a622c56: am a0c6bf5a: Merge "Call onScrollChanged when scrolling layers" into ics-mr1
* commit '6a622c5608e3f67efb7ba6a346ea4d8cfa5267ec':
  Call onScrollChanged when scrolling layers
2011-11-15 13:07:11 -08:00
Hong Teng
cc6c20f532 am 716747f7: am 481ffa50: Merge "Fix for issue 5309336 -add videoeditor maximum prefetch YUV frames in media_profiles.xml to limit the total memory usage." into ics-mr1
* commit '716747f7cb29b45e41c2870f12d39095f4ed80c8':
  Fix for issue  5309336 -add videoeditor maximum prefetch YUV frames in media_profiles.xml to limit the total memory usage.
2011-11-15 13:07:07 -08:00
Daniel Sandler
0e02e42140 am 50fb8a29: am ce33622a: Merge "Bring back the \'more notifications\' icon." into ics-mr1
* commit '50fb8a29f00e4414ef4961c4d2d6afca9ddf1659':
  Bring back the 'more notifications' icon.
2011-11-15 13:06:59 -08:00
Jean-Michel Trivi
eb80b31b55 am 87597d9c: am 538dc6ac: Merge "Fix 5615747 Don\'t leak remote control client death handlers" into ics-mr1
* commit '87597d9ce00691f05703f728c17548df2bbc9cc2':
  Fix 5615747 Don't leak remote control client death handlers
2011-11-15 13:06:57 -08:00
Wu-cheng Li
7c4dee75b8 am 4e1fed76: am b90a70d1: Merge "Improve camera face detection javadoc." into ics-mr1
* commit '4e1fed76c19cc9656af55e57dc57979324322593':
  Improve camera face detection javadoc.
2011-11-15 13:06:51 -08:00
Mathias Agopian
556a406cf4 am 3aa684ec: Merge "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices" into ics-mr1
* commit '3aa684ec0d3f70027fa808fb95b096a1613a1ddc':
  enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices
2011-11-15 13:06:08 -08:00
Mathias Agopian
a0d32c4d09 am 6b3ce09d: Merge "fix crash when validating an invalid EGL objects" into ics-mr1
* commit '6b3ce09d37fdb53a3a32e688017a5b343398c03b':
  fix crash when validating an invalid EGL objects
2011-11-15 13:06:06 -08:00
Mathias Agopian
3aa684ec0d Merge "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices" into ics-mr1 2011-11-15 13:03:47 -08:00
Mathias Agopian
6b3ce09d37 Merge "fix crash when validating an invalid EGL objects" into ics-mr1 2011-11-15 13:03:22 -08:00
Jeff Brown
bc072da931 POWER key is always a wake key.
This change is useful to ensure that injected POWER key events
always wake the device even if the right policy flags were
not set.

Change-Id: I05b8b35f984f5c9f58b0e9d44bcb6f41a9562fc8
2011-11-15 13:03:11 -08:00
Winson Chung
9ebb030ad9 am e5129d7f: Merge "Defer adding large icon until when we compose the final notification. (Bug 5566846)" into ics-mr1
* commit 'e5129d7f49361df69e804a79696e28b213ea20b0':
  Defer adding large icon until when we compose the final notification. (Bug 5566846)
2011-11-15 12:45:18 -08:00
Steven Ross
0a981cf522 No blackscreen when dialog is showing fixes 5511992
When a dialog is activated, we won't show the blackscreen
until after the lockscreen comes back in focus, which occurs
when the dialog closes.
The user may toggle the power button, causing onScreenTurnedOff to
reset mHasOverlay, even though the dialog is still on top of the window.
Thus, the dialog will have a black box behind it without this change.

Change-Id: I6bec7984b88454e9fff22147cbbfc27b9c0a74f2
2011-11-15 15:42:23 -05:00
Winson Chung
e5129d7f49 Merge "Defer adding large icon until when we compose the final notification. (Bug 5566846)" into ics-mr1 2011-11-15 12:41:56 -08:00
Danielle Millett
8b6b92ea5e am 49000016: am 8d8e669e: Merge "DO NOT MERGE cherry picking from MR0 cl 148223" into ics-mr0
* commit '4900001670c5229fa06e57821a3436023c25520d':
  DO NOT MERGE cherry picking from MR0 cl 148223
2011-11-15 12:21:01 -08:00
Danielle Millett
4900001670 am 8d8e669e: Merge "DO NOT MERGE cherry picking from MR0 cl 148223" into ics-mr0
* commit '8d8e669ea11d011b3e2320ad5dab580916b6d32e':
  DO NOT MERGE cherry picking from MR0 cl 148223
2011-11-15 12:16:59 -08:00
Eric Fischer
66adcedbc6 am 3524831a: am 8d00c194: Merge "Import revised translations. DO NOT MERGE" into ics-mr0
* commit '3524831a633693cf72880299706b2039d41c3b78':
  Import revised translations.  DO NOT MERGE
2011-11-15 11:55:54 -08:00
Eric Fischer
3524831a63 am 8d00c194: Merge "Import revised translations. DO NOT MERGE" into ics-mr0
* commit '8d00c194c228e67851e5a0cb75c4bf4d99dd40f0':
  Import revised translations.  DO NOT MERGE
2011-11-15 11:51:38 -08:00
Sunita Nadampalli
f1e868f682 SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call
Surface Texture dequeue logic is modified to return the oldest of the
free buffers to Client on dequeue call.

Currently dequeue method is returning the first buffer index which is free.
The parsing is done in ascending order of the buffer slot indices.
This leads to returning the buffer which has been just queued to composer,
and hence display, and this defeats the purpose of having minimum dequeue count
as 2 in asynchrnouse mode.

This is fixed by checking all the free slots and returning the oldest buffer.

Change-Id: Ibbac10593c3994c278c601af0480b171635ecdd4
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
2011-11-15 11:43:35 -08:00
Michael Jurka
489ab1167b am 729a9afe: am 4b7494e0: Merge "Updating recent apps visuals on tablet" into ics-mr1
* commit '729a9afe44c21cbe4e10ca4d6ba400641cc75cbc':
  Updating recent apps visuals on tablet
2011-11-15 11:30:36 -08:00
Jeff Sharkey
5898991075 am bc03c74c: am d968670d: Merge "Conservatively trim data usage stats." into ics-mr1
* commit 'bc03c74c485669695805944a655795a6f9890956':
  Conservatively trim data usage stats.
2011-11-15 11:30:34 -08:00
Nick Pelly
2cb8b5d9e9 am 26eeedce: am b3b66af2: Merge "Move nfc-extras tests into frameworks/base/nfc-extras/tests." into ics-mr1
* commit '26eeedceb12fa4d293f6e987115f0e2de54947b8':
  Move nfc-extras tests into frameworks/base/nfc-extras/tests.
2011-11-15 11:30:22 -08:00
Adam Powell
187309bdcc am 5d536c94: am 539bcca9: Merge "Fix bug 5594320 - Overlay action bar decor layout causes two measure passes" into ics-mr1
* commit '5d536c945da075036f151e5dbac86d74d32e2fc9':
  Fix bug 5594320 - Overlay action bar decor layout causes two measure passes
2011-11-15 11:30:13 -08:00
Nick Pelly
0c2184bdb0 am fb52c474: am a26cf301: Merge "Enforce 1-1 relationship between context and NfcAdapterExtras." into ics-mr1
* commit 'fb52c4747687819238eb4570ee7d424842c6159f':
  Enforce 1-1 relationship between context and NfcAdapterExtras.
2011-11-15 11:30:10 -08:00
Dianne Hackborn
356b9b87cf am f1c78890: am 91c2b5ce: Merge "Improve low memory reporting." into ics-mr1
* commit 'f1c78890dc703f44227b556e71624bed7eef95a1':
  Improve low memory reporting.
2011-11-15 11:30:01 -08:00
Jeff Brown
a4db1b7278 am 642de92b: am 9058435d: Merge "Fix races when content providers are acquired and released." into ics-mr1
* commit '642de92b3500446ab2d2a84fbe4ff9c083e8c1af':
  Fix races when content providers are acquired and released.
2011-11-15 11:29:59 -08:00
Dianne Hackborn
aaba252903 am 74710e50: am f10a5364: Merge "Maybe fix issue #5405788: Device continuously opening and closing..." into ics-mr1
* commit '74710e5041045251c43ff408641ec6818d23f985':
  Maybe fix issue #5405788: Device continuously opening and closing...
2011-11-15 11:29:57 -08:00
Daisuke Miyakawa
2b6517cd2c am f2213aca: am d8f5e6ba: Merge "Allow ContactsProvider to remove dulicates" into ics-mr1
* commit 'f2213acaae5073ea3b4f3f566f0e8c7dc976765b':
  Allow ContactsProvider to remove dulicates
2011-11-15 11:29:51 -08:00
Jamie Gennis
43015443b4 am c38d40de: am 6b228af6: Merge "EGL: add the ANDROID suffix to the blob cache ext" into ics-mr1
* commit 'c38d40ded9810aa809489e080ee811bec86d546d':
  EGL: add the ANDROID suffix to the blob cache ext
2011-11-15 11:29:47 -08:00
Tsu Chiang Chuang
06e4a40017 am b3f2890a: am 047c4de2: Merge "Adding mobile microbenchmark tests." into ics-mr0
* commit 'b3f2890a8af3a99be1b0d5fd5a40df656cb60598':
  Adding mobile microbenchmark tests.
2011-11-15 11:13:45 -08:00
Tsu Chiang Chuang
b3f2890a8a am 047c4de2: Merge "Adding mobile microbenchmark tests." into ics-mr0
* commit '047c4de2c548960fff428a92099003593cede5f8':
  Adding mobile microbenchmark tests.
2011-11-15 11:10:44 -08:00