summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2021-09-10 11:37:30 -0700
committerYohei Yukawa <yukawa@google.com>2021-09-10 11:37:30 -0700
commit95d4f0dc175f5579e765f49e3b6fa35338b807dc (patch)
tree14c763705e6e4acd0a744009ea96ff809922e1f5 /core/java/android/inputmethodservice/InputMethodService.java
parente5c02996897352bd4c56ef34d333057e7c1a14ef (diff)
Log errors if RemoteInputConnection is used after IMS#onDestroy()
This CL consolidates weak-ref handlings in RemoteInputConnection so that IME developers can find more useful messages in logcat when they are using RemoteInputConnection after InputMethodService#onDestroy(). RemoteInputConnection has been designed to not hold a strong reference to its parent InputMethodService instance. While IME developers can manually keep a strong reference to (Remote)InputConnection object that they obtained from InputMethodService#getCurrentInputConnection(), doing so does not prevent the system from garbage-collecting InputMethodService instance. With this CL, an error message will be shown in logcat if somehow RemoteInputConnection object is still touched after InputMethodService is destroyed, which hopefully can help IME developers realize they might be doing something unexpected. Other than showing error messages in logcat, there is no behavior change in this CL. Bug: 192412909 Bug: 194110780 Test: atest CtsInputMethodTestCases Change-Id: I514630d27c8953f62fdb34cd3133a662b3fbbf76
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
0 files changed, 0 insertions, 0 deletions