Commit Graph

3790 Commits

Author SHA1 Message Date
Dave Burke
bafc8dcf69 am 34bc73df: Merge "Revert "Make implementation of isEmpty consistent with implementation of getCount in HeaderListViewAdapter"" into jb-mr2-dev
* commit '34bc73dff1f0c8402da3fc9bd1f0175bddcaa842':
  Revert "Make implementation of isEmpty consistent with implementation of getCount in HeaderListViewAdapter"
2013-06-12 21:11:12 -07:00
Adam Powell
fc93d0c108 Revert "Make implementation of isEmpty consistent with implementation of getCount in HeaderListViewAdapter"
This reverts commit ef2277ec58.

This caused a regression for some apps relying on the old behavior.

Bug 9372495
2013-06-12 17:38:25 -07:00
Romain Guy
7a6e129759 am 8d8fc469: Merge "Don\'t orphan footers with transient state Bug #8725945" into jb-mr2-dev
* commit '8d8fc469952ffe3feb45e52388f2129f8dd5e40c':
  Don't orphan footers with transient state Bug #8725945
2013-06-10 10:26:57 -07:00
Romain Guy
b7e0f7942b Don't orphan footers with transient state
Bug #8725945

Selecting text in an EditText causes the View to have transient
state. This would in turn cause the View to be removed from its
ListView parent. When removed, the EditText would lose its
AttachInfo, causing all sorts of problems. Headers and footers
must not be removed, only detached. This is the part of the fix
in AbsListView.

Fixing AbsListView triggered a second bug: when a View is removed
from the Window manager, it would keep its parent assigned, thus
making it impossible to add it again to the window manager. When
a ViewRootImpl goes through doDie(), it must set its content view's
parent to null to properly cleanup.

Change-Id: I0489daa74f8f7fcf85526f0928f8925ec30d4f42
2013-06-07 15:36:49 -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
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
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
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
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
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
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
Svetoslav Ganov
50776863a2 Taking into account data change for AbsListView when prefetching node infos.
We are prefetching accessibility node infos to minimize the number of IPC
calls when an accessibility service introspects the screen. It is however,
possible that the view we are prefetching is a child of an AbsListView whose
adapter changed its data but the AbsListView still did not perform a layout
pass to sync its children with the new adapter state. This may lead to an
exeption when trying to query for the state of a child's position. If the
data of the adapter is changed and the layout pass still not performed,
we return null for the AbsLIstView's children. When the layout pass
completes we already notify the accessibliity layer so it will be able to
refetch the children of the AbsListView.

bug:8433433

Change-Id: I56313c721aef3848b15fad50027d068ba1d291f7
2013-05-17 18:36:57 -07:00
Fabrice Di Meglio
a423f5033a Fix bug #8913650 spinner dropdown(android.R.layout.simple_spinner_dropdown_item) random alignment on RTL.
- add missing assignment for text direction (mTextDir)
- when layout direction change, update text direction (mTextDir again)

Change-Id: Id600fb0c5897a0d2ee5f9fe18a63437dc3e528d9
2013-05-15 19:24:56 -07:00
Svetoslav
80127981f8 am c0a979ce: Merge "Fixing the accessibility text traversal in extend mode." into jb-mr2-dev
* commit 'c0a979ce30cf9b96c0a84d0679aeeef7153a22fa':
  Fixing the accessibility text traversal in extend mode.
2013-05-14 11:07:08 -07:00
Svetoslav
c0a979ce30 Merge "Fixing the accessibility text traversal in extend mode." into jb-mr2-dev 2013-05-14 17:39:36 +00:00
Svetoslav
abad55d860 Fixing the accessibility text traversal in extend mode.
We added APIs to allow an accessibility service to extend the
selection while moving the cursor at a given granularity such
as word, character, etc. The problem is that the traversal was
extending only the end of the selection while moving forward
and the start of the selection while moving backward. This leads
to a case in which the user cannot shrink/extend the selection
because for example instead of shrinking the end of the selection
the implementation was extending the start.

Now extending the selection moves only the selection end. This is
the same behavior as text view using a keyboard.

Tests: https://googleplex-android-review.googlesource.com/#/c/307062

bug:8839844

Change-Id: Id6965b102647df909f61301fcc8ec05458dd5881
2013-05-10 20:14:40 -07:00
Svetoslav
1e4c658994 am b3c2b21b: Merge "Accessibility should not query for list items when data set changed." into jb-mr2-dev
* commit 'b3c2b21b5ba30d82938ae2ef93d8120f5fd0cc80':
  Accessibility should not query for list items when data set changed.
2013-05-10 13:10:41 -07:00
Svetoslav
b3c2b21b5b Merge "Accessibility should not query for list items when data set changed." into jb-mr2-dev 2013-05-10 20:06:42 +00:00
Marco Nelissen
1d3488cba9 am 86e0b491: Merge "Add VideoView.getAudioSessionId()" into jb-mr2-dev
* commit '86e0b491d1b50e59221420de3005184b1dee8373':
  Add VideoView.getAudioSessionId()
2013-05-10 12:44:05 -07:00
Marco Nelissen
13bfebd6b7 Add VideoView.getAudioSessionId()
This lets apps get the audio session id of the video being played, so
they can apply effects to the audio track.
b/8767565

Change-Id: Iaa39d97d0b6fb528ed04b52d579afa58444ebcfe
2013-05-09 15:50:38 -07:00
Svetoslav
5b578daac9 Accessibility should not query for list items when data set changed.
AbsListView is backed by an adapter. After the adapter data changes
the view sets a flag that its state is dirty and requests a layout.
If an accessibility service asks for the state of a list item at
this point, it may incur an error since the views and the adapter
are not in sync.

Now if an accessibility service queries for a list item when the
data set is changed and the item views are dirty, we pretend the
children do not exist. After the layout happens, we notify the
accessibility layer that the screen content changed so it can
refetch the views if desired (this notification mechanism is
already in place in AbsListView#handleDataChanged()).

bug:8433433

Change-Id: I4287a0ac2ef6bb33f1f988d5ddad973556c305ca
2013-05-08 14:23:38 -07:00
Elliott Hughes
c255800fb0 am 6d82f86f: Merge "Show CJK dates as all-numeric in the DatePicker."
* commit '6d82f86fa01800ee0523743366e0dc1113178fd9':
  Show CJK dates as all-numeric in the DatePicker.
2013-05-01 14:53:28 -07:00
Elliott Hughes
949e9df25b Show CJK dates as all-numeric in the DatePicker.
Before, we'd have something like 2006 4月12. After, we have 2006 4 12.
The alternative would require using custom NumberPicker.Formatter instances
for the year and day fields in these locales, and that seems significantly
more disruptive.

Bug: 8766552
Change-Id: I568578aae2f80f2acfc53cd277ef3beae6743472
2013-05-01 14:12:05 -07:00
Elliott Hughes
76c643c9b6 am e3f2735f: Merge "when locale is non-Enligh, sometimes month spinner needs a number IME"
* commit 'e3f2735fcfd8dafd226200d5cf219a6f82c9cc0c':
  when locale is non-Enligh, sometimes month spinner needs a number IME
2013-04-30 13:21:22 -07:00
Romain Guy
55828af26c am 6628ee7a: Merge "HeaderViewListAdapter: Correct thrown error names."
* commit '6628ee7a46a56cdc28d409e6fd74afc34bd24c5b':
  HeaderViewListAdapter: Correct thrown error names.
2013-04-30 13:21:19 -07:00
Elliott Hughes
e3f2735fcf Merge "when locale is non-Enligh, sometimes month spinner needs a number IME" 2013-04-30 20:11:50 +00:00
Elliott Hughes
a99595a393 am afe56810: Merge "Fix DatePicker\'s spinner order in various locales."
* commit 'afe56810517a4ddfad125029ca04fd4cc5af2ef5':
  Fix DatePicker's spinner order in various locales.
2013-04-30 12:15:06 -07:00
Romain Guy
6628ee7a46 Merge "HeaderViewListAdapter: Correct thrown error names." 2013-04-30 19:11:22 +00:00
Taylor H. Perkins
62b2bb80f6 HeaderViewListAdapter: Correct thrown error names.
When accessing an invalid entry of the list, an IndexOutOfBounds exception is thrown, not an ArrayIndexOutOfBounds exception.

Change-Id: I3cf59faab004fa6391d84f30f280e0c9bd92dc44
Signed-off-by: Taylor H. Perkins <taylorhp@gmail.com>
2013-04-30 12:04:52 -07:00
Elliott Hughes
659f145278 Fix DatePicker's spinner order in various locales.
DatePicker always effectively uses yyyy MMM dd, so we need to ask
icu4c what order those should appear in for the user's locale. The
existing DateFormat code was an approximation that worked for en_US
but not for all languages (fa being one example).

Bug: 7207103
Change-Id: I7b12568dbc02522ebad6e1db5f8426109cd6f7ce
2013-04-30 11:11:53 -07:00
Scott Main
b40c1fdaee add docs for new attributes, including account restriction for restricted profiles
Change-Id: I737ea55bfa58562b1b384e52626e95b479759376
2013-04-25 19:05:55 -07:00
Svetoslav
4c78306617 Merge "Fixing bugs exposed when moving accessibility CTS tests to UiAutomation." into jb-mr2-dev 2013-04-24 01:05:38 +00:00
Svetoslav
db7da0eb8b Fixing bugs exposed when moving accessibility CTS tests to UiAutomation.
1. UiAutomation#executeAndWaitForEvent method was invoking the passed
   runnable while holding the lock which may lead to a deadlock. For
   example: a runnable that calls getActivity() gets us into a state
   like this.

2. UI automation services did not get all capabilities such a
   service can have. Now a UI test service gets all of them.

3. When UiAutomation was exiting for event fired as a result of a
   performed action, it was checking whether the received evnet time
   is strictly before the time of executing the command that should
   fire the event. However, if the execution is fast enough, i.e.
   less than one millisecond, then the event time and the execution
   time are the same. This was leading to a missed signal in rare
   cases.

4. AccessibilityNodeInfoCache was not clearing the relevant state
   for accessibility focus clearing event.

5. Accessibility text traversal in TextView was partially using text
   and partially content description - broken. Now we are using the
   text since for text view and content desc for other views. In other
   words, we are using the most precise text we have.

6. AccessibilityManagerService was not granting capabilities of a
   UiAutomation service - plainly wrong.

CTS change:https://googleplex-android-review.googlesource.com/#/c/300693/

bug:8695422
bug:8657560

Change-Id: I9afc5c3c69eb51f1c01930959232f44681b15e86
2013-04-23 17:44:00 -07:00
Philip Milne
3c647d23e5 Fix for bug 8578258.
The fix in:

https://googleplex-android-review.googlesource.com/#/c/300346/

worked but the constant used had an extra trailing zero - which was confusing
and put a 1 in the 'flag' space of the measurement spec.

The intended number was:

0x00800000

Unfortunately, this intended constant doesn't fix this bug.

The constant submitted in this fix is:

0x00010000

which is outside the 'flag' space of measurement specs and appears to steer clear of overflow
problems in the scenario of this bug.

As suggested in the submission above, it would be preferable to rework of the RTL code to avoid
the use of such a constant as it seems very unlikely indeed that any choice of integer can
avoid problems in all cases.

Change-Id: I0c6744257ef2aebe8dbc8c041a447f9b90ee4b84
2013-04-23 15:28:18 -07:00
Philip Milne
a7b2625d43 Merge "Fix for bug 8578258: GridLayout is forcing wrong width to TextView widgets" into jb-mr2-dev 2013-04-22 22:26:21 +00:00
Philip Milne
ca2e9e1122 Fix for bug 8578258: GridLayout is forcing wrong width to TextView widgets
GridLayout is working as intended here. The bug is appears to be in RelativeLayout
(and possibly LinearLayout).

The value of RelativeLayout.DEFAULT_WIDTH = Integer.MAX_VALUE/2 is 0x3FFFFFFF has bits
set in the range that is used to flag certain conditions and states by the layout system.

In View we have:

MEASURED_SIZE_MASK = 0x00ffffff
MEASURED_STATE_MASK = 0xff000000;
MEASURED_STATE_TOO_SMALL = 0x01000000

This change fixes this bug, though it looks as if that a safer solution would be to not introduce
this constant and code path in the first place - as RelativeLayout's measurement algorithm operates
in the LTR case without it.

Change-Id: I01c51ae854620f08dd63047594486a3464c86f3a
2013-04-22 12:58:55 -07:00
Chet Haase
339ac85483 Merge "Fix quickReject logic to account for setClipChildren() setting" into jb-mr2-dev 2013-04-20 21:02:21 +00:00
Chet Haase
dd671599be Fix quickReject logic to account for setClipChildren() setting
The rendering code optimizes by rejecting drawing operations that
lie outside of the bounds of their views. This works in most
situations, but breaks down when containers have called
setClipChildren(false), because we reject drawing that is outside
of that container, but which should be drawn anyway.

Fix is to pass in the value of that flag to the DisplayList drawing
routines which take that flag into account when deciding whether
to quickReject any particular operation.

Issue #8659277 animation clipping

Change-Id: Ief568e4db01b533a97b3c5ea5ad777c03c0eea71
2013-04-19 15:36:37 -07:00
Philip Milne
68711f9363 Merge "Revert "Simple MVC based binding mechanism for android controls."" into jb-mr2-dev 2013-04-19 17:53:24 +00:00