Add IME device-side test used from host-side test

Bug: 7542467
Test: Install CtsInputMethodServiceDeviceTests.apk, CtsInputMethod1.apk,
      CtsInputMethod2.apk, and CtsInputMethodServiceEventProvider.apk. Then
      confirm that switching IME test is passed.
        adb install -r CtsInputMethodServiceDeviceTests.apk
	adb install -r CtsInputMethod1.apk
	adb install -r CtsInputMethod2.apk
	adb install -r CtsInputMethodServiceEventProvider.apk
	adb shell ime enable android.inputmethodservice.cts.ime1/.CtsInputMethod1
	adb shell ime enable android.inputmethodservice.cts.ime2/.CtsInputMethod2
	adb shell content delete --uri content://android.inputmethodservice.cts.provider/events
	adb shell am broadcast -a android.inputmethodservice.cts.action.DEVICE_EVENT \
	    -e event_type TEST_START \
	    -e event_sender android.inputmethodservice.cts.devicetest.InputMethodServiceDeviceTest#testSwitchIme1ToIme2 \
	    --el event_time 1234 \
	    android.inputmethodservice.cts.provider/android.inputmethodservice.cts.receiver.EventReceiver
	adb shell ime set android.inputmethodservice.cts.ime1/.CtsInputMethod1
        adb shell am instrument -w \
	    -e class android.inputmethodservice.cts.devicetest.InputMethodServiceDeviceTest#testSwitchIme1ToIme2 \
	    android.inputmethodservice.cts.devicetest/android.support.test.runner.AndroidJUnitRunner
Change-Id: I077f0e8824041d3154fdedf5b27d435af33604ef
(cherry picked from commit ff843564ca0ca424baa15e9830d46690eef01148)
diff --git a/hostsidetests/inputmethodservice/deviceside/devicetest/Android.mk b/hostsidetests/inputmethodservice/deviceside/devicetest/Android.mk
new file mode 100644
index 0000000..d4786bc
--- /dev/null
+++ b/hostsidetests/inputmethodservice/deviceside/devicetest/Android.mk
@@ -0,0 +1,45 @@
+# Copyright (C) 2014 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+# Don't include this package in any target
+LOCAL_MODULE_TAGS := tests
+# When built, explicitly put it in the data partition.
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+
+LOCAL_DEX_PREOPT := false
+
+LOCAL_PROGUARD_ENABLED := disabled
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_JAVA_RESOURCE_DIR := res
+LOCAL_JAVA_LIBRARY := android.test.runner
+LOCAL_STATIC_JAVA_LIBRARIES := \
+    android-support-test \
+    hamcrest hamcrest-library \
+    ub-uiautomator \
+    CtsInputMethodServiceCommon \
+    CtsInputMethodServiceLib
+
+# tag this module as a cts test artifact
+LOCAL_COMPATIBILITY_SUITE := cts
+
+LOCAL_PACKAGE_NAME := CtsInputMethodServiceDeviceTests
+
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_CTS_PACKAGE)