Make accessibility tests unlock the keyguard.

Include the InstrumentationCtsTestRunner in the accessibilitytest package,
which will unlock the keyguard before running tests.

Bug 5521447

Change-Id: I39dc4907ac7d1ce6a3452c4a16e29478ec91d3fd
diff --git a/tests/tests/accessibilityservice/Android.mk b/tests/tests/accessibilityservice/Android.mk
index 401f7a4..71b7537 100644
--- a/tests/tests/accessibilityservice/Android.mk
+++ b/tests/tests/accessibilityservice/Android.mk
@@ -22,7 +22,9 @@
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
+# TODO: include the core runner source as a library instead
+LOCAL_SRC_FILES := $(call all-java-files-under, src)\
+              $(call all-java-files-under, ../../core/runner/src)
 
 LOCAL_SRC_FILES += \
   src/android/accessibilityservice/IAccessibilityServiceDelegate.aidl \
@@ -30,6 +32,6 @@
 
 LOCAL_PACKAGE_NAME := CtsAccessibilityServiceTestCases
 
-LOCAL_SDK_VERSION := current
+#LOCAL_SDK_VERSION := current
 
 include $(BUILD_PACKAGE)
diff --git a/tests/tests/accessibilityservice/AndroidManifest.xml b/tests/tests/accessibilityservice/AndroidManifest.xml
index c75ffb2..ddf38c7 100644
--- a/tests/tests/accessibilityservice/AndroidManifest.xml
+++ b/tests/tests/accessibilityservice/AndroidManifest.xml
@@ -19,6 +19,8 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
         package="com.android.cts.accessibilityservice">
 
+  <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
+
   <application android:theme="@android:style/Theme.Holo.NoActionBar" >
 
       <uses-library android:name="android.test.runner"/>
@@ -31,7 +33,7 @@
 
   </application>
 
-  <instrumentation android:name="android.test.InstrumentationTestRunner"
+  <instrumentation android:name="android.test.InstrumentationCtsTestRunner"
                    android:targetPackage="com.android.cts.accessibilityservice"
                    android:label="Tests for the accessibility APIs."/>