OSDN Git Service

Tell the reason why IMM called startInput().
authorYohei Yukawa <yukawa@google.com>
Wed, 25 Nov 2015 19:07:19 +0000 (11:07 -0800)
committerYohei Yukawa <yukawa@google.com>
Wed, 25 Nov 2015 19:07:19 +0000 (11:07 -0800)
commit35d3f37bd51268cc99d81a3f537ac364d178e851
treee2dc275a9dba3cd474ce0c2439a17b0a80e976d7
parent1fae502824dfb77a109fedd80dad61fe094d8284
Tell the reason why IMM called startInput().

As a preparation to fix Bug 25373872, this CL introduces an additional
int parameter into the following two methods
  - IInputMethodManager.startInput()
  - IInputMethodManager.windowGainedFocus()
so that IMMS can know why IMM needs to start input.  Currently the
"startInputReason" parameter is used only for debug message only when
the OS is rebuilt with flipping IMMS#DEBUG to true.  Basically this
should have no impact in production builds except for a tiny overhead
of having one int parameter in some internal IPC calls.

Note that since 7663d80f6b6fd6ca7a736c3802013a09c0abdeb9 [1] basically
IMMS#windowGainedFocus() has been a superset of IMMS#startInput().
Hence we should pass to "startInputReason" parameter to
IMMS#windowGainedFocus() as well as IMMS#startInput().

  [1]: Icb58bef75ef4bf9979f3e2ba88cea20db2e2c3fb

Bug: 25373872
Change-Id: Ia1fe120af7d71495c5f3a4fc0ec6390efb8240ca
core/java/android/view/inputmethod/InputMethodManager.java
core/java/com/android/internal/view/IInputMethodManager.aidl
core/java/com/android/internal/view/InputMethodClient.java
services/core/java/com/android/server/InputMethodManagerService.java