7 Commits

Author SHA1 Message Date
Yohei Yukawa
cac977204b Map "shell ime" to "shell cmd input_method ime"
This is a follow up CL to my following CLs:
 * Use IBinder#shellCommand() for 'adb shell ime' [1]
 * Add a shell command to reset selected/enabled IMEs [2]

Previously
  adb shell ime <command>
was an alias of
  adb shell cmd input_method <command>

With this CL,
  adb shell ime <command>
is now an alias of
  adb shell cmd input_method ime <command>

This allows us to rename a sub command "reset-ime" to "reset" without
worrying about ambiguity about what will be reset.

Note also that the built-in "dump" command now works only as
  shell cmd input_method dump

 [1]: I9a2dbbf1d4494addbe22c82e2c416eedc4d585f2
      926488d70d09baefee0489537b2915602deaeebf
 [2]: I1e27aa1c9edf5d9a6d529c469ad42fd1e42b13b1
      cc97ebd031b4d4be6f69e3163c362bce6878baf1

Bug: 70475949
Fixes: 70731324
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
  7. Make sure that SoftKeyboard is no longer enabled and selected
Change-Id: I2a325dcd6108e357420d47880e4cbd9f81670ec9
2017-12-15 16:52:05 -08:00
Yohei Yukawa
926488d70d Use IBinder#shellCommand() for 'adb shell ime'
This is a preparation CL to add a new command to 'adb shell ime'.

Currently 'ime' command is written in Java language that relies directly
on the internal Binder IPC interface IInputMethodManager.

This is not ideal because:

 1. We have to keep maintaining IInputMethodManager methods used
    only by the 'ime' command.
 2. Adding new options to the 'ime' command is tedious when it
    requires new methods in IInputMethodManager.

With this CL, all features of 'ime' command are re-implemented inside
InputMethodManagerService (IMMS) on top of Binder's "shell command"
feature [1].  Like 'am' command was gone recently [2], now 'ime' command
is also a simple shell wrapper to forward options to 'cmd input_method',
which allows us to 1) reduce the code duplication and 2) give non-zero
status code when the command fails with Java exception.

 [1]: I76518ea6719d1d08a8ad8722a059c7f5fd86813a
      9461b6f91f37fd32207da1bd734d9ea9629eb8e5
 [2]: Ia8187196af597046fd2e7092dbf19ce1dc1ea457
      1704e3cf0c445512f0a9644485dd3449e874556b

Bug: 70475949
Test: adb shell ime
Test: adb shell ime help
Test: adb shell ime dump
Test: adb shell ime list -a
Test: adb shell cmd input_method
Test: adb shell cmd input_method help
Test: adb shell cmd input_method dump
Test: adb shell cmd input_method list -a
Change-Id: I9a2dbbf1d4494addbe22c82e2c416eedc4d585f2
2017-12-11 17:24:55 -08:00
George Burgess IV
6c1688850e cmds: add #!s
Without this, exec()ing these fails.

Found with `grep -L bin/sh $(grep -Rl Script)`

Bug: None
Test: exec()ed each of these scripts; I no longer get "exec format
error" for any of them.
Change-Id: I47db5007e5cc14ab91eb846b7bffecb925d37874
2017-11-05 01:07:30 -07:00
Dan Willemsen
98ff0b72f0 Remove custom copy rules, stop using ACP
Replace some custom rules with BUILD_PREBUILT.

Move tools from ALL_PREBUILTS to BUILD_PREBUILT. All of them are already
in PRODUCT_PACKAGES in build/target/product/base.mk.

Remove uses of ACP and replace with core build system macros or 'cp'

Change-Id: I529e7c6c50fc64ad36b75bb47142f6bde909d141
2016-03-23 13:42:52 -07:00
The Android Open Source Project
9066cfe988 auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
The Android Open Source Project
d83a98f4ce auto import from //depot/cupcake/@135843 2009-03-03 18:28:45 -08:00
The Android Open Source Project
b798689749 auto import from //branches/cupcake/...@125939 2009-01-09 17:51:23 -08:00