Commit Graph

2848 Commits

Author SHA1 Message Date
Svetoslav Ganov
db3cf0dd58 am 0e29ac9e: Merge "Accessibility focus traversal in virtual nodes." into jb-dev
* commit '0e29ac9e4ede6e75a5ca91eb744bbff83949c71e':
  Accessibility focus traversal in virtual nodes.
2012-05-15 11:32:40 -07:00
Gilles Debunne
8573c20404 am 855f5407: Merge "Minor changes in SpellCheckSpan pool management in SpellChecker" into jb-dev
* commit '855f5407c74694ebd924b36738ecc79241c4becf':
  Minor changes in SpellCheckSpan pool management in SpellChecker
2012-05-15 11:32:09 -07:00
Svetoslav Ganov
d83a080067 am 8ce2d78a: Merge "Improving accessibility focus traversal." into jb-dev
* commit '8ce2d78aa89e89e9a5607d8809bf6d248508a531':
  Improving accessibility focus traversal.
2012-05-15 11:31:28 -07:00
Svetoslav Ganov
0e29ac9e4e Merge "Accessibility focus traversal in virtual nodes." into jb-dev 2012-05-15 10:48:44 -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
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
Svetoslav Ganov
e436812e85 am 844047ac: Merge "Fix inconsitency in aAccessibilityNodeInfo cache." into jb-dev
* commit '844047acb7133c0b6b7128f19b76f93eaca9371e':
  Fix inconsitency in aAccessibilityNodeInfo cache.
2012-05-14 19:34:14 -07:00
Philip Milne
b0708669f9 am c8b7747b: Merge "Add validation code for GridLayout.LayoutParams" into jb-dev
* commit 'c8b7747bc04418ee1a6c0cffe11cdd55c44e5f68':
  Add validation code for GridLayout.LayoutParams
2012-05-14 19:34:10 -07:00
Guang Zhu
58b0dcde83 am 0d607fbe: accessibility bug fix in NumberPicker
* commit '0d607fbe546ac943de38dad33ae681b09efec6ea':
  accessibility bug fix in NumberPicker
2012-05-14 19:32:33 -07:00
Svetoslav Ganov
8ce2d78aa8 Merge "Improving accessibility focus traversal." into jb-dev 2012-05-14 18:26:24 -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
Svetoslav Ganov
844047acb7 Merge "Fix inconsitency in aAccessibilityNodeInfo cache." into jb-dev 2012-05-14 14:14:26 -07:00
Philip Milne
c8b7747bc0 Merge "Add validation code for GridLayout.LayoutParams" into jb-dev 2012-05-14 14:12:06 -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
Guang Zhu
0d607fbe54 accessibility bug fix in NumberPicker
* moved View#isVisibleToUser to protected with @hide
* added a new View#isVisibleToUser(Rect), so that a portion of
  the view can be tested for visibility
* NumberPicker will report its concrete class name
* code to append virtual children was at wrong place
* boundInScreen for increment and decrement buttons are reported
  wrong

Change-Id: Ic5d644b3e1efa15b1f0537907c8cdd4ce43a97c1
2012-05-12 19:09:34 -07:00
Svetoslav Ganov
c406be9036 Fix inconsitency in aAccessibilityNodeInfo cache.
1. Fixed errors in the accessibility node cache.

  A. The cache was not catching the case when the current window changes as a
     result the user touch exploring it. As a result the cache had nodes from
     more that one window but the node ids are not unique thus causing a mess.

  B. The node info tree was prefetched regardless if a prefetched node is root
     name space (i.e. view ids - not accessibility ids - are namespaced) while
     the prefetched nodes were taking this into account. As a result there can
     get disconnected subtrees in the cache.

  C. When an event for a property change such as focus was received the cache
     we were removing the source node. As a result there may be disconnected nodes.

  D. When a node was added to the cache and an older version exists there was
     no check if it will point to the same children and parent. As a result if
     the state of the node has fewer children the subtrees rooted at the no
     longer present children will stay disconnected in the cache.

  E. When a node got accessibility or input focus the old one in the cache was
     not removed. As a result you may have a state with more than one access
     or input focus.

2. Added integrity check enabled only on user builds when a specific flag is set
   for the cache which checks whether:

  A. All nodes are from the same window.

  B. All nodes are connected.

  C. There are no duplicates.

  D. There is only one input focus.

  E. There is only one accessibility focus.

3. The reported accessibility node info tree was stopping at the root namespace
   boundary which is not correct. The reported tree has to reflect everything
   on the screen that the user can see such a workspace with widgets. The root
   namespace is added to avoid clash of view id but the accessibility ids are
   unique no matter if the view is inflated from a remote view.

4. Added calls to notify the accessibility layer when a preoprty that is interesting
   for accessibiliy has changed.

bug:6471710

Change-Id: I069470d91f209ba16313fa6539787a55efa3512e
2012-05-11 17:42:07 -07:00
Adam Powell
e48c70e4d9 am 7fc4fbcc: Merge "Automatic persistent text selection for ListViews" into jb-dev
* commit '7fc4fbccd6129e286a1f9c640eb3229b91792bce':
  Automatic persistent text selection for ListViews
2012-05-11 16:36:11 -07:00
Adam Powell
057a585fba Automatic persistent text selection for ListViews
Use View transient state tracking to allow selection to persist across
ListView-style item view recycling.

Fix some bugs with transient state tracking.

Bug 6110122

Change-Id: Ic084b8fc2289bff718b19478a37ce64459b3ed4c
2012-05-11 14:26:17 -07:00
Raph Levien
a9cc30ce59 am 75ef98f8: Merge "Add fontFamily XML attribute to select font family by string" into jb-dev
* commit '75ef98f8210fa1845d04a6e8206f4c7be5499052':
  Add fontFamily XML attribute to select font family by string
2012-05-11 09:33:22 -07:00
Raph Levien
75ef98f821 Merge "Add fontFamily XML attribute to select font family by string" into jb-dev 2012-05-11 09:31:22 -07:00
satok
da0ff4de32 am bec154c5: Allow the spell checker to remove existing misspelled spans
* commit 'bec154c50036bc70a37518dc93f6821209f58728':
  Allow the spell checker to remove existing misspelled spans
2012-05-11 03:31:32 -07:00
satok
bec154c500 Allow the spell checker to remove existing misspelled spans
Bug: 6451163
Change-Id: If018533e8855e9dc21ab2a09ae31aa80ef260b72
2012-05-11 17:34:01 +09:00
satok
0b8d272eed am 37e169cd: Add a safety net to set range span in the spell checker
* commit '37e169cd1429c76a0223d8fdd77622ead718bbff':
  Add a safety net to set range span in the spell checker
2012-05-10 23:15:57 -07:00
satok
37e169cd14 Add a safety net to set range span in the spell checker
Bug: 6476578
Change-Id: I60ad82f80770dcb67fd9663dac64dc81634d7014
2012-05-11 12:56:13 +09:00
Svetoslav Ganov
31b241919b am 0891a897: Merge "Polish the NumberPicker, TimePicker, and DatePicker based on UX request." into jb-dev
* commit '0891a89790777e2f88f413351fafe49dda36714f':
  Polish the NumberPicker, TimePicker, and DatePicker based on UX request.
2012-05-10 13:02:22 -07:00
Svetoslav Ganov
0891a89790 Merge "Polish the NumberPicker, TimePicker, and DatePicker based on UX request." into jb-dev 2012-05-10 13:00:08 -07:00
Svetoslav Ganov
37fd797699 am a1dc761c: Adding scroll actions to accessibility node info.
* commit 'a1dc761c8322355eb1bb71d3d6c9c603c1d1fc0f':
  Adding scroll actions to accessibility node info.
2012-05-10 12:39:55 -07:00
Svetoslav Ganov
232dd3f335 Polish the NumberPicker, TimePicker, and DatePicker based on UX request.
1. Now the spinners in the time and data picker a wider therefore
   easier to interact with, i.e. harder to miss accidentall.

2. Removed the scroll distance cut off user to distinguish between
   fling and change by one.

3. Added visual feedback when the areas the serve as virtual buttons
   in number picker are poked.

4. Removed the coeffcient that was making drap not to be one-to-one
   with the scrolled distance.

5. Added some margin at the top and bottom of the spinners in
   date and time pickers.

bug:6321432

Change-Id: I311c1733d1951b0563209401faa830ca70ec87cb
2012-05-10 12:35:22 -07:00
Svetoslav Ganov
a1dc761c83 Adding scroll actions to accessibility node info.
1. Scrolling actions are crucial for enabling a gesture based
   traversal of the UI and specifically scrollable containers
   especially lists and anything backed by an adapter. Since
   accessibility focus can land only attached views, it cannot
   visit views for adapter items not shown on the screen.
   Auto scrolling the list as a result of putting access focus
   ot a list item does not work well since the user may get
   trapped in a long list. Adding an accessibility node provider
   to emit virtual views for one view before the first and one
   after the last is complex and suffers the limitation of trapping
   the user. Accessibility service need an explicit scroll actions
   which may be performed upon an explicit user action. Hence,
   the user is informed for the start/end of the visible part of
   the list and he makes a deliberate choice to scroll. This will
   benefit also people developing Braille devices since they can
   scroll the content without telling the user to stop using the
   Braille controller and take the device out of his pocket to scroll
   and go back to the Braille controller.

NOTE: Without these action large portions of the screen will be
    hard to access since users will have to touch and explore to
    find and scroll the list.

Change-Id: Iafcf54d4967893205872b3649025a4e347a299ed
2012-05-10 12:28:04 -07:00
Raph Levien
d570e8987a Add fontFamily XML attribute to select font family by string
Change-Id: I0b649528d3d9888e3561a1a3907a6b6ee2e30238
2012-05-09 23:18:42 -07:00
Svetoslav Ganov
cd26d63ffa am f103758b: Merge "Delegate list item focus and click actions to the parent list." into jb-dev
* commit 'f103758b7c78f4dc1c5bd57383d245ec138576a1':
  Delegate list item focus and click actions to the parent list.
2012-05-09 13:49:33 -07:00
Svetoslav Ganov
f103758b7c Merge "Delegate list item focus and click actions to the parent list." into jb-dev 2012-05-09 13:46:57 -07:00
Gilles Debunne
4f9e7490e7 am 12ff1492: Merge "Spell checker underlines words even when there are no suggestions" into jb-dev
* commit '12ff149265ba599627896f6c1a0e3ea9721b54c1':
  Spell checker underlines words even when there are no suggestions
2012-05-09 11:52:13 -07:00
Gilles Debunne
12ff149265 Merge "Spell checker underlines words even when there are no suggestions" into jb-dev 2012-05-09 11:49:08 -07:00
Gilles Debunne
69865bd686 Minor changes in SpellCheckSpan pool management in SpellChecker
Bug 6464190

The 'inProgress' flag is set to false when the SpellCheckSpan starts
to get used (instead of a less intuitive when it is removed).

Pool recycling in handled by onSpellCheckSpanRemoved, called from
the TextView's SpanWatcher, when a SpellCheckSpan is removed for any
reason (from the SC code or due to text editing).

The other change is that Sentence SC now correctly removes the span
from the text (and hence recycles it in the pool).

Change-Id: If8b433fd5e41d4dc0304a127ebcc088ea1eecaa7
2012-05-09 11:22:26 -07:00
satok
957f1e3e1a am d1e323b2: Merge "Not to add invalid spell check spans Bug: 6464197" into jb-dev
* commit 'd1e323b272db90db426a4add18af4993f41ae361':
  Not to add invalid spell check spans Bug: 6464197
2012-05-09 01:49:57 -07:00
Adam Powell
eb0890da4c am a87f2346: Merge "More fun with AbsListView smooth scrolling" into jb-dev
* commit 'a87f23468182f64373f549e3f63666215e00f7eb':
  More fun with AbsListView smooth scrolling
2012-05-09 01:48:47 -07:00
Gilles Debunne
4fcc9b4924 am 2e999d12: Merge "Removed debug code in TextView" into jb-dev
* commit '2e999d12743edf329b6991d7168099cec9f1c24f':
  Removed debug code in TextView
2012-05-09 01:48:27 -07:00
Svetoslav Ganov
c02e9980e4 am 775bcac6: Updating the documentation of share action provider.
* commit '775bcac6bcdd04b6bffd23b5de0da4588a749337':
  Updating the documentation of share action provider.
2012-05-09 01:45:54 -07:00
Svetoslav Ganov
4a79594ca1 am d57521c6: Fix the build.
* commit 'd57521c6742f4018761faab1de96bd38afbcac02':
  Fix the build.
2012-05-09 01:45:41 -07:00
Adam Powell
e64436f7f2 am ae9c72d9: Merge "AbsListView: Toss transient state views once they no longer have transient state." into jb-dev
* commit 'ae9c72d9a8f210e51b5a6364b294a5eb24945de6':
  AbsListView: Toss transient state views once they no longer have transient state.
2012-05-09 01:45:33 -07:00
Svetoslav Ganov
43e3366b55 am b1ae25cb: Merge "ActivityChooserModel does not handle package changes on the thread that created it." into jb-dev
* commit 'b1ae25cb37e92a30d196290b75a159e5382c5b34':
  ActivityChooserModel does not handle package changes on the thread that created it.
2012-05-09 01:45:31 -07:00
Svetoslav Ganov
755b214673 am b2ee0d57: Merge "Text traversal at various granularities." into jb-dev
* commit 'b2ee0d57672faf42ca88fa878dc7e688046c915e':
  Text traversal at various granularities.
2012-05-09 01:45:24 -07:00
Adam Powell
06aedd01c1 am 6392a360: Merge "Fix misc. bugs in AbsListView smooth scrolling." into jb-dev
* commit '6392a3609cb6457aec715804e15b51fa498141c6':
  Fix misc. bugs in AbsListView smooth scrolling.
2012-05-09 01:44:55 -07:00
satok
a4c82c1c78 Not to add invalid spell check spans
Bug: 6464197

Change-Id: I6e9d359847b200e2afae61f85eb7cfe7f179b888
2012-05-09 11:20:17 +09:00
Adam Powell
a87f234681 Merge "More fun with AbsListView smooth scrolling" into jb-dev 2012-05-08 15:52:12 -07:00
Adam Powell
aadf4fb68e More fun with AbsListView smooth scrolling
If any data set change is pending when a smooth scroll is requested,
post it for later - not just if the list is currently empty.

Fix a bug in relative smooth scrolling where the last view was being
determined incorrectly.

Bug 6434713

Change-Id: Ic249eefc594151a414a6a8758074a9a60888e2b4
2012-05-08 15:43:34 -07:00
Gilles Debunne
41347e9e8b Spell checker underlines words even when there are no suggestions
Bug 6222722

Also fixed a cast to Long warning.

Change-Id: Ief299cc3cb952b83f774ca1be13dc69352015a3e
2012-05-08 15:39:17 -07:00
Gilles Debunne
5fae996751 Removed debug code in TextView
Bug 6462527

The String parameter was used to debug code during the
refactoring process.

Change-Id: I49a78bbfa3b45c185311d0dbebddddc52515c099
2012-05-08 14:53:30 -07:00
alanv
c1d7e770e1 Delegate list item focus and click actions to the parent list.
Change-Id: Ie05c79f049896bfb498d4b33f0611da38f381140
2012-05-08 14:50:02 -07:00