98655 Commits

Author SHA1 Message Date
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
Stephen Hines
64cae1a608 Merge "Revert "Move RSTest to compatibility library."" 2013-01-19 02:49:09 +00:00
Dianne Hackborn
cc7433470f Merge "New API to get app op information about a single package." 2013-01-19 02:47:29 +00:00
Stephen Hines
5cb9037818 Revert "Move RSTest to compatibility library."
This reverts commit 36103c80b1d258157f0f4b531bc02f2fbb9e2d40.
2013-01-18 18:47:00 -08:00
Dianne Hackborn
72e3983d38 New API to get app op information about a single package.
Change-Id: I986453d9bb4161da467fb820b12502464e936483
2013-01-18 18:36:09 -08:00
Michael Wright
7bf6a5c3c7 Merge "Adds enum value for KEYCODE_ASSIST" 2013-01-19 02:19:09 +00:00
Tim Murray
878749fef0 Merge "Move RSTest to compatibility library." 2013-01-19 01:26:13 +00:00
Jeff Sharkey
e95724aebe Merge "Add LongSparseLongArray with tests." 2013-01-19 01:07:54 +00:00
Romain Guy
494647961f Merge "Allow layers with a stencil buffer to be resized on the fly Bug #7146141" 2013-01-19 01:03:39 +00:00
Jeff Sharkey
dda73b5dcd Add LongSparseLongArray with tests.
Change-Id: Iae32ba7647601c587e30834379d7d3c2235c75b0
2013-01-18 16:59:14 -08:00
Romain Guy
2055abaa0a Allow layers with a stencil buffer to be resized on the fly
Bug #7146141

This change moves the resizeLayer() from LayerCache (where it should
never have been anyway) to Layer. This makes a little more sense.

Change-Id: I8b2f9c19c558e738405a58b9e71ec5799fc6be88
2013-01-18 16:42:51 -08:00
Robert Greenwalt
20da885caa Merge "Revert "Second pass tying into dns cache per interface"" 2013-01-19 00:36:12 +00:00
Robert Greenwalt
63837f455d Revert "Second pass tying into dns cache per interface"
This reverts commit f60f94a89e49c125f4aff6496710a0fb66579545

Change-Id: If52dffd5100a6b03275da0eabfa05e24c5ecada9
2013-01-19 00:34:07 +00:00
Tim Murray
36103c80b1 Move RSTest to compatibility library.
Change-Id: I486f485fe9798d81dcd8e1ca9001bb851bcfc9b8
2013-01-18 16:28:02 -08:00
Dianne Hackborn
8fea4e72e4 Merge "Rework ParceledListSlice to be much easier to use." 2013-01-19 00:18:40 +00:00
Kristian Monsen
21af9258f3 Merge "Better detecting if current threasd is main thread" 2013-01-18 23:58:33 +00:00
Stephen Hines
70b900cded Merge "Actually test fract(float)." 2013-01-18 23:36:12 +00:00
Ben Murdoch
03d366e89c Merge "Refactor FindActionModeCallback." 2013-01-18 23:26:12 +00:00
Ben Murdoch
52c9f7f950 Refactor FindActionModeCallback.
Refactor FindActionModeCallback to make it more suitable
for sharing between WebViewClassic and WebViewChromium.

Bug=5006564

Change-Id: Ic3156eb50f99033a17ba3f83d0b4f39ba992afa8
2013-01-18 23:18:09 +00:00
Kristian Monsen
0a30328c10 Better detecting if current threasd is main thread
Old approach got broken after:
https://googleplex-android-review.googlesource.com/#/c/266421/2

Change-Id: I12ae23efdbaebd8ba24acb1b7eff75c912d24f1d
2013-01-18 14:50:07 -08:00
Dake Gu
ebf7c74361 am 85a06152: am fe88f1be: Merge "Fix bug of SimulatedTrackball" into jb-mr1-aah-dev
* commit '85a06152ce9b7d3a198639eb1918a9c2a3fd34d4':
  Fix bug of SimulatedTrackball
2013-01-18 14:01:57 -08:00
Dake Gu
85a06152ce am fe88f1be: Merge "Fix bug of SimulatedTrackball" into jb-mr1-aah-dev
* commit 'fe88f1be3d197987a874f6c29fefdeb11db183f6':
  Fix bug of SimulatedTrackball
2013-01-18 13:26:02 -08:00
Dake Gu
fe88f1be3d Merge "Fix bug of SimulatedTrackball" into jb-mr1-aah-dev 2013-01-18 21:22:45 +00:00
Dianne Hackborn
d8e1dbb6bc Rework ParceledListSlice to be much easier to use.
Take advantage of this to return better information about
packages filtered by permissions -- include the permissions
they have in the requested array.

Also fix issue #8026793 (Contact picture shows default pic
while searching for a contact in qsb) by using the base
package name of the Context when reporting the app name
of an operation.  Otherwise you could make a resource-only
context for another application and do calls through that
and get reported as the wrong app.

Change-Id: I5e0488bf773acea5a3d22f245641828e1a106fb8
2013-01-18 13:02:26 -08:00
Victoria Lease
f25febf014 am 00ef2a36: (-s ours) am c62eefa0: am 3599f0a0: (-s ours) am 0cf97d32: (-s ours) Merge "DO NOT MERGE Prevent OOM death for services under ServiceWatcher\'s care." into jb-mr1.1-dev
* commit '00ef2a3622baa477d7dfdd8df7d68bab84008b4d':
  DO NOT MERGE Prevent OOM death for services under ServiceWatcher's care.
2013-01-18 10:57:06 -08:00
Victoria Lease
00ef2a3622 am c62eefa0: am 3599f0a0: (-s ours) am 0cf97d32: (-s ours) Merge "DO NOT MERGE Prevent OOM death for services under ServiceWatcher\'s care." into jb-mr1.1-dev
* commit 'c62eefa02aefb0bf3870e063aa47df6dccbf5862':
  DO NOT MERGE Prevent OOM death for services under ServiceWatcher's care.
2013-01-18 10:53:48 -08:00
Victoria Lease
c62eefa02a am 3599f0a0: (-s ours) am 0cf97d32: (-s ours) Merge "DO NOT MERGE Prevent OOM death for services under ServiceWatcher\'s care." into jb-mr1.1-dev
* commit '3599f0a02129c238177806ce3d6db20853230d4d':
  DO NOT MERGE Prevent OOM death for services under ServiceWatcher's care.
2013-01-18 10:51:25 -08:00
Victoria Lease
3599f0a021 am 0cf97d32: (-s ours) Merge "DO NOT MERGE Prevent OOM death for services under ServiceWatcher\'s care." into jb-mr1.1-dev
* commit '0cf97d32178b689184866e731c0a4105d8223d80':
  DO NOT MERGE Prevent OOM death for services under ServiceWatcher's care.
2013-01-18 10:49:07 -08:00
Victoria Lease
0cf97d3217 Merge "DO NOT MERGE Prevent OOM death for services under ServiceWatcher's care." into jb-mr1.1-dev 2013-01-18 18:43:11 +00:00
Wink Saville
52dda54b08 Merge "Clean up published network condition reporting." 2013-01-18 18:41:39 +00:00
Robert Ly
3e7959ab4d am dbdf8767: am 5287cd74: am 6d59e0ea: am a239b933: am 548e17df: Merge "docs: Add PageTransformer to animations training class" into jb-mr1-dev
* commit 'dbdf8767e24d5d5ecc7a1751a103150676a4aa86':
  docs: Add PageTransformer to animations training class
2013-01-18 10:37:11 -08:00
Robert Ly
dbdf8767e2 am 5287cd74: am 6d59e0ea: am a239b933: am 548e17df: Merge "docs: Add PageTransformer to animations training class" into jb-mr1-dev
* commit '5287cd7476e0096f5f36866f81b47950343e4155':
  docs: Add PageTransformer to animations training class
2013-01-18 10:34:11 -08:00
Robert Ly
5287cd7476 am 6d59e0ea: am a239b933: am 548e17df: Merge "docs: Add PageTransformer to animations training class" into jb-mr1-dev
* commit '6d59e0ead242978eff8a64d314a1f8554694d8a6':
  docs: Add PageTransformer to animations training class
2013-01-18 10:31:48 -08:00
Robert Ly
6d59e0ead2 am a239b933: am 548e17df: Merge "docs: Add PageTransformer to animations training class" into jb-mr1-dev
* commit 'a239b933f7982ed069ccd284b4eab0fb5e4b6505':
  docs: Add PageTransformer to animations training class
2013-01-18 10:28:41 -08:00
Robert Ly
a239b933f7 am 548e17df: Merge "docs: Add PageTransformer to animations training class" into jb-mr1-dev
* commit '548e17dfdbd862cdfc663268a6d67b47f42b9544':
  docs: Add PageTransformer to animations training class
2013-01-18 10:23:29 -08:00
Robert Ly
548e17dfdb Merge "docs: Add PageTransformer to animations training class" into jb-mr1-dev 2013-01-18 18:20:40 +00:00
Wink Saville
82413d0b2a Clean up published network condition reporting.
Change-Id: I371c04bcb0547f1133e7ce12a6871aad3b3fdc6b
2013-01-18 09:31:13 -08:00
Satoshi Kataoka
2d43bf6ba5 Merge "Ensure that the input method dialog is dismissed when changing the hardware keyboard state." 2013-01-18 07:03:32 +00:00
Satoshi Kataoka
04dd24d4ba Ensure that the input method dialog is dismissed when changing the hardware keyboard state.
Change-Id: I51882ecd2b1a12116f43afff7c23454164a6272b
2013-01-18 13:44:57 +09:00
Jeff Sharkey
5a0252da77 Merge changes Ib8b18f1b,I0d799d82,Ia6222322
* changes:
  Always give ContentResolver a valid Context.
  Define failed connections column, and reset.
  Add method to get process group.
2013-01-18 02:44:50 +00:00
Jeff Sharkey
66a017b634 Always give ContentResolver a valid Context.
Also add MockContentResolver constructor to provide a Context, and
move to singleton ActivityThread, since there is only one inside
each process.  This makes ActivityThread accessible from threads like
InstrumentationThread.

Change-Id: Ib8b18f1b9bba8820ff412d782a43511066eabf24
2013-01-17 18:25:47 -08:00
Dake Gu
f8739b992f Fix bug of SimulatedTrackball
Simulated trackball should not generate KeyEvent if dispatchGenericMotionEvent
returns true

b/8022205

Change-Id: I1857e25407c508c98ef4db85fe146b1e25a0803e
2013-01-17 18:15:44 -08:00
Jeff Sharkey
54781207d3 Define failed connections column, and reset.
When retrying a download, always reset the failed connections count.

Bug: 8022478
Change-Id: I0d799d82dc7a04fe788b8c5faee0045d1e1a9c60
2013-01-17 17:27:33 -08:00
Romain Guy
b12db26fec Merge "Implement clipRect with a transform, clipRegion & clipPath Bug #7146141" 2013-01-17 23:47:27 +00:00
Romain Guy
8ce00301a0 Implement clipRect with a transform, clipRegion & clipPath
Bug #7146141

When non-rectangular clipping occurs in a layer the render buffer
used as the stencil buffer is not cached. If this happens on a
View's hardware layer the render buffer will live for as long
as the layer is bound to the view. When a stencil buffer is
required because of a call to Canvas.saveLayer() it will be allocated
on every frame. A future change will address this problem.

If "show GPU overdraw" is enabled, non-rectangular clips are not
supported anymore and we fall back to rectangular clips instead.
This is a limitation imposed by OpenGL ES that cannot be worked
around at this time.

This change also improves the Matrix4 implementation to easily
detect when a rect remains a rect after transform.

Change-Id: I0e69fb901792d38bc0c4ca1bf9fdb02d7db415b9
2013-01-17 15:39:31 -08:00
Roman Nurik
fb80c9e0f8 docs: Add PageTransformer to animations training class
Change-Id: I01f7e5b1fa078d9219edf190e5e8444192cc55f1
2013-01-17 15:37:20 -08:00
Fabrice Di Meglio
d859e7088a Merge "Fix SystemUI navigation bar recent icon loading in landscape mode" 2013-01-17 23:09:50 +00:00
Jeff Sharkey
9e57c414f3 Add method to get process group.
Change-Id: Ia62223228a54a6a4e3cdfc5c2e8c73ee194e77ef
2013-01-17 14:12:49 -08:00
Daniel Sandler
c51d96a95b Merge "Stop redrawing the nav bar any time you touch the screen." 2013-01-17 21:38:57 +00:00
Baligh Uddin
ccb9f5b66e Merge "Import translations. DO NOT MERGE" 2013-01-17 21:30:29 +00:00