Skip to content

Commit

Permalink
🔊 Add a message if the keyboard IME is not provided for selecting the…
Browse files Browse the repository at this point in the history
… keyboard
  • Loading branch information
astariul committed May 21, 2024
1 parent 9772e19 commit 1a624df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions kebbie/emulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,13 @@ def select_keyboard(self, keyboard):
Args:
keyboard (str): Keyboard to search.
"""
if keyboard not in KEYBOARD_PACKAGE:
print(
f"Warning ! {keyboard}'s IME isn't provided (in `KEYBOARD_PACKAGE`), can't automatically select the "
"keyboard."
)
return

ime_list = subprocess.check_output(["adb", "shell", "ime", "list", "-s"], universal_newlines=True)
ime_name = None
for ime in ime_list.strip().split("\n"):
Expand Down

0 comments on commit 1a624df

Please sign in to comment.