OSDN Git Service

Add a shell command to reset selected/enabled IMEs
authorYohei Yukawa <yukawa@google.com>
Tue, 12 Dec 2017 01:54:43 +0000 (17:54 -0800)
committerYohei Yukawa <yukawa@google.com>
Tue, 12 Dec 2017 01:54:43 +0000 (17:54 -0800)
commitcc97ebd031b4d4be6f69e3163c362bce6878baf1
treef88ee1c5d30c8904b8bea6caab0e55965a309872
parent926488d70d09baefee0489537b2915602deaeebf
Add a shell command to reset selected/enabled IMEs

With this CL, you can reset currently selected/enabled IMEs with a shell
command as follows:
  adb shell ime reset-ime

This should be useful for end-to-end tests where often we want to clean
up persistent IME state to the default ones as if the device is
initially booted.

Fixes: 70475949
Test: Manually tested as follows:
  1. make -j SoftKeyboard
  2. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  3. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
  4. adb shell ime set com.example.android.softkeyboard/.SoftKeyboard
  5. Make sure that SoftKeyboard is enabled and selected
  6. adb shell ime reset-ime
  7. Make sure that SoftKeyboard is no longer enabled and selected
Change-Id: I1e27aa1c9edf5d9a6d529c469ad42fd1e42b13b1
services/core/java/com/android/server/InputMethodManagerService.java