aboutsummaryrefslogtreecommitdiffstats
path: root/java (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Initial successful standalone buildAmin Bandali2025-01-114-2/+73
|
* Explicitly keep default constructor in rules without membersChristoffer Adamsen2025-01-081-7/+28
| | | | | | | | | | | | R8 implicitly keeps the default constructor when no member rules are specified. Future versions of R8 will require apps to explicitly keep the default constructors that are required for the build to work. This conservatively changes all keep rules that currently keep the default constructor to explicitly keep the default constructor. Future work will attempt to tighten up the rules that do not require the default constructor to be kept. Bug: 373579455 Test: existing Change-Id: Idbadcd81d516f851cc9bfa1333d76f1036803291
* Fix crash: NPE in SuggestionStripView in LatinIMEZiqi Chen2024-12-111-0/+3
| | | | | | | The first parameter in `GestureDetector.OnGestureListener#onScroll` might be null, which indicates an incomplete event stream or error state. https://developer.android.com/reference/android/view/GestureDetector.OnGestureListener#onScroll(android.view.MotionEvent,%20android.view.MotionEvent,%20float,%20float) Bug: 383053077 Change-Id: I6e49ae353beafb6585184fa729041570991f240c
* Fix bug: AOSP keyboard is shown incompletely in Android V landscape modeZiqi Chen2024-11-264-8/+27
| | | | | | | | | | Root cause: The AOSP keyboard uses `DisplayMetrics#widthPixels` to calculate the keyboard width and draw keys. Since Android 15’s edge-to-edge enforcement, this property now returns the full screen width, including window insets. This results in an incorrectly large key width calculation. Fix: Subtract window insets including system bar and display cutout from the width. Change-Id: Iea01ba749a48145cf5b484dc22a570874b1b7ca4 Test: use `m LatinIME` to install the AOSP keyboard and test landscape mode manually Bug: 377594757
* Fully qualify @attr reference to android.R fieldPaul Duffin2024-10-077-99/+99
| | | | | | | | | | | | | | | | | Currently, Metalava has some special handling of '@attr ref R.<field>` references to make sure that they are fully qualified, i.e. `@attr ref android.R.<field>`. That special handling complicates Metalava and is blocking some flagged API work so will be removed. Before that can be done, the existing incorrect documentation needs to be cleaned up. This change cleans up those cases in this repo. Bug: 371997321 Test: Run `m offline-sdk-docs` before and after to make sure that there are no differences. Flag: DOCS_ONLY Change-Id: Ic3d959fd8e95ac4524be5feb93feae3a08389370
* Merge "LatinIME: Fix Implicit PendingIntent Vulnerability" into mainTreehugger Robot2024-07-031-1/+7
|\
| * LatinIME: Fix Implicit PendingIntent Vulnerabilitytechyminati2024-06-191-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | * checkTimeAndMaybeSetupUpdateAlarm method created an Implicit PendingIntent vulnerability, which may cause security threats in the form of denial-of-service, private data theft, and privilege escalation. * PendingIntents are Intents delegated to another app to be delivered at some future time. Creating an implicit intent wrapped under a PendingIntent is a security vulnerability that might lead to denial-of-service, private data theft, and privilege escalation. * We've used FLAG_IMMUTABLE (added in SDK 23) to create PendingIntents for SDK > 23, This prevents apps that receive the PendingIntent from filling in unpopulated properties & Ensures that PendingIntent is only delivered to trusted components. Test: m Change-Id: I68a1f3f2d81138e42092cc201d36e5d29853a86e Signed-off-by: techyminati <sinha.aryan03@gmail.com>
* | Baseline NewApi issuesCole Faust2024-01-101-13/+22
|/ | | | | | | | | | | | | | NewApi is a lint check that you don't call framework methods that were introduced in versions later than your min_sdk_version. We want to make this an error, so we're baselineing all existing issues. This cl was generated automatically, by taking all the NewApi issues from the reference baselines, and all the non-NewApi issues from the existing checked in baselines. Bug: 268261262 Test: Presubmits Change-Id: If1b1214da673fec9f1e8bede86d5780a6b5f347b
* List baseline_filename on modules that are implititly using itCole Faust2023-12-201-0/+3
| | | | | | | | | | | | | | | | lintable modules currently pick up files named "lint-baseline.xml" to use as the lint baseline implicitly. This is confusing because you could end up using the baseline files in more modules than intended. Lint also has a feature where it requests you remove unnecessary findings from the baseline file, so something could be necessary for one module, but unnecessary for another that accidentally picked up the baseline. We're removing the implicit detection of the baseline file, which requires all modules using it to list the baseline file explicitly. Bug: 272769514 Test: Presubmits Change-Id: Ib640f0642fbb12b96309ce518a505376dda01cb4
* Merge "Fix erroneous LXX theme text color mappings" into mainTreehugger Robot2023-12-071-2/+2
|\
| * Fix erroneous LXX theme text color mappingsGeorg Veichtlbauer2023-08-231-2/+2
| | | | | | | | | | | | | | keyTextInactivatedColor and functionalTextColor were wrongly assigned, eventhough correct definitions already exist. Change-Id: I06694447ee22fb609267aa2256a36a2585ad6b3f
* | Merge "Add required flag to receivers in LatinIME" into udc-devMichael Groover2023-03-141-4/+19
|\ \
| * | Add required flag to receivers in LatinIMEMichael Groover2023-03-091-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android T allows apps to declare a runtime receiver as not exported by invoking registerReceiver with a new RECEIVER_NOT_EXPORTED flag; receivers registered with this flag will only receive broadcasts from the platform and the app itself. However to ensure developers can properly protect their receivers, all apps targeting U and registering a receiver for non-system broadcasts must specify either the exported or not exported flag when invoking registerReceiver; if one of these flags is not provided, the platform will throw a SecurityException. This commit updates the dictionary receivers with the RECEIVER_NOT_EXPORTED flag since these are only sent from the local app. The HIDE_SOFT_INPUT receiver is flagged with the RECEIVER_EXPORTED flag since it can be sent by any app with the corresponding permission. Bug: 234659204 Test: Build Change-Id: I2b9a1360e0eb1c1965c07cc71dca9f11eb153517
* | | Baseline NewApi issuesCole Faust2023-03-091-32/+12
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | NewApi was recently updated to support linting methods in the system, module_lib, and system_server sdks, and was demoted to a warning due to the new issues it finds. Baseline all the new issues that NewApi can be made an error again. These cls were generated automatically by a script that copied the NewApi issues from the reference baselines. Bug: 268261262 Test: m lint-check Change-Id: I99bb901018da30f39cf799ac6c939863266cee34
* | Merge "Fix errorprone warnings that should be errors" am: 6d585ed76c am: ↵Treehugger Robot2022-10-172-2/+2
|\| | | | | | | | | | | | | | | | | 78a43f6c9c am: ce22ebc557 Original change: https://android-review.googlesource.com/c/platform/packages/inputmethods/LatinIME/+/2256807 Change-Id: I0b54d410fdabe3424e0eff31153048e474e93923 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| * Fix errorprone warnings that should be errorsCole Faust2022-10-172-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Declaring package visibility needs for LatinIMERhed Jao2022-09-211-1/+9
| | | | | | | | | | | | | | | | Bug: 179783492 Bug: 179783499 Bug: 216823971 Test: atest LatinIMETests Change-Id: I309ffefe261049a5d3abce8e16829cd66f9123dc
* | Merge "Fix array-related errorprone warnings" am: 370d41de92 am: 3a06d6180b ↵Treehugger Robot2022-08-241-1/+3
|\| | | | | | | | | | | | | | | | | am: e546038cdf am: 51466cffd6 am: 2549e988db Original change: https://android-review.googlesource.com/c/platform/packages/inputmethods/LatinIME/+/2186538 Change-Id: Idd10a3df6c0a34fe3d14d493a8af5b64338f298f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| * Merge "Fix array-related errorprone warnings"Treehugger Robot2022-08-241-1/+3
| |\
| | * Fix array-related errorprone warningsCole Faust2022-08-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ArrayEquals, ArrayHashCode, ArrayToString, and ArraysAsListPrimitiveArray errorprone findings were demoted from errors to warnings. Fix existing occurrences of them so they can be made errors again. Bug: 242630963 Test: RUN_ERROR_PRONE=true m javac-check Change-Id: I689397a7196277de3fd301836e72f7555e2036cb
* | | Make DownloadOverMeteredDialog not exportedWilson Wu2022-08-101-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DownloadOverMeteredDialog is exported which may allow a app to prompt this dialog to ask the user to download dictionary. Since the app can control the download dictionary size and may show an incorrect size for user to make security concern. Make the activity not exported for apps to launch. Bug: 236688064 Test: Manual test as follow steps: 1. lunch aosp_bramble-userdebug and flash 2. Verify the AOSP keyboard work properly 3. Launch the PoC test app 4. Verify the DownloadOverMeteredDialog cannot be launched Change-Id: I9be92ba2813e7aaad0ef10555f585c5c8a25361f
* | Remove unused method for dictionarypackWilson Wu2022-02-231-54/+0
| | | | | | | | | | | | | | | | | | Remove the showDictionaryAvailableNotification method since there is no module use it. Bug: 209479751 Test: presubmit Change-Id: I4c88b4a2d0cb36761d9102ce35260f93303625d9
* | Remove flag to ignore user settings from haptic feedbackLais Andrade2022-01-171-2/+1
|/ | | | | | | | | The keyboard key-press haptic feedback should follow the user settings for "Touch feedback". Bug: 185351540 Test: manual Change-Id: I718d3bf15b1ef841a869a898038d0eca1eca78f0
* Using IME context to inflate layout from S_V2Ming-Shin Lu2022-01-121-19/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With CL[1],[2] to migrate InputMethodService as the subclass of the new introduced class WindowProviderService in S_V2, IME context resources can be managed by associating the window container of IME window when its display/window configuration changed. So we can get rid of createDisplayContext logic from S_V2 with gated by SDK version and refining the method of get IME context with documentation to make it clear. [1]: Ie565e30ed5dd3f2cfe27355a6dded76dc3adc14b [2]: I64a1614f32d097785915f6105b1813a929e0fe32 Bug: 213118079 Bug: 133825283 Test: manual with below steps 1) adb install -r EditTextVariations.apk 2) tapas LatinIME 3) make 4) adb install -r out/target/product/generic/system/app/LatinIME/\ LatinIME.apk 5) adb shell ime enable com.android.inputmethod.latin/.LatinIME 6) adb shell ime set com.android.inputmethod.latin/.LatinIME 5) Enable screen auto-rotation 7) Launch EditTextVariations from launcher's shortcut 8) Tap the first EditText field to show IME 9) Rotate the device to the landscape mode 10) Expect the IME should not be shrunk Change-Id: If2cc1c5bdb257a9c0af653fa7157cf781a90bf1d
* Fix Keyboard Theme update when device orientation changedMing-Shin Lu2021-06-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As CL[1] introduces diplayContext to address IME service context's Resources / DisplayMetrics update when switching IME window to another display after onConfigurationChange. In LatinIME#onInitializeInterface, we only update keyboard theme context and displayContent when the displayId is changed, but overlooked even the displayId is the same, the display context's resource configuration might changed like the device orientation changd. It leads getDefaultKeyboardHeight will get wrong config_max_keyboard_height fraction value when rotating to landcape because the context resources didn't get updated. Add a check to update keyboard theme context when the current display configuation is changed accordingly. [1]: I0ed6a079af1ed90c75fee1d36d5ce3ef3c41f8ed Fix: 186507147 Test: manual as issue steps 1) Turn on auto-rotate 2) Open Settings 3) Rotating the device to landscape mode 4) Tap “Search settings", verify if the soft-keyboard shown and the size is expected. Change-Id: I288a31baf04fa2e63d6b4a14ad81b401cb36ece5 Merged-In: I288a31baf04fa2e63d6b4a14ad81b401cb36ece5
* Bump targetSdkVersion to "30"Yohei Yukawa2021-06-152-4/+4
| | | | | | | | | | | | | | | | | | With this CL, versionCode, targetSdkVersion and minSdkVersion will be bumped/set as follows: versionCode: 28 -> 30 targetSdkVersion: 28 -> 30 minSdkVersion: 21 As far as we know, there should be no user-visible behavior change on supported OS versions. Fix: 189558760 Test: manually verified that LatinIME still is functional Change-Id: I3a7deb452960b370f5290f3d1bac9c79fe935303 Merged-In: I4bf7588c62fb77bf78d4afcb665e9bfbbef53966 (cherry picked from commit 360052f3044eee612af1cbfcd1f2e202096e3541)
* Add lint baseline to address NewApi errorsPedro Loureiro2021-04-121-0/+81
| | | | | | | | | | | We are enabling a new lint check where the min sdk != compile sdk. It has produced a lot of errors and adding the baseline file(s) allows us to continue work without introducing more problems. Bug: 150847901 Test: m lint-check Change-Id: Ic37bd8c531af7e68c939ce9c05614c37e6699b03
* [LSC] Add LOCAL_LICENSE_KINDS to packages/inputmethods/LatinIMEBob Badour2021-02-171-0/+19
| | | | | | | | | | | | | | | | | | | | | | 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
* Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)Xin Li2020-08-27580-153463/+153861
|\ | | | | | | | | | | Bug: 166295507 Merged-In: Ic072c06935a52c466d43fe4787cee7c7da73756c Change-Id: Ia56c511912ee213555b170faf292f1640d90cb75
| * Merge "Add an exported flag in manifest" am: 2e60c56ea9 am: 6f1b6d7a94Treehugger Robot2020-03-311-90/+103
| |\ | | | | | | | | | Change-Id: Ia32701aa3b3b6b6eb0f87df614ed68ba75d1d385
| * \ Merge "Implement text entry key API for accessibility services in AOSP ↵Automerger Merge Worker2019-12-043-16/+4
| |\ \ | | | | | | | | | | | | | | | | | | | | Keyboard" am: c3eafcb756 am: fc2bc10530 Change-Id: Ie3e94bbd0401ddabb489b0bcf6e7f6fc6be8f0c0
| * \ \ Merge "Support polytonic Greek diacritics in the Greek keyboard" am: ↵Alex Henrie2019-11-253-27/+199
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f64e2769b7 am: fa276af7df am: 9b45f98e23 Change-Id: I9e2f744204ceae36d092d2b95526e5c956f7c14f
| * \ \ \ Merge "Import translations. DO NOT MERGE"TreeHugger Robot2019-11-101-1/+1
| |\ \ \ \
| | * | | | Import translations. DO NOT MERGEBill Yi2019-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iee2e651ebfd028b235b428939964b1b532427e78 Auto-generated-cl: translation import
| * | | | | Merge "Import translations. DO NOT MERGE"TreeHugger Robot2019-11-101-1/+1
| |\ \ \ \ \
| | * | | | | Import translations. DO NOT MERGEBill Yi2019-11-101-1/+1
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5f46ed0024412fbf2b1e5d549ac4f5747ba10ead Auto-generated-cl: translation import
| * | | | | Merge "Import translations. DO NOT MERGE"TreeHugger Robot2019-11-102-6/+6
| |\ \ \ \ \
| | * | | | | Import translations. DO NOT MERGEBill Yi2019-11-102-6/+6
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2688babc5d396ae65481a97b186e52c7c3dafbc9 Auto-generated-cl: translation import
| * / / / / Import translations. DO NOT MERGEBill Yi2019-11-101-1/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | Change-Id: I237d2997fb1314302be85530c6b6bc710426b36b Auto-generated-cl: translation import
| * | | | Import translations. DO NOT MERGEBill Yi2019-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I096635ffb38bb645e04c4ed143cece7ce68b6ddc Auto-generated-cl: translation import
| * | | | Import translations. DO NOT MERGEBill Yi2019-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia7e18aa418d665e934f39dfbebb4696a10fd129a Auto-generated-cl: translation import
| * | | | Import translations. DO NOT MERGEBill Yi2019-10-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I82449a197920db5447cdf46cc3f7f4f2549d949d Auto-generated-cl: translation import
| * | | | Merge "Import translations. DO NOT MERGE"TreeHugger Robot2019-10-1282-115945/+115945
| |\ \ \ \
| | * | | | Import translations. DO NOT MERGEBill Yi2019-10-1282-115945/+115945
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic47ec88c6b88d291d340ab2573a034b872ccdf7f Auto-generated-cl: translation import
| * | | | | Merge "Import translations. DO NOT MERGE"TreeHugger Robot2019-10-1283-83/+83
| |\ \ \ \ \
| | * | | | | Import translations. DO NOT MERGEBill Yi2019-10-1283-83/+83
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id69b811277253a6bde5bcbc3c3a35f2ef65af4cd Auto-generated-cl: translation import
| * | | | | Merge "Import translations. DO NOT MERGE"TreeHugger Robot2019-10-1284-15876/+15876
| |\ \ \ \ \
| | * | | | | Import translations. DO NOT MERGEBill Yi2019-10-1284-15876/+15876
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic64f5bdff1583cc41c1ce0d34195503671708c9b Auto-generated-cl: translation import
| * | | | | Merge "Import translations. DO NOT MERGE"TreeHugger Robot2019-10-1283-664/+664
| |\ \ \ \ \
| | * | | | | Import translations. DO NOT MERGEBill Yi2019-10-1283-664/+664
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0473ea031a34f87b909238ddce678796dbf8252b Auto-generated-cl: translation import