OSDN Git Service

Add infrastructure for running a11y tests in instant mode
authorSvet Ganov <svetoslavganov@google.com>
Fri, 22 Dec 2017 17:43:48 +0000 (09:43 -0800)
committerSvetoslav Ganov <svetoslavganov@google.com>
Sat, 23 Dec 2017 02:36:46 +0000 (02:36 +0000)
commitd223db316d11a625a73f86392e7055d5c6f26e7d
treec620a6396b419bf5feb64355edf36726957fdfda
parent3cb35f37607cdb429734de905706c05957843da6
Add infrastructure for running a11y tests in instant mode

This change adds a special flag when binding to a service to request
instant apps to be considered as well (assuming the caller has the
permission to see instant apps). This flag is scoped only for the
platform to use and is intended only for development and testing.
Specifically, we have a class of CTS tests that has tests plus service
in the same APK (accessibility, printing, autofill, any other plugin
based sub-system).

Instead of doing the tediuous work split all these into one APK with
tests and one with the services where the latter exposes a remote
interface to the former, we will be adding shell commands to the
dedicated sub-system to allow temporary binding to plugins provided
by instant apps. The goal is not validating the plugin behavious,
rather a working plugin is required to test app side funcionality.

This change adds a shell command to allow the a11y manager serivce
to bind to plugins provided by instant apps. This is required to
be able to run relevant CTS test cases in instant mode.

Test: cts-tradefed run cts-dev -m CtsAccessibilityTestCases
      cts-tradefed run cts-dev -m CtsAccessibilityServiceTestCases

Bug: 70978575

Change-Id: Ifced735a9a6e495747372dd8b00fdd64933a09c7
core/java/android/content/Context.java
core/res/AndroidManifest.xml
packages/Shell/AndroidManifest.xml
services/accessibility/java/com/android/server/accessibility/AbstractAccessibilityServiceConnection.java
services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
services/accessibility/java/com/android/server/accessibility/AccessibilityServiceConnection.java
services/accessibility/java/com/android/server/accessibility/AccessibilityShellCommand.java [new file with mode: 0644]
services/core/java/com/android/server/am/ActiveServices.java