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)
15 files changed