• Home
  • History
  • Annotate
  • only in /frameworks/base/core/tests/inputmethodtests/src/android/
History log of /frameworks/base/core/tests/inputmethodtests/src/android/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b21220efae92a56ff7b4b781fa614a6e3a8a3007 01-Nov-2014 Yohei Yukawa <yukawa@google.com> Minimize the number of default enabled IMEs part 4

This is a follow up CL for recent attempt to minimize
the number of default enabled IMEs.
- part1: I831502db502f4073c9c2f50ce7705a4e45e2e1e3
- part2: Ife93d909fb8a24471c425c903e2b7048826e17a3
- part3: I6571d464a46453934f0a8f5e79018a67a9a3c845

It turned out that the changes made in part2 and part3 are
a bit overkill, and users will see no software keyboards
in some particular situations. The problem we missed in
the previous CLs is the fact that
InputMethodInfo#isDefault is indeed a locale-dependent
value, hence it may vary depending on the system locale.
Existing unittests also failed to abstract such
locale-dependent nature.

In order to addresses that regression, the selection logic
is a bit widely reorganized in this CL. Now the logic is
implemented as a series of fallback rules.

Also, unit tests are updated to be able to 1) test the
order of the enabled IMEs, and 2) emulate the
locale-dependent behavior of InputMethodInfo#isDefault
to enrich test cases.

BUG: 17347871
BUG: 18192576
Change-Id: I871ccda787eb0f1099ba3574356c1da4b33681f3
s/InputMethodTest.java
dc489241cfb3691a87942344cf55efd3d98c1107 13-Sep-2014 Yohei Yukawa <yukawa@google.com> Minimize the number of default enabled IMEs part 3

With this CL, the behavior of getDefaultEnabledImes() changes
as follows:

- Previously system IMEs are always enabled by default as long
as it is a software keyboard that supports En_* subtype. With
this CL, getDefaultEnabledImes() relies on the locale returned
from getFallbackLocaleForDefaultIme() instead of calling
isSystemImeThatHasEnglishKeyboardSubtype() to minimize the
number of enabled IMEs.
- Previously default enabled system IMEs are chosen in a
country-agnostic way. As a result, "en_IN" is enabled even
when the system locale is "en_US". With this CL, the system
first tries to find IMEs with taking the coutnry into account,
and use the country-agnostic way when and only when fallback
logic is required.

BUG: 17347871
Change-Id: I6571d464a46453934f0a8f5e79018a67a9a3c845
s/InputMethodTest.java
68c860bb29861e54fd9b868bd5af701b054a1dc0 13-Sep-2014 Yohei Yukawa <yukawa@google.com> Minimize the number of default enabled IMEs part 2

Previously the system tried to enable at least one auxiliary IME
even when the system is not ready. However, this doesn't make
much sense because the user should be able to set up their phone
without auxiliary IMEs. Also, IMEs enabled before the system
becomes ready are kept to be enabled after the system becomes
ready. Thus, we should minimize the number of enabled IMEs
until the system becomes ready.

BUG: 17347871
Change-Id: Ife93d909fb8a24471c425c903e2b7048826e17a3
s/InputMethodTest.java
59cccf93d28648a77860a30349e52b7eeb98436c 12-Sep-2014 Yohei Yukawa <yukawa@google.com> Enrich test cases when enabling default IMEs part 4

This is another groundwork for subsequent fixes.

Notable changes in test cases are:
- simplified test cases for voice IMEs.
- added more test cases for keyboard IMEs.
- introduced assertDefaultEnabledImes() to reduce code duplicate.

BUG: 17347871
Change-Id: I8cf61cfa18ac425a2cccc7823474c3f06dc0fa1e
s/InputMethodTest.java
d77adfe52d44396c54a4ce3a7f1e823e8618f27c 11-Sep-2014 Yohei Yukawa <yukawa@google.com> Enrich test cases when enabling default IMEs part 3

This is another groundwork for subsequent fixes.

Notable changes in test cases are:
- A dummy Hinglish IME ("en_US" + "hi") is added
- Added test cases where system locale is "en_GB",
"en_IN", and "hi" as well as "en_US".

BUG: 17347871
Change-Id: Iacf0f47c4dbc147f8153df50ba58fc4da4dacd29
s/InputMethodTest.java
bca817b2e2623c49bbb618f78fe207bedf57f266 11-Sep-2014 Yohei Yukawa <yukawa@google.com> Enrich test cases when enabling default IMEs part 2

This is another groundwork for subsequent fixes.

Notable changes in test cases are:
- isSystemReady == false is now coverted.
- tests can run even when the system locale of test
environment is different from "en_US"

BUG: 17347871

Change-Id: I9434270735d3b37d8b788d41250b23d7950aaeed
s/InputMethodTest.java
cfcbddaff269cbb35192c21e557d34aece2f3d6c 10-Sep-2014 Yohei Yukawa <yukawa@google.com> Enrich test cases when enabling default IMEs

This is another groundwork for subsequent fixes.

Notable changes in test cases are:
- isAsciiCapable is now annotated accordingly.
- "dummy.keyboard0" now has several subtypes like
"en_GB", "en_IN", "hi", "hi_ZZ" like the AOSP
LatinIME.

BUG: 17347871
Change-Id: Ide698ed11c2539ba5862e6b37ea63ed19f8ce566
s/InputMethodTest.java
443c2bafd824779a75cd4b922b6839a8df9795e9 10-Sep-2014 Yohei Yukawa <yukawa@google.com> Use public APIs to instantiate InputMethodSubtype

This is a groundwork for subsequent CLs that are
supposed to improve default input method selection
logics.

Historically we have had a @hide constructor of
InputMethodSubtype. However, this contructor is
a bit obsolete because we can not specify some
parameters that were added in recent platform
releases. We should use InputMethodSubtypeBuilder
instead.

BUG: 17347871
Change-Id: I72ad79682a58344e14380eb20e26edf98aee37cd
s/InputMethodTest.java
699a49b9f1d1a7f44a37fa9df96f22f724fbeb1f 08-Sep-2014 Yohei Yukawa <yukawa@google.com> Follow up API signature changes of CursorAnchorInfo part 2

This is another follow up CL for Ic8c6fab58c01206872a34e7e.

Ib2371849d32bb44da9ef59f05e648a476e03699a didn't cover
following renamings. This CL fixes them.

- #getCharacterRect -> #getCharacterBounds
- #getCharacterRectFlags -> #getCharacterBoundsFlags

BUG: 17365414
Change-Id: I120795da3f25f1e2fa71f455f92e3cd1c036c1d5
s/CursorAnchorInfoTest.java
a41c4bcc3dcac9e808c9d524e24454d132790e9a 08-Sep-2014 Yohei Yukawa <yukawa@google.com> Follow up API signature changes of CursorAnchorInfo

This is a follow up CL for Ia8cbb9f6b41cd9509fc0147fd68763dfde
and Ic8c6fab58c01206872a34e7ee604cdda1581364d.

BUG: 17365414
BUG: 17200900
Change-Id: Ib2371849d32bb44da9ef59f05e648a476e03699a
s/CursorAnchorInfoTest.java
71cf0a32d0d9a45653704a671154f26a8bc3132b 24-Jul-2014 Yohei Yukawa <yukawa@google.com> Stop assuming language part in locale string is up to 2-letter

With this CL, InputMethodSubtypeSwitchingController stop
assuming that language part in locale string is up to 2-letter.

this CL is not so risky because
InputMethodSubtypeSwitchingController have used language part for
nothing but sorting subtypes to determine the initial rotation
order of IME switching.

BUG: 16502987
Change-Id: Ib159ece0b7aa04f8fd7abc96c9a6e0832a4b7cd2
s/InputMethodSubtypeSwitchingControllerTest.java
a52aeda8088688f08602cccc444057f03b94c074 11-Jul-2014 Yohei Yukawa <yukawa@google.com> Consolidate test cases for InputMethodSubtype

We have accepted any arbitrary text as a locale
string when instantiating InputMethodSubtype object.
As a consequence, some existing code might assume
that InputMethodSubtype never canonicalize/normalize
the given locale string.

This CL add a test case for such scenario.

Change-Id: Ie08d6e149e22a60d6c4d40049a3e6afeee87dc44
s/InputMethodSubtypeTest.java
638e4787ba5093c5e43d8b15db57fff3a31a4e21 11-Jul-2014 Yohei Yukawa <yukawa@google.com> Add simple InputMethodSubtypeTest

Change-Id: I87105c4935adfca249378e667161d2998cf77840
s/InputMethodSubtypeTest.java
0b01e7fc58cdde00d8350285a3386c4209b72d78 08-Jul-2014 Yohei Yukawa <yukawa@google.com> Polish new IME API for L: CursorAnchorInfo

This CL allows application authors and input method authors to
communicate with each other more precisely on the visibility of
insertion marker and composing characters. Now we can describe
the situation where the coordinates of them are available but
they are overlapped by other UI elements.

This change is based on feedbacks from internal customers of
this preview API.

Change-Id: I82eba0e844a6f8b99ba11a68fad272399034cc24
BUG: 16118303
s/CursorAnchorInfoTest.java
s/SparseRectFArrayTest.java
eea0b8b051e916051d0d09da3f41f9ec4d508bff 08-Jul-2014 Yohei Yukawa <yukawa@google.com> Fix inconsistencies in CursorAnchorInfo#equals

This CL addresses some inconsistencies found in
CursorAnchorInfo#equals.

- #mComposingText is now taken into consideration when
compared with other instances.
- NaN is now treated as if it was just a number in
CursorAnchorInfo#equals if and only if NaN is used in
-- #mInsertionMarkerHorizontal
-- #mInsertionMarkerTop
-- #mInsertionMarkerBaseline
-- #mInsertionMarkerBottom.
This is useful if we want to use NaN as a marker to
indicate that no value is specified.

Change-Id: Ibff31bc34b9d488731b294ad38240c567a06b627
s/CursorAnchorInfoTest.java
b5268dcc17cd9ecb540b06ad59bd74188b57a069 27-Jun-2014 Yohei Yukawa <yukawa@google.com> Require coordinate transformation matrix if necessary

With this CL, CursorAnchorInfo.Builder#build() raises
IllegalArgumentException when an application author attempts to
instantiate CursorAnchorInfo without the coordinate
transformation matrix but with specifying some positional
parameters such as composing character rectangle.

Since any other positional members in CursorAnchorInfo are
supposed to be specified in local coordinates, the application
author must provide the coordinate transformation matrix for
such positional data.

Change-Id: I2b0fd0f146a2b95fe4fa1324837d8cfee667208c
s/CursorAnchorInfoTest.java
9a9c112737443e0a4ad0a5054408642ec7b7ee67 27-Jun-2014 Yohei Yukawa <yukawa@google.com> Fix test failures due to unexpected overload resolution

Starting with Ie04e8a27050849fee1c93ef14b9944acc70fafe4,
CursorAnchorInfo#getComposingText() returns CharSequence rather
than String. This causes unexpected overload resolution,
which results in test failures.

BUG: 15088391
Change-Id: I51e2b23573e92be7e5b1dcca6402e85364408215
s/CursorAnchorInfoTest.java
2a97b54f491346be193cc72b89d6712cf1abacc9 12-Jun-2014 Yohei Yukawa <yukawa@google.com> am f09cb58d: Merge "Rename CursorAnchorInfoBuilder with Builder" into lmp-preview-dev

* commit 'f09cb58d5f528665e6e96d8740eeeeab4167e357':
Rename CursorAnchorInfoBuilder with Builder
c46b5f04aa2a9fd292c117d2824f70fcf06e86ba 09-Jun-2014 Yohei Yukawa <yukawa@google.com> Rename CursorAnchorInfoBuilder with Builder

Inner Builder class should not inherit full class name of outer
class.

BUG: 15516230
Change-Id: I2d56edebb0c85639db57ca5b2aadb22c67fc5926
s/CursorAnchorInfoTest.java
07bd732034fbf4ce0e51b99c7199edf20dff1565 02-Jun-2014 Yohei Yukawa <yukawa@google.com> Reenable DynamicRotationList for language-switching-aware IMEs

In order to reenable DynamicRotationList for
language-switching-aware IMEs, this CL reverts
I84291fd4a7d6192b3bd0c366c49 with fixing a bug that the dynamic
rotation state is reset even when the list of input methods is
not changed.

With this CL, the dynamic rotation state is preserved when the
enabled input methods is not changed actually.

BUG: 7043015
Change-Id: I506828c7a363e79f1c767eeb28f0d3746ff1cb0d
s/InputMethodSubtypeSwitchingControllerTest.java
529001f06761205bcaae1570d81556be397f56fb 27-May-2014 Yohei Yukawa <yukawa@google.com> Switch back to StaticRotationList from DynamicRotationList

Ic005b94379f9d847ea, which introduced DynamicRotationList for
smarter input method rotation, is suspected to be causing a
strange behavior that InputMethodManager#switchToNextInputMethod
is choosing unexected/disabled IME/subtype.

With this CL, we switch back to StaticRotationList until the root
cause is addressed.

BUG: 7043015
Change-Id: I95fc8b28536cea6d09ea325e0caee14007cfc0a7
s/InputMethodSubtypeSwitchingControllerTest.java
a9bda774276f1c5a1fc6fd67a7782a06e696be8f 23-May-2014 Yohei Yukawa <yukawa@google.com> Implement dynamic IME rotation based on user action

With this CL, the IME rotation order will be updated dynamically
based on user actions on IMEs. Currently only onCommitText is
took into considered.

Imagine that we have the following rotation order.
[A, B, C, D, E]
If a user action for C is observed, the rotation order will be
updated as follows:
[C, A, B, D, E]
Then another user action for D updates the rotation order as
follows:
[D, C, A, B, E]

BUG: 7043015
Change-Id: Ic005b94379f9d847ea87046473ed77d8018d930e
s/InputMethodSubtypeSwitchingControllerTest.java
9b29d04565e1faf0a49054f538ed1881cb24fe12 22-May-2014 Yohei Yukawa <yukawa@google.com> Consolidate the language-switching logic

This CL does not change the existing behavior.
In I84291fd4a7d6192b, the IME rotation group is logically
devided into two groups, one is for IMEs that are declared as
supportsSwitchingToNextInputMethod == true, and the other is
IMEs that are not declared so. The problem is that the logic
was implemented with a single ime/subtype list where these two
kinds of IMEs are completely mixed. This makes the code
unnecessarily complex.
With this CL, these two rotation groups are actually managed
as two different collections separately. This allows us to
simplify the rotation logic as well as its test cases.
This CL is also a groundwork to implement smarter
language-switching logic that is applied to
language-switching-aware IMEs only.

BUG: 7043015
Change-Id: I7f08ec299ec41d614e2cd3912320687db1576e80
s/InputMethodSubtypeSwitchingControllerTest.java
5a647b69be8ac8d40c33ed9abe63e41514699e5b 21-May-2014 Yohei Yukawa <yukawa@google.com> Remove unnecessary internal lock

Previously, InputMethodSubtypeSwitchingController has relied on
its own internal lock for #getNextInputMethod and
class has to be invalidated whenever
InputMethodManagerService#mMethodMap is updated, any method of
InputMethodSubtypeSwitchingController should be called under
the global lock of InputMethodManagerService#mMethodMap.

As a consequence, we can conclude that
InputMethodSubtypeSwitchingController does not need its own
internal lock.

This CL also adds additional synchronization blocks into
the constructor of InputMethodManagerService to address the
existing inconsistency that methods with *Locked suffix are
called without the lock actually.

BUG: 7043015
Change-Id: I9d4d3d7232c984432185c10c13fb726a6158cac8
s/InputMethodSubtypeSwitchingControllerTest.java
4013940b62ae2227c9b30d8761d7533ee6190a9f 21-May-2014 Yohei Yukawa <yukawa@google.com> Style fix and dead code removal

This CL does not change the existing behavior.
Smarter language switching will be coverted by subsequent CLs.

BUG: 7043015
Change-Id: I281a33191d44be448492c2b74760cb8680719124
s/InputMethodSubtypeSwitchingControllerTest.java
419b1b0498e33a556780be1702b444d54fcaa7dd 15-May-2014 Yohei Yukawa <yukawa@google.com> Make a copy of Matrix in CursorAnchorInfoBuilder

This CL fixes a bug that CursorAnchorInfoBuilder does't make a
copy if the Matrix specified with #setMatrix.

Without this fix, IMM#updateCursorAnchorInfo could fail to detect
duplicated events when the same instances of
CursorAnchorInfoBuilder and Matrix are reused to optimize
performance.

Change-Id: I50c50a12a06d3cda4dec445b171b61ceb78da21a
s/CursorAnchorInfoTest.java
81f4cb3f858f46a4d9b793c4d326b9bf6aca868d 13-May-2014 Yohei Yukawa <yukawa@google.com> Enable CursorAnchorInfo to contain composing string

This CL adds one more functionality to CursorAnchorInfo
that enables applications to associate the composition
string with its positional information. This is useful
for an IME to handle CursorAnchorInfo asynchronously.

This is also useful for the framework to detect if
the application is unnecessarily calling
IMM#updateCursorAnchroInfo with duplicate event.

BUG: 14579622
Change-Id: Ie75c17b523dad33e97b08c15f5f5267573ce2063
s/CursorAnchorInfoTest.java
c2ddd6023688db5ecf6c586e05f55e262b4a802e 06-May-2014 Yohei Yukawa <yukawa@google.com> Introduce new API for floating window support

This CL introduces a new API IMM#updateCursorAnchorInfo for
floating window support.

BUG: 14579622
Change-Id: I61dec2f8fa671ba891da1d4af08975750e3acb04
s/CursorAnchorInfoTest.java
s/SparseRectFArrayTest.java
a1223cfe6f2e04da1ab6e0ad781068687446ee56 01-May-2014 Yohei Yukawa <yukawa@google.com> Take supportsSwitchingToNextInputMethod into considertaion

With this CL, InputMethodManager#switchToNextInputMethod starts
behaving as if there are two rotation groups: one is for the new
input methods that are declared with
supportsSwitchingToNextInputMethod set to true to indicate they
have some language switching UI, and the other is for the other
input methods to preserve the existing behavior.

In addition to the above change, this CL also fixes the behavior
of InputMethodManager#shouldOfferSwitchingToNextInputMethod()
so as to return true if and only if the former rotation group
consists of two or more input methods, as originally designed.

BUG: 12981505
Change-Id: I84291fd4a7d6192b3bd0c366c49586e79135584f
s/InputMethodSubtypeSwitchingControllerTest.java
d1da11529813f6d3f51518b5fe028e0b8084f5cc 01-May-2014 Yohei Yukawa <yukawa@google.com> Add unit tests for InputMethodSubtypeSwitchingController

This CL adds unit tests for InputMethodSubtypeSwitchingController
as a ground work to make it aware of
supportsSwitchingToNextInputMethod in a subsequent CL.

This CL never changes existing behavior.

BUG: 12981505
Change-Id: I3b2c46c47c7686b811fa248ad549f20875367425
s/InputMethodSubtypeSwitchingControllerTest.java
f06569561fe1c6e898debf8bb9f37331a9f87323 03-Mar-2014 Yohei Yukawa <yukawa@google.com> Introduce InputMethodSubtypeArray for memory efficient IPCs

This CL introduces InputMethodSubtypeArray which compresses
multiple instances of InputMethodSubtype to reduce the risk
of TransactionTooLargeException during IPCs.

There are some IMEs which rapidly adding new subtypes into
their supported language list. One problem here is that each
instance of InputMethodInfo internally owns the list of
supported subtypes. Basically it requires additional
200 ~ 300 bytes for each subtype when InputMethodInfo is
transffered via IPCs. We should keep the size less than
100 KB in typical scenario.

With this CL, the list of InputMethodSubtype is marshalled
with GZIP compression. Approximately one InputMethodInfo is
marshalled within 10 KB even when it has 100 subtypes.

No negative performance impact is observed so far. The cost of
decompression seems to be compensated by another optimization
in this CL. Actually marshalling cost is reduced with this CL
by caching the compressed data on demand.

BUG: 12954290
Change-Id: Ibb2940fcc02f3b3b51ba6bbe127d646fd7de7c45
s/InputMethodSubtypeArrayTest.java
c18cd393f65146fac03a9bdfa45380a69460ee98 03-Mar-2014 Yohei Yukawa <yukawa@google.com> Make sure InputMethodInfo implements Parcelable transitively

This CL adds one more test to make sure InputMethodInfo
implements Parcelable correctly. This test makes sure that
one can marshall and unmarshall again from an unmarshalled
copy of InputMethodInfo.

BUG: 12954290
Change-Id: I5aa1552a8089fe0bac54513ba224e5bfc494be97
s/InputMethodTest.java
589800485d770cab7b159ffcf4b18c10ae2aee6d 27-Feb-2014 Yohei Yukawa <yukawa@google.com> Add unit test for InputMethodInfo

This CL adds a unit test to make sure that InputMethodInfo
implements Parcelable correctly.

BUG: 12954290
Change-Id: I0abe8c266b4b035bf8ef4688d11069b355fabe9f
s/InputMethodTest.java
f1367b7e903a2a69a8f833bb272e91d77abd57c6 25-Jan-2013 Satoshi Kataoka <satok@google.com> Do not turn on imes unexpectedly with unit tests

Bug: 7872918

Change-Id: Ie1d74c9fac27de140e7aa85f2eaefcb89aa06ea7
s/InputMethodTest.java