Commit Graph

151 Commits (407f8a3216ad1ec403ed1c3aeb7c46192eae3cd8)

Author SHA1 Message Date
Brett Chabot c05a70a4ca Migrate packages/inputmethods/LatinIME to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: I63edeced1465725cd8d6467cd75ea1acc2608932
2018-12-13 19:06:42 -08:00
Yohei Yukawa c0aa76f897 Migrate to Android Testing Support Lib (part 7/N)
InstrumentationTestCase and ActivityInstrumentationTestCase2 are
deprecated.  This CL rewrites tests that rely on those deprecated
classes by using Android Testing Support Library.

Bug: 110805255
Test: verified as follows. No new test failures.
    tapas adb LatinIME LatinIMETests arm64 userdebug && \
    DISABLE_PROGUARD=true make -j LatinIME && \
    adb install -r $OUT/system/app/LatinIME/LatinIME.apk && \
    atest LatinIMETests:com.android.inputmethod.keyboard.internal.MoreKeySpecStringReferenceTests LatinIMETests:com.android.inputmethod.latin.settings.AccountsSettingsFragmentTests
Change-Id: I4fefccaa0c480cfba7142ed36883da2f19b6a5f9
2018-07-24 11:29:20 -07:00
Yohei Yukawa 560a5bc596 Migrate to Android Testing Support Lib (part 6/N)
This is a follow up CL to previous CLs that converted unit tests to
use Android Testing Support Library but forgot to remove unused import
lines.

Bug: 110805255
Test: verified as follows. No new test failures.
        tapas adb LatinIME LatinIMETests arm64 userdebug && \
        DISABLE_PROGUARD=true make -j LatinIME && \
        adb install -r $OUT/system/app/LatinIME/LatinIME.apk && \
        atest LatinIMETests:com.android.inputmethod.latin
Change-Id: I8762b0dfc209bdf68867f725b03a22286026faae
2018-07-23 17:19:51 -07:00
Yohei Yukawa a497886dda Migrate to Android Testing Support Lib (part 4/N)
This CL converts 7 test classes under com.android.inputmethod.keyboard
to Android Testing Support Library.

This CL also fix missing annotations in KeyboardLayoutTest.

Bug: 110805255
Test: verified as follows. No new test failures.
        tapas adb LatinIME LatinIMETests arm64 userdebug && \
        DISABLE_PROGUARD=true make -j LatinIME && \
        adb install -r $OUT/system/app/LatinIME/LatinIME.apk && \
        atest LatinIMETests:com.android.inputmethod.keyboard
Change-Id: I8ab9e3329f159f0df02812fafe44c25efa76c0d1
2018-07-06 10:09:43 -07:00
Tadashi G. Takaoka 4934a88b61 Make LanguageOnSpacebarHelper as utility class
Change-Id: I546f3b1943999a41803222bd14f9ddd23aa87a51
2014-12-11 14:22:21 +09:00
Tadashi G. Takaoka 0d6ce46528 Move logic to determine spacebar text to LanguageOnSpacebarHelper
Change-Id: Ib9dbbb4bd4e35c15fd752c364d3012e8a7da2410
2014-11-08 18:50:59 -08:00
Tadashi G. Takaoka a04380de6a Add more test cases to LanguageOnSpacebarHelperTests
Change-Id: I54a4b89db84bbbd6bc7f5886f27b8bb6429ca8db
2014-11-08 18:24:54 -08:00
Ken Wakasa 9342484e8d Move Constants.java to the latin.common package
Our intention is to have classes of latinime-common under the common
package as much as we can.

Change-Id: I76efbbbe7bebf1a4aa943715cdff64f91675e20d
2014-10-23 20:27:37 +09:00
Tadashi G. Takaoka 5f00fe09e9 Fix some compiler warnings
This CL fixes the following compiler warnings.

- Indirect access to static member
- Access to a non-accessible member of an enclosing type
- Parameter assignment
- Method can be static
- Local variable declaration hides another field or variable
- Value of local variable is not used
- Unused import
- Unused private member
- Unnecessary 'else' statement
- Unnecessary declaration of throw exception
- Redundant type arguments
- Missing '@Override' annotation
- Unused '@SuppressWarning' annotations

Bug: 18003991
Change-Id: Icfebe753e53a2cc621848f769d6a3d7ce501ebc7
2014-10-21 19:28:37 +09:00
Tadashi G. Takaoka aaefd56661 Add !string/<resource_name> reference
This CL introduces new text reference notation !string/<resource_name>
to refer a string resource on the fly.

This notation is mainly used to represent action key labels may refer
a string in a system locale in run-time.

This notation is needed to implement Hinglish and Serbian-Latin
keyboards that need to refer its own action key labels.

Bug: 17169632
Bug: 9687668
Change-Id: I042f6bd04714e0e448cd92031730eb9fb422e6d3
2014-09-25 18:27:23 +09:00
Jean Chalard e38043849e Fix a bug where mic/emoji key wouldn't work.
Bug: 17272902
Bug: 17269948
Change-Id: I561609fa84a6265f8148db7d2411bc1fd38dd163
2014-08-26 22:06:21 +09:00
Jean Chalard 85ddfe1317 Revert "Revert "[ML1] Introduce RichInputMethodSubtype""
This reverts commit a63d0a8ee6.

This patch seems to be fine after all, but was submitted without its companion [ML1.1] patch causing a build breakage. Reverting the revert and submitting both at the same time seems like the right thing to do.

Change-Id: Ib8fefa40b74dcee0edb025a52dac9b35c82d49df
2014-08-25 04:42:15 +00:00
Jean Chalard a63d0a8ee6 Revert "[ML1] Introduce RichInputMethodSubtype"
This reverts commit 8ffe4bc932.

Change-Id: I9d4c98b0adfdb78b0f4d376f7691e50d1bd2228f
2014-08-22 09:40:27 +00:00
Jean Chalard 8ffe4bc932 [ML1] Introduce RichInputMethodSubtype
Bug: 11230254
Change-Id: Ic7a1bf938a5a186dcff527b556295aba2406e8b9
2014-08-22 16:34:27 +09:00
Tadashi G. Takaoka 03a1c442ae Clean up compatible utility classes
Change-Id: I95a682052037d292801477db0f05e04926b61412
2014-08-04 01:21:29 +00:00
Yohei Yukawa 3895d7f8dc Additional subtype ID should be independent of OS-version
This CL consolidates the initialization logic for additional
subtypes so that each additional subtypes can have predictable
subtype ID regardless of OS version.

Previously subtype IDs for additional subtypes are calculated
differently depending on the running OS version with hoping it
minimizes the risk of compatibility issues.  However, it is
getting harder and harder to maintain slightly different
logic between OSes. Thus we decided to unify the logic into
that in KitKat even though it may causes some breaking changes.

Note that the actual extra values that are used to instantiate
InputMethodSubtype object are still determined on the fly
depending on the running OS version. However these actual
extra values are no longer used for the subtype ID calculation.

BUG: 16000850
Change-Id: Id3c262386a7bc7ed75966b1395a50171abe550d3
2014-07-04 15:08:58 +09:00
Tadashi G. Takaoka a91561aa58 Use Java 7 diamond operator
Change-Id: If16ef50ae73147594615d0f49d6a22621eaf1aef
2014-05-24 01:05:42 +09:00
Jean Chalard f091c491ea [IL135] Make getCurrentAutoCapsState private
Bug: 8636060
Change-Id: I800aefe6fee4c14df6fe5abe21b2387c69abb8f5
2014-04-14 21:09:32 +09:00
Jean Chalard ddc163988a [IL134] Add an alternative path to getCurrentAutoCapsState
Bug: 8636060

Change-Id: I959e13d34910adad028ed6174f92029ff690eeeb
2014-04-14 21:09:32 +09:00
Tadashi G. Takaoka 7dd32dfc06 Remove country name from space bar text when appropriate
Remove country name from space bar text when there no other subtype
that is a same language and a same keyboard layout.

Bug: 8084704
Change-Id: I7c785a925ff7a0a61e5d009f138e1df52b3aeb3a
2014-04-02 12:50:52 +09:00
Tadashi G. Takaoka 8e3c585265 Make NeedsToDisplayLanguage as a top level class
Change-Id: Ia05e0494a9dccebfb5c1316479e52f04cf2ae444
2014-03-28 17:59:57 +09:00
Tadashi G. Takaoka 393efd94e5 Rename text resources consistently
- keylabel_<key>, the key label text of the <key>
- keyspec_<key>, the key specification of the <key>
- keyhintlabel_<key>, the hint label text of the <key>
- morekeys_<key>, the more keys specifications of the <key>
- additional_morekeys_<key>, the additional more keys specification of
  the <key>

Change-Id: Ib2127f21fa33a2568e8a6eba65cfdb2cf78b480e
2014-03-25 13:02:09 +09:00
Tadashi G. Takaoka df39eb6961 Consolidate KeyboardTextsSet.setLocale and loadStringResoucres
Change-Id: Idaf8f0d80fdeef4f1430f11d4083366e8ab7f6e0
2014-03-20 18:55:03 +09:00
Tadashi G. Takaoka 6007a1b7a9 Refactor KeyboardTextsSet class
Change-Id: Ibb59a9d4902db9ec0e00244304be9ab35b215a50
2014-03-20 18:38:59 +09:00
Tadashi G. Takaoka 53b62fe7d0 Add KeyboardTextsSetTests
- Text "label_to_alpha_key" needed to implement Emoji keyboard exists.
- Test the text from resources are loaded correctly.

Bug: 13017434
Change-Id: Idfb9ac87c1556c535ebc10eaef78d8166799a657
2014-02-25 12:24:55 +09:00
Tadashi G. Takaoka 7ae6721ffa Remove RTL aware !code and add corresponding !text
Change-Id: I9021c8fa1cf2d4ac07579237a939c15551509a0b
2014-02-13 17:32:09 +09:00
Tadashi G. Takaoka a9e1db6636 Merge "Decimal number is treated as outputText" 2014-02-07 09:26:04 +00:00
Tadashi G. Takaoka 3bbd50c36b Use SubtypeLocaleUtils.isRtlLanguage
Change-Id: Ic0208412cd9c02975641cb5c448d092f28786746
2014-02-06 18:15:32 +09:00
Tadashi G. Takaoka 4a64ad9538 Decimal number is treated as outputText
Change-Id: I9d4a8ac5dd26a7c41fcfbe1842a40f347a2f2aab
2014-02-06 16:30:12 +09:00
Tadashi G. Takaoka f7d8b8fcbc Treat a sole "|" as a special case of key label
Change-Id: Ia72c31d15c891fa522935ba9792e88fd5d8ce7f7
2014-02-05 17:57:44 +09:00
Tadashi G. Takaoka d9c6b33209 Add null check to KeySpecParser
Change-Id: Ic37db8cbf8f83f753d7381e1edba8eac1ef1ceb1
2014-02-05 17:49:26 +09:00
Tadashi G. Takaoka 2151216c09 Rename base test class KeySpecParserTestsBase
Change-Id: I41e1ccb3f0cfde4e5ae311a763e5659e5ff71d3c
2014-02-05 14:55:36 +09:00
Tadashi G. Takaoka 853e8d8869 Add KeySpecParser unit test
Change-Id: Ie1c32daecefc2909e58056f515631cbd7de687f7
2014-02-04 19:01:45 +09:00
Tadashi G. Takaoka e855093f55 Move some methods to MoreKeySpec class
Change-Id: I025ed15e36ac3113db6a5fccefa0c87f016703fa
2014-01-31 20:19:48 +09:00
Tadashi G. Takaoka 0bae2ab460 Refactor KeyboardTextsSet class
Change-Id: I0b48c85aa2c291e1e7ee25d61c558700fc677e29
2014-01-31 16:31:07 +09:00
Ken Wakasa 2fa3693c26 Reset to 9bd6dac470
The bulk merge from -bayo to klp-dev should not have been merged to master.

Change-Id: I527a03a76f5247e4939a672f27c314dc11cbb854
2013-12-13 17:13:32 +09:00
Satoshi Kataoka e3150664ae Revert "Remove symbols shifted layout related code"
This reverts commit 1cd027850b.

Bug: 9059539

Change-Id: I1880b799e2d0f148ae913f13cffa1b8cac48be60
2013-09-04 16:27:34 +09:00
Satoshi Kataoka 5169937dd4 Revert "Revert "Support Emoji keyboard""
Window resizing junkiness is addressed in I605e657c9468

This reverts commit aabc972338.

Change-Id: I0bc0f1ad9a90799e643fe9ec35f5b4bbe94eee0d
2013-08-30 19:46:10 +09:00
Ken Wakasa aabc972338 Revert "Support Emoji keyboard"
This reverts commit d7791a93b0.

Change-Id: I5ca4c0227f97540e8a22b487b5056dfa3611082b
2013-08-30 07:23:42 +00:00
Tadashi G. Takaoka d7791a93b0 Support Emoji keyboard
Bug: 6370846
Change-Id: I33ce8f952799c89929996a226ac17731a953ec2a
2013-08-29 19:48:34 +09:00
Tadashi G. Takaoka 1cd027850b Remove symbols shifted layout related code
This is a follow up of I7fe6520e4e.

Bug: 9059539
Change-Id: Idb39906ddb1e2234a0d1c7c4d5e6fc728090e79e
2013-08-24 00:07:23 +09:00
Tadashi G. Takaoka 0c3a9b549c Make RunInLocale as top-level class
Change-Id: I07ed606b7aba098a5be85533e5baff300b21fb44
2013-07-24 16:00:25 +09:00
Tadashi G. Takaoka b80cc628ff Fix KeySpecParserSplitTests
Change-Id: Icf4525c735cda0330a3bd0f9628165ec722b64a8
2013-07-23 19:29:33 +09:00
Tadashi G. Takaoka f87e8f7ec1 Handling key repeat by emulating key press and code input
This change also eliminates a reference of
AudioAndHapticFeedbackManager from KeyboardSwitcher and MainKeyboard.

Bug: 6522943
Change-Id: Iac42ec8ff00c66deb76a660ffc07477923a58959
2013-07-02 19:50:34 +09:00
Ken Wakasa e28eba5074 Move util classes to the latin/utils directory
Change-Id: I1c5b27c8edf231680edb8d96f63b9d04cfc6a6fa
2013-06-24 17:04:40 +09:00
Tadashi G. Takaoka 9552badf3c Add CODE_CAPSLOCK for long press shift key
This change utilizes the no panel auto more key feature to implement
long press shift key for shift lock.

Change-Id: I3995d25dc35aea3c67b5aa29299815462eff9cad
2013-06-04 18:20:06 +09:00
Tadashi G. Takaoka 2a9882a433 Rename methods for readability
Change-Id: I8fc2c90cf8d3dce11740f8e61edf6dfde9b1c116
2013-06-03 17:52:21 +09:00
Tadashi G. Takaoka 94af6d9e7f Merge "Make unit test independent from test device locale" 2013-05-28 11:48:09 +00:00
Tadashi G. Takaoka 35091716e7 Fix unit test assert helper method
Change-Id: Id03bf0910708d07b45286dccf8f2bfc97a362ba0
2013-05-28 20:39:39 +09:00
Tadashi G. Takaoka 8586a43424 Make unit test independent from test device locale
Bug: 9112465
Change-Id: I4fe39bebf130799397485dbe6d23199a29a8641e
2013-05-28 20:24:15 +09:00