From fb3b9360d70596d7e921de8bf7d3ca99564a077e Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Tue, 10 Dec 2024 11:54:39 -0500 Subject: Initial successful standalone build --- java/Android.mk | 50 ++++++++++++++++++++++ java/AndroidManifest_SdkVersion.xml | 20 +++++++++ .../KeyboardAccessibilityNodeProvider.java | 2 +- .../inputmethod/latin/utils/ResourceUtils.java | 3 +- 4 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 java/Android.mk create mode 100644 java/AndroidManifest_SdkVersion.xml (limited to 'java') diff --git a/java/Android.mk b/java/Android.mk new file mode 100644 index 000000000..875aad4f9 --- /dev/null +++ b/java/Android.mk @@ -0,0 +1,50 @@ +# Copyright (C) 2011 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE_TAGS := optional + +LOCAL_SRC_FILES := $(call all-java-files-under, src) + +LOCAL_PACKAGE_NAME := LatinIME + +LOCAL_CERTIFICATE := shared + +LOCAL_FULL_LIBS_MANIFEST_FILES := \ + $(LOCAL_PATH)/AndroidManifest.xml \ + $(LOCAL_PATH)/AndroidManifest_SdkVersion.xml + +LOCAL_JNI_SHARED_LIBRARIES := libjni_latinime + +LOCAL_STATIC_JAVA_LIBRARIES := \ + android-common jsr305 latinime-common + +LOCAL_STATIC_ANDROID_LIBRARIES := \ + androidx.legacy_legacy-support-v4 + +LOCAL_USE_AAPT2 := true + +# Do not compress dictionary files to mmap dict data runtime +LOCAL_AAPT_FLAGS := -0 .dict + +# Include all the resources regardless of system supported locales +LOCAL_AAPT_INCLUDE_ALL_RESOURCES := true + +LOCAL_SDK_VERSION := current + +LOCAL_PROGUARD_FLAG_FILES := proguard.flags + +include $(BUILD_PACKAGE) diff --git a/java/AndroidManifest_SdkVersion.xml b/java/AndroidManifest_SdkVersion.xml new file mode 100644 index 000000000..a843e83bb --- /dev/null +++ b/java/AndroidManifest_SdkVersion.xml @@ -0,0 +1,20 @@ + + + + + + diff --git a/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java b/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java index 7266aa88a..cc244c305 100644 --- a/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java +++ b/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java @@ -236,7 +236,7 @@ final class KeyboardAccessibilityNodeProvider // Obtain and initialize an AccessibilityNodeInfo with information about the virtual view. final AccessibilityNodeInfoCompat info = AccessibilityNodeInfoCompat.obtain(); info.setPackageName(mKeyboardView.getContext().getPackageName()); - info.setTextEntryKey(true); + // info.setTextEntryKey(true); info.setClassName(key.getClass().getName()); info.setContentDescription(keyDescription); info.setBoundsInParent(boundsInParent); diff --git a/java/src/com/android/inputmethod/latin/utils/ResourceUtils.java b/java/src/com/android/inputmethod/latin/utils/ResourceUtils.java index f799be750..37b34751a 100644 --- a/java/src/com/android/inputmethod/latin/utils/ResourceUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/ResourceUtils.java @@ -25,6 +25,7 @@ import android.text.TextUtils; import android.util.DisplayMetrics; import android.util.Log; import android.util.TypedValue; +import android.view.Window; import android.view.WindowInsets; import android.view.WindowManager; import android.view.WindowMetrics; @@ -188,7 +189,7 @@ public final class ResourceUtils { } public static int getDefaultKeyboardWidth(final Context context) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { // Since Android 15’s edge-to-edge enforcement, window insets should be considered. final WindowManager wm = context.getSystemService(WindowManager.class); final WindowMetrics windowMetrics = wm.getCurrentWindowMetrics(); -- cgit v1.2.3-83-g751a