Commit Graph

3687 Commits

Author SHA1 Message Date
Svetoslav
e10837f444 [DO NOT MERGE] DatePickerDialog title initially incorrect if calendar view shown.
If the calendar view of the date picker dialog is shown we
do not use a formatted date as the dialog title since the
calendar view shows it, instead we show a static "Set date"
title. However, the initial state of the date picker dialog
on a tablet has a formatted date since the date picker widget
does not do a correct check whether the calendar view is shown
which returns a false negative resulting in a title with a
formatted date being added since the dialog thinks it has no
calendar view.

Change-Id: Ibf4c433b34ab1ee1bc1dc386689664a32283fb6a
2013-03-08 13:31:53 -08:00
Fabrice Di Meglio
617283c3c0 Merge "Fix bug #8217354 Suspicious behavior in RTL support for a RelativeLayout" into jb-mr2-dev 2013-03-07 22:49:38 +00:00
Fabrice Di Meglio
5f51fd6970 Merge "Make Spinner widget RTL-aware (part 2)" into jb-mr2-dev 2013-03-05 22:23:33 +00:00
Fabrice Di Meglio
c44d880c50 Fix bug #8217354 Suspicious behavior in RTL support for a RelativeLayout
- make rules resolution follow the same pattern as padding and other
RTL properties

Change-Id: Ia0f460f188063f950bc311b51765fdec2f96f542
2013-03-05 14:10:23 -08:00
Fabrice Di Meglio
f80ceed450 Make Spinner widget RTL-aware (part 2)
See bug #8159072 Spinner widget should be RTL'ized

Change-Id: I3f9368f242a027852bf13a7ce4b760de1e1c2fb2
2013-03-05 13:12:13 -08:00
Fabrice Di Meglio
d5ffc79fc8 Improve RTL code for RelativeLayout
- instead of passing the screen size as a constant for computing the
layout size in RTL mode, we just use a real constant. Any value would
work actually, as soon as the value would not be null.

Change-Id: If9f5b38afa88938db36a795bfc8a403ad660726b
2013-03-05 13:07:08 -08:00
Justin Ho
3cf7b3c592 Revert "Fix ListView is not scrolled properly with arrows"
This reverts commit db68fac12d.
2013-02-25 16:08:27 -08:00
Adam Powell
0d74e8f8c6 am 06689433: am d61ff77e: Merge "Fix ListView is not scrolled properly with arrows"
* commit '06689433bc9e9d54e01bf4af9526dff2fc3dc862':
  Fix ListView is not scrolled properly with arrows
2013-02-22 14:09:30 -08:00
Adam Powell
d61ff77ee1 Merge "Fix ListView is not scrolled properly with arrows" 2013-02-22 21:29:44 +00:00
Luca Zanolin
1b15ba5d19 Resubmitting "Enable correction/deleting notification via EasyEditSpan.""
Re-run "make update-api"

Original CL Ic227b8fd50066699915f69a54f225fb5330867c4

Change-Id: Ifb1a0f61801c544b01193435fbfdedd7f3888971
2013-02-20 14:31:37 +00:00
Luca Zanolin
1b916301e0 Revert "Enable correction/deleting notification via EasyEditSpan."
This reverts commit 8cd8135b95

Change-Id: I6361cc47d58281ab37cb9ae0a67541b43f873147
2013-02-20 12:27:35 +00:00
Luca Zanolin
8cd8135b95 Enable correction/deleting notification via EasyEditSpan.
When the "delete" pop-up is clicked (and the wrapped text removed), the
creator of the span will receive a notification of the action.

Similarly, if the user modifies (i.e., add/remove a char), the creator of
the span will receive a notification too. The notification will not contain any
information about how the text has been modified.


Bug: 6905960
Change-Id: Ic227b8fd50066699915f69a54f225fb5330867c4
2013-02-20 11:35:19 +00:00
Romain Guy
52036b19a5 Expose display list APIs
The exposed APIs are slightly simpler than the full APIs used internally.
Only APIs useful to applications are exposed.

Change-Id: Ie03014628d40ad5ef63dedbc52ce3def84429d54
2013-02-19 12:30:02 -08:00
Adam Powell
ac91df87fc Add support for shadows in TextAppearance styles
Allow developers to specify shadow properties for text in a
TextAppearance, not just in direct TextView attributes.

Change-Id: I873fbaf2c26683895e1eea2d02b5d9b17ca333d0
2013-02-14 13:48:47 -08:00
Philip Milne
fd0fa65eea Merge "Revert "Fix for bug: 8184401 - GridLayout accounts for child's size/measurements even when a child is "GONE""" 2013-02-13 22:23:45 +00:00
Philip Milne
57ce47134a Revert "Fix for bug: 8184401 - GridLayout accounts for child's size/measurements even when a child is "GONE""
Suspected cause of: http://b.corp.google.com/issue?id=8192858 

This reverts commit e5e0b7f191

Change-Id: I1a35c12c3ca0b1eacfb0c1a4d6ba03601dab664b
2013-02-13 22:07:50 +00:00
Fabrice Di Meglio
0c33ecd209 Merge "Clean Paint.mBidiFlags as it is no longer used" 2013-02-13 19:11:50 +00:00
Philip Milne
e5e0b7f191 Fix for bug: 8184401 - GridLayout accounts for child's size/measurements even when a child is "GONE"
Added a check for GONE status in measurement calculations.

Change-Id: I3ec82b03f3089730f10dbd6916f6245188cd8452
2013-02-12 14:29:17 -08:00
Fabrice Di Meglio
6d9fe5bd22 Clean Paint.mBidiFlags as it is no longer used
See bug #7623824

Change-Id: Ie2f9422821f6dcc73c99e8695f448e966b587b1d
2013-02-12 13:12:13 -08:00
Romain Guy
f16c7a9754 Always honor fixed size children
Change-Id: If49a9486c554223132663cd9f0dc388d102ebbff
2013-02-11 17:45:04 -08:00
Jaewan Kim
db68fac12d Fix ListView is not scrolled properly with arrows
According to ListView's layoutChildren logic, it detaches all children
and rebuilds its children based on visible area which might omit
invisible elements in the adapter.

In this case, arrowScroll methods only tries to find next scroll
candidates from its children so user is unable to scroll more with
D-pad.

This fixes the issue by look forward next child among the adapter as
well as children.

Bug: 7346868
Change-Id: I01ab19ad899b5bcb5ab420ddf08c9ffd136933d1
2013-02-09 03:27:09 +09:00
Katie McCormick
d68c096476 am 89e7aa3d: am 2306f0ee: am ee27bcda: am b68702eb: am 0e66f16a: Merge "Doc change: Scroller Javadoc Bug # 7966653" into jb-mr1-dev
# Via Android Git Automerger (4) and others
* commit '89e7aa3dae133fd38007eddb47a3e372abb68d4d':
  Doc change: Scroller Javadoc Bug # 7966653
2013-02-07 17:29:18 -08:00
Katie McCormick
89e7aa3dae am 2306f0ee: am ee27bcda: am b68702eb: am 0e66f16a: Merge "Doc change: Scroller Javadoc Bug # 7966653" into jb-mr1-dev
# Via Android Git Automerger (3) and others
* commit '2306f0ee3396cd8a85d04dfbc08fb8c5ffa6699f':
  Doc change: Scroller Javadoc Bug # 7966653
2013-02-07 17:26:13 -08:00
Katie McCormick
2306f0ee33 am ee27bcda: am b68702eb: am 0e66f16a: Merge "Doc change: Scroller Javadoc Bug # 7966653" into jb-mr1-dev
# Via Android Git Automerger (2) and others
* commit 'ee27bcda8644f8c3f2328acc248b8c5c9d152f59':
  Doc change: Scroller Javadoc Bug # 7966653
2013-02-07 17:23:00 -08:00
Katie McCormick
b68702eb05 am 0e66f16a: Merge "Doc change: Scroller Javadoc Bug # 7966653" into jb-mr1-dev
# Via Android (Google) Code Review (1) and Katie McCormick (1)
* commit '0e66f16abd651bdf5833f4aede4899e627d7b333':
  Doc change: Scroller Javadoc Bug # 7966653
2013-02-07 17:18:48 -08:00
Katie McCormick
87cfad7d74 Doc change: Scroller Javadoc Bug # 7966653
Change-Id: I4365946f890a76fcfa78ca9d69f2a8e0848095a9
2013-02-07 16:42:26 -08:00
Adam Powell
2d9c0cac8b am 044a4c3e: am 351f7817: am 21af9a08: Merge "avoid multiple-"0" to exceed the length of upper bound"
# By Sungmin Choi
# Via Android Git Automerger (2) and others
* commit '044a4c3e4a42aae4faac8b92ea05f122cdf45f7c':
  avoid multiple-"0" to exceed the length of upper bound
2013-02-06 15:11:24 -08:00
Adam Powell
351f7817e5 am 21af9a08: Merge "avoid multiple-"0" to exceed the length of upper bound"
# By Sungmin Choi
# Via Gerrit Code Review (1) and Sungmin Choi (1)
* commit '21af9a08465c4927aab9db30efdfcf5ee8f52410':
  avoid multiple-"0" to exceed the length of upper bound
2013-02-06 14:58:41 -08:00
Adam Powell
21af9a0846 Merge "avoid multiple-"0" to exceed the length of upper bound" 2013-02-06 22:11:19 +00:00
Svetoslav
bcc46a0d03 Set accessibility cursor in non-text views with content description.
We support text traversal at a granularity over non-next views with
content description, hence we should support setting the cursor position
in such views.

bug:8134469

Change-Id: I4dba225b0ade795b7a20c201fb906ae7146c065d
2013-02-06 11:58:03 -08:00
Svetoslav
d0c83cccca Set accessibility cursor position in non-editable views with content description.
While an accessibility service can set the cursor position in an editable
text field, it was not possible to set it for non-editable views with
content description. This patch enables that.

bug:8134469

Change-Id: I28b0ef1666b9e3ed5c0642718fbe63d4c9616569
2013-02-05 13:44:25 -08:00
Fabrice Di Meglio
f8ce2b94df Merge "Fix progress bar and spinner in RTL mode" 2013-01-31 19:28:37 +00:00
Fabrice Di Meglio
2b378cde41 Fix progress bar and spinner in RTL mode
Add "mirrorForRtl" property for ProgressBar (default is "false") and
use it accordingly to the following RTL rules:

- time still goes from left to right
- clocks still rotate clockwise

Change-Id: Ib91ce6ab341aa6097c0f43b13703174a2ee9ec70
2013-01-31 11:20:30 -08:00
Svetoslav
f48a2d30c5 Merge "Add accessibility actions for text editing." 2013-01-31 07:53:43 +00:00
Svetoslav
7c51284d80 Add accessibility actions for text editing.
Currently text editing is pretty hard (certain operations even
impossible) for a blind person. To address the issue this change
adds APIs that enable an accessibility service to perform basic
text editing operations such as copy, paste, cut, set selection,
extend selection while moving at a given granularity.

The new APIs enable an accessibility service to expose a gesture
driven efficient text editing facility.

bug:8098384

Change-Id: I82b200138a3fdf4c0c316b774fc08a096ced29d0
2013-01-30 23:47:17 -08:00
Romain Guy
5370405db2 Return a copy of the read-only identity Matrix
An app trying to modify the returned matrix (despite what the
documentation says...) would crash when the matrix is identity.

Change-Id: I8aae06b712907085088fb9f0321352dd2c3462ac
2013-01-30 16:25:50 -08:00
Svetoslav Ganov
d0fd54648c Merge "Adding UI test automation APIs." 2013-01-29 03:16:40 +00:00
Fabrice Di Meglio
96bf00fe92 Merge "Fix bug #8051633 Recent Apps thumbnails in RTL mode (Arabic / Hebrew / Farsi) should be aligned" 2013-01-28 20:33:35 +00:00
Adam Powell
9122187fca am bb74d8b9: am 783fe429: am e305e5f6: Merge "show SELECT ALL icon with text in landscape mode"
# By Sungmin Choi
# Via Android Git Automerger (2) and others
* commit 'bb74d8b9f632bdda2f5639a9516a83f58374b936':
  show SELECT ALL icon with text in landscape mode
2013-01-28 11:44:02 -08:00
Adam Powell
bb74d8b9f6 am 783fe429: am e305e5f6: Merge "show SELECT ALL icon with text in landscape mode"
# By Sungmin Choi
# Via Android Git Automerger (1) and others
* commit '783fe4295372cee8d024388221414c253802c995':
  show SELECT ALL icon with text in landscape mode
2013-01-28 11:41:03 -08:00
Adam Powell
783fe42953 am e305e5f6: Merge "show SELECT ALL icon with text in landscape mode"
# By Sungmin Choi
# Via Gerrit Code Review (1) and Sungmin Choi (1)
* commit 'e305e5f68df8338cb3c4bdcf099d23ec9abce564':
  show SELECT ALL icon with text in landscape mode
2013-01-28 11:37:41 -08:00
Fabrice Di Meglio
306fe5cc0e Fix bug #8051633 Recent Apps thumbnails in RTL mode (Arabic / Hebrew / Farsi) should be aligned
Basically RelativeLayout was broken in a very stubtle way.

RelativeLayout needs in onMeasure() to have a width in RTL mode when "myWidth=-1" (meaning "not
defined") so that the rest of the onMeasure() computation can be done (children positioning and
width computation).

As there is no way to get its width apart from running the code, in RTL mode we set its width
arbitrary to the screen width for doing the width computation and children positoning.

Then, as a last pass, we will update and fix the children position (no need to do anything with
the computed width because it is correctly computed  already).

Change-Id: I426af3327160e751ef63ed3845aad5bab6dad661
2013-01-25 18:43:42 -08:00
Sungmin Choi
f036920669 show SELECT ALL icon with text in landscape mode
Though set config_allowActionMenuItemTextWithIcon as true,
icon for the "SELECT ALL" menu on ActionBar is not shown as staring
in landscape mode.
To fix it, use "SELECT ALL" icon in onCreateActionMode() to show the
icon and text together.

To show or hide text is decided by updateTextButtonVisibility() of
core/java/com/android/internal/view/menu/ActionMenuItemView.java

STEPS TO REPRODUCE: (please be specific)
1. launch Browser/Chrome and go to google.com
2. rotate to landscape mode
3. long press on URL address

Bug: 8073761
Change-Id: Ie0e0aa45f0dff609ed8c03e4423b163bad5452ed
2013-01-25 22:06:55 +09:00
Sungmin Choi
6d8a99fecc avoid multiple-"0" to exceed the length of upper bound
Limits number of "0"s not to exceed length of maximum number allowed
for the NumberPicker.

Steps to reproduce:
1. Settings -> Date & time -> uncheck "Automatic date & time"
2. Select "Set time"
3. Select Time Area on Set time dialog
4. insert 00000000 via NumberPicker

Bug: 8073759
Change-Id: I0f3f5303d9a4b559217adb436f244407a23e58c0
2013-01-25 18:26:46 +09:00
Svetoslav Ganov
80943d8daa Adding UI test automation APIs.
This change adds APIs support for implementing UI tests. Such tests do
not rely on internal application structure and can span across application
boundaries. UI automation APIs are encapsulated in the UiAutomation object
that is provided by an Instrumentation object. It is initialized by the
system and can be used for both introspecting the screen and performing
interactions simulating a user. UI test are normal instrumentation tests
and are executed on the device.

UiAutomation uses the accessibility APIs to introspect the screen and
a special delegate object to perform privileged operations such as
injecting input events. Since instrumentation tests are invoked by a shell
command, the shell program launching the tests creates a delegate object and
passes it as an argument to started instrumentation. This delegate
allows the APK that runs the tests to access some privileged operations
protected by a signature level permissions which are explicitly granted
to the shell user.

The UiAutomation object also supports running tests in the legacy way
where the tests are run as a Java shell program. This enables existing
UiAutomator tests to keep working while the new ones should be implemented
using the new APIs. The UiAutomation object exposes lower level APIs which
allow simulation of arbitrary user interactions and writing complete UI test
cases. Clients, such as UiAutomator, are encouraged to implement higher-
level APIs which minimize development effort and can be used as a helper
library by the test developer.

The benefit of this change is decoupling UiAutomator from the system
since the former was calling hidden APIs which required that it is
bundled in the system image. This prevented UiAutomator from being
evolved separately from the system. Also UiAutomator was creating
additional API surface in the system image. Another benefit of the new
design is that now test cases have access to a context and can use
public platform APIs in addition to the UiAutomator ones. Further,
third-parties can develop their own higher level test APIs on top
of the lower level ones exposes by UiAutomation.

bug:8028258

Also this change adds the fully qualified resource name of the view's
id in the emitted AccessibilityNodeInfo if a special flag is set while
configuring the accessibility service. Also added is API for looking
up node infos by this id. The id resource name is relatively more stable
compared to the generaed id number which may change from one build to
another. This API facilitate reuing the already defined ids for UI
automation.

bug:7678973

Change-Id: I589ad14790320dec8a33095953926c2a2dd0228b
2013-01-22 17:56:53 -08:00
Fabrice Di Meglio
7384db20b8 Merge "Fix bug #8052320 RelativeLayout is not having the correct width when in RTL mode - part 2" 2013-01-22 21:17:36 +00:00
Fabrice Di Meglio
547261320c Fix bug #8052320 RelativeLayout is not having the correct width when in RTL mode - part 2
This is a fix for  RelativeLayout in RTL mode

- visible effect: wrong positioning of components
- the width computation (first pass) in RTL mode was wrong: it was missing the application
of the horizontal rules before measuring the children horizontally. This is now doing the
same as the normal LTR pass (except positioning the component which is done in the second
pass)

See related issue:

bug #8051633 Recent Apps thumbnails in RTL mode (Arabic / Hebrew / Farsi) should be aligned

Change-Id: I710de1a504bec8743f8e3c13f6ff850055edb2d2
2013-01-22 13:14:08 -08:00
Yorke Lee
30244d9239 Merge "Fix the build breakage due to incorrect javadoc link" 2013-01-15 16:47:18 -08:00
Yorke Lee
3e839f4eed Fix the build breakage due to incorrect javadoc link
Change-Id: I1789f7e324a06c45c1be4088e9bd4e5cd6879aee
2013-01-15 16:46:00 -08:00
Yorke Lee
be33f9696a Merge "Allow supplying extras when assigning QuickContactsBadge" 2013-01-15 11:26:20 -08:00