Commit Graph

1204 Commits (main)

Author SHA1 Message Date
maia arson crimew 7aab3f949e make gradle buildable
many tears were shed in this process
2022-03-23 13:52:05 +01:00
Bob Badour f3d9532a32 [LSC] Add LOCAL_LICENSE_KINDS to packages/inputmethods/LatinIME
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  common/Android.bp
  java/Android.bp
  native/dicttoolkit/Android.bp
  native/jni/Android.bp
  tests/Android.bp
  tools/EditTextVariations/Android.bp
  tools/dicttool/Android.bp
  tools/make-keyboard-text/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I440008bffac5c97a2497970af377a9d03262b6d8
2021-02-17 09:46:27 -08:00
Treehugger Robot e04480b68b Merge "Mark liblatinime_unittests as unit_test:true to run in presubmit in CI" 2021-02-17 10:24:20 +00:00
Julien Desprez b19114e93b Mark liblatinime_unittests as unit_test:true to run in presubmit in CI
This will ensure that the target stays green.
Note: we will clean up the explicit unit_tests:true once cc_test default is changed.

Change-Id: I5153ca918e94b370b1f08289118877d209385ba2
Test: presubmit
Bug: 180014759
2021-02-16 18:31:04 +00:00
Adrian Roos 8b3d8f48e1 Fix broken liblatinime_unittests
Change-Id: I95021965ecc2699fbce01ed0552dd28fed7f8fe4
Merged-In: I95021965ecc2699fbce01ed0552dd28fed7f8fe4
Fixes: 180014759
Test: atest liblatinime_unittests --host
2021-02-16 17:49:08 +00:00
Seigo Nonaka 0c549e7424 Update language to comply with Android’s inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: tapas LatinIME && m
Change-Id: Ic06f948c023a091e1532db826a78dd01031d7205
2020-07-31 11:28:59 -07:00
Jeff Sharkey 1d9bf42009 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Change-Id: I171bc299e660f96f20041a67a3052bd8a2ed781c
2020-07-31 09:33:35 -06:00
Orion Hodson 54c4f2afb5 Add explicit dependencies on jni_headers
Preparation for removing implicit include paths for jni.h from soong.

Bug: 152482542
Test: lunch aosp_x86_64 && m checkbuild
Change-Id: Ib36e679819a3309ccbf12fd592309b16c8bbd6c8
2020-04-13 17:15:59 +01:00
Anton Hansson 575340c674 Merge "Move LatinIME and its lib to /product" am: 149b9d4f6e am: 84d156b1e6
am: d894eec1ee

Change-Id: Ib7cdb0007c22934f7736cd02c02e0f9358f889d4
2019-01-14 02:11:11 -08:00
Anton Hansson 1c429e3a09 Move LatinIME and its lib to /product
This app is frequently overriden by proprietary apps
on shipping devices, so move it to /product along with
its jni library.

Bug: 122353713
Test: launch keyboard on aosp_arm64 emulator
Change-Id: Ied8c1e6133b67e28da76b0e48254e2e2e0ed15bf
2019-01-11 15:20:31 +00:00
Chih-Hung Hsieh f7b80bb317 Merge "Fix performance-for-range-copy warnings" am: db2e4888f8 am: 947f8ee063
am: 535cd61e63

Change-Id: Ic8ee8523a644b283ef0c9592bb66bf09ca541485
2018-12-11 16:36:28 -08:00
Chih-Hung Hsieh 895bf97d22 Fix performance-for-range-copy warnings
Bug: 30413223
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance*
Change-Id: I06021a6597705515dc7a3cb81a7fbbac7ba344a1
2018-12-11 10:40:46 -08:00
Dan Willemsen a23407bf62 Convert to Android.bp
See build/soong/README.md for more information.

Test: cd packages/inputmethods/LatinIME; mma
Change-Id: Ib8867d3b74f09fc1d9f95adc9a49a81ac0f7f054
Merged-In: Ib8867d3b74f09fc1d9f95adc9a49a81ac0f7f054
2018-11-01 23:09:33 +00:00
Dan Willemsen 22ebec6e2e Convert to Android.bp
See build/soong/README.md for more information.

Test: cd packages/inputmethods/LatinIME; mma
Change-Id: Ib8867d3b74f09fc1d9f95adc9a49a81ac0f7f054
2018-10-31 21:49:02 -07:00
Chih-Hung Hsieh 17116a6ce8 Merge "Add noexcept to move constructors and assignment operators." am: 61d3a1d39b am: 587239f195
am: 9c58fe67f0

Change-Id: I926433188e61eef7f4947167e51b1afae407d9fc
2018-10-05 12:43:33 -07:00
Chih-Hung Hsieh 66a88a5eae Add noexcept to move constructors and assignment operators.
Bug: 116614593
Test: build with WITH_TIDY=1
Change-Id: Ic2a04f82f36c2f7fe43109a7a74270044d227789
2018-09-25 14:32:36 -07:00
Yohei Yukawa 3d74fc73a8 Fix lint warnings in LatinIME JNI code
This CL addresses compiler warnings when building libjni_latinime.so
with NDK from Android Studio.

There should be no behavior change.

Bug: 110741422
Bug: 110757803
Test: tapas LatinIME LatinIMETests arm64 userdebug && make -j
Change-Id: Icc711dd46511a167b1fd90028552def5b2f9941f
2018-07-25 17:11:00 -07:00
Yohei Yukawa f4131e3f53 Deprecate host-side C++ test in LatinIME
Host-side C++ test in LatinIME is no longer actively used and is
actually not compatible with Android Studio build.

Let's just remove this for now.

Bug: 13754552
Bug: 110741422
Test: compile
Change-Id: I3e81285fe559022e1a296051036e74d2f2afbf9c
2018-07-25 14:38:58 -07:00
Chih-Hung Hsieh fab2c3c0ea Use -Werror in packages/inputmethods/LatinIME/native/jni
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I6b91302908e147077bb4fd0a8718c39357337133
2017-11-02 10:18:54 -07:00
Chih-Hung Hsieh 1da7b0c5bb Use -Werror in packages/inputmethods/LatinIME/native/jni
* Suppress warning on unused loop index variable.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: Ia3f0f9cc4cb0ebeeac9b1ff51955597a725c87ef
2017-10-20 15:19:55 -07:00
Lennart Wieboldt afca081fc3 Remove LOCAL_CLANG
clang is the default compiler since Android nougat

Change-Id: I52d7f1ded227b21cd88d2d292f0af4adecb800f4
Signed-off-by: Lennart Wieboldt <lennart.1997@gmx.de>
2017-09-11 20:23:18 +02:00
Elliott Hughes 8fd22fa494 Rely on the platform -std default.
Bug: http://b/32019064
Test: builds
Change-Id: I17611b6d9598992bd52cf3dc93509f0f5e0bdcde
2016-10-07 15:41:05 -07:00
Dan Albert a4e9383971 Stop mixing and matching platform and NDK.
The library was being built with the NDK, but the test is being built
with the platform, in this case building against the NDK STL headers
and then using the platform library, which are not ABI compatible.

Bug: http://b/27801981
Change-Id: I7386dfe6ac73334d7c1b1e0cbc8dc346c84313bf
2016-03-22 17:06:45 -07:00
Dan Albert 4b43b8798c am 9ce2d0bb: am 06e62ab2: am cc47075c: Merge "Remove uses of libcxx.mk."
* commit '9ce2d0bb3702f2854e612cb743f4c508dd590981':
  Remove uses of libcxx.mk.
2015-03-27 23:31:41 +00:00
Dan Albert 48fc8fde2f Remove uses of libcxx.mk.
This is a no-op.

Change-Id: I982883f994303ba622546b5c6cd0e935a354cde8
2015-03-27 11:27:24 -07:00
Keisuke Kuroyanagi 88bc312ad3 Move dictionary code to top level dictionary dir.
Bug: 18725954
Change-Id: Ia442ba4b5d84311057d83edf6e7aeb151d6a820b
2014-12-17 16:02:09 +09:00
Keisuke Kuroyanagi 0bb038a19d Remove needless include.
Bug: 18725954
Change-Id: I3c823fda1b7daf41d82b118d9495f5f2356a1a5e
2014-12-15 18:54:42 +09:00
Keisuke Kuroyanagi 5e1b225082 Add missing error check in TrieMap.
Bug: 18725954
Change-Id: I8fcb0d15dda3f823a4575fe707bcdec57ff5e89b
2014-12-15 18:53:22 +09:00
Keisuke Kuroyanagi ad546afbaa Remove dependency on jni.h from WordProperty.
Bug: 18725954
Change-Id: Ic97d3a56b036ff042322c9f794504064046fd7d7
2014-12-15 18:09:45 +09:00
Keisuke Kuroyanagi 52e92f812b Merge "Quit auto-correct explicit accented letters to base letters." 2014-12-09 10:24:56 +00:00
Keisuke Kuroyanagi 515c508135 Quit auto-correct explicit accented letters to base letters.
Bug: 7677193
Change-Id: I66eddbf27a9db8682c0347a1be19922792a3bea7
2014-12-09 19:23:27 +09:00
Keisuke Kuroyanagi 60021bbdc2 Enable Quadgram for personalized dicts.
Before:
Total words: 1134659, Success Num: 944709, Success Percentage: 83.259%
Bad Failures, with auto-correction (typed word == expected word, output word != expected word): 1258, Bad Failure Percentage: 0.111%
Failures, with auto-correction (F-C): 28013, F-C Percentage: 2.469%
Max Keystrokes: 6072844, Min Keystrokes: 3347332, Keystroke Saving Percentage:44.880%

After:
Total words: 1134665, Success Num: 945026, Success Percentage: 83.287%
Bad Failures, with auto-correction (typed word == expected word, output word != expected word): 1271, Bad Failure Percentage: 0.112%
Failures, with auto-correction (F-C): 27756, F-C Percentage: 2.446%
Max Keystrokes: 6072850, Min Keystrokes: 3290996, Keystroke Saving Percentage:45.808%

Change-Id: I16af52a3e9c371b95fd6f0741f45ee6b2443bea6
2014-11-25 19:07:13 +09:00
Keisuke Kuroyanagi 78212a6d3d Use enum to specify ngram type.
Change-Id: Ie28768ceadcd7a2d940c57eb30be7d4c364e509f
2014-11-25 19:07:10 +09:00
Jean Chalard 2a3ed8c988 Fix the base character of D with stroke
Bug: 18436480
Change-Id: Ic92cae7c85c07c8f62a5b6e69d2b71e204aff50d
2014-11-19 17:26:00 +09:00
Ken Wakasa fc81196741 Revert "Follow up to https://android-review.googlesource.com/114561"
This reverts commit 64d3f78ee5 per https://android-review.googlesource.com/114664

Change-Id: I2acab828d41e79847db72f8d2677c12173a323b6
2014-11-17 22:18:03 +00:00
Ken Wakasa 64d3f78ee5 Follow up to https://android-review.googlesource.com/114561
Looks like unbundled builds need to use --hash-style=sysv for the
sake of compatibility

Change-Id: Ia7b3a1cc3b2c91a8628551888a74925926dff855
2014-11-17 18:29:13 +09:00
Keisuke Kuroyanagi 580420d21b Implement IntArrayView::split for dicttoolkit.
Bug: 10059681
Change-Id: Ic29e79d049bb532727cf5cb1e529fec5d35156ed
2014-11-11 15:06:48 +09:00
Keisuke Kuroyanagi b23f03488f Merge "Use reference instead of pointer for WordProperty()." 2014-11-10 18:32:24 +00:00
Keisuke Kuroyanagi 7d5420aa5e Make profiler use getTimeInMicroSec().
Bug: 17797064
Change-Id: Ie992c9454edfc3bf93d5ea367c3a4427b513a205
2014-11-11 01:38:49 +09:00
Keisuke Kuroyanagi bbf0d4141b Use reference instead of pointer for WordProperty().
Change-Id: Idf03e97661d64186c752e35964d641a5528be5b1
2014-11-10 09:15:11 +09:00
Keisuke Kuroyanagi 2cf5550749 Fix: BoS prediction after inputting just once.
Change-Id: Ib69569ab6b6edfcc8c1d2c621b95de4127789ab6
2014-11-01 17:58:22 +09:00
Keisuke Kuroyanagi b3bae2e89b Merge "Update v4 format version from 402 to 403." 2014-10-31 14:19:44 +00:00
Keisuke Kuroyanagi ef931546a0 Merge "Add hacks for better handling count value during migration." 2014-10-31 13:53:57 +00:00
Keisuke Kuroyanagi a88c9682fc Merge "Change v403 historical info format." 2014-10-31 13:38:38 +00:00
Keisuke Kuroyanagi ea468cc9de Update v4 format version from 402 to 403.
Without personalization:
Total words: 1134774, Success Num: 899230, Success Percentage: 79.243%
Bad Failures, with auto-correction (typed word == expected word, output word != expected word): 1871, Bad Failure Percentage: 0.165%
Failures, with auto-correction (F-C): 29084, F-C Percentage: 2.563%
Max Keystrokes: 6072959, Min Keystrokes: 4436090, Keystroke Saving Percentage:26.953%

Before:
Total words: 1134646, Success Num: 925194, Success Percentage: 81.540%
Bad Failures, with auto-correction (typed word == expected word, output word != expected word): 1316, Bad Failure Percentage: 0.116%
Failures, with auto-correction (F-C): 28288, F-C Percentage: 2.493%
Max Keystrokes: 6072831, Min Keystrokes: 3946188, Keystroke Saving Percentage:35.019%

After
Total words: 1134659, Success Num: 944746, Success Percentage: 83.263%
Bad Failures, with auto-correction (typed word == expected word, output word != expected word): 1258, Bad Failure Percentage: 0.111%
Failures, with auto-correction (F-C): 28016, F-C Percentage: 2.469%
Max Keystrokes: 6072844, Min Keystrokes: 3387333, Keystroke Saving Percentage:44.222%

Change-Id: I3af42ec37a11847c0429c28616e726f6a339247f
2014-10-31 17:23:39 +09:00
Keisuke Kuroyanagi c611989929 Add hacks for better handling count value during migration.
Bug: 14425059
Change-Id: Ib050574aa7c4babd4285322a11c3af9be9fbab1e
2014-10-31 17:22:13 +09:00
Keisuke Kuroyanagi 2383575d2d Change v403 historical info format.
count -> 2B, level -> 0B.

Change-Id: I3b241126f56eb33cdf09cb1ebfed04f534e4ec48
2014-10-31 17:22:13 +09:00
Adrian Velicu 009e02ce4a Further fixes to treat 0-frequency words
Previously, when both legitimate 0-frequency words (such as
distracters) and offensive words were encoded in the same
way, distracters would never show up when the user blocked
offensive words (the default setting, as well as the setting
for regression tests).

When b/11031090 was fixed and a separate encoding was used
for offensive words, 0-frequency words would no longer be
blocked when they were an "exact match" (where case
mismatches and accent mismatches would be considered an
"exact match"). The exact match boosting functionality meant
that, for example, when the user typed "mt" they would be
suggested the word "Mt", although they most probably meant
to type "my".

For this reason, we introduced this change, which does the
following:
* Defines the "perfect match" as a really exact match, with
no room for case or accent mismatches
* When the target word has probability zero (as "Mt" does,
because it is a distracter), ONLY boost its score if it is a
perfect match.

By doing this, when the user types "mt", the word "Mt" will
NOT be boosted, and they will get "my". However, if the user
makes an explicit effort to type "Mt", we do boost the word
"Mt" so that the user's input is not autocorrected to "My".

Bug: 11031090
Change-Id: I92ee1b4e742645d52e2f7f8c4390920481e8fff0
2014-10-31 15:58:50 +09:00
Adrian Velicu 10416241f7 Block offensive words in multi-word suggestions
If the user has chosen to block offensive words and types
"aaaxbb", where "aaa" is an offensive word and "bb" is not,
we should not suggest "aaa bb".

Bug: 11031090
Change-Id: Ie23b8dd5d347bc26b1c046c3f5e8dfbc259bf528
2014-10-31 15:58:50 +09:00
Adrian Velicu aa20342d7e Merge "Using "blacklist" flag as "possibly offensive"" 2014-10-31 06:49:29 +00:00