57799 Commits

Author SHA1 Message Date
Jim Miller
3e5d3fd7e1 Fix 5185505: Update DevicePolicyManager to support weak biometric security.
Change-Id: If0fa49908a10d8057b9398112d47eb968cc77060
2011-09-02 17:30:35 -07:00
Christopher Tate
8e294d4557 Fix backup-agent timeouts
Away in the misty span of very-long-ago, it was suggested that spinning
a separate thread to run the backup process was wasteful, and that it
could just run it inline on the dedicated HandlerThread that the
backup manager uses for its own operations.  That was indeed true,
except that the timeout management was also using delayed messages
to that handler.  You see where this is going: timeouts were never
actually being processed, with the effect that a badly-behaving
app's backup agent could lock up the entire backup / restore system
until the device was rebooted.

This is bad.

Backup operations are now driven as an asynchronous state machine:
each step (init, call one agent to obtain data, send resulting
data to the transport, finalize the backup) is handled as a formal
state transition on-looper.  No synchronous wait-for-completion
or -timeout is performed on any thread.

As an additional effect this greatly tightens up the serialization
and locking semantics.  We no longer have to worry about an in-
flight operation involving a standalone thread spinning off on
its own; everything is on the HandlerThread and can be coherently
manipulated from that perspective.

Along the way, this CL tightens up the per-agent error handling
logic.  Previously a single failed agent would abort the entire
backup process, tantamount to a transport-level failure.  This could
mean that the aforesaid badly-behaving app's agent could in effect
starve out other apps whose agents were routinely showing up later
in the queue.  There's some nondeterminism involved, but in practice
it could and did happen.  Furthermore, the failure case would
reschedule *immediately* in this case, because the transport itself
would see that all is well and sure, why not run a backup soon?
This, as you might imagine, causes battery-life issues.

Now we note that the single agent has failed, mark it for a future
repeat attempt, and process the rest of the queue normally, pretending
success at the transport level even though we didn't actually send
any data for that app.  This means that (a) we now finish running
backups for everything in the queue, (b) reschedule backups only for
those apps whose agents individually failed during this run, and
(c) perform the retry after the normal interval [typically on the
order of an hour] rather than immediately.

NOTE: this CL does not retool the restore code path, just backup.
Restore is similarly vulnerable to misbehaving apps, though, so a
future CL will address that bug vector.

Addresses bug 5074923

Change-Id: I67e3f8d06f322607881eaa4093de6d675b85ff2c
2011-09-02 17:21:09 -07:00
Dianne Hackborn
6b0c11da5a Merge "Fix issue #5150899: Call activity takes 15MB we never get back." 2011-09-02 17:18:32 -07:00
Adam Powell
a59e3146b7 Merge "Fix bug 5201420 - Appease the monkeys" 2011-09-02 17:01:28 -07:00
Adam Powell
e1bf486846 Fix bug 5201420 - Appease the monkeys
Make ListView.onFocusChanged more tolerant of missing adapters.

Change-Id: Icae1cfd02fe369d3fd0e3c6531adb973f44f3036
2011-09-02 16:56:57 -07:00
Chet Haase
44671725bf Merge "Fix artifact with LayoutTransitions on disappearing window." 2011-09-02 16:52:03 -07:00
Adam Powell
d857837df2 Merge "Fix bug 5231904 - Fix wobbly progress spinners" 2011-09-02 16:48:55 -07:00
Adam Powell
a1b92c5e8b Fix bug 5231904 - Fix wobbly progress spinners
Make ProgressBar maintain aspect ratio on indeterminate progress drawables.

Make RotateDrawable tolerate left/top bounds != 0.

Change-Id: Iee03030caa98f72a8745f1ae3fb0de108ff663d4
2011-09-02 16:37:41 -07:00
Michael Jurka
32041c1602 Merge "Click on whitespace dismisses Recents in landscape" 2011-09-02 16:35:54 -07:00
Michael Jurka
8064ec61d6 Merge "Use default thumbnail if getting app thumbnail fails" 2011-09-02 16:35:42 -07:00
Chet Haase
3c4ce72c4d Fix artifact with LayoutTransitions on disappearing window.
Logic in performTraversals() starts a transition running at the
proper time. But when a view's parent window goes away, this transition
may not start at that time because drawing gets canceled. But the
transition still hung off of the ViewRoot, waiting until some later
drawing operation to kick it off. This resulted in some weird animations
like the Recents panel appearing and having a single item animate off of it.

The fix is to delete pending transitions when drawing is skipped.

Change-Id: I3ab7702c16e069644a163424f977350743e2cecc
2011-09-02 16:10:43 -07:00
Eric Laurent
929827b819 Merge "Fix issue 5252593: any app can restart the runtime" 2011-09-02 16:05:03 -07:00
Michael Jurka
7725a4e307 Click on whitespace dismisses Recents in landscape
(was added previously for portrait, forgot to add for landscape)

Change-Id: I38161d00c65f753c17d25db8ed69f59f35b0d352
2011-09-02 16:00:34 -07:00
Eric Laurent
dca56b9432 Fix issue 5252593: any app can restart the runtime
Replace null device address string by empty sting.

Change-Id: I285c35f3345334e6d2190493b1a8a5aca1a361a4
2011-09-02 15:59:50 -07:00
Jamie Gennis
83fb94d188 MediaPlayer: remove the setTexture method
This change removes the MediaPlayer#setTexture method.  It has been
replaced with MediaPlayer#setSurface.

Change-Id: Iaecbbac7629d7092883f270694c5c67391f4ed6c
2011-09-02 15:48:52 -07:00
Michael Jurka
ccbc2f309e Merge "Fix a NPE in Recents" 2011-09-02 15:44:09 -07:00
Michael Jurka
9563cb813d Use default thumbnail if getting app thumbnail fails
Change-Id: If76a26d80f2327fe73bc18024c6b2c7eaab4d11d
2011-09-02 15:42:28 -07:00
Mathias Agopian
f743338c1e Merge "fix a bug that caused the off animation to not show sometimes" 2011-09-02 15:31:20 -07:00
Michael Jurka
21ce2d8cae Fix a NPE in Recents
Change-Id: I8fead3b20646e92add6acd49440db675a190baee
2011-09-02 15:28:06 -07:00
Scott Main
d6ede10984 Merge "cherrypick Change-Id: I253ff775829a80fec8e3d1c88ae85af1286a9300 docs: update dashboard stats; add codenames and release note links to version table" 2011-09-02 15:20:00 -07:00
Scott Main
6bddaae049 cherrypick Change-Id: I253ff775829a80fec8e3d1c88ae85af1286a9300
docs: update dashboard stats; add codenames and release note links to version table

Change-Id: I5f6d917fd7b331bbc6782d1df63cf6e76122e04d
2011-09-02 15:18:20 -07:00
Jeff Sharkey
890aaea2fb Merge "Show statusbar clock based on lockscreen status." 2011-09-02 15:07:19 -07:00
Michael Jurka
f7315dd192 Merge "Fix regression: recents did not dismiss after launching apps (5252649)" 2011-09-02 15:02:08 -07:00
Michael Jurka
c6461ca5a0 Fix regression: recents did not dismiss after launching apps (5252649)
also:
- when using menu to "remove from list" in landscape, animate items upward (5149577)
- dismiss recents when tapping on whitespace regions (5115883)

Change-Id: I0f38c7567281583898a49f572cf92d6c59464649
2011-09-02 14:58:10 -07:00
Eric Fischer
5820aeee0b Import revised translations.
Change-Id: Iac73006cfaf846d210855496f6732cbdc6ad0de8
2011-09-02 14:44:12 -07:00
Gilles Debunne
572527f2c3 Merge "Remove the suggestion underline when the TextView loses focus." 2011-09-02 13:54:48 -07:00
Justin Ho
2d05d4b9c3 Merge "Check in source WAVs for sounds" 2011-09-02 13:47:12 -07:00
Gilles Debunne
a41bc33855 Merge "Popup windows positions are updated when a TextView is scrolled" 2011-09-02 13:24:20 -07:00
Gilles Debunne
f3d78eac0f Merge "Added an add to dictionary option in suggestions for misspelled words" 2011-09-02 13:19:24 -07:00
Gilles Debunne
26b5cf40b1 Merge "Fixes around text selection" 2011-09-02 13:17:44 -07:00
Gilles Debunne
1737fcd689 Merge "Fix for NPE in Switch" 2011-09-02 13:17:13 -07:00
Chet Haase
016671fb46 Merge "Tweaks to NotificationPanel animation" 2011-09-02 13:14:18 -07:00
Russell Brenner
d9facff585 Merge "Add Armenian and Georgian fonts" 2011-09-02 12:51:22 -07:00
Martijn Coenen
0c8d57d124 Merge "Fix Activity ref-leak in NFC dispatch API." 2011-09-02 12:50:27 -07:00
Mathias Agopian
7f97258ab3 fix a bug that caused the off animation to not show sometimes
this happened when the overlays were in use, since the animation
is rendered in the FB and the FB is not used.

we now have a way to turn hwc off temporarily.

Change-Id: I3385f0c25bb9cc91948e7b26e7cd31ed18c36ace
2011-09-02 12:22:39 -07:00
Dianne Hackborn
5d927c2d8e Fix issue #5150899: Call activity takes 15MB we never get back.
Persistent process can no longer use hardware acclerated drawing
when running on a low-memory device.

Change-Id: I3110335617af1c98fcede9bf41f4a1d0c20d0e87
2011-09-02 12:22:18 -07:00
Eric Laurent
74e0a990ae VoIP JNI: Force AEC on for tuna board
Force AEC on for tuna board because of the strong feedback
of Rx audio path, even when playing over earpiece or headset.

Change-Id: I9c14257d56103ba82d6cdb0b7d5a3f315638136e
2011-09-02 12:10:45 -07:00
Luca Zanolin
fe5e9834a3 Remove the suggestion underline when the TextView loses focus.
Only the easy correction (i.e., voice ime corrections) will lose the underline, while the misspelled span will not.

Change-Id: If96c17473dd70c99b808739ddde800cc93551e2a
2011-09-02 19:41:42 +01:00
Chet Haase
41bff38d30 Tweaks to NotificationPanel animation
The animation that runs when the NotificationPanel appears
used to start, then pause for a long time as the window/surface/layer
was created, then by the time it started to be visible, the animation
was over. This new approach delays starting the animation until the
layer has been drawn, so the animation can actually run a few frames after
that before finishing.

Change-Id: I998f01fd48cb762178021ad99e2b919b58a1ef3f
2011-09-02 11:28:25 -07:00
Gilles Debunne
70a6312f09 Fixes around text selection
Text selection mode was started by two consecutive taps inside a
field with selectAllOnFocus.

ArrowKeyMovementMethod does not respect the possible cancelLongPress and handles up events.
As a result a scroll that happens to end up at its initial position will be considered a tap
and will move the cursor.
This is however not considered as a tap in TextView and a possible selection mode would not
be stopped in that case.
Fixed by making ArrowKeyMovementMethod aware of the cancel that happened in Touch.

Change-Id: I07372b703f250e1edc7ee0665318ce30441b9187
2011-09-02 11:26:46 -07:00
Mangesh Ghiware
5afd2bd02a Merge "Set reading level scale to display density instead of a fixed minimum." 2011-09-02 11:14:14 -07:00
Dianne Hackborn
c592e8e61a Merge "Fix issue #4554429: API REVIEW: deprecate Live Folders" 2011-09-02 10:37:38 -07:00
Jeff Sharkey
054340d0a3 Show statusbar clock based on lockscreen status.
Keep track of lockscreen clock visibility, and only hide statusbar
clock when one is provided by lockscreen.  This fixes bug where widget
would hide all clocks.

Bug: 5242065
Change-Id: I48de98ecb956c7f22bd40b54d771c78c1a80c14c
2011-09-02 10:31:15 -07:00
Jeff Sharkey
52f159c79e Merge "Fix notification ticker info text alignment." 2011-09-02 10:07:58 -07:00
Mike Lockwood
c458960886 Merge "Fix logic for power button overridding the "wait for prox negative state" after a call" 2011-09-02 10:04:11 -07:00
Russell Brenner
e8a7a72b96 Add Armenian and Georgian fonts
Add Armenian (25K) and Georgian (47K) to all devices.

Bug: 5240378
Change-Id: Ia16c6db54923eb9e27c931dfd2f3c3b052361307
2011-09-02 09:48:47 -07:00
Andreas Huber
69a5f6c3e0 Properly serialize access to FileSource::getSize by acquiring the mutex
Both ::getSize and ::read call into lseek64, if this happens simultaneously
from multiple threads the results are undefined if not properly serialized.

Change-Id: I737cafebd836f3d8eb702beac557b4731f69c6f6
related-to-bug: 5196490
2011-09-02 09:34:51 -07:00
Gilles Debunne
e90bed18cc Added an add to dictionary option in suggestions for misspelled words
Change-Id: I031f17a76b4a81ae375b778046b8c391f9b8b2b2
2011-09-02 09:04:26 -07:00
Mike Lockwood
db97f60054 Fix logic for power button overridding the "wait for prox negative state" after a call
When in a phone call, we keep the screen off while the prox sensor returns positive
and the device is oriented in a vertical position.
If the call is terminated on the other end, we keep the screen off
until the proximity sensor returns negative.
We do this to avoid having the screen turn on as soon as the other end
hangs up while the phone is still next to your head.

However, we allow the power button to wake the screen while waiting for the proximity
sensor to go negative as a precaution in case there is a problem with the proximity sensor.
But unfortunately that logic broke due to a change in the call path used to turn the screen
on from the power button (it previously called userActivity, now it uses a wake lock).
This change adds code to handle the new code path so the power button will wake the screen
while we are waiting for the proximity sensor to go negative after a call.

Bug: 5184524

Change-Id: I7d1e0f0d1f78680c552a05d68a392647823250ab
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-09-02 11:59:08 -04:00
David 'Digit' Turner
382b88409c opengl: EGL: special case for GLES emulation
This patch modifies the library loaded in libEGL.so to
handle the case of GLES emulation as follows:

- if we detect that we run inside the emulator, check the
  GPU emulation status through ro.kernel.qemu.gles, which
  will be set to 1 if supported, or 0 otherwise.

  When trying to run on an older version of the emulator,
  the kernel parameter will not be defined at all.

- if GPU emulation is supported, use egl.cfg as usual.
  It will contain a line like "0 0 emulation" that will
  load libEGL_android.so appropriately.

- nothing is changed if we don't run inside the emulator.

NOTE: Ideally, we would modify libEGL_emulation.so to
      redirect all calls to libEGL_android.so in this case.

      However, this turns out to be extremely tedious to implement
      (too many functions with different signatures).

      As such,  it is much simpler to make the check before
      loading the library.

Change-Id: I9930bc168d9013cc8700feedc57b979384467c37
2011-09-02 15:41:13 +02:00