Remove CtsRootDeviceSetup accessibility steps
These steps may be interfering with the test setup being done in
AccessibilityTestRunner which also installs APKs and enables
accessibility.
Bug 6537582
Change-Id: I15b95a30a80bb0b654eff3693157f85555e94ccf
diff --git a/tools/tradefed-host/src/com/android/cts/tradefed/targetprep/CtsRootDeviceSetup.java b/tools/tradefed-host/src/com/android/cts/tradefed/targetprep/CtsRootDeviceSetup.java
index bddb7ba..09129ca 100644
--- a/tools/tradefed-host/src/com/android/cts/tradefed/targetprep/CtsRootDeviceSetup.java
+++ b/tools/tradefed-host/src/com/android/cts/tradefed/targetprep/CtsRootDeviceSetup.java
@@ -41,12 +41,7 @@
*/
public class CtsRootDeviceSetup implements ITargetPreparer {
- // TODO: read this from a configuration file rather than hard-coding
- private static final String ACCESSIBILITY_SERVICE_APK_FILE_NAME =
- "CtsDelegatingAccessibilityService.apk";
-
- private static final String DEVICE_ADMIN_APK_FILE_NAME =
- "CtsDeviceAdmin.apk";
+ private static final String DEVICE_ADMIN_APK_FILE_NAME = "CtsDeviceAdmin.apk";
/**
* {@inheritDoc}
@@ -70,7 +65,6 @@
// perform CTS setup steps that only work if adb is root
SettingsToggler.setSecureInt(device, "mock_location", 1);
- enableAccessibilityService(device, buildHelper);
enableDeviceAdmin(device, buildHelper);
// end root setup steps
@@ -79,21 +73,6 @@
}
}
- private void enableAccessibilityService(ITestDevice device, CtsBuildHelper ctsBuild)
- throws DeviceNotAvailableException, TargetSetupError,
- FileNotFoundException {
- String errorCode = device.installPackage(
- ctsBuild.getTestApp(ACCESSIBILITY_SERVICE_APK_FILE_NAME), true);
- if (errorCode != null) {
- // TODO: retry ?
- throw new TargetSetupError(String.format(
- "Failed to install %s on device %s. Reason: %s",
- ACCESSIBILITY_SERVICE_APK_FILE_NAME, device.getSerialNumber(), errorCode));
- }
- // TODO: enable Settings > Accessibility > Accessibility > Delegating Accessibility
- // Service
- }
-
private void enableDeviceAdmin(ITestDevice device, CtsBuildHelper ctsBuild)
throws DeviceNotAvailableException, TargetSetupError, FileNotFoundException {
String errorCode = device.installPackage(ctsBuild.getTestApp(DEVICE_ADMIN_APK_FILE_NAME),