Commit Graph

3651 Commits

Author SHA1 Message Date
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
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
Elliott Hughes
5bd48b528e am 67ae48f3: am fc91d730: am cbfece82: Merge "Switch over to getting 12-/24-hour time formats from CLDR via icu4c."
* commit '67ae48f32545791fe0a0574f02bfe714e106074b':
  Switch over to getting 12-/24-hour time formats from CLDR via icu4c.
2013-01-14 19:28:20 -08:00
Elliott Hughes
67ae48f325 am fc91d730: am cbfece82: Merge "Switch over to getting 12-/24-hour time formats from CLDR via icu4c."
* commit 'fc91d73067d76e129869fe472238f4c80aa5d435':
  Switch over to getting 12-/24-hour time formats from CLDR via icu4c.
2013-01-14 19:25:52 -08:00
Elliott Hughes
fc91d73067 am cbfece82: Merge "Switch over to getting 12-/24-hour time formats from CLDR via icu4c."
* commit 'cbfece8237cb9cf62547e75ab9572ccbf682369a':
  Switch over to getting 12-/24-hour time formats from CLDR via icu4c.
2013-01-14 19:23:48 -08:00
Elliott Hughes
4caba61ea0 Switch over to getting 12-/24-hour time formats from CLDR via icu4c.
I removed the duplication in DateTimeView rather than fix that copy
of the code.

Bug: 7924970
Change-Id: I60c205d06ad3b50fd2f5d5fc432e4eb186f9c0e7
2013-01-14 15:48:27 -08:00
Yorke Lee
02f304f721 Allow supplying extras when assigning QuickContactsBadge
Add assignContactFromEmail(String, boolean, Bundle)
and assignContactFromPhone(String, boolean, Bundle)
that allow the caller to provide a bundle of extras to
pre-populate the ContactEditorFragment with if a contact
is not found with the requested email address or phone number.

Bug: 7038382
Change-Id: Ib77fa484e1c39cb60d7acc27efe3a3fcf3fee62f
2013-01-14 11:38:39 -08:00
Scott Kennedy
57b59e025b am aebeea4c: am 5d6d6aab: am 8e45679a: am 026f9191: am 08342698: Merge "docs: Fix a bunch of issues" into jb-mr1-dev
* commit 'aebeea4cf39acae833b1b7f27a4c08d3b55dee37':
  docs: Fix a bunch of issues
2013-01-14 11:19:13 -08:00
Scott Kennedy
aebeea4cf3 am 5d6d6aab: am 8e45679a: am 026f9191: am 08342698: Merge "docs: Fix a bunch of issues" into jb-mr1-dev
* commit '5d6d6aab255aa17fde979d954c839402837b4243':
  docs: Fix a bunch of issues
2013-01-14 11:15:55 -08:00
Scott Kennedy
5d6d6aab25 am 8e45679a: am 026f9191: am 08342698: Merge "docs: Fix a bunch of issues" into jb-mr1-dev
* commit '8e45679adfe03271dd1cc627d6c4542649a0446a':
  docs: Fix a bunch of issues
2013-01-14 11:13:25 -08:00
Scott Kennedy
026f91915f am 08342698: Merge "docs: Fix a bunch of issues" into jb-mr1-dev
* commit '083426980dbe6607a0cfc8b4ec5944d5b414ecbe':
  docs: Fix a bunch of issues
2013-01-14 11:09:27 -08:00
Scott Kennedy
7ed189e457 docs: Fix a bunch of issues
External tracker 42609
External tracker 42607
External tracker 42604
External tracker 42600
External tracker 42574
External tracker 42450
External tracker 41050
External tracker 40995
External tracker 40970
External tracker 40935
External tracker 40507
External tracker 40481
External tracker 40435
External tracker 40406
External tracker 40297
External tracker 40281
External tracker 39978
External tracker 39929
External tracker 39803
External tracker 39715
External tracker 39441

Change-Id: If4215cef850ba8e4e8df356a68192566806e7914
2013-01-11 23:44:11 -08:00
Jeff Sharkey
ab82e35a59 Merge "Examine widget hierarchy to find clocks." 2013-01-11 10:56:40 -08:00
Jeff Sharkey
06c5f8a768 Examine widget hierarchy to find clocks.
When switching to a widget, examine its hierarchy to determine if it
contains TextClocks that show hour and minute for the local timezone.
If so, hide the status bar clock.  Doesn't fix closing walls.

Bug: 7667638
Change-Id: I1e2c40345c9e5eb0193efd70838c7ca9f779190b
2013-01-11 10:49:19 -08:00
Adam Cohen
b00d9f0e07 Updating new widget api to account for view type count
Change-Id: Iab3a905aaec0b42ef31cd23e0711f6f7bf299486
2013-01-10 19:23:39 -08:00
Romain Guy
14e066df1c Merge "Clarify javadoc and parameter names Bug #7978741" 2013-01-09 20:18:35 -08:00
Romain Guy
9c5d1b17bf Clarify javadoc and parameter names
Bug #7978741

Change-Id: If713e2e58524ace008797abc142f50b83bfa3c61
2013-01-09 20:16:37 -08:00
Dake Gu
96c2a83cd7 am 05d48504: am af6dd103: Merge "fix ImageView.getImageMatrix()" into jb-mr1-aah-dev
* commit '05d485044bc4607759e2b4ca5188858bceb120f8':
  fix ImageView.getImageMatrix()
2013-01-09 11:53:36 -08:00
Sangkyu Lee
955beb2b96 Optimize drawHardwareAccelerated method in Editor class
When inserting a new line or breaking a line,
every display list was invalidated and rebuilt before.
However, we can reuse the display lists above intactly and also
reuse the display lists below with only updating drawing locations.

This patch reuses the display lists if possible.
The display lists above the inserted line are just reused
and the display lists below are reused with only updating
drawing locations not fullly rebuilt.

mIndexOfFirstChangedBlock is the index of the first block
which is moved by inserting or breaking a line.
So the display list whose index is >= mIndexOfFirstChangedBlock
only needs to update its drawing location.

Change-Id: Ica20deb0ebb5750de21356ed31fa9f86e657ff92
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
2013-01-08 17:10:24 -08:00
Dake Gu
05d485044b am af6dd103: Merge "fix ImageView.getImageMatrix()" into jb-mr1-aah-dev
* commit 'af6dd103bd2bb0783b9364c703c2623260496d5c':
  fix ImageView.getImageMatrix()
2013-01-07 18:13:30 -08:00
Dake Gu
1ee60179bb fix ImageView.getImageMatrix()
getImageMatrix() does not return "mDrawMatrix",  instead it returns
mMatrix.  This is not reflecting the matrix used in drawing when
Bitmap is changed and mDrawMatrix is set to null while mMatrix still
holds old invalid data.

Change-Id: If24c3118068eca70cfe15786f9715d95c4499f3b
2013-01-03 15:11:43 -08:00
Raph Levien
afe8e9b6d0 Suppress horizontal scrolling with trailing blanks
The existing behavior of EditText is that trailing blanks can cause a
line to exceed the layout width, causing the cursor to extend past the
line, which in turn causes horizontal scrolling. This patch clamps the
cursor to the layout width in the non-scrolling case, which makes the
spaces effectively invisible when they're at the end of the line, but at
least suppresses the scrolling.

The clamping only works reliably in left-to-right alignments, so this
patch checks for than and only enables the clamping in those cases.

Fix for bug 7699295.

Change-Id: I22bc4e6c9ded3d7716edfcf10dd2b5c31a5da9de
2012-12-20 15:42:47 -08:00
John Spurlock
330dd53484 Remove remaining doc references to StyledAttributes.
It appears StyledAttributes was renamed to TypedArray
prior to fw 1.0.  Leaving references to the old name
around in the public docs is confusing.

Deliberating leaving...
   tests/coretests/src/android/widget/LabelView.java
... as is - it's clearly unused.

Change-Id: I3f66e5f9cbe945d9d86530d37b88369b401f054d
2012-12-18 12:03:11 -05:00
Sascha Prueter
ab989ac313 am 8149820c: am 25458528: am dd2ed93e: Merge "Handle "CODE_ALREADY_PRESENT" message from Settings app" into jb-mr1.1-dev
* commit '8149820c2b2df47028498571785ca009d99b5dc9':
  Handle "CODE_ALREADY_PRESENT" message from Settings app
2012-12-17 10:49:38 -08:00
Sascha Prueter
8149820c2b am 25458528: am dd2ed93e: Merge "Handle "CODE_ALREADY_PRESENT" message from Settings app" into jb-mr1.1-dev
* commit '25458528f07ef9f4710e669b74b76d687bbc7645':
  Handle "CODE_ALREADY_PRESENT" message from Settings app
2012-12-17 10:47:56 -08:00
Sascha Prueter
25458528f0 am dd2ed93e: Merge "Handle "CODE_ALREADY_PRESENT" message from Settings app" into jb-mr1.1-dev
* commit 'dd2ed93e4794dd8472593cdd21fb7e0056f11dbf':
  Handle "CODE_ALREADY_PRESENT" message from Settings app
2012-12-17 10:46:04 -08:00
Pawit Pornkitprasan
35e4a7029e Toast: fix force close if called from system service
If a toast is created from a system service, an application context
will not be available, use the service context instead.

Fixes
http://code.google.com/p/android/issues/detail?id=40058
http://code.google.com/p/android/issues/detail?id=40075

Change-Id: Ic643f4557fa04476819cd2c3ee640b735eeae429
2012-12-17 18:04:17 +07:00
satok
6bad2f2fef Handle "CODE_ALREADY_PRESENT" message from Settings app
Bug: 7725834
Change-Id: I85c35e73978d606edf9687e2de76c6ffc3c3ee2b
2012-12-17 15:02:04 +09:00
Adam Cohen
f85f1aeb56 Merge "Fix docs build issue" 2012-12-14 12:11:38 -08:00
Adam Cohen
3b4ca103f8 Fix docs build issue
Change-Id: I901e5b80609bf5ae85b167ec01b7507714423e5c
2012-12-14 12:00:56 -08:00
Mike Cleron
40efbd4060 am 323bb07f: am a5a4eb0f: am 6b922cc6: Merge "Receive a user dictionary callback from Settings application" into jb-mr1.1-dev
* commit '323bb07f762e5373f90e758a1146b93a3c31fe17':
  Receive a user dictionary callback from Settings application
2012-12-14 11:04:42 -08:00
Mike Cleron
323bb07f76 am a5a4eb0f: am 6b922cc6: Merge "Receive a user dictionary callback from Settings application" into jb-mr1.1-dev
* commit 'a5a4eb0f93d4b992a1879e26e04ba803827e24ca':
  Receive a user dictionary callback from Settings application
2012-12-14 11:01:55 -08:00
Mike Cleron
a5a4eb0f93 am 6b922cc6: Merge "Receive a user dictionary callback from Settings application" into jb-mr1.1-dev
* commit '6b922cc6d4d8221ad83b410c03eb4b8fb9fc78e2':
  Receive a user dictionary callback from Settings application
2012-12-14 10:59:19 -08:00
Satoshi Kataoka
0e3849af47 Receive a user dictionary callback from Settings application
Bug: 7725834

The callback is sent when the user adds a word to the user dictionary.

Change-Id: Ieee9bfd50a9adbed1a769e3cd95d9cb2815c34b4
2012-12-14 17:21:43 +09:00
Adam Cohen
3366cb2a01 Merge "Adding simple ArrayList API for collection widgets" 2012-12-13 17:50:11 -08:00
Adam Cohen
50f3d1bae8 Adding simple ArrayList API for collection widgets
Change-Id: I4d6c909d1d2c0bdd1ddc8329445cea0e78a5ce7c
2012-12-13 14:52:30 -08:00
Adam Powell
2331b42328 am dc4beb48: am e7ec492f: Merge "Make implementation of isEmpty consistent with implementation of getCount in HeaderListViewAdapter"
* commit 'dc4beb483eb14f1b56154125c67b780802756572':
  Make implementation of isEmpty consistent with implementation of getCount in HeaderListViewAdapter
2012-12-11 19:12:45 -08:00
Adam Powell
dc4beb483e am e7ec492f: Merge "Make implementation of isEmpty consistent with implementation of getCount in HeaderListViewAdapter"
* commit 'e7ec492f13355888c90b3f08fbc66e49dda7ed24':
  Make implementation of isEmpty consistent with implementation of getCount in HeaderListViewAdapter
2012-12-11 19:10:45 -08:00