Commit Graph

3896 Commits

Author SHA1 Message Date
Satoshi Kataoka
65ea41541b Merge "Fix an issue where "SuggestionSpan"s are not removed properly" 2013-06-07 07:59:44 +00:00
Svetoslav
494cb689d0 Merge "Optimizing AccessibilityNodeInfo caching." 2013-06-07 00:04:57 +00:00
Romain Guy
f69913056b Remove unnecessary allocations
Change-Id: Ia561a0a312ca2737d5afa742184f5392bb2f29a3
2013-06-06 12:10:42 -07:00
Elliott Hughes
e7af0d2866 am 340df6c4: am 4d33a8ab: am fa6d6256: Merge "change "next" to "done" in minute IME option under 24-hour format"
* commit '340df6c4f7af79dc085471064211ba01ebd45f0a':
  change "next" to "done" in minute IME option under 24-hour format
2013-06-05 16:29:13 -07:00
Elliott Hughes
340df6c4f7 am 4d33a8ab: am fa6d6256: Merge "change "next" to "done" in minute IME option under 24-hour format"
* commit '4d33a8aba33fa70e1e1a1c713e487a26a090bc25':
  change "next" to "done" in minute IME option under 24-hour format
2013-06-05 16:26:04 -07:00
Elliott Hughes
4d33a8aba3 am fa6d6256: Merge "change "next" to "done" in minute IME option under 24-hour format"
* commit 'fa6d6256e9052a5f5155ac97364170f6518e37a4':
  change "next" to "done" in minute IME option under 24-hour format
2013-06-05 16:23:34 -07:00
Elliott Hughes
fa6d6256e9 Merge "change "next" to "done" in minute IME option under 24-hour format" 2013-06-05 23:20:37 +00:00
Svetoslav
6254f4806d Optimizing AccessibilityNodeInfo caching.
1. Before we were firing an accessibility event from the common
   predecessor of views with accessibility related state changes
   every X amount of time. These events designate that the tree
   rooted at the source is invalid and should not be cached.
   However, some of the state changes do not affect the view tree
   structure and we can just refresh the node instead of evicting
   and recaching nodes infos for views that did not change. Hence,
   we need a way to distinguish between a subtree changed over a
   node changed.

   Adding a new event type will not work since if say two siblings
   have local changes and their predecessor fires a window state
   change event, the client will drop the subtree rooted at the
   parent including the two views with changes. Subsequent, more
   specialized events emitted from the two changed siblings will
   be useless since the parent which did not changed is already
   evicted from the cache. Conversely, if the specialized events
   are fired from the two siblings with local changes and they
   are refreshed in the cache the subsequent window state change
   event from the common predecessor will force the refreshed
   nodes to be evicted.

   Hence, to enable distinction between node being changed and
   a subtree baing changed while not changing existing behavior,
   we will fire only window content change event with an additional
   argument specifying what changed - node or a subtree for now.
   Also if the changes are local to a view we fire the window
   content changed event from the view. So, the two siblings will
   fire such an event independently and the client will know that
   these are local changes and can just refresh the node. If the
   changes are structural, then we fire the window state change
   event from the common predecessor.

2. Added the input type of a text view as one of the properties
   reported by an AccessibilityNodeInfo. It is nice to prompt the
   user what input is expected.

3. Added a bundle for optional information to AccessiiblityNodeInfo.
   For example, it will be used for putting web specific properties
   that do not map cleanly to Android specific ones in WebView.

4. AccessibilityInteractionController was not taking into account
   whether the current accessibility focused node is shown before
   returing it. Hence, a disconnected node would be returned and
   caching it puts our cahche in an inconsistent state.

Change-Id: I8ed19cfb4a70bdd7597c3f105487f1651cffd9e0
2013-06-05 15:16:05 -07:00
Alan Viverette
d6f37d724d Merge "Prevent scroll views from sending duplicate onScrollChanged events." 2013-06-05 17:37:29 +00:00
Satoshi Kataoka
d7429c15e6 Fix an issue where "SuggestionSpan"s are not removed properly
Basically, the root cause of this issue is a lack of an expected implementation.
This change completes the spec of the architecture to remove modified "SuggestionSpan"s.

Bug: 9190860
Change-Id: I63f2ccf3407ae7c1bc28813e044b8703e2112f34
2013-06-05 22:30:54 +09:00
Alan Viverette
4bb52a93e9 Merge "Always draw dividers for footers and headers when explicitly enabled." 2013-06-04 22:48:20 +00:00
Alan Viverette
9234a78be2 Merge "Clear pressed state when moving outside list bounds." 2013-06-04 22:46:31 +00:00
Joe Malin
e3b8d7fdb1 am 36d0f946: am e9dff008: am 305cf97b: am 60776093: am 029099ff: am f4b21585: am 10d96950: DOC CHANGE: Clarify textIsSelectable in TextView
* commit '36d0f946adc83a9ffa5483556d263b719977da5d':
  DOC CHANGE: Clarify textIsSelectable in TextView
2013-06-04 11:17:16 -07:00
Joe Malin
36d0f946ad am e9dff008: am 305cf97b: am 60776093: am 029099ff: am f4b21585: am 10d96950: DOC CHANGE: Clarify textIsSelectable in TextView
* commit 'e9dff008adc7b6e565402ec61cd89fb3265a28bd':
  DOC CHANGE: Clarify textIsSelectable in TextView
2013-06-04 10:20:15 -07:00
Joe Malin
e9dff008ad am 305cf97b: am 60776093: am 029099ff: am f4b21585: am 10d96950: DOC CHANGE: Clarify textIsSelectable in TextView
* commit '305cf97ba7b927f49d3f52952c36cb5102699cc5':
  DOC CHANGE: Clarify textIsSelectable in TextView
2013-06-04 10:17:46 -07:00
Joe Malin
305cf97ba7 am 60776093: am 029099ff: am f4b21585: am 10d96950: DOC CHANGE: Clarify textIsSelectable in TextView
* commit '60776093a5569817040e2f65a17893a381906564':
  DOC CHANGE: Clarify textIsSelectable in TextView
2013-06-04 10:14:48 -07:00
Joe Malin
60776093a5 am 029099ff: am f4b21585: am 10d96950: DOC CHANGE: Clarify textIsSelectable in TextView
* commit '029099ff56b92201e10b2047e1ced675c8e9f964':
  DOC CHANGE: Clarify textIsSelectable in TextView
2013-06-04 10:12:09 -07:00
Joe Malin
10d96950c1 DOC CHANGE: Clarify textIsSelectable in TextView
Change-Id: Iddfdf7ed82ea3fa2a0160bda4a1e29ec8f815a2b
2013-06-04 09:34:54 -07:00
Alan Viverette
cb25bd8c2b Prevent scroll views from sending duplicate onScrollChanged events.
Moves the call to onScrollChanged from onTouchEvent into onOverScrolled,
which ensures only one of scrollTo or onScrollChanged will be called in
a single execution.

Bug: 7584549
Change-Id: Ibccd98a30835efad75eb41bcdd4b136e1b8e0ddd
2013-06-03 17:10:44 -07:00
Alan Viverette
b9fc4b879b Always draw dividers for footers and headers when explicitly enabled.
Treats headers and footers as "enabled" list items when header and footer
dividers are turned on. Also fixes incorrect drawing of dividers when
"stack from bottom" is enabled.

Bug: 7288159
Change-Id: Ibfc48841502a410357db04aaed01072703c7d36c
2013-06-03 16:42:22 -07:00
Romain Guy
a4b7965cc2 Merge "Replace HashMap with ArrayMap to remove unnecessary allocations" 2013-06-03 22:52:20 +00:00
Romain Guy
6876b4fb90 Replace HashMap with ArrayMap to remove unnecessary allocations
This change also fixes a race condition. If multiple UI threads are used
in a single process, RelativeLayouts could end up using the same nodes
in different windows, causing mayhem and headaches.

Change-Id: I9ba4a0bf05d44e1a1e7a82443d40c500c657cd7a
2013-06-03 15:40:52 -07:00
Romain Guy
36e337f971 Merge "Remove unnecessary lock to save 1 allocation per TextView" 2013-06-03 22:38:07 +00:00
Alan Viverette
74ded29bd1 Clear pressed state when moving outside list bounds.
Bug: 8724943
Change-Id: Ife40ad672c161fef76e62dfd3c7f7fb3b08c3648
2013-06-03 15:34:11 -07:00
Romain Guy
31f0544293 Remove unnecessary lock to save 1 allocation per TextView
Change-Id: I4fb885c61b44e57b8abaf3beedf61aaab3ef5d71
2013-06-03 14:19:54 -07:00
Alan Viverette
20914c6ae9 Merge "Cleaning up AbsListView, fixing annotations and updating API calls." 2013-06-01 01:37:46 +00:00
Alan Viverette
66dbeac0e9 Merge "Split AbsListView.onTouchEvent into multiple methods for readability." 2013-06-01 01:37:01 +00:00
Alan Viverette
8fa327a2fc Cleaning up AbsListView, fixing annotations and updating API calls.
Change-Id: I87ce7714d0cc9e10a1466f474b828f2a27c57e15
2013-05-31 14:53:13 -07:00
Alan Viverette
e7f30dc14d Split AbsListView.onTouchEvent into multiple methods for readability.
Change-Id: Iaa28b70f9d708857e64c3d857c65aa075ab4208a
2013-05-31 14:14:51 -07:00
Svetoslav
6a3c3b838b am 5fecbf9d: am ec586994: Merge "CalendarView header not updated on year change." into jb-mr2-dev
* commit '5fecbf9d10cd6e40204187e6a2970ed113e48350':
  CalendarView header not updated on year change.
2013-05-30 15:16:25 -07:00
Svetoslav
5fecbf9d10 am ec586994: Merge "CalendarView header not updated on year change." into jb-mr2-dev
* commit 'ec58699413ebe4cc2a72a8aae3c420fb3d764457':
  CalendarView header not updated on year change.
2013-05-30 12:50:15 -07:00
Svetoslav
a085179558 CalendarView header not updated on year change.
The calendar view was updating its header only if the focused
month changes. Removed the check whether the displayed month
changed before setting it since the setter is carefully called
only in cases when there is a change. Hence, now if the year
or the month change, we update the header. This is the safest
and least intrusive fix.

bug:9167305

Change-Id: I98200bb57580f6416abd30c6c25454d4474add64
2013-05-29 14:37:34 -07:00
John Spurlock
883ffa243d Merge "Hideybars feature confirmation toast bar." 2013-05-28 22:23:17 +00:00
Dianne Hackborn
bbf6ecc981 am 4e73e8a8: am 95b79966: am 0a40bef9: Merge "Fix CalendarView to show the month title properly."
* commit '4e73e8a817ff99a19ba9ed6fa68754007731406d':
  Fix CalendarView to show the month title properly.
2013-05-28 13:49:59 -07:00
John Spurlock
dcf4f21460 Hideybars feature confirmation toast bar.
Enhance Toast to support new standard toast bar style, similar
to the undo bar in Gmail.  Toast bars can be interactive,
and can have a single action.  Add a new toast duration to
indicate persistent toasts (no auto-hide delay).

Use the new toast bar to implement a feature hint when hiding
the navigation bar in hideybars mode.

Per UX, the feature confirmation bar can also be dismissed on
any outside touch as long as the user confirmed it using the
OK button at least once globally.

Bug: 8754108
Change-Id: Iaa85d3b4da7ada1952a562f1e31de04380f5d587
2013-05-28 13:09:23 -04:00
Dianne Hackborn
95b7996693 am 0a40bef9: Merge "Fix CalendarView to show the month title properly."
* commit '0a40bef955c937189841b6f1695e8001311758fa':
  Fix CalendarView to show the month title properly.
2013-05-26 00:02:41 -07:00
Dianne Hackborn
0a40bef955 Merge "Fix CalendarView to show the month title properly." 2013-05-26 06:58:14 +00:00
Dianne Hackborn
2e39f5c5cb Merge "New ArrayMap class." 2013-05-24 23:37:16 +00:00
Dianne Hackborn
f4bf0ae2a7 New ArrayMap class.
This is a new kind of key/value mapping that stores its data
as an array, so it doesn't need to create an extra Entry object
for every mapping placed in to it.  It is also optimized to reduce
memory overhead in other ways, by keeping the base object small,
being fairly aggressive about keeping the array data structures
small, etc.

There are some unit and performance tests dropped in to some
random places; they will need to be put somewhere else once I
decided what we are going to do with this for the next release
(for example if we make it public the unit tests should go in
to CTS).

Switch IntentResolver to using ArrayMap instead of HashMap.

Also get rid of a bunch of duplicate implementations of binarySearch,
and add an optimization to the various sparse arrays where you can
supply an explicit 0 capacity to prevent it from doing an initial
array allocation; use this new optimization in a few places where it
makes sense.

Change-Id: I01ef2764680f8ae49938e2a2ed40dc01606a056b
2013-05-24 16:36:14 -07:00
Alan Viverette
4026a797bc am 14ccf554: Merge "DO NOT MERGE. Fix number picker accessibility focus." into jb-mr2-dev
* commit '14ccf554d0168d94c35c058b057d7d1aca228c6e':
  DO NOT MERGE. Fix number picker accessibility focus.
2013-05-24 14:21:55 -07:00
Alan Viverette
14ccf554d0 Merge "DO NOT MERGE. Fix number picker accessibility focus." into jb-mr2-dev 2013-05-24 21:19:55 +00:00
Alan Viverette
dbed27e5e4 DO NOT MERGE. Fix number picker accessibility focus.
The node bounds populated by the child TextView were not consistent
with the bounds manually populated for its parent NumberPicker.

Bug: 9072003
Change-Id: Icbfa64f52cf11fd39c7243936227b8ba36280c3c
2013-05-24 10:03:24 -07:00
Alan Viverette
0e2d281083 Fix number picker accessibility focus.
The node bounds populated by the child TextView were not consistent
with the bounds manually populated for its parent NumberPicker.

Bug: 9072003
Change-Id: Icbfa64f52cf11fd39c7243936227b8ba36280c3c
2013-05-21 17:15:30 -07:00
Adam Powell
2e46b60d84 Merge "Fix out-of-screen item can take focus issue" 2013-05-21 00:23:50 +00:00
Fabrice Di Meglio
ea0735ff12 am 5d19f506: am 28df6d3d: Merge "Fix bug #8913650 spinner dropdown(android.R.layout.simple_spinner_dropdown_item) random alignment on RTL." into jb-mr2-dev
* commit '5d19f506b43e9e7e4c27ca70da1d44a58da71d75':
  Fix bug #8913650 spinner dropdown(android.R.layout.simple_spinner_dropdown_item) random alignment on RTL.
2013-05-20 15:50:48 -07:00
Fabrice Di Meglio
5d19f506b4 am 28df6d3d: Merge "Fix bug #8913650 spinner dropdown(android.R.layout.simple_spinner_dropdown_item) random alignment on RTL." into jb-mr2-dev
* commit '28df6d3d4f719d4dbdf82751db46e10ff3d044bb':
  Fix bug #8913650 spinner dropdown(android.R.layout.simple_spinner_dropdown_item) random alignment on RTL.
2013-05-20 15:49:03 -07:00
Fabrice Di Meglio
28df6d3d4f Merge "Fix bug #8913650 spinner dropdown(android.R.layout.simple_spinner_dropdown_item) random alignment on RTL." into jb-mr2-dev 2013-05-20 22:47:43 +00:00
Svetoslav Ganov
f1cfdcee27 am 5315953b: am 78a4630e: Merge "Taking into account data change for AbsListView when prefetching node infos." into jb-mr2-dev
* commit '5315953b86ee7ca29756504535e124b053286623':
  Taking into account data change for AbsListView when prefetching node infos.
2013-05-20 15:46:18 -07:00
Svetoslav Ganov
5315953b86 am 78a4630e: Merge "Taking into account data change for AbsListView when prefetching node infos." into jb-mr2-dev
* commit '78a4630edaa11846b09bdad84bac18a0441c500a':
  Taking into account data change for AbsListView when prefetching node infos.
2013-05-20 15:43:36 -07:00
Jaewan Kim
49fc4dcd4c Fix out-of-screen item can take focus issue
In case of a ListView has a item which takes more than 33% of its height
(result from getMaxScrollAmount), scroll does not move enough to show
all the item. In this case, consecutive arrow scroll moves selection
everytime while scroll may not move that much.

This fixes the issue by checking the visibility of current selection in
advance.

Bug: 8831751
Change-Id: Ic747bd5513c6734aaf1a1d08e497c1e3ef835004
2013-05-21 05:08:38 +09:00