Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e14a11c1 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Clarify on DEFAULT_INPUT_METHOD and InputMethodInfo#getId()

This CL aims to clarify more on what "IME ID" means in Android.

"IME ID" is a string representation of a certain implementation of
InputMethodService, which has always been computed by

  new ComponentName(packageName, serviceName).flattenToShortString(),

then has been exposed to developers through at least the following two
public APIs.

 * Settings.Secure.DEFAULT_INPUT_METHOD
 * InputMethodInfo#getId()

Now that our IME CTS tests are already requiring that "IME ID" equals
to test IMEs' component name indirectly, it would be more beneficial
if we clearly mention that "IME ID" is guaranteed to be constructed by

  ComponentName#flattenToShortString()

hence is also guaranteed to be parsed with

  ComponentName#unflattenFromString().

It is to late to change strong representations that have been
exposed to developers for more than 10 years anyway.

Other than updating public API documents, this CL does nothing.

Fix: 192392438
Test: presubmit
Change-Id: I013cd79b92363fe6e438f445606b5fc53e2660f6
parent b72545e7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment