30915 Commits

Author SHA1 Message Date
Fabrice Di Meglio
15cc68ced0 Fix bug #6495019 Character gets garbled when locale is changed
- add missing cached data clearing. The Shaper was caching the HB_Face so
clear them too
- do minor code refactoring

Change-Id: Ifa86cc63815bdb4b51ce688cf16e986415b1e8c1
2012-05-15 14:55:49 -07:00
Guang Zhu
1affb93764 Expose class name in AppWidgetHostView for accessibility
The class is public, part of framework, exposing it for launcher
testing.

Change-Id: Icd9b0f3e300de964b98de8d9f5f62fdc916584e3
2012-05-15 14:29:33 -07:00
Dianne Hackborn
bea7afc52c Merge "Fix issue #6284404: ArrayIndexOutOfBoundsException in..." into jb-dev 2012-05-15 13:57:06 -07:00
Adam Cohen
0a283346aa Merge "Adjusting default widget padding for sw600 dp devices (issue 6491977)" into jb-dev 2012-05-15 13:47:48 -07:00
Adam Cohen
cd1b10b257 Adjusting default widget padding for sw600 dp devices (issue 6491977)
Change-Id: Ib5ae1452509f4f12c3bfc485b61251490a37960b
2012-05-15 13:38:02 -07:00
Daniel Sandler
8414beac87 Merge "Test new fonts and use correct OS version." into jb-dev 2012-05-15 13:30:41 -07:00
George Mount
d97d4f6cf6 Merge "Only open CAB for long-press." into jb-dev 2012-05-15 13:25:03 -07:00
Daniel Sandler
f89d5079e4 Test new fonts and use correct OS version.
Bug: 6499146
Change-Id: I83d6298725fe1f3385d5bf0a34487658583141a4
2012-05-15 16:15:15 -04:00
Dianne Hackborn
03fcc333cf Fix issue #6284404: ArrayIndexOutOfBoundsException in...
...FragmentManagerImpl.restoreAllState

This was a bug related to the difference between the pre- and post-HC
behavior of onSaveInstanceState().  Prior to HC, state was saved
before calling onPause().  Starting with HC, it is saved between
onPause() and onStop().  To maintain compatibility with existing
applications, there is a check in ActivityThread for pre-HC to in
that case emulate the behavior of old applications, still calling
onSaveInstanceState() before onPause() but using the state later.

One of the special cases we had to deal with in the old model of
saving state before pausing was restarting an activity that is
already paused.

Consider, for example: you have two activities on screen, the one on
top not fullscreen so you can see the one behind.  The top activity
is resumed, the behind activity is paused.  In the pre-HC world, the
behind activity would have already had its state saved.

Now you rotate the screen, and we need to restart the activities.
We need to destroy the behind activity and create a new instance,
but the new instance has to end up in the paused state.  To
accompish this, we restart it with a flag saying that it should
end up paused.  For the pre-HC world, since it ends up paused,
we need to make sure we still have its instance state kept around
in case we need it because we can't regenerate it (since it is
already paused).

So that is what the changed code here is doing.  It goes through
the normal create/start/resume steps, but holds on to the current
saved state so that it isn't lost when resume clears it, and then
puts the activity back to paused and stuffs that old saved state
back in to it.

The problem is that this code was doing it for every application,
even HC apps.  So we end up in a bad state, when a HC app has its
saved state sitting there as if it had been saved, even though it
is only paused.  Now if we go to restart the activity again, instead
of asking it for a new saved state (as we should for a HC app as
part of stopping it), we just re-use the existing saved state again.

Now this wouldn't generally be a huge problem.  Worst case, when we
restart the activity yet again we are just instantiating it from
the same saved state as we used last time, dropping whatever changes
may have happened in-between.  Who cares?  All it has been doing is
sitting there in the background, visible to the user, but not something
they can interact with.  If the activity made changes to its
fragments, those changes will be lost, and we will restore it from
the older state.

However...  if one of those fragements is a retained fragment, this
will *not* appear in the saved state, but actually be retained across
each activity instance.  And now we have a problem: if the retained
fragments are changed during this time, the next activity instance
will be created from the most recent state for the retained fragments,
but the older state for everyting else.  If these are inconsistent...
wham, dead app.

To fix this, just don't keep the saved state for HC apps.

Also includes a small optimization to ActivityStack to not push
the home screen to the front redundantly.

Change-Id: Ic3900b12940de25cdd7c5fb9a2a28fb1f4c6cd1a
2012-05-15 13:13:33 -07:00
David Hu
981bd8a4cd Merge "Allow tests to run when bandwidth profiling fails" into jb-dev 2012-05-15 12:37:52 -07:00
Svetoslav Ganov
0e3057c667 Merge "Add accessibility scroll support to some widgets." into jb-dev 2012-05-15 11:58:55 -07:00
Jeff Sharkey
d6c1e49847 Merge "Migrate stream extras in CHOOSER intents." into jb-dev 2012-05-15 11:35:45 -07:00
Svetoslav Ganov
48d1586f40 Add accessibility scroll support to some widgets.
1. Added support for accessibility scroll action to
   some widgets that are scrollable.

2. Making the super call when handling an accessibility
   action in the views to call super first to allow
   an accessibility delegate to intercept the call.

bug:5932640

Change-Id: I5eb37d64bf9fba1d5c596981132e0df717e2a18a
2012-05-15 11:21:32 -07:00
Romain Guy
2298fe223f Merge "Avoid unnecessary copy when invoking drawBitmap(int[]) Bug #6483390" into jb-dev 2012-05-15 11:18:08 -07:00
Romain Guy
49c5fc0b9e Avoid unnecessary copy when invoking drawBitmap(int[])
Bug #6483390

Change-Id: I4d2d725ef50c9401b4bd998b6160128102b40745
2012-05-15 11:15:24 -07:00
Chris Wren
78cb7cf7d1 Allow animations to run past cancelled draws, if the view is visible.
Bug: 6475482
Change-Id: Iecb3a04744282135efa0049f1b70a46dc4a6bb23
2012-05-15 10:57:59 -07:00
Svetoslav Ganov
8b4d73b2d5 Merge "Revert "Showing default activity in activity chooser view only if enough space."" into jb-dev 2012-05-15 10:49:01 -07:00
Svetoslav Ganov
0e29ac9e4e Merge "Accessibility focus traversal in virtual nodes." into jb-dev 2012-05-15 10:48:44 -07:00
Chris Craik
02c2f45ea2 Invalidate on new picture if scale/content size changes
bug:6497496
Change-Id: Id6de6f83f7bf8a9a4ebcfed61e6b3985d7f19efe
2012-05-15 10:41:49 -07:00
George Mount
899f609f78 Only open CAB for long-press.
Bug 6182286

Change-Id: I18590c457548e63cf45f5f7b626f5e8bd855f521
2012-05-15 08:28:28 -07:00
Gilles Debunne
855f5407c7 Merge "Minor changes in SpellCheckSpan pool management in SpellChecker" into jb-dev 2012-05-15 02:57:00 -07:00
Svetoslav Ganov
b9f286e1a3 Revert "Showing default activity in activity chooser view only if enough space."
This reverts commit 340e2611de6d54516e222597585dbe7968a9915d

Change-Id: I396b70e8c737e6f1c36429618889e5c8fc690b55
2012-05-15 02:48:13 -07:00
Svetoslav Ganov
791fd31a68 Accessibility focus traversal in virtual nodes.
1. Finished the implementation of support for maintaining
   accessibility focus in view with virtual descendants.

2. Finished the NumberPicker implementation of virtual
   subtree such that all requred attributes are reported
   and ensuring that it support accessibility focus in
   its virtual descentants.

3. Fixed a bug where if a predecessor of the view that is
   accessiiblity focused is removed the accessibliity focus
   host in ViewRootImpl is not cleared leading to a crash
   when trying to draw the accessibility focus highlight.:

bug:6472646
bug:6433864

Change-Id: I3645642b87b4a26025c0b2ba9dfaad92d11a48f1
2012-05-15 00:43:53 -07:00
Romain Guy
7b8523aaed Merge "Remove all Dalvik allocations from Cavnas.drawBitmap(int[], ...)" into jb-dev 2012-05-14 20:12:09 -07:00
Romain Guy
e651cc6239 Remove all Dalvik allocations from Cavnas.drawBitmap(int[], ...)
Change-Id: Ie28538a2104d21154fdc78a56525e7403f08287d
2012-05-14 19:44:40 -07:00
John Reck
41f73bdf4d Always do a HIT_TEST
Bug: 6490959
 The issue here is that if the page calls preventDefault on a
 touchstart handler WebViewClassic will not do a HIT_TEST as it
 doesn't get the ACTION_DOWN. This means that the mouse is in the
 wrong position when the click ultimately fires.

 This changes it so that WebViewInputDispatcher will always do a
 HIT_TEST at the start of a touch stream, which ensures that the
 mouse is positioned correctly.

Change-Id: I1aaca7692e2c7aeedeb21fa3592cd4cb3223ea25
2012-05-14 18:40:48 -07:00
Michael Chan
9a9001f008 Update docs for launching custom app for calendar events
Change-Id: I0aeeed91cc27f2c4fa9a026371713cb562776fa8
2012-05-14 18:28:21 -07:00
Svetoslav Ganov
8ce2d78aa8 Merge "Improving accessibility focus traversal." into jb-dev 2012-05-14 18:26:24 -07:00
David Hu
71a0d06fd8 Allow tests to run when bandwidth profiling fails
When bandwidth profiling fails due to lack of kernel module
the test should still be able to run.

Change-Id: Ib111989d2892b05c147889e562e77035fab05140
2012-05-14 18:13:19 -07:00
Jeff Sharkey
3b7d1ef4be Migrate stream extras in CHOOSER intents.
When sending CHOOSER intent, inspect its target for any EXTRA_STREAM
needing migration. If any migration happens, copy the ClipData to
the CHOOSER intent and set GRANT_READ flag. Also update CHOOSER docs.

Bug: 6463773
Change-Id: I66a7adf7bf6f2f173866925cb7e048f4c7a63222
2012-05-14 17:37:11 -07:00
Dianne Hackborn
a827843f9b Merge "Fix issue #6020164: Settings crashed on orientation change..." into jb-dev 2012-05-14 17:31:53 -07:00
Adam Powell
e48d12b780 Merge "Fix ActionProviders that have submenus" into jb-dev 2012-05-14 17:24:24 -07:00
Adam Powell
9e8b7406ca Merge "Fix text coloring for action mode "close" option" into jb-dev 2012-05-14 17:23:54 -07:00
Dianne Hackborn
b61a02657b Fix issue #6020164: Settings crashed on orientation change...
...while listening to TTS example

This was a nice one.  What was happening is that immediately upon
being created, the activity was starting another activity in a
different process.  The second activity would never show, just
immediately exit.  However the original activity had time to
pause and get into stopping itself before the second activity had
come back to the activity manager to say it was going away, resulting
in the activity manager asking the original activity to resume.

At this point the activity manager's state is that the second
activity is finishing and gone, and the original activity is
resumed.  However in the app process the original activity is
still working on stopping itself, and it eventually completes
this and tells the activity manager.  The activity manager now
changes its state to STOPPED, even though it is actually resumed
and that is the last thing it told it to be, and it is now
proceeding to set itself in that state.

This would result later in the activity manager sending an
unnecessary state change to the application.  In the case of
the screen here, we next do a rotation change, the activity
manager thinks the current state is STOPPED not RESUMED, so it
tells the application to relaunch the activity in a new config
but not in the resumed state.  Now it does the whole "start a
new temporary activity" thing again, at which point it tries
to pause the original activity again, and we have an unbalanced
onPause() call to the app and it falls over.

Change-Id: I38b680746f4c61ae30e7ce831e1de187adf60902
2012-05-14 17:19:18 -07:00
Jeff Brown
00ff47484f Merge "More VelocityTracker refactoring." into jb-dev 2012-05-14 17:12:32 -07:00
Chris Craik
dbd98bfecb Merge "Remove unused native method" into jb-dev 2012-05-14 17:04:10 -07:00
Adam Powell
f77f480800 Fix ActionProviders that have submenus
Automatically create a submenu for items with ActionProviders that
provide a submenu when the item was not initially configured to have
one.

Bug 6493376

Change-Id: I27218e2ab205e87534f235eb04042b185d99d143
2012-05-14 16:44:43 -07:00
Eric Laurent
dfae6db022 Merge "Implement new volume display policy." into jb-dev 2012-05-14 16:30:47 -07:00
Svetoslav Ganov
e5dfa47d84 Improving accessibility focus traversal.
1. Now the views considered during the accessibility focus search
   are the ones that would get accessibility focus when thovered
   over. This way the user will get the same items i.e. feedback
   if he touch explores the screen and uses focus traversal. This
   is imperative for a good user experience.

2. Updated which focusables are considered when searching for access
   focus in ViewGroup. Generally accessibility focus ignores focus
   before/after descendants.

3. Implemented focus search strategy in AbsListView that will traverse
   the items of the current list (and the stuff withing one item
   before moving to the next) before continuing the search if
   forward and backward accessibility focus direction.

4. View focus search stops at root namespace. This is not the right
   way to prevent some stuff that is not supposed to get a focus in
   a container for a specific state. Actually the addFocusables
   for that container has to be overriden. Further this approach
   leads to focus getting stuck. The accessibility focus ignores
   root names space since we want to traverse the entire screen.

5. Fixed an bug in AccessibilityInteractionController which was not
   starting to search from the root of a virtual node tree.

6. Fixed a couple of bugs in FocusFinder where it was possible to
   get index out of bounds exception if the focusables list is empty.

bug:5932640

Change-Id: Ic3bdd11767a7d40fbb21f35dcd79a4746af784d4
2012-05-14 16:21:29 -07:00
George Mount
108feca9a0 Merge "Change selection to use left/right instead of base/extent." into jb-dev 2012-05-14 16:04:42 -07:00
Adam Powell
a3d4205cf2 Fix text coloring for action mode "close" option
Bug 6492714

Change-Id: I1e6d3a8c310b791b9e226de0d2984a430250475d
2012-05-14 16:02:36 -07:00
Chris Craik
8230231c88 Remove unused native method
depends on external/webkit change: https://android-git.corp.google.com/g/#/c/190468/

bug:6486310
Change-Id: Id1c1eabf27135c73e45a489ab4c7cfa26e0c9def
2012-05-14 15:57:06 -07:00
Daisuke Miyakawa
3422440633 Merge "Remove assets for Phone's incoming call widget" into jb-dev 2012-05-14 15:21:51 -07:00
Eric Fischer
1d1a5273a9 Merge "Import translations. DO NOT MERGE" into jb-dev 2012-05-14 14:31:01 -07:00
Daisuke Miyakawa
df9b20504b Remove assets for Phone's incoming call widget
Bug: 6491970
Change-Id: I6c0965b7807daef91e0e61252f254ac704c60c67
2012-05-14 14:20:31 -07:00
Svetoslav Ganov
844047acb7 Merge "Fix inconsitency in aAccessibilityNodeInfo cache." into jb-dev 2012-05-14 14:14:26 -07:00
Eric Laurent
8c78752f2b Implement new volume display policy.
Whenever a stream type is muted, the progress bar in volume panel
is at 0.
If a stream is muted by ringer mode and does not control ringer mode,
the progress bar is disabled.
Pressing VOL- when in vibrate or silent mode resets the last audible
volume of ringtone stream (music strem on tablets) to 0.

VolumePanel implementation:
 - Always prefer AudioManager APIs over AudioService APIs when available on both.
 - Do not use AudioManager.shouldVibrate() (deprecated).

Change-Id: I57fcb19ada4e8d729b6b41d668496562ebe340c3
2012-05-14 14:13:10 -07:00
Philip Milne
c8b7747bc0 Merge "Add validation code for GridLayout.LayoutParams" into jb-dev 2012-05-14 14:12:06 -07:00
Michael Jurka
143a02aa79 Merge "Prevent ViewPropertyAnimators from getting started twice" into jb-dev 2012-05-14 14:04:27 -07:00
Philip Milne
0f57cea898 Add validation code for GridLayout.LayoutParams
Bug 6404882.

The supplied code in this bug sets up a table with 2 columns and then
tries to add a component in column 5. Earlier attempts to fix this
by 'doing what the user meeant' had unwanted side-effects. This CL is
intended to defend against all ways to register invalid LayoutParams
and throw IllegalArgumentExcpetion when any column index falls outside the
range [0 .. N] where N is the number of columns. It also includes the
symmetrical check for rows.

Change-Id: I958a6d16035889cd954b78108773426e8b6b6d95
2012-05-14 13:42:05 -07:00