Commit Graph

448 Commits

Author SHA1 Message Date
Aleksandras Kostarevas
3efcbf730f Update tests 2024-09-19 14:20:57 +03:00
Aleksandras Kostarevas
601470747e Port Devanagari layouts 2024-09-19 09:49:08 +03:00
Aleksandras Kostarevas
0ce2c7352b Port 20 layouts to new system and fix some inconsistencies 2024-09-18 18:47:04 +03:00
Aleksandras Kostarevas
b8fc09e25c Calculate settings/punctuation morekeys based on coord 2024-08-28 19:57:20 +03:00
Aleksandras Kostarevas
19eb332fba Fix incorrect order for parenthesis morkeys 2024-08-28 09:40:11 +03:00
Aleksandras Kostarevas
a8baad4877 Fix issues with some locale texts 2024-08-24 10:54:45 +03:00
Aleksandras Kostarevas
084dec1a47 Add punctuation on period key for Arabic and Persian 2024-08-01 15:44:48 +03:00
Aleksandras Kostarevas
7e0234cb22 Fix missing morekeys in default layout causing null to be morekey 2024-07-24 22:13:36 +03:00
Aleksandras Kostarevas
c9dc656fbf Update keyboard texts for many languages to separate misc keys
This was done by looking at characters listed on the Wikipedia language recognition chart[0] for each language, finding the last character in the array that the language uses and splitting the rest off into misc. This was partially automated, but there is potential that there may be errors for some languages. All of the keys should still be there if misc keys are enabled, so the keyboard should still be usable for all affected languages even if there were errors, if misc keys are enabled.

[0] https://en.wikipedia.org/wiki/Wikipedia:Language_recognition_chart
2024-07-24 21:42:44 +03:00
Aleksandras Kostarevas
c4fe18eb62 Update KeyboardTextsTable template 2024-07-24 21:35:10 +03:00
Aleksandras Kostarevas
c2246e8ba0 Remove old make-keyboard-text files to reduce confusion 2024-07-24 21:34:17 +03:00
Aleksandras Kostarevas
db82511d92 Add README for make-keyboard-text-py 2024-07-24 21:32:49 +03:00
Aleksandras Kostarevas
68f7f4251a Update punctuation to be more similar to other keyboards 2024-07-24 21:23:38 +03:00
Aleksandras Kostarevas
b2d3107357 Fix Arabic missing diacritics 2024-07-23 17:11:04 +03:00
Aleksandras Kostarevas
4c04bb8375 Add missing superscripts and subscripts 2024-07-13 04:20:04 +03:00
Aleksandras Kostarevas
1756bde713 Update some popular layouts with new moreKeys system 2024-07-13 03:53:25 +03:00
Aleksandras Kostarevas
dd0ba32804 Update settings categories. Add option for customizing long-press key layout. Draw icon key hints
The texts for more keys have been updated:
* morekeys_a should now include only letters relevant to the active language
* morekeys_misc_a should include misc letters (accents, etc) not specifically needed for typing in the language

The above still needs to be applied to most other languages. Only QWERTY has been updated with the new morekeys system. Other layouts still need to be updated.
2024-07-07 21:25:36 +03:00
Aleksandras Kostarevas
6bf523010d Create Python version of the make-keyboard-text tool
The Python version uses json files, separate from the xml files. Comments haven't been migrated still.

I'm still not very happy with the way the keyboard texts are managed and that it requires running a separate tool to generate a .java file. It's at least better than manually editing an autogenerated file as before, and python3 is more widely available than the archaic Android build system
2024-06-25 12:55:24 +03:00
abb128
434f8b6b27 Initial working build of fork 2023-07-06 21:57:49 +03:00
Cole Faust
91cb9a6acf Fix errorprone warnings that should be errors
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:

BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower

See https://errorprone.info/bugpatterns for more
information on the checks.

Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I454a105ae82484a2d19aff1808e8d9dd55ba64f4
2022-10-17 11:01:42 -07:00
Ming-Shin Lu
f134ea3848 EditTextVariations: create a IME focusable overlay for test
Bug: 228766370
Test: manual by using EditorTextVariations tool
     1) make and install EditTextVariations
     2) Enable "Settings > Display over other apps" for
        EditTextVariations
     3) Launch EditTextVariations from all apps
     4) Menu -> Show IME focuable overlay
     5) Go to home screen by gesture or pressing home key
     6) Launch any app (e.g. Chrome) and tap the editor
     7) Expect IME can show up

Change-Id: Ib4b72e0a277d8b2fb78837bed5d2e9cccd819a07
2022-04-21 16:42:23 +08:00
TreeHugger Robot
ee855c281c Merge "Add Notification Permission for T" 2022-01-27 06:33:05 +00:00
Wilson Wu
75f77d6666 Add Notification Permission for T
From T, apps need POST_NOTIFICATION permission
to send the notification.

-. Add the permission into Manifest.
-. Request runtime permission when it's needed.

Bug: 209479751
Test: Manual test as following steps:
      1. Open EditTextVariations at T device.
      2. Tap direct reply to send notification.
      3. Verify the permission dialog show up.
      4. Send the notification if permission granted.
Change-Id: Iadae00f635ee556d1d1de9abbb9da0498b4070f1
2022-01-26 19:09:10 +08:00
Steve Elliott
a5ed00d252 add post_notification permission to manifest
so the package can send notifications on T+

Bug: 194833441
Change-Id: Iafb56ebd788f1dcd98320dc6c250ca8f585fcab3
2021-12-08 19:02:06 +00:00
Ming-Shin Lu
ed13b1971d Make direct-reply notification as HUN in EditTextVariations
Also, set the content intent to launch an editorActivity as the message
notifiation when tapping the notification.

Bug: 190057993
Test: make EditTextVariations, manual test by using EditTextVariations
      app to simulate the issue step.
Change-Id: I1a4463dc44031eaebb286ad2a289870e97a1c475
2021-06-10 14:32:51 +00: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
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
Ashwini Oruganti
7c1b5497f2 Add an exported flag in manifest
With b/150232615, we will need an explicit value set for the exported
flag when intent filters are present, as the default behavior is
changing for S+. This change adds the value reflecting the previous
default to the manifest.

These changes were made using an automated tool, the xml file may be
reformatted slightly creating a larger diff. The only "real" change is
the addition of "android:exported" to activities, services, and
receivers that have one or more intent-filters.

Bug: 150232615
Test: TH
Exempt-From-Owner-Approval: mechanical refactoring
Change-Id: Idc43e262fd2911e19f0bcd20add29e4c3392d3da
2020-03-23 16:23:26 -07:00
Yohei Yukawa
bdf7d6f56d Support testing Direct Reply with EditTextVariations on API 24/25
This is a follow up CL to my previous CL [1], which enabled us to test
Direct-Reply with EditTextVariations.

What this CL does are:

 * Specyfing min_sdk_version to avoid INSTALL_FAILED_OLDER_SDK error
   when installing on older devices.
 * Avoiding NoSuchMethodError on pre-O devices where
   Notification.Builder does not have a constructor that takes
   notification channel.
 * Fixing a race condition where notification can be sent before
   notification channel is created.

 [1]: Iafffcc7d138b0f502116a5e557f0c3f17e9d0b73
      da2486fd63

Bug: 122957841
Test: Made sure that we can install EditTextVariations on N devices
      and "Direct-Reply" on EditTextVariations works there.
Change-Id: Ib4fbd447608b111e763fde4287226cf7e206e65e
2019-02-05 22:46:42 -08:00
Yohei Yukawa
da2486fd63 Support testing Direct Reply with EditTextVariations
With this CL, EditTextVariations is able to send Direct Repply
notification so that we can easily test IME behaviors there.

You don't need to set up a chat application then let it receive a
message from someone else any more just to test IME behaviors on
Direct Reply.

Fix: 122957841
Test: manually done as follows.
  1. tapas EditTextVariations
  2. make -j
  3. adb install -r \
     $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk
  4. Open EditTextVariations
  5. Tap the menu icon.
  6. Select "Direct Reply"
  7. Make sure that there is a Direct Reply notification.
Change-Id: Iafffcc7d138b0f502116a5e557f0c3f17e9d0b73
2019-01-16 10:28:07 -08: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
Tadashi G. Takaoka
b6301306fa Merge "Fix dicttool build" am: a92d0f9262 am: 438a303732
am: 6aed05232b

Change-Id: I558fb5ff22a7428d1d82eac82b4caba469ed48d4
2018-10-31 09:24:08 -07:00
Tadashi G. Takaoka
6a1b37353d Fix dicttool build
This CL partially reverts
  - Id88b02b74bdfe4ca05b08181ceb6b34d5652fc0c
  - I05c7d8429e8d9a26139456763c77997340fea8c2
And followup (remove shortcut support)
  - I73b7dc008a5acaf75a31a36a2d332b5afabd82d0

Bug: 28255684
Test: make -j10 dicttool_aosp
Change-Id: I2e01ed86b9517a1141aee35ea6d8ef39258981d1
2018-10-29 15:59:05 +09:00
Yohei Yukawa
f97da47c02 Opensource a test tool called EditTextVariations
This CL opensouces a testing tool called EditTextVariations that has
been used internally to test IME behaviors on various
EditorInfo#inputType and EditorInfo#imeOptions.

Bug: 80039502
Test: Manually verified as follows.
 1. tapas EditTextVariations
 2. make -j
 3. adb install -r $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk
Change-Id: Ia87e655573c2fd1fc09d56e4af90bfb1dfd65f9b
2018-05-22 10:31:28 -07:00
Dan Willemsen
5977a3cb18 Merge "Clean up Makefiles, remove HOST_JDK_IS_64BIT_VERSION"
am: 3669fbc4c9

Change-Id: Ibfbc1f11eac0870a5eec7211c868fdcb38f395e0
2017-07-26 20:42:35 +00:00
Dan Willemsen
6e29475b9f Clean up Makefiles, remove HOST_JDK_IS_64BIT_VERSION
This builds on Darwin fine, so remove the non-standard darwin checks.

Remove HOST_JDK_IS_64BIT_VERSION, it's always true now, and this is the
only user.

Test: mmm packages/inputmethods/LatinIME/tools/dicttool:liblatinime-aosp-dicttool-host
Change-Id: I750c6baa29cf1d27a885ff064f0daf9d986db0b9
2017-07-26 10:59:15 -07:00
Roozbeh Pournader
35ed8068ef Rename language+country resources to just language
Bug: 26496609
Test: none
Change-Id: I3eb7d265cc3c5ebbbc4ef737deb24f099757e821
2017-01-10 20:25:51 -08:00
Paul Duffin
982f0fa29f Use junit-host instead of junit
Use framework/junit-host.jar instead of framework/junit.jar

Ran the script before and after making the change and it failed
in the same way with a build error but it was not due to a
problem with JUnit.

Bug: 30188076
Test: make checkbuild and ran the test-dicttool.sh script
Change-Id: I4cdd518f38184ff3ade5a06d968d6902770ece6b
2016-11-30 11:24:59 +00: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
Tadashi G. Takaoka
b0a0ce0b31 Remove unused import and local variable
Change-Id: I256d1c6bf96c07b10d2d063d7935e20e0ab8ea17
2014-11-28 11:53:12 +09:00
Adrian Velicu
9f46834839 dicttool header to read stream exhaustively
Change-Id: I50a286c115f5bd6e93763bd2f79031676d6fffd8
2014-11-11 18:10:26 -08:00
Adrian Velicu
1e72f9da12 Dicttool to handle unpackaging non-latest version dicts
Change-Id: I738735186213b3a40eff997ae2fd83069c6445f1
2014-11-11 16:35:04 -08:00
Adrian Velicu
0691f29d36 Merge "Making 'dicttool header' output format version" 2014-11-11 01:34:36 +00:00
Adrian Velicu
8e394ffcf4 Making 'dicttool header' output format version
Change-Id: I4198f6b463711feb4ab78020934cca4d23870fbb
2014-11-08 10:35:37 +09:00
Jean Chalard
5b91b551e5 Move util classes under common
Also why did we have two copies of LocaleUtils >.>

Bug: 18108776
Change-Id: I03b4403dfd51934e66b567f2f8b87da419cfb3ab
2014-11-07 18:00:03 +09:00
Jean Chalard
536bf61658 Merge "Remove dicttool dependency to NativeSuggestOptions" 2014-11-07 06:00:40 +00:00
Jean Chalard
e1652d7570 Fix the build : move offdevice tests in an off device file
Also fix a failing test

Change-Id: I280aa6b5836c7332da08a88f1258546edeb25a37
2014-11-06 22:33:57 +09:00
Jean Chalard
03eb9de961 Remove dicttool dependency to NativeSuggestOptions
Bug: 18108776
Change-Id: I0f57594617f8d5080aea9002b2356d18bfe97043
2014-11-06 21:38:11 +09:00
Jean Chalard
5b33d197ba Add a header command to dicttool.
This will allow to greatly improve the performance of the
metadata-generating files, as they won't have to wait for
the info command to read the entire dictionary when the
header is all we need.

Also add tests, and while we're at it, use the seed as
intended to enable reproducible tests.

Change-Id: I0ba79ef62f0292b23e63aed57ff565bb102281a2
2014-11-06 18:50:59 +09:00
Jean Chalard
f6b0e32df3 Add a *FAST* dictionary header reader.
It's still unused as of this change but the next change will use it

As a reference point, generating the metadata for Bayo takes
3'02" on my machine with the info command; it's down to 16" if
made to use this instead. The gains increases with the number
of dictionaries obviously.

Change-Id: I0eeea2d8f81bb74b0d1570af658e91b56f7c2b79
2014-11-06 13:17:08 +09:00