Add '-u <user id>' option to 'adb shell ime enable'

This is a preparation to add end-to-end CTS for per-profile IME mode.

In order to allow CTS tests to enable/disable IMEs via shell command
in multi-user environment, this CL adds '-u <user id>' option to
  adb shell ime enable <ime id>
and
  adb shell ime disable <ime id>

Note that '-u' option is already supposed in 'adb shell ime list' [1].

 [1]: I192a0f5a1375170d17a4c08af94f23966dbaea8b
      7f8ee4b9ddd31ad36a12c5278b27990dc76011cc

Bug: 122924287
Test: Manually tested as follows:
  1. Build aosp_blueline-userdebug and flash it
  2. make -j SoftKeyboard
  3. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  4. adb shell pm create-user test
  5. adb shell am switch-user 10
  6. adb shell ime enable -u 0 com.example.android.softkeyboard/.SoftKeyboard
     -> Input method com.example.android.softkeyboard/.SoftKeyboard: now enabled for user #0
  7. adb shell ime disable -u 0 com.example.android.softkeyboard/.SoftKeyboard
     -> Input method com.example.android.softkeyboard/.SoftKeyboard: now disabled for user #0
Test: Manually tested as follows.
  1. Build aosp_blueline-userdebug and flash it
  2. adb shell pm create-user test
  3. adb shell pm create-user restricted_test
  4. adb root
  5. adb shell pm set-user-restriction --user 11 no_debugging_features 1
  6. adb shell am switch-user 10
  7. adb shell am switch-user 11
  8. adb shell am switch-user 0
  9. adb shell ime disable -u all com.android.inputmethod.latin/.LatinIME
     -> Input method com.android.inputmethod.latin/.LatinIME: now disabled for user #0
        Input method com.android.inputmethod.latin/.LatinIME: now disabled for user #10
        User #11 is restricted with DISALLOW_DEBUGGING_FEATURES.
Change-Id: Ia0f873e4589a9fc3f549469e3d1d966640dc2df5
1 file changed