diff options
| author | Yohei Yukawa <yukawa@google.com> | 2019-01-18 08:48:07 -0800 | 
|---|---|---|
| committer | Yohei Yukawa <yukawa@google.com> | 2019-01-18 08:48:07 -0800 | 
| commit | 0f5eade4a492fc91130da1aedcad0999932f4137 (patch) | |
| tree | ef70f8c6320be3346138512a2d88538bf19fda38 /rs/java/android/renderscript/RenderScriptCacheDir.java | |
| parent | d70e1ad78882962c0e642d06138e7de2060ebce7 (diff) | |
Introduce @hide EditorInfo#targetInputMethodUser
This is a preparation to propagate the expected IME user ID from
direct-reply notification to InputMethodManagerService (IMMS).
When per-profile IME mode [1] is enabled, IMMS basically assumes that
the IME user ID should be determined by calling process's user ID.
This works for most of apps, but does not work for direct-reply hosted
in the System UI process, which always runs as user 0.
With this CL, client apps can explicitly specify the target IME user
ID by using @hide field in EditorInfo.  For instance, to tell IMMS to
connect to user 10's IME, do this:
 @Override
 public InputConnection onCreateInputConnection(EditorInfo info) {
    InputConnection ic = super.onCreateInputConnection(info);
    info.targetInputMethodUser = UserHandle.of(10);  // user 10
    return ic;
 }
The calling process will receive SecurityException if it does not
belong to user 10 and does not have INTERACT_ACROSS_USERS_FULL.
This CL is just a preparation.  There should be no user-visible
behavior change yet.
 [1]: Ied99664d3dc61b97c919b220c601f90b29761b96
      a878b9500e6b89dce9738179edc27bcd0d736b7e
Bug: 120744418
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: Ia7ea944438d69669ccdf9111b34ba400e786a602
Diffstat (limited to 'rs/java/android/renderscript/RenderScriptCacheDir.java')
0 files changed, 0 insertions, 0 deletions
