mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-07 22:47:29 +00:00
chore(core): Merge remote-tracking branch 'origin/master' into chore/core/mesonversion
This commit is contained in:
commit
95aa92ff9a
917 changed files with 20235 additions and 22484 deletions
263
HISTORY.md
263
HISTORY.md
|
|
@ -1,5 +1,143 @@
|
|||
# Keyman Version History
|
||||
|
||||
## 17.0.41 alpha 2023-02-02
|
||||
|
||||
* chore(web): main web build & test script rework to our common script format + nomenclature (#7474)
|
||||
* change(web): conversion to standard filesystem layout: source -> src, intermediate + release -> build (#7513)
|
||||
* change(web): conversion to standard filesystem layout: testing -> src/test/manual, unit_tests -> src/test/auto (#7515)
|
||||
* change(web): conversion to standard filesystem layout: tools -> src/tools (#7556)
|
||||
* chore(web): updates build product references, extracts CI test-build scripts (#7831)
|
||||
* feat(common): TS-based sourcemap remapping tool (#7894)
|
||||
* feat(web): implements shell scripting for CI release-build configurations (#8001)
|
||||
|
||||
## 17.0.40 alpha 2023-02-01
|
||||
|
||||
* chore(developer): kmcmpdll debug src path (#8127)
|
||||
* chore(common): Merge end of beta from Sprint A17S5 (#8135)
|
||||
* refactor(android): Change com.tavultesoft.kmea package to com.keyman.engine (#7981)
|
||||
* refactor(android/engine): Split KMInAppKeyboardWebViewClient to new class (#7983)
|
||||
* refactor(android/engine): Refactor KMSystemKeyboardWebViewClient (#7993)
|
||||
|
||||
## 17.0.39 alpha 2023-01-31
|
||||
|
||||
* feat(windows): add additional registry keys to report (#8126)
|
||||
|
||||
## 17.0.38 alpha 2023-01-30
|
||||
|
||||
* chore(deps): bump ua-parser-js from 0.7.31 to 0.7.33 (#8109)
|
||||
* fix(linux): Fix CI build (#8121)
|
||||
|
||||
## 17.0.37 alpha 2023-01-27
|
||||
|
||||
* chore(linux): Fix warnings (#8103)
|
||||
* chore(linux): Remove legacy projects (#8102)
|
||||
* Specify the path to the Debian package in the Vcs-Git header (#8104)
|
||||
|
||||
## 17.0.36 alpha 2023-01-26
|
||||
|
||||
* chore(common): Add crowdin strings for Kannada (#8074)
|
||||
|
||||
## 17.0.35 alpha 2023-01-25
|
||||
|
||||
* chore(common): revise tag variable name to VERSION_GIT_TAG (#8063)
|
||||
* chore(common): Add crowdin strings for Czech (#8070)
|
||||
* feat(linux): Improve uninstallation (#8011)
|
||||
|
||||
## 17.0.34 alpha 2023-01-24
|
||||
|
||||
* chore: merge beta to alpha, end of A17S4 (#8065)
|
||||
|
||||
## 17.0.33 alpha 2023-01-23
|
||||
|
||||
* chore: Xcode 14.2 update (#8015)
|
||||
|
||||
## 17.0.32 alpha 2023-01-20
|
||||
|
||||
* fix(ios): use mobile mode for keyboard download pages (#8042)
|
||||
* docs(common/resources): Update configure step in Docker readme (#8034)
|
||||
* fix(linux): JSON File missing after installation (#8040)
|
||||
|
||||
## 17.0.31 alpha 2023-01-19
|
||||
|
||||
* chore: git tag with release@semver (#8035)
|
||||
* fix(linux): Properly set context after changing IP (#8026)
|
||||
* chore(linux): use faster zero-length string check (#8037)
|
||||
* chore(linux): log failures to `km_kbp_context_clear(context)` (#8036)
|
||||
* chore(linux): Update recommended extension (#8038)
|
||||
|
||||
## 17.0.30 alpha 2023-01-17
|
||||
|
||||
* chore(linux): Fix vertical alignment of label (#8016)
|
||||
* fix(common): update sentry release identifiers to support semver (#8031)
|
||||
|
||||
## 17.0.29 alpha 2023-01-16
|
||||
|
||||
* fix(linux): Fix crash (un-)installing shared keyboard (#8020)
|
||||
* chore(linux): Don't report KeyboardInterrupt to Sentry (#8021)
|
||||
* chore(linux): Update sample settings (#8018)
|
||||
* feat(linux): Enhance tab completion in km-package-install (#8005)
|
||||
|
||||
## 17.0.28 alpha 2023-01-12
|
||||
|
||||
* feat(linux): Display error messages in the UI (#8006)
|
||||
* bug(linux): Empty keyboard after failed installation (#8008)
|
||||
|
||||
## 17.0.27 alpha 2023-01-11
|
||||
|
||||
* chore(linux): Refactor completion script (#8002)
|
||||
|
||||
## 17.0.26 alpha 2023-01-10
|
||||
|
||||
* feat(linux): Add Back button to "Download Keyman Keyboards" dialog (#7994)
|
||||
* feat(linux): List fonts in the uninstall confirmation dialog (#7995)
|
||||
|
||||
## 17.0.25 alpha 2023-01-09
|
||||
|
||||
* chore(linux): Remove unnecessary variable (#7988)
|
||||
|
||||
## 17.0.24 alpha 2023-01-06
|
||||
|
||||
* chore(common/resources): Add Docker readme (#7980)
|
||||
|
||||
## 17.0.23 alpha 2023-01-03
|
||||
|
||||
* fix(linux): add IBUS_HAS_PREFILTER ifdef to linux/ibus-keyman/tests (#7958)
|
||||
* docs(linux): document fullbuild using docker (#7960)
|
||||
|
||||
## 17.0.22 alpha 2023-01-02
|
||||
|
||||
* chore: merge beta to master (A17S2) (#7948)
|
||||
* chore(linux): Remove unused JENKINS parameter (#7920)
|
||||
|
||||
## 17.0.21 alpha 2022-12-21
|
||||
|
||||
* fix(windows): shutdown fix masked modal result (#7933)
|
||||
|
||||
## 17.0.20 alpha 2022-12-19
|
||||
|
||||
* chore(android/samples): Remove Sentry dependencies (#7901)
|
||||
* chore: Revert "chore(common): Fix shellcheck warnings" (#7925)
|
||||
|
||||
## 17.0.19 alpha 2022-12-17
|
||||
|
||||
* fix(linux): Fix dependency of ibus-keyman (#7918)
|
||||
|
||||
## 17.0.18 alpha 2022-12-16
|
||||
|
||||
* chore(common): Fix shellcheck warnings (#7910)
|
||||
|
||||
## 17.0.17 alpha 2022-12-15
|
||||
|
||||
* chore: merge beta to master (#7885)
|
||||
* chore(android): Update Gradle dependencies; targetSDKVersion to 33 (#7897)
|
||||
|
||||
## 17.0.16 alpha 2022-12-11
|
||||
|
||||
* refactor(linux): Update ibusimcontext.c (#7813)
|
||||
|
||||
## 17.0.15 alpha 2022-12-08
|
||||
|
||||
* chore(linux): Update vscode settings for Linux (#7876)
|
||||
|
||||
## 17.0.14 alpha 2022-12-07
|
||||
|
||||
|
|
@ -10,7 +148,7 @@
|
|||
## 17.0.13 alpha 2022-11-29
|
||||
|
||||
* fix(windows): lower case filenames for projects (#7837)
|
||||
* refactor(linux): Refactor setting keyboard options ️ (#7804)
|
||||
* refactor(linux): Refactor setting keyboard options (#7804)
|
||||
|
||||
## 17.0.12 alpha 2022-11-25
|
||||
|
||||
|
|
@ -18,7 +156,7 @@
|
|||
|
||||
## 17.0.11 alpha 2022-11-24
|
||||
|
||||
* refactor(linux): Use consts instead of strings ️ (#7803)
|
||||
* refactor(linux): Use consts instead of strings (#7803)
|
||||
|
||||
## 17.0.10 alpha 2022-11-21
|
||||
|
||||
|
|
@ -39,14 +177,14 @@
|
|||
|
||||
* chore: fix TIER.md for master (#7704)
|
||||
|
||||
## 17.0.6 beta 2022-11-12
|
||||
## 17.0.6 alpha 2022-11-12
|
||||
|
||||
* chore: merge beta to master B16S1 (#7693)
|
||||
* chore(deps): bump minimatch from 3.0.4 to 3.1.2 (#7675)
|
||||
|
||||
## 17.0.5 alpha 2022-11-11
|
||||
|
||||
* chore(linux): Update debian changelog :cherries: (#7681)
|
||||
* chore(linux): Update debian changelog (#7681)
|
||||
|
||||
## 17.0.4 alpha 2022-11-10
|
||||
|
||||
|
|
@ -67,6 +205,123 @@
|
|||
* chore: move to 17.0-alpha (#7577)
|
||||
* chore: Move to 17.0 alpha
|
||||
|
||||
## 16.0.136 beta 2023-01-31
|
||||
|
||||
* chore(common): Update crowdin strings for Shuwa (Latin) (#8097)
|
||||
* chore(common): Check in crowdin for Russian (#8072)
|
||||
* chore(common): Check in crowdin for Ukrainian (#8073)
|
||||
* chore(common): Add crowdin for Swedish (#8071)
|
||||
* chore(common): Add crowdin strings for Czech (#8095)
|
||||
|
||||
## 16.0.135 beta 2023-01-30
|
||||
|
||||
* chore(linux): Include packaging path in Vcs-Git header (#8110)
|
||||
|
||||
## 16.0.134 beta 2023-01-25
|
||||
|
||||
* chore(common): Add crowdin strings for Kannada (#7970)
|
||||
|
||||
## 16.0.133 beta 2023-01-19
|
||||
|
||||
* fix(linux): Properly set context after changing IP (#8025)
|
||||
|
||||
## 16.0.132 beta 2023-01-18
|
||||
|
||||
* docs(windows): update screenshots and documentation for Keyman for Windows config (#8014)
|
||||
|
||||
## 16.0.131 beta 2023-01-16
|
||||
|
||||
* chore(linux): Don't report KeyboardInterrupt to Sentry (#8022)
|
||||
* fix(linux): Fix crash (un-)installing shared keyboard (#8019)
|
||||
|
||||
## 16.0.130 beta 2023-01-09
|
||||
|
||||
* fix(windows): kmshell -ikl install language and enable keyboard (#7856)
|
||||
|
||||
## 16.0.129 beta 2023-01-06
|
||||
|
||||
* fix(android/engine): Add utility for localized strings (#7976)
|
||||
|
||||
## 16.0.128 beta 2022-12-22
|
||||
|
||||
* fix(developer): force ES3 code generation for LMs (#7927)
|
||||
|
||||
## 16.0.127 beta 2022-12-21
|
||||
|
||||
* fix(oem/fv/android): Fix keyboard version title (again) (#7941)
|
||||
* fix(oem/fv/android): Add view permission of online help (#7909)
|
||||
* fix(windows): modifer event is always serialized (#7935)
|
||||
|
||||
## 16.0.126 beta 2022-12-21
|
||||
|
||||
* fix(windows): shutdown fix masked modal result (#7932)
|
||||
|
||||
## 16.0.125 beta 2022-12-19
|
||||
|
||||
* fix(windows): no languages warning source changed (#7900)
|
||||
|
||||
## 16.0.124 beta 2022-12-18
|
||||
|
||||
* fix(oem/fv/android): Cleanup version title (#7908)
|
||||
|
||||
## 16.0.123 beta 2022-12-17
|
||||
|
||||
* fix(linux): Fix dependency of ibus-keyman (#7917)
|
||||
|
||||
## 16.0.122 beta 2022-12-14
|
||||
|
||||
* fix(windows): modify disable keyboard display (#7898)
|
||||
* fix(developer): invalid charmap cell selection when updating to empty search result (#7887)
|
||||
|
||||
## 16.0.121 beta 2022-12-11
|
||||
|
||||
* chore(linux): Fix `make install` (#7886)
|
||||
|
||||
## 16.0.120 beta 2022-12-07
|
||||
|
||||
* chore(linux): Improve package build (#7875)
|
||||
|
||||
## 16.0.119 beta 2022-12-05
|
||||
|
||||
* chore: Change platform advocates (#7867)
|
||||
|
||||
## 16.0.118 beta 2022-12-04
|
||||
|
||||
* chore(linux): Update debian changelog (#7860)
|
||||
|
||||
## 16.0.117 beta 2022-12-01
|
||||
|
||||
* fix(developer): OnlineUpdate crash on shutdown (#7830)
|
||||
* fix(developer): EncodeURL was not handling spaces (#7820)
|
||||
|
||||
## 16.0.116 beta 2022-11-30
|
||||
|
||||
* fix(android/app): Toggle keyboard update notifications for landscape and tablets (#7832)
|
||||
* fix(android/engine): Append languageID for keyboard updates (#7807)
|
||||
* fix(android/engine): Use FLAG_IMMUTABLE for PendingIntent for Android S+ (#7844)
|
||||
|
||||
## 16.0.115 beta 2022-11-29
|
||||
|
||||
* fix(windows): Cleanup CEF more correctly in shutdown (#7825)
|
||||
* fix(windows): lower case filenames for projects (#7836)
|
||||
* chore(linux): Update debian changelog (#7835)
|
||||
* chore(linux): Fix upload-to-debian script (#7833)
|
||||
|
||||
## 16.0.114 beta 2022-11-28
|
||||
|
||||
* fix(mac): Caps processing was not consistent with core (#7795)
|
||||
* fix(web): locks page scroll when scrolling lang menu (#7790)
|
||||
|
||||
## 16.0.113 beta 2022-11-26
|
||||
|
||||
* docs(android/app): Add note of haptic feedback to whatsnew (#7817)
|
||||
* fix(developer): remove missing files from MRU list (#7821)
|
||||
|
||||
## 16.0.112 beta 2022-11-25
|
||||
|
||||
* fix: test builds should always run latest changes (#7806)
|
||||
* fix(web): unit test breakages (#7797)
|
||||
|
||||
## 16.0.111 beta 2022-11-24
|
||||
|
||||
* fix(android/engine): Make it easier to test keyboard updates (#7781)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
17.0.15
|
||||
17.0.42
|
||||
|
|
@ -6,9 +6,10 @@ buildscript {
|
|||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.2.1'
|
||||
classpath 'io.sentry:sentry-android-gradle-plugin:2.1.0'
|
||||
classpath 'name.remal:gradle-plugins:1.3.1'
|
||||
classpath 'com.android.tools.build:gradle:4.2.2'
|
||||
// sentry-android-gradle-plugin 2.1.5+ requires AGP 7.0
|
||||
classpath 'io.sentry:sentry-android-gradle-plugin:2.1.2'
|
||||
classpath 'name.remal:gradle-plugins:1.5.0'
|
||||
|
||||
// From jcenter() which could be sunset in future
|
||||
// https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
|
||||
|
|
|
|||
|
|
@ -36,13 +36,12 @@ display_usage ( ) {
|
|||
}
|
||||
|
||||
function makeLocalSentryRelease() {
|
||||
local SENTRY_RELEASE_VERSION="release-$VERSION_WITH_TAG"
|
||||
echo "Making a Sentry release for tag $SENTRY_RELEASE_VERSION"
|
||||
echo "Making a Sentry release for tag $VERSION_GIT_TAG"
|
||||
sentry-cli upload-dif -p keyman-android --include-sources
|
||||
sentry-cli releases -p keyman-android files $SENTRY_RELEASE_VERSION upload-sourcemaps ./
|
||||
sentry-cli releases -p keyman-android files $VERSION_GIT_TAG upload-sourcemaps ./
|
||||
|
||||
echo "Finalizing release tag $SENTRY_RELEASE_VERSION"
|
||||
sentry-cli releases finalize "$SENTRY_RELEASE_VERSION"
|
||||
echo "Finalizing release tag $VERSION_GIT_TAG"
|
||||
sentry-cli releases finalize "$VERSION_GIT_TAG"
|
||||
}
|
||||
|
||||
NO_DAEMON=false
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ plugins {
|
|||
id 'com.android.application'
|
||||
id 'io.sentry.android.gradle'
|
||||
// https://github.com/Triple-T/gradle-play-publisher/issues/947#issuecomment-843634852
|
||||
id 'com.github.triplet.play' version '3.5.0' apply false
|
||||
id 'com.github.triplet.play' version '3.7.0-agp4.2' apply false
|
||||
id 'name.remal.default-plugins'
|
||||
}
|
||||
|
||||
|
|
@ -10,8 +10,7 @@ ext.rootPath = '../../'
|
|||
apply from: "$rootPath/version.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
buildToolsVersion "30.0.2"
|
||||
compileSdkVersion 33
|
||||
|
||||
// Don't compress kmp files so they can be copied via AssetManager
|
||||
aaptOptions {
|
||||
|
|
@ -25,7 +24,7 @@ android {
|
|||
defaultConfig {
|
||||
applicationId "com.tavultesoft.kmapro"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 31
|
||||
targetSdkVersion 33
|
||||
|
||||
//println "===DUMPING PROPERTIES==="
|
||||
//dumpProperties(project) // Use this to dump all external properties for debugging TeamCity integration
|
||||
|
|
@ -35,6 +34,7 @@ android {
|
|||
versionCode VERSION_CODE as Integer
|
||||
versionName VERSION_NAME
|
||||
buildConfigField 'String', 'VERSION_ENVIRONMENT', '"'+VERSION_ENVIRONMENT+'"'
|
||||
buildConfigField 'String', 'VERSION_GIT_TAG', '"'+VERSION_GIT_TAG+'"'
|
||||
}
|
||||
|
||||
String env_release_store_file = System.getenv("release_store_file")
|
||||
|
|
@ -148,18 +148,18 @@ repositories {
|
|||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'androidx.appcompat:appcompat:1.3.0-rc01'
|
||||
implementation 'com.google.android.material:material:1.3.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.6.0-rc01'
|
||||
implementation 'com.google.android.material:material:1.6.0'
|
||||
implementation 'com.stepstone.stepper:material-stepper:4.3.1'
|
||||
api(name: 'keyman-engine', ext: 'aar')
|
||||
implementation 'io.sentry:sentry-android:4.3.0'
|
||||
implementation 'androidx.preference:preference:1.1.1'
|
||||
implementation 'io.sentry:sentry-android:6.9.2'
|
||||
implementation 'androidx.preference:preference:1.2.0'
|
||||
implementation "com.android.installreferrer:installreferrer:2.2"
|
||||
|
||||
// Add dependency for generating QR Codes
|
||||
// (Even though it's embedded in KMEA, because we're manually copying keyman-engine.aar,
|
||||
// we "lose" it in the dependency management)
|
||||
implementation ('com.github.kenglxn.QRGen:android:2.6.0') {
|
||||
implementation ('com.github.kenglxn.QRGen:android:2.7.0') {
|
||||
transitive = true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,10 +32,10 @@ import com.android.installreferrer.api.InstallReferrerStateListener;
|
|||
import com.android.installreferrer.api.ReferrerDetails;
|
||||
import com.tavultesoft.kmapro.MainActivity;
|
||||
import com.tavultesoft.kmapro.R;
|
||||
import com.tavultesoft.kmea.KmpInstallMode;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.tavultesoft.kmea.util.KMString;
|
||||
import com.tavultesoft.kmea.util.VersionUtils;
|
||||
import com.keyman.engine.KmpInstallMode;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
import com.keyman.engine.util.KMString;
|
||||
import com.keyman.engine.util.VersionUtils;
|
||||
|
||||
public class CheckInstallReferrer {
|
||||
private static final String TAG = "CheckInstallReferrer";
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import android.content.Intent;
|
|||
import android.os.Bundle;
|
||||
import android.os.ResultReceiver;
|
||||
|
||||
import com.tavultesoft.kmea.KmpInstallMode;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.KmpInstallMode;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
public class DownloadIntentService extends IntentService {
|
||||
private static final String TAG = "DownloadIntentSvc";
|
||||
|
|
|
|||
|
|
@ -6,12 +6,14 @@ package com.keyman.android;
|
|||
|
||||
import com.tavultesoft.kmapro.BuildConfig;
|
||||
import com.tavultesoft.kmapro.KeymanSettingsActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.KMManager.KeyboardType;
|
||||
import com.tavultesoft.kmea.KMHardwareKeyboardInterpreter;
|
||||
import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardEventListener;
|
||||
import com.tavultesoft.kmea.R;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.KMManager.KeyboardType;
|
||||
import com.keyman.engine.KMHardwareKeyboardInterpreter;
|
||||
import com.keyman.engine.KeyboardEventHandler.OnKeyboardEventListener;
|
||||
import com.keyman.engine.R;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.util.DependencyUtil;
|
||||
import com.keyman.engine.util.DependencyUtil.LibraryType;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
|
|
@ -50,10 +52,10 @@ public class SystemKeyboard extends InputMethodService implements OnKeyboardEven
|
|||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
if (!Sentry.isEnabled()) {
|
||||
if (DependencyUtil.libraryExists(LibraryType.SENTRY) && !Sentry.isEnabled()) {
|
||||
Log.d(TAG, "Initializing Sentry");
|
||||
SentryAndroid.init(getApplicationContext(), options -> {
|
||||
options.setRelease("release-"+com.tavultesoft.kmapro.BuildConfig.VERSION_NAME);
|
||||
options.setRelease(com.tavultesoft.kmapro.BuildConfig.VERSION_GIT_TAG);
|
||||
options.setEnvironment(com.tavultesoft.kmapro.BuildConfig.VERSION_ENVIRONMENT);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ import androidx.appcompat.app.ActionBar;
|
|||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.KMManager;
|
||||
|
||||
/**
|
||||
* Settings menu for adjusting the keyboard height. The value for the current device orientation
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ import android.content.Context;
|
|||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
public class BookmarksActivity extends BaseActivity {
|
||||
private static final String TAG = "BookmarksActivity";
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ import android.os.Handler;
|
|||
import android.os.ResultReceiver;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.KmpInstallMode;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.KmpInstallMode;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
package com.tavultesoft.kmapro;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
|
|
|
|||
|
|
@ -21,11 +21,11 @@ import android.webkit.WebViewClient;
|
|||
import android.widget.Toast;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.util.KMPLink;
|
||||
import com.tavultesoft.kmea.util.KMString;
|
||||
import com.tavultesoft.kmea.util.WebViewUtils;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.util.KMPLink;
|
||||
import com.keyman.engine.util.KMString;
|
||||
import com.keyman.engine.util.WebViewUtils;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
|
|
|||
|
|
@ -28,20 +28,21 @@ import android.widget.SimpleAdapter;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.tavultesoft.kmea.ConfirmDialogFragment;
|
||||
import com.tavultesoft.kmea.KMHelpFileActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.KMKeyboardDownloaderActivity;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.data.KeyboardController;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.FileProviderUtils;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.tavultesoft.kmea.util.KMString;
|
||||
import com.tavultesoft.kmea.util.MapCompat;
|
||||
import com.tavultesoft.kmea.util.QRCodeUtil;
|
||||
import com.keyman.engine.ConfirmDialogFragment;
|
||||
import com.keyman.engine.KMHelpFileActivity;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.KMKeyboardDownloaderActivity;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.data.KeyboardController;
|
||||
import com.keyman.engine.util.DependencyUtil;
|
||||
import com.keyman.engine.util.DependencyUtil.LibraryType;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.FileProviderUtils;
|
||||
import com.keyman.engine.util.KMString;
|
||||
import com.keyman.engine.util.MapCompat;
|
||||
import com.keyman.engine.util.QRCodeUtil;
|
||||
|
||||
import static com.tavultesoft.kmea.ConfirmDialogFragment.DialogType.DIALOG_TYPE_DELETE_KEYBOARD;
|
||||
import static com.keyman.engine.ConfirmDialogFragment.DialogType.DIALOG_TYPE_DELETE_KEYBOARD;
|
||||
|
||||
// Public access is necessary to avoid IllegalAccessException
|
||||
public final class KeyboardSettingsActivity extends AppCompatActivity {
|
||||
|
|
@ -198,7 +199,7 @@ public final class KeyboardSettingsActivity extends AppCompatActivity {
|
|||
// If QRGen library included, append the QR code View to the
|
||||
// scrollable listview for sharing keyboard
|
||||
View view = getLayoutInflater().inflate(R.layout.qr_layout, null);
|
||||
if (QRCodeUtil.libraryExists(context)) {
|
||||
if (DependencyUtil.libraryExists(LibraryType.QRCODE)) {
|
||||
LinearLayout qrLayout = (LinearLayout) view.findViewById(R.id.qrLayout);
|
||||
listView.addFooterView(qrLayout);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.tavultesoft.kmapro;
|
|||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ import androidx.preference.PreferenceFragmentCompat;
|
|||
import androidx.preference.PreferenceScreen;
|
||||
import androidx.preference.SwitchPreference;
|
||||
|
||||
import com.tavultesoft.kmea.DisplayLanguages;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.data.Dataset;
|
||||
import com.keyman.engine.DisplayLanguages;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.data.Dataset;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ import android.os.Bundle;
|
|||
import android.widget.SimpleAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.data.KeyboardController;
|
||||
import com.tavultesoft.kmea.util.MapCompat;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.data.KeyboardController;
|
||||
import com.keyman.engine.util.MapCompat;
|
||||
|
||||
public class KeymanSettingsInstallActivity extends AppCompatActivity {
|
||||
private static final String TAG = "SettingsInstallActivity";
|
||||
|
|
@ -51,7 +51,7 @@ public class KeymanSettingsInstallActivity extends AppCompatActivity {
|
|||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
getSupportActionBar().setDisplayShowTitleEnabled(false);
|
||||
|
||||
final ListView listView = findViewById(com.tavultesoft.kmea.R.id.listView);
|
||||
final ListView listView = findViewById(com.keyman.engine.R.id.listView);
|
||||
|
||||
Bundle bundle = getIntent().getExtras();
|
||||
|
||||
|
|
@ -96,9 +96,9 @@ public class KeymanSettingsInstallActivity extends AppCompatActivity {
|
|||
installOptionList.add(hashMap);
|
||||
|
||||
String[] from = new String[]{titleKey, subtitleKey, iconKey};
|
||||
int[] to = new int[]{com.tavultesoft.kmea.R.id.text1, com.tavultesoft.kmea.R.id.text2, com.tavultesoft.kmea.R.id.image1};
|
||||
int[] to = new int[]{com.keyman.engine.R.id.text1, com.keyman.engine.R.id.text2, com.keyman.engine.R.id.image1};
|
||||
|
||||
ListAdapter adapter = new SimpleAdapter(context, installOptionList, com.tavultesoft.kmea.R.layout.list_row_layout2, from, to) {
|
||||
ListAdapter adapter = new SimpleAdapter(context, installOptionList, com.keyman.engine.R.layout.list_row_layout2, from, to) {
|
||||
@Override
|
||||
public boolean isEnabled(int position) {
|
||||
HashMap<String, String> hashMap = installOptionList.get(position);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import com.tavultesoft.kmea.DisplayLanguages;
|
||||
import com.keyman.engine.DisplayLanguages;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
|
@ -48,7 +48,7 @@ public class KeymanSettingsLocalizeActivity extends AppCompatActivity {
|
|||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
getSupportActionBar().setDisplayShowTitleEnabled(false);
|
||||
|
||||
final ListView listView = findViewById(com.tavultesoft.kmea.R.id.listView);
|
||||
final ListView listView = findViewById(com.keyman.engine.R.id.listView);
|
||||
|
||||
Bundle bundle = getIntent().getExtras();
|
||||
|
||||
|
|
@ -69,9 +69,9 @@ public class KeymanSettingsLocalizeActivity extends AppCompatActivity {
|
|||
}
|
||||
|
||||
String[] from = new String[]{titleKey, subtitleKey, iconKey};
|
||||
int[] to = new int[]{com.tavultesoft.kmea.R.id.text1, com.tavultesoft.kmea.R.id.image1};
|
||||
int[] to = new int[]{com.keyman.engine.R.id.text1, com.keyman.engine.R.id.image1};
|
||||
|
||||
ListAdapter adapter = new SimpleAdapter(context, localizeOptionList, com.tavultesoft.kmea.R.layout.list_row_layout1, from, to) {
|
||||
ListAdapter adapter = new SimpleAdapter(context, localizeOptionList, com.keyman.engine.R.layout.list_row_layout1, from, to) {
|
||||
};
|
||||
listView.setAdapter(adapter);
|
||||
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import com.tavultesoft.kmea.KeyboardPickerActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.ModelPickerActivity;
|
||||
import com.tavultesoft.kmea.data.Dataset;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.data.adapters.NestedAdapter;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.KeyboardPickerActivity;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.ModelPickerActivity;
|
||||
import com.keyman.engine.data.Dataset;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.data.adapters.NestedAdapter;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
|
@ -315,7 +315,7 @@ public final class LanguageSettingsActivity extends AppCompatActivity {
|
|||
}
|
||||
|
||||
// Fully details the building of this Activity's list view items.
|
||||
static private class FilteredKeyboardsAdapter extends NestedAdapter<com.tavultesoft.kmea.data.Keyboard, Dataset.Keyboards, String> {
|
||||
static private class FilteredKeyboardsAdapter extends NestedAdapter<com.keyman.engine.data.Keyboard, Dataset.Keyboards, String> {
|
||||
static final int RESOURCE = R.layout.list_row_layout1;
|
||||
|
||||
private static class ViewHolder {
|
||||
|
|
|
|||
|
|
@ -22,11 +22,11 @@ import androidx.appcompat.app.AlertDialog;
|
|||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import com.tavultesoft.kmea.data.Dataset;
|
||||
import com.tavultesoft.kmea.data.adapters.AdapterFilter;
|
||||
import com.tavultesoft.kmea.data.adapters.NestedAdapter;
|
||||
import com.tavultesoft.kmea.KeyboardPickerActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.keyman.engine.data.Dataset;
|
||||
import com.keyman.engine.data.adapters.AdapterFilter;
|
||||
import com.keyman.engine.data.adapters.NestedAdapter;
|
||||
import com.keyman.engine.KeyboardPickerActivity;
|
||||
import com.keyman.engine.KMManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
|
|
|||
|
|
@ -18,29 +18,29 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import com.keyman.android.CheckInstallReferrer;
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.KMHelpFileActivity;
|
||||
import com.tavultesoft.kmea.KMKeyboardDownloaderActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.KMManager.KeyboardType;
|
||||
import com.tavultesoft.kmea.KmpInstallMode;
|
||||
import com.tavultesoft.kmea.KMTextView;
|
||||
import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardDownloadEventListener;
|
||||
import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardEventListener;
|
||||
import com.tavultesoft.kmea.cloud.CloudApiTypes;
|
||||
import com.tavultesoft.kmea.cloud.CloudDownloadMgr;
|
||||
import com.tavultesoft.kmea.cloud.impl.CloudLexicalModelMetaDataDownloadCallback;
|
||||
import com.tavultesoft.kmea.data.CloudRepository;
|
||||
import com.tavultesoft.kmea.data.Dataset;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.data.LexicalModel;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.DownloadFileUtils;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.KMHelpFileActivity;
|
||||
import com.keyman.engine.KMKeyboardDownloaderActivity;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.KMManager.KeyboardType;
|
||||
import com.keyman.engine.KmpInstallMode;
|
||||
import com.keyman.engine.KMTextView;
|
||||
import com.keyman.engine.KeyboardEventHandler.OnKeyboardDownloadEventListener;
|
||||
import com.keyman.engine.KeyboardEventHandler.OnKeyboardEventListener;
|
||||
import com.keyman.engine.cloud.CloudApiTypes;
|
||||
import com.keyman.engine.cloud.CloudDownloadMgr;
|
||||
import com.keyman.engine.cloud.impl.CloudLexicalModelMetaDataDownloadCallback;
|
||||
import com.keyman.engine.data.CloudRepository;
|
||||
import com.keyman.engine.data.Dataset;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.data.LexicalModel;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.DownloadFileUtils;
|
||||
import com.keyman.android.DownloadIntentService;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.tavultesoft.kmea.util.KMPLink;
|
||||
import com.tavultesoft.kmea.util.KMString;
|
||||
import com.tavultesoft.kmea.util.WebViewUtils.EngineWebViewVersionStatus;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
import com.keyman.engine.util.KMPLink;
|
||||
import com.keyman.engine.util.KMString;
|
||||
import com.keyman.engine.util.WebViewUtils.EngineWebViewVersionStatus;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.ProgressDialog;
|
||||
|
|
@ -131,7 +131,7 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
checkSendCrashReport();
|
||||
if (KMManager.getMaySendCrashReport()) {
|
||||
SentryAndroid.init(context, options -> {
|
||||
options.setRelease("release-" + com.tavultesoft.kmapro.BuildConfig.VERSION_NAME);
|
||||
options.setRelease(com.tavultesoft.kmapro.BuildConfig.VERSION_GIT_TAG);
|
||||
options.setEnvironment(com.tavultesoft.kmapro.BuildConfig.VERSION_ENVIRONMENT);
|
||||
});
|
||||
}
|
||||
|
|
@ -353,6 +353,7 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
@SuppressLint("RestrictedApi")
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(final Menu menu) {
|
||||
this.menu = menu;
|
||||
final MenuItem _overflowMenuItem = menu.findItem(R.id.action_overflow);
|
||||
if (_overflowMenuItem != null) {
|
||||
MenuItem updateKeyboards = this.menu.findItem(R.id.action_update_keyboards);
|
||||
|
|
@ -372,8 +373,8 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
}
|
||||
|
||||
final MenuItem _keyboardupdate = menu.findItem(R.id.action_update_keyboards);
|
||||
if (_keyboardupdate != null) {
|
||||
updateUpdateCountIndicator(_keyboardupdate, anUpdateCount, true);
|
||||
if (_keyboardupdate != null && anUpdateCount > 0) {
|
||||
_keyboardupdate.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -452,6 +453,11 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
KMManager.getUpdateTool().executeOpenUpdates();
|
||||
// Dismiss icon
|
||||
updateUpdateCountIndicator(0);
|
||||
final MenuItem _keyboardupdate = menu.findItem(R.id.action_update_keyboards);
|
||||
if (_keyboardupdate != null && _keyboardupdate.isVisible()) {
|
||||
_keyboardupdate.setVisible(false);
|
||||
}
|
||||
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
|
|
|
|||
|
|
@ -18,14 +18,14 @@ import android.widget.Toast;
|
|||
|
||||
import com.stepstone.stepper.StepperLayout;
|
||||
import com.stepstone.stepper.VerificationError;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.KeyboardEventHandler;
|
||||
import com.tavultesoft.kmea.KmpInstallMode;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.packages.PackageProcessor;
|
||||
import com.tavultesoft.kmea.packages.LexicalModelPackageProcessor;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.KeyboardEventHandler;
|
||||
import com.keyman.engine.KmpInstallMode;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.packages.PackageProcessor;
|
||||
import com.keyman.engine.packages.LexicalModelPackageProcessor;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ import androidx.fragment.app.Fragment;
|
|||
|
||||
import com.stepstone.stepper.StepperLayout;
|
||||
import com.stepstone.stepper.VerificationError;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.packages.PackageProcessor;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.packages.PackageProcessor;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,11 +23,11 @@ import androidx.fragment.app.Fragment;
|
|||
import com.stepstone.stepper.BlockingStep;
|
||||
import com.stepstone.stepper.StepperLayout;
|
||||
import com.stepstone.stepper.VerificationError;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.data.KeyboardController;
|
||||
import com.tavultesoft.kmea.packages.PackageProcessor;
|
||||
import com.tavultesoft.kmea.util.BCP47;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.data.KeyboardController;
|
||||
import com.keyman.engine.packages.PackageProcessor;
|
||||
import com.keyman.engine.util.BCP47;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ public final class SelectLanguageFragment extends Fragment implements BlockingSt
|
|||
}
|
||||
|
||||
String[] from = new String[]{titleKey, subtitleKey, iconKey};
|
||||
int[] to = new int[]{R.id.text1, R.id.text2, com.tavultesoft.kmea.R.id.image1};
|
||||
int[] to = new int[]{R.id.text1, R.id.text2, com.keyman.engine.R.id.image1};
|
||||
|
||||
adapter = new KMListAdapter(context, list, R.layout.list_row_layout2, from, to);
|
||||
listView.setAdapter(adapter);
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ import android.widget.TextView;
|
|||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.data.KeyboardController;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.data.KeyboardController;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -87,9 +87,9 @@ public final class SelectPackageActivity extends AppCompatActivity {
|
|||
}
|
||||
|
||||
String[] from = new String[]{titleKey, subtitleKey, iconKey};
|
||||
int[] to = new int[]{com.tavultesoft.kmea.R.id.text1, com.tavultesoft.kmea.R.id.text2, com.tavultesoft.kmea.R.id.image1};
|
||||
int[] to = new int[]{com.keyman.engine.R.id.text1, com.keyman.engine.R.id.text2, com.keyman.engine.R.id.image1};
|
||||
|
||||
ListAdapter adapter = new SimpleAdapter(context, list, com.tavultesoft.kmea.R.layout.list_row_layout2, from, to) {
|
||||
ListAdapter adapter = new SimpleAdapter(context, list, com.keyman.engine.R.layout.list_row_layout2, from, to) {
|
||||
};
|
||||
listView.setAdapter(adapter);
|
||||
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import android.app.Activity;
|
|||
import android.content.Intent;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ import androidx.fragment.app.FragmentManager;
|
|||
import com.stepstone.stepper.Step;
|
||||
import com.stepstone.stepper.adapter.AbstractFragmentStepAdapter;
|
||||
import com.stepstone.stepper.viewmodel.StepViewModel;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.packages.PackageProcessor;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.packages.PackageProcessor;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ import java.net.URL;
|
|||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.util.KMPLink;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.util.KMPLink;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ import androidx.fragment.app.Fragment;
|
|||
import com.stepstone.stepper.BlockingStep;
|
||||
import com.stepstone.stepper.StepperLayout;
|
||||
import com.stepstone.stepper.VerificationError;
|
||||
import com.tavultesoft.kmea.packages.PackageProcessor;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.WebViewUtils;
|
||||
import com.keyman.engine.packages.PackageProcessor;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.WebViewUtils;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/titlebar"/>
|
||||
|
||||
<com.tavultesoft.kmea.KMTextView
|
||||
<com.keyman.engine.KMTextView
|
||||
android:id="@+id/kmTextView"
|
||||
android:background="@drawable/textview_bg"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -30,6 +30,6 @@
|
|||
android:scrollbars="vertical">
|
||||
|
||||
<requestFocus />
|
||||
</com.tavultesoft.kmea.KMTextView>
|
||||
</com.keyman.engine.KMTextView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
|
|||
|
|
@ -45,10 +45,12 @@
|
|||
android:title="@string/action_settings"
|
||||
android:icon="@drawable/ic_settings" />
|
||||
|
||||
<item
|
||||
<!-- hidden until updates available -->
|
||||
<item
|
||||
android:id="@+id/action_update_keyboards"
|
||||
android:title="@string/action_install_updates"
|
||||
app:showAsAction="always"
|
||||
app:actionLayout="@layout/update_count_view"/>
|
||||
android:title="@string/action_install_updates"
|
||||
android:visible="false"
|
||||
android:icon="@drawable/ic_cloud_download" />
|
||||
|
||||
</menu>
|
||||
|
|
|
|||
|
|
@ -45,10 +45,12 @@
|
|||
android:title="@string/action_settings"
|
||||
android:icon="@drawable/ic_settings" />
|
||||
|
||||
<!-- hidden until updates available -->
|
||||
<item
|
||||
android:id="@+id/action_update_keyboards"
|
||||
android:title="@string/action_install_updates"
|
||||
app:showAsAction="always"
|
||||
app:actionLayout="@layout/update_count_view"/>
|
||||
android:id="@+id/action_update_keyboards"
|
||||
app:showAsAction="always"
|
||||
android:title="@string/action_install_updates"
|
||||
android:visible="false"
|
||||
android:icon="@drawable/ic_cloud_download" />
|
||||
|
||||
</menu>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- app_name removed in 16.0 beta. Set in build.gradle -->
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_share" comment="Menu action to send text content to another app">Gassuma</string>
|
||||
<!-- Context: Menu Action -->
|
||||
|
|
|
|||
163
android/KMAPro/kMAPro/src/main/res/values-cs-rCZ/strings.xml
Normal file
163
android/KMAPro/kMAPro/src/main/res/values-cs-rCZ/strings.xml
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- app_name removed in 16.0 beta. Set in build.gradle -->
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_share" comment="Menu action to send text content to another app">Sdílet</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_web" comment="Menu action to open Keyman browser">Webový prohlížeč</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_text_size" comment="Menu action to adjust text size">Velikost textu</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_overflow" comment="Show additional menu items">Více</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_clear_text" comment="Menu action to erase text">Vymazat text</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_info" comment="Menu action to display Keyman help page">Info</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_settings" comment="Menu action to open Settings menu">Nastavení</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_install_updates" comment="Menu notification that keyboard or dictionary updates available">Instalovat aktualizace</string>
|
||||
<!-- Context: Title -->
|
||||
<string name="title_version" comment="Title of Keyman for Android version">Verze: %1$s</string>
|
||||
<!-- Context: Text label when old Chrome version installed -->
|
||||
<string name="text_require_chrome_57" comment="Banner text when old version of Chrome is installed"> Keyman vyžaduje Chrome verze 57 nebo novější.</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="button_update_chrome" comment="Prompt to upgrade Chrome in the Play Store">Aktualizovat Chrome</string>
|
||||
<!-- Context: Textfield prompt (… is the ellipsis character "...") -->
|
||||
<string name="textview_hint" comment="Prompt to start typing">Začněte psát zde…</string>
|
||||
<!-- Context: Splash screen (version/copyright info currently disabled -->
|
||||
<!-- Context: Splash screen (version/copyright info currently disabled -->
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="text_size" comment="Current text size (number)">Velikost textu: %1$d</string>
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="ic_text_size_up" comment="Make text bigger">Velikost textu nahoru</string>
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="ic_text_size_down" comment="Make text smaller">Velikost textu dolů</string>
|
||||
<!-- Context: Clear Text dialog -->
|
||||
<string name="all_text_will_be_cleared" comment="Erase all the text">\nVeškerý text bude vymazán\n</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="get_started" comment="Menu for getting started">Začněte</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="add_a_keyboard" comment="Menu item to add a keyboard">Přidat klávesnici do vašeho jazyka</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="enable_system_keyboard" comment="Menu item to enable Keyman as system keyboard">Povolit klávesnici jako systémovou klávesnici</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="set_keyman_as_default" comment="Menu item to set Keyman as default system keyboard">Nastavit klíč jako výchozí klávesnici</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="more_info" comment="Open the Keyman for Android help page">Více informací</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="show_get_started" comment="Show the "Get Started" menu on startup">Zobrazit \"%1$s\" při spuštění</string>
|
||||
<!-- Context: Android Storage Permission -->
|
||||
<string name="request_storage_permission" comment="Request storage permission to access keyboard packages"> Pro instalaci balíčků klávesnice povolte klávesnici oprávnění ke čtení externího úložiště.</string>
|
||||
<!-- Context: Android Storage Permission -->
|
||||
<string name="storage_permission_denied" comment="Keyboard package installation may fail since Android storage permission not granted"> Žádost o oprávnění k úložišti byla zamítnuta. Může selhat instalace balíčku klávesnice</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="keyman_settings" comment="Settings menu title">Nastavení</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<plurals name="installed_languages">
|
||||
<item quantity="one">Nainstalované jazyky (%1$d)</item>
|
||||
<item quantity="few">Nainstalované jazyky (%1$d)</item>
|
||||
<item quantity="many">Nainstalované jazyky (%1$d)</item>
|
||||
<item quantity="other">Nainstalované jazyky (%1$d)</item>
|
||||
</plurals>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="install_keyboard_or_dictionary" comment="Menu item to install keyboard or dictionary">Instalovat klávesnici nebo slovník</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="change_display_language" comment="Menu action to change interface language">Zobrazit jazyk</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="adjust_keyboard_height" comment="Menu action to adjust keyboard height">Upravit výšku klávesnice</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="spacebar_caption" comment="Menu action to set the spacebar caption">Titulek mezerníku</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_keyboard" comment="Spacebar caption option - keyboard">Keyboard</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_language" comment="Spacebar caption option - language">Jazyk</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_language_keyboard" comment="Spacebar caption option - language + keyboard">Jazyk + Klávesnice</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_blank" comment="Spacebar caption option - blank">Prázdné</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_keyboard" comment="Spacebar caption hint - keyboard">Zobrazit název klávesnice v mezerníku</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_language" comment="Spacebar caption hint - language">Zobrazit název jazyka v mezerníku</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_language_keyboard" comment="Spacebar caption hint - language + keyboard">Jazyk a klávesnice v mezerníku</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_blank" comment="Spacebar caption hint - blank">Nezobrazovat titulek v mezerníku</string>
|
||||
<!-- Context: Keyman Settings menu / Haptic feedback -->
|
||||
<string name="haptic_feedback" comment="haptic feedback on key press">Vibrate when typing</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner" comment="text suggestions banner">Vždy zobrazovat banner</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner_on" comment="Description when toggle is on">K provedení</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner_off" comment="Description when toggle is off">Pokud je vypnuto, zobrazí se pouze pokud je povolen prediktivní text</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report" comment="permission for sending crash reports">Povolit odesílání hlášení o pádech přes síť</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report_on" comment="Description when toggle is on">Pokud je zapnuto, zprávy o selhání budou odeslány</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report_off" comment="Description when toggle is off">Pokud je vypnuto, zprávy o selhání nebudou odeslány</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_keyman_dot_com" comment="Install package from Keyman server">Instalovat z keyman.com</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_local_file" comment="Install package file from local device">Instalovat z lokálního souboru</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_other_device" comment="Scan QR Code">Instalovat z jiného zařízení</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="add_languages_to_installed_keyboard" comment="Install additional languages from a keyboard package">Přidat jazyky do nainstalované klávesnice</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="add_language_subtext" comment="Additional information for adding another language">(z balíčku klávesnice)</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="title_select_keyboard_package_list" comment="Select a keyboard package to add languages">Vyberte balíček klávesnice</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="title_select_languages_for_package" comment="Select language names from the keyboard package">Vyberte jazyky pro %1$s</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="added_language_to_keyboard" comment="Notification that a language name is added to a keyboard">Přidán jazyk %1$s do %2$s</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Všechny jazyky jsou již nainstalovány</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Přetažením klávesnice změníte výšku</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Otočit zařízení pro nastavení na výšku a na šířku</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Obnovit výchozí nastavení</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_text" comment="Prompt to type in the browser search bar">Hledat nebo zadat URL</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="title_bookmarks" comment="Title for bookmarks">Záložky</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="no_bookmarks" comment="Text when bookmark list is empty">Žádné záložky</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="add_bookmark" comment="Confirmation to add bookmark">Přidat záložku</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_title" comment="Page title for saved bookmark">Hlava 1 – Celkem</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_url" comment="Page URL for saved bookmark">Adresa URL</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="title_package_failed_to_install" comment="Error dialog title when package failed to install">Nepodařilo se nainstalovat balíček %1$s</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="downloading_keyboard_package" comment="Confirmation to download keyboard package filename">Stahování balíčku klávesnice\n%1$s…</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="failed_to_extract" comment="Notification that keyboard package failed to unzip">Extrahování se nezdařilo</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="install_keyboard_package" comment="Title to install keyboard package">Instalovat klávesnici</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="install_predictive_text_package" comment="Title to install dictionary package">Nainstalovat slovník</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="not_valid_package_file" comment="Notification when invalid package file cannot be installed">%1$s není platný soubor balíčku klíče.\n%2$s\"</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_new_touch_keyboards_to_install" comment="Notification when no touch-optimized keyboards can be installed">Balíček klávesnice nemá žádné dotykově optimalizované klávesnice k instalaci</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_new_predictive_text_to_install" comment="Notification when no dictionaries can be installed">Žádný nový prediktivní text k instalaci</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_targets_to_install" comment="Notification when a package doesn't contain keyboards or dictionaries">Žádné klávesnice nebo prediktivní text k instalaci</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_associated_languages" comment="Notification when a keyboard package doesn't contain languages">Balíček klávesnice nemá žádné přidružené jazyky k instalaci</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="invalid_metadata" comment="kmp.json metadata file is invalid or missing in package">Neplatná/chybějící metadata v balíčku</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="minimum_keyboard_version_not_supported" comment="Notification when keyboard has functionality not supported by current Keyman"> Keyboard requires a newer version of Keyman</string>
|
||||
<!-- Context: anywhere -->
|
||||
<string name="unable_to_open_browser" comment="Notification when a browser activity cannot be launched">Unable to launch web browser</string>
|
||||
</resources>
|
||||
161
android/KMAPro/kMAPro/src/main/res/values-kn-rIN/strings.xml
Normal file
161
android/KMAPro/kMAPro/src/main/res/values-kn-rIN/strings.xml
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- app_name removed in 16.0 beta. Set in build.gradle -->
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_share" comment="Menu action to send text content to another app">ಹಂಚಿಕೊಳ್ಳಿ</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_web" comment="Menu action to open Keyman browser">ವೆಬ್ ಬ್ರೌಸರ್</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_text_size" comment="Menu action to adjust text size">ಅಕ್ಷರದ ಗಾತ್ರ</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_overflow" comment="Show additional menu items">ಇನ್ನಷ್ಟು</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_clear_text" comment="Menu action to erase text">ಪಠ್ಯವನ್ನು ತೆರವುಗೊಳಿಸಿ</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_info" comment="Menu action to display Keyman help page">ಮಾಹಿತಿ</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_settings" comment="Menu action to open Settings menu">ಸೆಟ್ಟಿಂಗ್ಗಳು</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_install_updates" comment="Menu notification that keyboard or dictionary updates available">ನವೀಕರಣೆಯನ್ನು ಅಳವಡಿಸಿ</string>
|
||||
<!-- Context: Title -->
|
||||
<string name="title_version" comment="Title of Keyman for Android version">ಆವೃತ್ತಿ %1$s</string>
|
||||
<!-- Context: Text label when old Chrome version installed -->
|
||||
<string name="text_require_chrome_57" comment="Banner text when old version of Chrome is installed">ಕೀಮ್ಯಾನ್ಗೆ ಕ್ರೋಮ್ ಆವೃತ್ತಿ 57 ಅಥವಾ ಹೊಸತಿನ ಅಗತ್ಯವಿದೆ.</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="button_update_chrome" comment="Prompt to upgrade Chrome in the Play Store">ಕ್ರೋಮ್ ನವೀಕರಿಸು</string>
|
||||
<!-- Context: Textfield prompt (… is the ellipsis character "...") -->
|
||||
<string name="textview_hint" comment="Prompt to start typing">ಇಲ್ಲಿ ಟೈಪ್ ಮಾಡಲು ಪ್ರಾರಂಭಿಸಿ…</string>
|
||||
<!-- Context: Splash screen (version/copyright info currently disabled -->
|
||||
<!-- Context: Splash screen (version/copyright info currently disabled -->
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="text_size" comment="Current text size (number)">ಅಕ್ಷರದ ಗಾತ್ರ: %1$d</string>
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="ic_text_size_up" comment="Make text bigger">ಅಕ್ಷರದ ಗಾತ್ರ ಹೆಚ್ಚಿಸಿ</string>
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="ic_text_size_down" comment="Make text smaller">ಅಕ್ಷರದ ಗಾತ್ರ ತಗ್ಗಿಸಿ</string>
|
||||
<!-- Context: Clear Text dialog -->
|
||||
<string name="all_text_will_be_cleared" comment="Erase all the text">\nಎಲ್ಲಾ ಪಠ್ಯವನ್ನು ತೆರವುಗೊಳಿಸಲಾಗುತ್ತದೆ\n</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="get_started" comment="Menu for getting started">ಶುರುಮಾಡಿ</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="add_a_keyboard" comment="Menu item to add a keyboard">ನಿಮ್ಮ ಭಾಷೆಗೆ ಕೀಲಿಮಣೆಯನ್ನು ಸೇರಿಸಿ</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="enable_system_keyboard" comment="Menu item to enable Keyman as system keyboard">ಕೀಮ್ಯಾನ್ವನ್ನು ಸಿಸ್ಟಮ್-ಆದ್ಯಂತ ಕೀಲಿಮಣೆಯಾಗಿ ಸ್ಥಾಪಿಸು</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="set_keyman_as_default" comment="Menu item to set Keyman as default system keyboard">ಕೀಮ್ಯಾನ್ಅನ್ನು ಪೂರ್ವನಿರ್ಧರಿತ (ಡೀಫಾಲ್ಟ್) ಕೀಲಿಮಣೆಯನ್ನಾಗಿ ಹೊಂದಿಸಿ</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="more_info" comment="Open the Keyman for Android help page">ಹೆಚ್ಚಿನ ಮಾಹಿತಿ</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="show_get_started" comment="Show the "Get Started" menu on startup">ಆರಂಭದಲ್ಲಿ \"%1$s\" ತೋರಿಸು</string>
|
||||
<!-- Context: Android Storage Permission -->
|
||||
<string name="request_storage_permission" comment="Request storage permission to access keyboard packages">ಕೀಲಿಮಣೆ ಪ್ಯಾಕೇಜ್ಗಳನ್ನು ಸ್ಥಾಪಿಸಲು, ಕೀಮ್ಯಾನ್ಗೆ (external storage) ಬಾಹ್ಯ ಸಂಗ್ರಹಣೆಯನ್ನು ಓದಲು ಅನುಮತಿ ನೀಡಿ.</string>
|
||||
<!-- Context: Android Storage Permission -->
|
||||
<string name="storage_permission_denied" comment="Keyboard package installation may fail since Android storage permission not granted">ಬಾಹ್ಯ ಸಂಗ್ರಹಣೆಯನ್ನು (external storage) ಓದಲು ಅನುಮತಿಯನ್ನು ನಿರಾಕರಿಸಲಾಗಿದೆ. ಕೀಲಿಮಣೆ ಪ್ಯಾಕೇಜ್ಅನ್ನು ಸ್ಥಾಪಿಸಲು ವಿಫಲವಾಗಬಹುದು</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="keyman_settings" comment="Settings menu title">ಸೆಟ್ಟಿಂಗ್ಗಳು</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<plurals name="installed_languages">
|
||||
<item quantity="one">ಸ್ಥಾಪಿಸಲಾದ ಭಾಷೆ (%1$d)</item>
|
||||
<item quantity="other">ಸ್ಥಾಪಿಸಲಾದ ಭಾಷೆಗಳು (%1$d)</item>
|
||||
</plurals>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="install_keyboard_or_dictionary" comment="Menu item to install keyboard or dictionary">ಕೀಲಿಮಣೆ ಅಥವ ಶಬ್ದಕೋಶವನ್ನು ಅನುಸ್ಥಾಪಿಸು</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="change_display_language" comment="Menu action to change interface language">ಪ್ರದರ್ಶನ ಭಾಷೆ</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="adjust_keyboard_height" comment="Menu action to adjust keyboard height">ಕೀಲಿಮಣೆಯ ಎತ್ತರವನ್ನು ಹೊಂದಿಸಿ</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="spacebar_caption" comment="Menu action to set the spacebar caption">ಸ್ಪೇಸ್ಬಾರ್ ಶೀರ್ಷಿಕೆ</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_keyboard" comment="Spacebar caption option - keyboard">ಕೀಲಿಮಣೆ</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_language" comment="Spacebar caption option - language">ಭಾಷೆ</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_language_keyboard" comment="Spacebar caption option - language + keyboard">ಭಾಷೆ + ಕೀಲಿಮಣೆ</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_blank" comment="Spacebar caption option - blank">ಖಾಲಿ</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_keyboard" comment="Spacebar caption hint - keyboard">ಕೀಲಿಮಣೆ ಹೆಸರನ್ನು ಸ್ಪೇಸ್ಬಾರ್ ಶೀರ್ಷಿಕೆಯನ್ನಾಗಿ ತೋರಿಸು</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_language" comment="Spacebar caption hint - language">ಭಾಷೆಯನ್ನು ಸ್ಪೇಸ್ಬಾರ್ ಶೀರ್ಷಿಕೆಯನ್ನಾಗಿ ತೋರಿಸು</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_language_keyboard" comment="Spacebar caption hint - language + keyboard">ಭಾಷೆ ಮತ್ತು ಕೀಲಿಮಣೆ ಸ್ಪೇಸ್ಬಾರ್ ಶೀರ್ಷಿಕೆಯನ್ನಾಗಿ ತೋರಿಸು</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_blank" comment="Spacebar caption hint - blank">ಸ್ಪೇಸ್ಬಾರ್ ಶೀರ್ಷಿಕೆ ತೋರಿಸಬೇಡ</string>
|
||||
<!-- Context: Keyman Settings menu / Haptic feedback -->
|
||||
<string name="haptic_feedback" comment="haptic feedback on key press">ಟೈಪಿಂಗ್ ಮಾಡುವಾಗ ವೈಬ್ರೇಟ್ ಮಾಡು</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner" comment="text suggestions banner">ಯಾವಾಗಲೂ ಬ್ಯಾನರ್ ತೋರಿಸು</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner_on" comment="Description when toggle is on">ಅನುಷ್ಠಾನಗೊಳಿಸಲಾಗುವುದು</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner_off" comment="Description when toggle is off">ಇದು ಆಫ್ ಆಗಿರುವಾಗ, \"ಮುಂದಿನ ಪದವನ್ನು ಊಹಿಸಿ\" ಸಕ್ರಿಯಗೊಳಿಸಿದಾಗ ಮಾತ್ರ ತೋರಿಸಲಾಗುತ್ತದೆ</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report" comment="permission for sending crash reports">ಅಂತರ್ಜಾಲ ಮೂಲಕ ದೋಷದ ವರದಿಗಳನ್ನು ಕಳುಹಿಸಲು ಅನುಮತಿಸಿ</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report_on" comment="Description when toggle is on">ಇದು ಆನ್ ಆಗಿರುವಾಗ, ದೋಷದ ವರದಿಗಳನ್ನು ಕಳುಹಿಸಲಾಗುವುದು</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report_off" comment="Description when toggle is off">ಇದು ಆಫ್ ಆಗಿರುವಾಗ, ದೋಷದ ವರದಿಗಳನ್ನು ಕಳುಹಿಸಲಾಗುವುದಿಲ್ಲ</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_keyman_dot_com" comment="Install package from Keyman server">Keyman.com ನಿಂದ ಅನುಸ್ಥಾಪಿಸು</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_local_file" comment="Install package file from local device">ಸ್ಥಳೀಯ ಕಡತನಿಂದ ಅನುಸ್ಥಾಪಿಸು</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_other_device" comment="Scan QR Code">ಬೇರೊಂದು ಡಿವೈಸ್ನಿಂದ ಅನುಸ್ಥಾಪಿಸು</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="add_languages_to_installed_keyboard" comment="Install additional languages from a keyboard package">ಸ್ಥಾಪಿಸಲಾದ ಕೀಲಿಮಣೆಗೆ ಭಾಷೆಯನ್ನು ಸೇರಿಸು</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="add_language_subtext" comment="Additional information for adding another language">(ಕೀಲಿಮಣೆ ಪ್ಯಾಕೇಜ್ನಿಂದ)</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="title_select_keyboard_package_list" comment="Select a keyboard package to add languages">ಕೀಲಿಮಣೆ ಪ್ಯಾಕೇಜ್ವನ್ನು ಆಯ್ಕೆ ಮಾಡಿ</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="title_select_languages_for_package" comment="Select language names from the keyboard package">%1$s ಕೀಲಿಮಣೆಗೆ ಭಾಷೆಯನ್ನು ಆಯ್ಕೆ ಮಾಡಿ</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="added_language_to_keyboard" comment="Notification that a language name is added to a keyboard">%1$s ಭಾಷೆಯನ್ನು %2$s ಕೀಲಿಮಣೆಗೆ ಸೇರಿಸಲಾಗಿದೆ</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">ಎಲ್ಲಾ ಭಾಷೆಗಳನ್ನು ಈಗಾಗಲೇ ಸ್ಥಾಪಿಸಲಾಗಿದೆ</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">ಎತ್ತರವನ್ನು ಬದಲಾಯಿಸಲು ಕೀಲಿಮಣೆಯನ್ನು ಎಳೆಯಿರಿ</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">ಪೋರ್ಟ್ರೇಟ್ ಮತ್ತು ಲ್ಯಾಂಡ್ಸ್ಕೇಪ್ ಹೊಂದಿಸಲು ಸಾಧನವನ್ನು ತಿರುಗಿಸಿ</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">ಡೀಫಾಲ್ಟ್ ಮರುಹೊಂದಿಸಿ</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_text" comment="Prompt to type in the browser search bar">ಹುಡುಕು ಅಥವಾ URL ಟೈಪ್ ಮಾಡಿ</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="title_bookmarks" comment="Title for bookmarks">ಬುಕ್ಮಾರ್ಕ್ಗಳು</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="no_bookmarks" comment="Text when bookmark list is empty">ಯಾವುದೇ ಬುಕ್ಮಾರ್ಕ್ಗಳಿಲ್ಲ</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="add_bookmark" comment="Confirmation to add bookmark">ಬುಕ್ಮಾರ್ಕ್ ಸೇರಿಸಿ</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_title" comment="Page title for saved bookmark">ಶೀರ್ಷಿಕೆ</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_url" comment="Page URL for saved bookmark">ಯುಆರ್ಎಲ್</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="title_package_failed_to_install" comment="Error dialog title when package failed to install">ಪ್ಯಾಕೇಜ್ %1$s ಅನ್ನು ಅನುಸ್ಥಾಪಿಸಲು ವಿಫಲವಾಗಿದೆ</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="downloading_keyboard_package" comment="Confirmation to download keyboard package filename">ಕೆಳಗೆ ಉಲ್ಲೇಖಿಸಿರುವ ಕೀಲಿಮಣೆ ಪ್ಯಾಕೇಜ್ ಡೌನ್ಲೋಡ್ ಮಾಡಲಾಗುತ್ತಿದೆ\n%1$s…</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="failed_to_extract" comment="Notification that keyboard package failed to unzip">ಹೊರತೆಗೆಯಲು ವಿಫಲವಾಗಿದೆ</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="install_keyboard_package" comment="Title to install keyboard package">ಕೀಲಿಮಣೆಯನ್ನು ಅನುಸ್ಥಾಪಿಸು</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="install_predictive_text_package" comment="Title to install dictionary package">ಶಬ್ದಕೋಶವನ್ನು ಅನುಸ್ಥಾಪಿಸು</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="not_valid_package_file" comment="Notification when invalid package file cannot be installed">%1$s ಕೀಮ್ಯಾನ್ ಪ್ಯಾಕೇಜ್ ಕಡತ ಮಾನ್ಯವಾಗಿಲ್ಲ\n%2$s\"</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_new_touch_keyboards_to_install" comment="Notification when no touch-optimized keyboards can be installed">ಕೀಲಿಮಣೆ ಪ್ಯಾಕೇಜ್ನಲ್ಲಿ ಯಾವುದೆ ಕೀಲಿಮಣೆಯು (touch-optimized) ಟಚ್ ಹೊಂದುವಂತೆ ಮಾಡಲಾಗಿಲ್ಲ</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_new_predictive_text_to_install" comment="Notification when no dictionaries can be installed">ಮುಂದಿನ ಪದವನ್ನು ಊಹಿಸುವ ಪಟ್ಟಿಯನ್ನು ಸ್ಥಾಪಿಸಲು ಯಾವ ಹೊಸದು ಇಲ್ಲ</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_targets_to_install" comment="Notification when a package doesn't contain keyboards or dictionaries">ಕೀಲಿಮಣೆಗಳು ಅಥವ ಮುಂದಿನ ಪದವನ್ನು ಊಹಿಸುವ ಪಟ್ಟಿಯನ್ನು ಸ್ಥಾಪಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_associated_languages" comment="Notification when a keyboard package doesn't contain languages">ಕೀಲಿಮಣೆ ಪ್ಯಾಕೇಜ್ನಲ್ಲಿ ಯಾವುದೆ ಸಂಬಂಧಿತ ಭಾಷೆಗಳನ್ನು ಹೊಂದಿಲ್ಲ</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="invalid_metadata" comment="kmp.json metadata file is invalid or missing in package">ಪ್ಯಾಕೇಜ್ನಲ್ಲಿ ಅಮಾನ್ಯ/ಕಾಣೆಯಾದ (metadata)ಮೆಟಾಡೇಟಾ</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="minimum_keyboard_version_not_supported" comment="Notification when keyboard has functionality not supported by current Keyman">ಈ ಕೀಲಿಮಣೆಗೆ ಹೊಸ ಆವೃತ್ತಿಯ ಕೀಮ್ಯಾನ್ ಅಗತ್ಯವಿದೆ</string>
|
||||
<!-- Context: anywhere -->
|
||||
<string name="unable_to_open_browser" comment="Notification when a browser activity cannot be launched">ವೆಬ್ ಬ್ರೌಸರ್ ಅನ್ನು ಪ್ರಾರಂಭಿಸಲು ಸಾಧ್ಯವಾಗುತ್ತಿಲ್ಲ</string>
|
||||
</resources>
|
||||
163
android/KMAPro/kMAPro/src/main/res/values-ru-rRU/strings.xml
Normal file
163
android/KMAPro/kMAPro/src/main/res/values-ru-rRU/strings.xml
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- app_name removed in 16.0 beta. Set in build.gradle -->
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_share" comment="Menu action to send text content to another app">Поделиться</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_web" comment="Menu action to open Keyman browser">Веб-браузер</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_text_size" comment="Menu action to adjust text size">Размер текста</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_overflow" comment="Show additional menu items">Больше</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_clear_text" comment="Menu action to erase text">Очистить текст</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_info" comment="Menu action to display Keyman help page">Инф.</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_settings" comment="Menu action to open Settings menu">Настройки</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_install_updates" comment="Menu notification that keyboard or dictionary updates available">Установить обновления</string>
|
||||
<!-- Context: Title -->
|
||||
<string name="title_version" comment="Title of Keyman for Android version">Версия: %1$s</string>
|
||||
<!-- Context: Text label when old Chrome version installed -->
|
||||
<string name="text_require_chrome_57" comment="Banner text when old version of Chrome is installed"> Keyman требует Chrome версии 57 или новее.</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="button_update_chrome" comment="Prompt to upgrade Chrome in the Play Store">Обновить Chrome</string>
|
||||
<!-- Context: Textfield prompt (… is the ellipsis character "...") -->
|
||||
<string name="textview_hint" comment="Prompt to start typing">Начните вводить здесь…</string>
|
||||
<!-- Context: Splash screen (version/copyright info currently disabled -->
|
||||
<!-- Context: Splash screen (version/copyright info currently disabled -->
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="text_size" comment="Current text size (number)">Размер текста: %1$d</string>
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="ic_text_size_up" comment="Make text bigger">Размер текста вверх</string>
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="ic_text_size_down" comment="Make text smaller">Размер текста вниз</string>
|
||||
<!-- Context: Clear Text dialog -->
|
||||
<string name="all_text_will_be_cleared" comment="Erase all the text">\nВесь текст будет очищен\n</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="get_started" comment="Menu for getting started">Начать работу</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="add_a_keyboard" comment="Menu item to add a keyboard">Добавить клавиатуру для вашего языка</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="enable_system_keyboard" comment="Menu item to enable Keyman as system keyboard">Включить клавиатуру как системную клавиатуру</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="set_keyman_as_default" comment="Menu item to set Keyman as default system keyboard">Установить клавиатуру по умолчанию</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="more_info" comment="Open the Keyman for Android help page">Подробнее</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="show_get_started" comment="Show the "Get Started" menu on startup">Показать \"%1$s\" при запуске</string>
|
||||
<!-- Context: Android Storage Permission -->
|
||||
<string name="request_storage_permission" comment="Request storage permission to access keyboard packages"> Для установки пакетов клавиатуры разрешите разрешение на чтение внешнего накопителя.</string>
|
||||
<!-- Context: Android Storage Permission -->
|
||||
<string name="storage_permission_denied" comment="Keyboard package installation may fail since Android storage permission not granted"> Запрос на доступ к хранилищу отклонен. Может не установить пакет клавиатуры</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="keyman_settings" comment="Settings menu title">Настройки</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<plurals name="installed_languages">
|
||||
<item quantity="one">Установленные языки (%1$d)</item>
|
||||
<item quantity="few">Установленные языки (%1$d)</item>
|
||||
<item quantity="many">Установленные языки (%1$d)</item>
|
||||
<item quantity="other">Установленные языки (%1$d)</item>
|
||||
</plurals>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="install_keyboard_or_dictionary" comment="Menu item to install keyboard or dictionary">Установить клавиатуру или словарь</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="change_display_language" comment="Menu action to change interface language">Показать язык</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="adjust_keyboard_height" comment="Menu action to adjust keyboard height">Настройка высоты клавиатуры</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="spacebar_caption" comment="Menu action to set the spacebar caption">Заголовок пробела</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_keyboard" comment="Spacebar caption option - keyboard">Клавиатура</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_language" comment="Spacebar caption option - language">Язык</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_language_keyboard" comment="Spacebar caption option - language + keyboard">Язык + клавиатура</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_blank" comment="Spacebar caption option - blank">Пустой</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_keyboard" comment="Spacebar caption hint - keyboard">Показывать имя клавиатуры на пробеле</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_language" comment="Spacebar caption hint - language">Показывать название языка в пробеле</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_language_keyboard" comment="Spacebar caption hint - language + keyboard">Язык и клавиатура на пробеле</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_blank" comment="Spacebar caption hint - blank">Не показывать заголовок в пробеле</string>
|
||||
<!-- Context: Keyman Settings menu / Haptic feedback -->
|
||||
<string name="haptic_feedback" comment="haptic feedback on key press">Vibrate when typing</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner" comment="text suggestions banner">Всегда показывать баннер</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner_on" comment="Description when toggle is on">Будет реализовано</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner_off" comment="Description when toggle is off">Если выключен, отображается только при включенном предиктивном тексте</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report" comment="permission for sending crash reports">Разрешить отправку отчетов об ошибках по сети</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report_on" comment="Description when toggle is on">Когда включено, отчеты о сбоях будут отправлены</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report_off" comment="Description when toggle is off">Отчеты о сбое не будут отправлены</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_keyman_dot_com" comment="Install package from Keyman server">Установить с keyman.com</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_local_file" comment="Install package file from local device">Установить из локального файла</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_other_device" comment="Scan QR Code">Установить с другого устройства</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="add_languages_to_installed_keyboard" comment="Install additional languages from a keyboard package">Добавить языки на установленную клавиатуру</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="add_language_subtext" comment="Additional information for adding another language">(из пакета клавиатуры)</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="title_select_keyboard_package_list" comment="Select a keyboard package to add languages">Выберите набор клавиатуры</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="title_select_languages_for_package" comment="Select language names from the keyboard package">Выберите языки для %1$s</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="added_language_to_keyboard" comment="Notification that a language name is added to a keyboard">Язык %1$s добавлен в %2$s</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Все языки уже установлены</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Перетащите клавиатуру для изменения высоты</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Повернуть устройство для настройки портрета и ландшафта</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Сброс по умолчанию</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_text" comment="Prompt to type in the browser search bar">Поиск или введите URL</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="title_bookmarks" comment="Title for bookmarks">Закладки</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="no_bookmarks" comment="Text when bookmark list is empty">Нет закладок</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="add_bookmark" comment="Confirmation to add bookmark">Добавить закладку</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_title" comment="Page title for saved bookmark">Заглавие</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_url" comment="Page URL for saved bookmark">Url</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="title_package_failed_to_install" comment="Error dialog title when package failed to install">Не удалось установить пакет %1$s</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="downloading_keyboard_package" comment="Confirmation to download keyboard package filename">Загрузка пакета клавиатуры\n%1$s…</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="failed_to_extract" comment="Notification that keyboard package failed to unzip">Не удалось извлечь</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="install_keyboard_package" comment="Title to install keyboard package">Установить клавиатуру</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="install_predictive_text_package" comment="Title to install dictionary package">Установить словарь</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="not_valid_package_file" comment="Notification when invalid package file cannot be installed">%1$s не является допустимым файлом пакета Keyman.\n%2$s\"</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_new_touch_keyboards_to_install" comment="Notification when no touch-optimized keyboards can be installed">В пакете клавиатуры нет сенсорных клавиатур для установки</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_new_predictive_text_to_install" comment="Notification when no dictionaries can be installed">Нет нового предиктивного текста для установки</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_targets_to_install" comment="Notification when a package doesn't contain keyboards or dictionaries">Нет клавиатуры или предиктивного текста для установки</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_associated_languages" comment="Notification when a keyboard package doesn't contain languages">Пакет клавиатуры не имеет связанных языков для установки</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="invalid_metadata" comment="kmp.json metadata file is invalid or missing in package">Невалидные/отсутствующие метаданные в пакете</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="minimum_keyboard_version_not_supported" comment="Notification when keyboard has functionality not supported by current Keyman"> Keyboard requires a newer version of Keyman</string>
|
||||
<!-- Context: anywhere -->
|
||||
<string name="unable_to_open_browser" comment="Notification when a browser activity cannot be launched">Unable to launch web browser</string>
|
||||
</resources>
|
||||
161
android/KMAPro/kMAPro/src/main/res/values-sv-rSE/strings.xml
Normal file
161
android/KMAPro/kMAPro/src/main/res/values-sv-rSE/strings.xml
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- app_name removed in 16.0 beta. Set in build.gradle -->
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_share" comment="Menu action to send text content to another app">Dela</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_web" comment="Menu action to open Keyman browser">Webbläsare</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_text_size" comment="Menu action to adjust text size">Textstorlek</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_overflow" comment="Show additional menu items">Mer</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_clear_text" comment="Menu action to erase text">Rensa text</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_info" comment="Menu action to display Keyman help page">Information</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_settings" comment="Menu action to open Settings menu">Inställningar</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_install_updates" comment="Menu notification that keyboard or dictionary updates available">Installera uppdateringar</string>
|
||||
<!-- Context: Title -->
|
||||
<string name="title_version" comment="Title of Keyman for Android version">Version: %1$s</string>
|
||||
<!-- Context: Text label when old Chrome version installed -->
|
||||
<string name="text_require_chrome_57" comment="Banner text when old version of Chrome is installed"> Keyman kräver Chrome version 57 eller senare.</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="button_update_chrome" comment="Prompt to upgrade Chrome in the Play Store">Uppdatera Chrome</string>
|
||||
<!-- Context: Textfield prompt (… is the ellipsis character "...") -->
|
||||
<string name="textview_hint" comment="Prompt to start typing">Börja skriva här…</string>
|
||||
<!-- Context: Splash screen (version/copyright info currently disabled -->
|
||||
<!-- Context: Splash screen (version/copyright info currently disabled -->
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="text_size" comment="Current text size (number)">Textstorlek: %1$d</string>
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="ic_text_size_up" comment="Make text bigger">Textstorlek upp</string>
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="ic_text_size_down" comment="Make text smaller">Textstorlek ner</string>
|
||||
<!-- Context: Clear Text dialog -->
|
||||
<string name="all_text_will_be_cleared" comment="Erase all the text">\nAll text kommer att rensas\n</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="get_started" comment="Menu for getting started">Kom igång</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="add_a_keyboard" comment="Menu item to add a keyboard">Lägg till ett tangentbord för ditt språk</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="enable_system_keyboard" comment="Menu item to enable Keyman as system keyboard">Aktivera Keyman som tangentbord i hela systemet</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="set_keyman_as_default" comment="Menu item to set Keyman as default system keyboard">Sätt Keyman som standardtangentbord</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="more_info" comment="Open the Keyman for Android help page">Mer information</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="show_get_started" comment="Show the "Get Started" menu on startup">Visa \"%1$s\" vid uppstart</string>
|
||||
<!-- Context: Android Storage Permission -->
|
||||
<string name="request_storage_permission" comment="Request storage permission to access keyboard packages"> För att installera tangentbordspaket, tillåt Keyman tillåtelse att läsa extern lagring.</string>
|
||||
<!-- Context: Android Storage Permission -->
|
||||
<string name="storage_permission_denied" comment="Keyboard package installation may fail since Android storage permission not granted"> Begäran om lagringsbehörighet nekades. Kan misslyckas med att installera tangentbordspaket</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="keyman_settings" comment="Settings menu title">Inställningar</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<plurals name="installed_languages">
|
||||
<item quantity="one">Installerade språk (%1$d)</item>
|
||||
<item quantity="other">Installerade språk (%1$d)</item>
|
||||
</plurals>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="install_keyboard_or_dictionary" comment="Menu item to install keyboard or dictionary">Installera tangentbord eller ordbok</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="change_display_language" comment="Menu action to change interface language">Visa språk</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="adjust_keyboard_height" comment="Menu action to adjust keyboard height">Justera tangentbordshöjd</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="spacebar_caption" comment="Menu action to set the spacebar caption">Mellanslag bildtext</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_keyboard" comment="Spacebar caption option - keyboard">Keyboard</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_language" comment="Spacebar caption option - language">Språk</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_language_keyboard" comment="Spacebar caption option - language + keyboard">Språk + Tangentbord</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_blank" comment="Spacebar caption option - blank">Tom</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_keyboard" comment="Spacebar caption hint - keyboard">Visa tangentbordsnamn på mellanslag</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_language" comment="Spacebar caption hint - language">Visa språknamn på mellanslag</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_language_keyboard" comment="Spacebar caption hint - language + keyboard">Språk och tangentbord på mellanslagstangenten</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_blank" comment="Spacebar caption hint - blank">Visa inte bildtext på mellanslagstangenten</string>
|
||||
<!-- Context: Keyman Settings menu / Haptic feedback -->
|
||||
<string name="haptic_feedback" comment="haptic feedback on key press">Vibrate when typing</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner" comment="text suggestions banner">Visa alltid banner</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner_on" comment="Description when toggle is on">Att implementeras</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner_off" comment="Description when toggle is off">När du är avstängd, visas endast när prediktiv text är aktiverad</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report" comment="permission for sending crash reports">Tillåt skicka kraschrapporter över nätverk</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report_on" comment="Description when toggle is on">När den är aktiverad kommer kraschrapporter att skickas</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report_off" comment="Description when toggle is off">När du är avstängd skickas inte kraschrapporter</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_keyman_dot_com" comment="Install package from Keyman server">Installera från keyman.com</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_local_file" comment="Install package file from local device">Installera från lokal fil</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_other_device" comment="Scan QR Code">Installera från annan enhet</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="add_languages_to_installed_keyboard" comment="Install additional languages from a keyboard package">Lägg till språk till installerat tangentbord</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="add_language_subtext" comment="Additional information for adding another language">(från tangentbordspaket)</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="title_select_keyboard_package_list" comment="Select a keyboard package to add languages">Välj tangentbordspaket</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="title_select_languages_for_package" comment="Select language names from the keyboard package">Välj språk för %1$s</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="added_language_to_keyboard" comment="Notification that a language name is added to a keyboard">Lade till språk %1$s till %2$s</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Alla språk är redan installerade</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Dra tangentbordet för att ändra storlek på höjden</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Rotera enheten för att justera stående och liggande</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Återställ till standard</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_text" comment="Prompt to type in the browser search bar">Sök eller skriv URL</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="title_bookmarks" comment="Title for bookmarks">Bokmärken</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="no_bookmarks" comment="Text when bookmark list is empty">Inga bokmärken</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="add_bookmark" comment="Confirmation to add bookmark">Lägg till bokmärke</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_title" comment="Page title for saved bookmark">Titel</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_url" comment="Page URL for saved bookmark">URL</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="title_package_failed_to_install" comment="Error dialog title when package failed to install">Paketet %1$s kunde inte installeras</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="downloading_keyboard_package" comment="Confirmation to download keyboard package filename">Laddar ner tangentbordspaket\n%1$s…</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="failed_to_extract" comment="Notification that keyboard package failed to unzip">Det gick inte att extrahera</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="install_keyboard_package" comment="Title to install keyboard package">Installera tangentbord</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="install_predictive_text_package" comment="Title to install dictionary package">Installera ordbok</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="not_valid_package_file" comment="Notification when invalid package file cannot be installed">%1$s är inte en giltig Keyman-fil.\n%2$s\"</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_new_touch_keyboards_to_install" comment="Notification when no touch-optimized keyboards can be installed">Tangentbordspaketet har inga touch-optimerade tangentbord att installera</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_new_predictive_text_to_install" comment="Notification when no dictionaries can be installed">Ingen ny prediktiv text att installera</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_targets_to_install" comment="Notification when a package doesn't contain keyboards or dictionaries">Inga tangentbord eller prediktiv text att installera</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_associated_languages" comment="Notification when a keyboard package doesn't contain languages">Tangentbordspaket har inga associerade språk att installera</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="invalid_metadata" comment="kmp.json metadata file is invalid or missing in package">Ogiltiga/saknade metadata i paketet</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="minimum_keyboard_version_not_supported" comment="Notification when keyboard has functionality not supported by current Keyman"> Keyboard requires a newer version of Keyman</string>
|
||||
<!-- Context: anywhere -->
|
||||
<string name="unable_to_open_browser" comment="Notification when a browser activity cannot be launched">Unable to launch web browser</string>
|
||||
</resources>
|
||||
163
android/KMAPro/kMAPro/src/main/res/values-uk-rUA/strings.xml
Normal file
163
android/KMAPro/kMAPro/src/main/res/values-uk-rUA/strings.xml
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- app_name removed in 16.0 beta. Set in build.gradle -->
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_share" comment="Menu action to send text content to another app">Поділитись</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_web" comment="Menu action to open Keyman browser">Веб-переглядач</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_text_size" comment="Menu action to adjust text size">Розмір тексту</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_overflow" comment="Show additional menu items">Більше</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_clear_text" comment="Menu action to erase text">Очистити текст</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_info" comment="Menu action to display Keyman help page">Інформація</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_settings" comment="Menu action to open Settings menu">Налаштування</string>
|
||||
<!-- Context: Menu Action -->
|
||||
<string name="action_install_updates" comment="Menu notification that keyboard or dictionary updates available">Встановити оновлення</string>
|
||||
<!-- Context: Title -->
|
||||
<string name="title_version" comment="Title of Keyman for Android version">Версія: %1$s</string>
|
||||
<!-- Context: Text label when old Chrome version installed -->
|
||||
<string name="text_require_chrome_57" comment="Banner text when old version of Chrome is installed"> Keyman вимагає Chrome версії 57 або новіше.</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="button_update_chrome" comment="Prompt to upgrade Chrome in the Play Store">Оновлення Chrome</string>
|
||||
<!-- Context: Textfield prompt (… is the ellipsis character "...") -->
|
||||
<string name="textview_hint" comment="Prompt to start typing">Почніть вводити тут…</string>
|
||||
<!-- Context: Splash screen (version/copyright info currently disabled -->
|
||||
<!-- Context: Splash screen (version/copyright info currently disabled -->
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="text_size" comment="Current text size (number)">Розмір тексту: %1$d</string>
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="ic_text_size_up" comment="Make text bigger">Розмір тексту вгору</string>
|
||||
<!-- Context: Text Size dialog -->
|
||||
<string name="ic_text_size_down" comment="Make text smaller">Розмір тексту вниз</string>
|
||||
<!-- Context: Clear Text dialog -->
|
||||
<string name="all_text_will_be_cleared" comment="Erase all the text">\nВесь текст буде очищено\n</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="get_started" comment="Menu for getting started">Початок роботи</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="add_a_keyboard" comment="Menu item to add a keyboard">Додайте клавіатуру для вашої мови</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="enable_system_keyboard" comment="Menu item to enable Keyman as system keyboard">Увімкнути Keyman як системну клавіатуру</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="set_keyman_as_default" comment="Menu item to set Keyman as default system keyboard">Встановити Keyman як типова клавіатура</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="more_info" comment="Open the Keyman for Android help page">Детальніше</string>
|
||||
<!-- Context: Get Started menu -->
|
||||
<string name="show_get_started" comment="Show the "Get Started" menu on startup">Показувати \"%1$s\" під час запуску</string>
|
||||
<!-- Context: Android Storage Permission -->
|
||||
<string name="request_storage_permission" comment="Request storage permission to access keyboard packages"> Щоб встановити пакунки клавіатури, дозвольте Keyman читати зовнішнє сховище.</string>
|
||||
<!-- Context: Android Storage Permission -->
|
||||
<string name="storage_permission_denied" comment="Keyboard package installation may fail since Android storage permission not granted"> Запит на дозвіл на зберігання даних було відхилено. Може не вдалося встановити пакет клавіатури</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="keyman_settings" comment="Settings menu title">Налаштування</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<plurals name="installed_languages">
|
||||
<item quantity="one">Встановлені мови (%1$d)</item>
|
||||
<item quantity="few">Встановлені мови (%1$d)</item>
|
||||
<item quantity="many">Встановлені мови (%1$d)</item>
|
||||
<item quantity="other">Встановлені мови (%1$d)</item>
|
||||
</plurals>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="install_keyboard_or_dictionary" comment="Menu item to install keyboard or dictionary">Встановлення клавіатури або словника</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="change_display_language" comment="Menu action to change interface language">Мова інтерфейсу</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="adjust_keyboard_height" comment="Menu action to adjust keyboard height">Відрегулюйте висоту клавіатури</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="spacebar_caption" comment="Menu action to set the spacebar caption">Заголовок до панелі</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_keyboard" comment="Spacebar caption option - keyboard">Keyboard</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_language" comment="Spacebar caption option - language">Мова:</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_language_keyboard" comment="Spacebar caption option - language + keyboard">Мова + Клавіатура</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption -->
|
||||
<string name="spacebar_caption_blank" comment="Spacebar caption option - blank">Пустий</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_keyboard" comment="Spacebar caption hint - keyboard">Показувати назву клавіатури на пробілі</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_language" comment="Spacebar caption hint - language">Показувати назву мови на пробілі</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_language_keyboard" comment="Spacebar caption hint - language + keyboard">Мова і клавіатура на пробілі</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_blank" comment="Spacebar caption hint - blank">Не показувати підпис на пробілі</string>
|
||||
<!-- Context: Keyman Settings menu / Haptic feedback -->
|
||||
<string name="haptic_feedback" comment="haptic feedback on key press">Vibrate when typing</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner" comment="text suggestions banner">Завжди показувати банер</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner_on" comment="Description when toggle is on">Для реалізування</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_banner_off" comment="Description when toggle is off">Коли вимкнено, відображається лише коли включений прогнозований текст</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report" comment="permission for sending crash reports">Дозволити надсилання звітів про аварії через мережу</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report_on" comment="Description when toggle is on">Коли увімкнено, звіти про збої будуть надіслані</string>
|
||||
<!-- Context: Keyman Settings menu -->
|
||||
<string name="show_send_crash_report_off" comment="Description when toggle is off">Коли вимкнено, звіти про помилки не надсилатимуться</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_keyman_dot_com" comment="Install package from Keyman server">Встановити з keyman.com</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_local_file" comment="Install package file from local device">Встановити з локального файлу</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="install_from_other_device" comment="Scan QR Code">Встановити з іншого пристрою</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="add_languages_to_installed_keyboard" comment="Install additional languages from a keyboard package">Додати мови до встановленої клавіатури</string>
|
||||
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
|
||||
<string name="add_language_subtext" comment="Additional information for adding another language">(із пакета клавіатури)</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="title_select_keyboard_package_list" comment="Select a keyboard package to add languages">Виберіть пакунок клавіатури</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="title_select_languages_for_package" comment="Select language names from the keyboard package">Вибрати мову для %1$s</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="added_language_to_keyboard" comment="Notification that a language name is added to a keyboard">Додано мову %1$s до %2$s</string>
|
||||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Всі мови вже встановлені</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Перетягніть клавіатуру, щоб змінити розмір висоти</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Поверніть пристрій, щоб змінити портретну та альбомну орієнтацію</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Відновити параметри за замовчуванням</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_text" comment="Prompt to type in the browser search bar">Пошук або введення URL</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="title_bookmarks" comment="Title for bookmarks">Закладки</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="no_bookmarks" comment="Text when bookmark list is empty">Немає закладок</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="add_bookmark" comment="Confirmation to add bookmark">Додати закладку</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_title" comment="Page title for saved bookmark">Найменування</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
<string name="hint_url" comment="Page URL for saved bookmark">URL-адреса</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="title_package_failed_to_install" comment="Error dialog title when package failed to install">Не вдалося встановити пакунок %1$s</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="downloading_keyboard_package" comment="Confirmation to download keyboard package filename">Завантаження пакета клавіатури\n%1$s…</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="failed_to_extract" comment="Notification that keyboard package failed to unzip">Не вдалося витягти</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="install_keyboard_package" comment="Title to install keyboard package">Встановлення клавіатури</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="install_predictive_text_package" comment="Title to install dictionary package">Установіть словник</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="not_valid_package_file" comment="Notification when invalid package file cannot be installed">%1$s не є коректним файлом пакету Keyman.\n%2$s\"</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_new_touch_keyboards_to_install" comment="Notification when no touch-optimized keyboards can be installed">Пакет клавіатури не має сенсорних клавіатур для встановлення</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_new_predictive_text_to_install" comment="Notification when no dictionaries can be installed">Немає нового предикатного тексту для встановлення</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_targets_to_install" comment="Notification when a package doesn't contain keyboards or dictionaries">Немає клавіатур чи прогнозованого тексту для встановлення</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="no_associated_languages" comment="Notification when a keyboard package doesn't contain languages">У пакунку клавіатури немає пов\'язаних мов для встановлення</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="invalid_metadata" comment="kmp.json metadata file is invalid or missing in package">Невірні/відсутні метадані в пакеті</string>
|
||||
<!-- Context: KMP Package strings -->
|
||||
<string name="minimum_keyboard_version_not_supported" comment="Notification when keyboard has functionality not supported by current Keyman"> Keyboard requires a newer version of Keyman</string>
|
||||
<!-- Context: anywhere -->
|
||||
<string name="unable_to_open_browser" comment="Notification when a browser activity cannot be launched">Unable to launch web browser</string>
|
||||
</resources>
|
||||
|
|
@ -7,12 +7,11 @@ ext.rootPath = '../../'
|
|||
apply from: "$rootPath/version.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
buildToolsVersion "30.0.2"
|
||||
compileSdkVersion 33
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 31
|
||||
targetSdkVersion 33
|
||||
|
||||
// VERSION_CODE and VERSION_NAME from version.gradle but Gradle removes them for libraries
|
||||
buildConfigField "String", "KEYMAN_ENGINE_VERSION_NAME", "\""+VERSION_NAME+"\""
|
||||
|
|
@ -61,19 +60,22 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.appcompat:appcompat:1.3.0-rc01'
|
||||
implementation 'com.google.android.material:material:1.3.0'
|
||||
// 1.6.0-rc01 needed to resolve https://issuetracker.google.com/issues/238425626
|
||||
implementation 'androidx.appcompat:appcompat:1.6.0-rc01' // 1.5.1
|
||||
// material:1.7.0 will need Gradle plugin 7.1.0+
|
||||
implementation 'com.google.android.material:material:1.6.0'
|
||||
implementation 'commons-io:commons-io:2.6'
|
||||
implementation 'io.sentry:sentry-android:4.3.0'
|
||||
implementation 'androidx.preference:preference:1.1.1'
|
||||
implementation 'io.sentry:sentry-android:6.9.2'
|
||||
implementation 'androidx.preference:preference:1.2.0'
|
||||
|
||||
// Robolectric
|
||||
testImplementation 'androidx.test:core:1.3.0'
|
||||
testImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
testImplementation 'org.robolectric:robolectric:4.5.1'
|
||||
testImplementation 'androidx.test:core:1.5.0'
|
||||
testImplementation 'androidx.test.ext:junit:1.1.4'
|
||||
testImplementation 'org.robolectric:robolectric:4.8.1'
|
||||
|
||||
// Generate QR Codes
|
||||
implementation ('com.github.kenglxn.QRGen:android:2.6.0') {
|
||||
// 3.0.1 requires Java 11
|
||||
implementation ('com.github.kenglxn.QRGen:android:2.7.0') {
|
||||
transitive = true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.tavultesoft.kmea" >
|
||||
package="com.keyman.engine" >
|
||||
<!-- Query other IME's for keyboard picker menu -->
|
||||
<queries>
|
||||
<intent>
|
||||
|
|
@ -8,6 +8,8 @@
|
|||
</intent>
|
||||
</queries>
|
||||
|
||||
<!-- https://developer.android.com/develop/ui/views/notifications/notification-permission#declare -->
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
|
||||
<!-- Ensure these permissions aren't added by dependencies unless calling app intentionally adds them -->
|
||||
|
|
@ -20,7 +22,7 @@
|
|||
<meta-data android:name="io.sentry.auto-init" android:value="false" />
|
||||
|
||||
<activity
|
||||
android:name="com.tavultesoft.kmea.KeyboardPickerActivity"
|
||||
android:name="com.keyman.engine.KeyboardPickerActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
|
||||
|
|
@ -28,28 +30,28 @@
|
|||
android:theme="@style/AppTheme.Light.Dialog" >
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.tavultesoft.kmea.KeyboardInfoActivity"
|
||||
android:name="com.keyman.engine.KeyboardInfoActivity"
|
||||
android:exported="true"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme.Light.Dialog" >
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.tavultesoft.kmea.KMKeyboardDownloaderActivity"
|
||||
android:name="com.keyman.engine.KMKeyboardDownloaderActivity"
|
||||
android:exported="true"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
|
||||
android:label=""
|
||||
android:theme="@style/AppTheme.Light.Dialog">
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.tavultesoft.kmea.ModelPickerActivity"
|
||||
android:name="com.keyman.engine.ModelPickerActivity"
|
||||
android:exported="true"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme.Light.Dialog">
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.tavultesoft.kmea.ModelInfoActivity"
|
||||
android:name="com.keyman.engine.ModelInfoActivity"
|
||||
android:exported="true"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
|
||||
android:label="@string/app_name"
|
||||
|
|
@ -59,7 +61,7 @@
|
|||
<!-- Put other WebViewActivities in a separate process so the Keyboard WebView doesn't lag.
|
||||
Ref https://stackoverflow.com/questions/40650643/timed-out-waiting-on-iinputcontextcallback-with-custom-keyboard-on-android -->
|
||||
<activity
|
||||
android:name="com.tavultesoft.kmea.KMHelpFileActivity"
|
||||
android:name="com.keyman.engine.KMHelpFileActivity"
|
||||
android:exported="true"
|
||||
android:process=":KMHelpFileActivity"
|
||||
android:launchMode="singleTask"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (C) 2021 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.ContextWrapper;
|
||||
|
|
@ -15,11 +15,13 @@ import android.widget.Toast;
|
|||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import com.tavultesoft.kmea.util.ContextUtils;
|
||||
import com.keyman.engine.util.ContextUtils;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class BaseActivity extends AppCompatActivity {
|
||||
private static final String TAG = "BaseActivity";
|
||||
static ContextWrapper localeUpdatedContext;
|
||||
|
||||
/**
|
||||
|
|
@ -49,6 +51,23 @@ public class BaseActivity extends AppCompatActivity {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Some classes aren't an AppCompatActivity and need this helper to retrieve localized Strings
|
||||
* in the updated locale.
|
||||
* @param defaultContext - the context to fallback if localUpdatedContext is null
|
||||
* @param resID - the resource ID of the string
|
||||
* @return String - localized string
|
||||
*/
|
||||
public static String getString(Context defaultContext, int resID) {
|
||||
Context context = (localeUpdatedContext != null) ? localeUpdatedContext : defaultContext;
|
||||
if (context != null) {
|
||||
return context.getString(resID);
|
||||
};
|
||||
// Shouldn't be here
|
||||
KMLog.LogError(TAG, "context null for getString()");
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void attachBaseContext(Context newBase) {
|
||||
// Override the app locale using the BCP 47 tag from shared preferences
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
|
|
@ -7,8 +7,8 @@ import android.content.DialogInterface;
|
|||
import android.os.Bundle;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.tavultesoft.kmea.cloud.CloudApiTypes;
|
||||
import com.tavultesoft.kmea.data.KeyboardController;
|
||||
import com.keyman.engine.cloud.CloudApiTypes;
|
||||
import com.keyman.engine.data.KeyboardController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (C) 2021 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
|
|
@ -42,6 +42,7 @@ public class DisplayLanguages {
|
|||
new DisplayLanguageType("am-ET", "አማርኛ (Amharic)"),
|
||||
new DisplayLanguageType("az-AZ", "Azərbaycanca (Azəricə)"),
|
||||
new DisplayLanguageType("bwr-NG", "Bura-Pabir"),
|
||||
new DisplayLanguageType("cs-CZ", "čeština (Czech)"),
|
||||
new DisplayLanguageType("ff-NG", "Ɗemngal Fulfulde"),
|
||||
new DisplayLanguageType("en", "English"),
|
||||
new DisplayLanguageType("es-419", "Español (Spanish - Latin America)"),
|
||||
|
|
@ -50,6 +51,7 @@ public class DisplayLanguages {
|
|||
new DisplayLanguageType("in-ID", "Indonesian"),
|
||||
new DisplayLanguageType("it-IT", "Italiana"),
|
||||
new DisplayLanguageType("de-DE", "German"),
|
||||
new DisplayLanguageType("kn-IN", "ಕನ್ನಡ (Kannada)"),
|
||||
new DisplayLanguageType("kr-NG", "Kanuri"),
|
||||
new DisplayLanguageType("km-KH", "Khmer"),
|
||||
new DisplayLanguageType("ckl-NG", "Kibaku"),
|
||||
|
|
@ -60,7 +62,10 @@ public class DisplayLanguages {
|
|||
new DisplayLanguageType("pl-PL", "Polski (Polish)"),
|
||||
new DisplayLanguageType("pt-PT", "Português do Portugal"),
|
||||
new DisplayLanguageType("ff-ZA", "Pulaar-Fulfulde"), // or Fulah
|
||||
new DisplayLanguageType("ru-RU", "Pyccĸий (Russian)"),
|
||||
new DisplayLanguageType("shu-latn", "Shuwa (Latin)"),
|
||||
new DisplayLanguageType("sv-SE", "svenska (Swedish)"),
|
||||
new DisplayLanguageType("uk-UA", "Українська (Ukrainian)"),
|
||||
new DisplayLanguageType("hia-NG", "Waha"),
|
||||
new DisplayLanguageType("zh-CN", "中文(简体) (Simplified Chinese)")
|
||||
};
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (C) 2017 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
|
|
@ -23,8 +23,8 @@ import org.json.JSONArray;
|
|||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import com.tavultesoft.kmea.util.Connection;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.util.Connection;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
public final class JSONParser {
|
||||
private final String TAG = "JSONParser";
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (C) 2018 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.ContextWrapper;
|
||||
|
|
@ -2,9 +2,9 @@
|
|||
* Copyright (C) 2017 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import com.tavultesoft.kmea.KMScanCodeMap;
|
||||
import com.keyman.engine.KMScanCodeMap;
|
||||
import android.content.Context;
|
||||
import android.view.KeyEvent;
|
||||
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (C) 2021 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
|
|
@ -27,11 +27,11 @@ import androidx.appcompat.widget.Toolbar;
|
|||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.content.FileProvider;
|
||||
|
||||
import com.tavultesoft.kmea.packages.PackageProcessor;
|
||||
import com.tavultesoft.kmea.util.FileProviderUtils;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.HelpFile;
|
||||
import com.tavultesoft.kmea.util.WebViewUtils;
|
||||
import com.keyman.engine.packages.PackageProcessor;
|
||||
import com.keyman.engine.util.FileProviderUtils;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.HelpFile;
|
||||
import com.keyman.engine.util.WebViewUtils;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (C) 2017 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (C) 2017-2018 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -13,15 +13,17 @@ import org.json.JSONArray;
|
|||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.data.KeyboardController;
|
||||
import com.tavultesoft.kmea.KMManager.KeyboardType;
|
||||
import com.tavultesoft.kmea.KeyboardEventHandler.EventType;
|
||||
import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardEventListener;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.tavultesoft.kmea.util.KMString;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.data.KeyboardController;
|
||||
import com.keyman.engine.KMManager.KeyboardType;
|
||||
import com.keyman.engine.KeyboardEventHandler.EventType;
|
||||
import com.keyman.engine.KeyboardEventHandler.OnKeyboardEventListener;
|
||||
import com.keyman.engine.util.DependencyUtil;
|
||||
import com.keyman.engine.util.DependencyUtil.LibraryType;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
import com.keyman.engine.util.KMString;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
|
|
@ -241,10 +243,11 @@ final class KMKeyboard extends WebView {
|
|||
keyboardSet = false;
|
||||
this.javascriptAfterLoad.clear();
|
||||
|
||||
if(keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP)
|
||||
KMManager.InAppKeyboardLoaded = false;
|
||||
else
|
||||
KMManager.SystemKeyboardLoaded = false;
|
||||
if(keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
KMManager.InAppKeyboardWebViewClient.setKeyboardLoaded(false);
|
||||
} else {
|
||||
KMManager.SystemKeyboardWebViewClient.setKeyboardLoaded(false);
|
||||
}
|
||||
|
||||
String htmlPath = "file://" + getContext().getDir("data", Context.MODE_PRIVATE) + "/" + KMManager.KMFilename_KeyboardHtml;
|
||||
loadUrl(htmlPath);
|
||||
|
|
@ -254,8 +257,8 @@ final class KMKeyboard extends WebView {
|
|||
public void loadJavascript(String func) {
|
||||
this.javascriptAfterLoad.add(func);
|
||||
|
||||
if((keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP && KMManager.InAppKeyboardLoaded) ||
|
||||
(keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM && KMManager.SystemKeyboardLoaded)) {
|
||||
if((keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP && KMManager.InAppKeyboardWebViewClient.getKeyboardLoaded()) ||
|
||||
(keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM && KMManager.SystemKeyboardWebViewClient.getKeyboardLoaded())) {
|
||||
|
||||
// If !this.keyboardSet, then pageLoaded hasn't fired yet.
|
||||
// When pageLoaded fires, it'll call `callJavascriptAfterLoad` safely.
|
||||
|
|
@ -638,7 +641,7 @@ final class KMKeyboard extends WebView {
|
|||
BaseActivity.makeToast(context, R.string.fatal_keyboard_error_short, Toast.LENGTH_LONG, packageID, keyboardID, languageID);
|
||||
}
|
||||
|
||||
if(this.currentKeyboardErrorReports < 5 && reportToSentry) {
|
||||
if(this.currentKeyboardErrorReports < 5 && DependencyUtil.libraryExists(LibraryType.SENTRY) && Sentry.isEnabled() && reportToSentry) {
|
||||
// We'll only report up to 5 errors in a given keyboard to avoid spamming
|
||||
// errors and using unnecessary bandwidth doing so
|
||||
// Don't use localized string R.string.fatal_keyboard_error msg for Sentry
|
||||
|
|
@ -674,7 +677,7 @@ final class KMKeyboard extends WebView {
|
|||
}
|
||||
|
||||
private void sendKMWError(int lineNumber, String sourceId, String message) {
|
||||
if (Sentry.isEnabled()) {
|
||||
if (DependencyUtil.libraryExists(LibraryType.SENTRY) && Sentry.isEnabled()) {
|
||||
Breadcrumb breadcrumb = new Breadcrumb();
|
||||
breadcrumb.setMessage("KMKeyboard.sendKMWError");
|
||||
breadcrumb.setCategory("KMWError");
|
||||
|
|
@ -1286,7 +1289,7 @@ final class KMKeyboard extends WebView {
|
|||
}
|
||||
|
||||
try {
|
||||
String hintText = context.getString(R.string.help_bubble_text);
|
||||
String hintText = BaseActivity.getString(this.context, R.string.help_bubble_text);
|
||||
|
||||
// To ensure that the localized text is properly escaped, we'll use JSON utilities. Since
|
||||
// there's no direct string encoder, we'll just wrap it in an object and unwrap it in JS.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import android.app.DialogFragment;
|
||||
import android.content.Context;
|
||||
|
|
@ -7,20 +7,20 @@ import android.widget.Toast;
|
|||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.tavultesoft.kmea.cloud.CloudApiTypes;
|
||||
import com.tavultesoft.kmea.cloud.CloudDataJsonUtil;
|
||||
import com.tavultesoft.kmea.cloud.CloudDownloadMgr;
|
||||
import com.tavultesoft.kmea.cloud.impl.CloudKeyboardPackageDownloadCallback;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.data.KeyboardController;
|
||||
import com.tavultesoft.kmea.cloud.impl.CloudLexicalPackageDownloadCallback;
|
||||
import com.keyman.engine.cloud.CloudApiTypes;
|
||||
import com.keyman.engine.cloud.CloudDataJsonUtil;
|
||||
import com.keyman.engine.cloud.CloudDownloadMgr;
|
||||
import com.keyman.engine.cloud.impl.CloudKeyboardPackageDownloadCallback;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.data.KeyboardController;
|
||||
import com.keyman.engine.cloud.impl.CloudLexicalPackageDownloadCallback;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import static com.tavultesoft.kmea.ConfirmDialogFragment.DialogType.DIALOG_TYPE_DOWNLOAD_KEYBOARD;
|
||||
import static com.tavultesoft.kmea.ConfirmDialogFragment.DialogType.DIALOG_TYPE_DOWNLOAD_MODEL;
|
||||
import static com.keyman.engine.ConfirmDialogFragment.DialogType.DIALOG_TYPE_DOWNLOAD_KEYBOARD;
|
||||
import static com.keyman.engine.ConfirmDialogFragment.DialogType.DIALOG_TYPE_DOWNLOAD_MODEL;
|
||||
|
||||
public class KMKeyboardDownloaderActivity extends BaseActivity {
|
||||
// Bundle Keys
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (C) 2017 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -19,13 +19,13 @@ import android.view.ViewGroup;
|
|||
import android.widget.ImageButton;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tavultesoft.kmea.data.Dataset;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.data.KeyboardController;
|
||||
import com.tavultesoft.kmea.data.adapters.AdapterFilter;
|
||||
import com.tavultesoft.kmea.data.adapters.NestedAdapter;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.MapCompat;
|
||||
import com.keyman.engine.data.Dataset;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.data.KeyboardController;
|
||||
import com.keyman.engine.data.adapters.AdapterFilter;
|
||||
import com.keyman.engine.data.adapters.NestedAdapter;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.MapCompat;
|
||||
|
||||
final class KMKeyboardPickerAdapter extends NestedAdapter<Keyboard, Dataset.Keyboards, Void> implements OnClickListener {
|
||||
private final static int KEYBOARD_LAYOUT_RESOURCE = R.layout.list_row_layout3;
|
||||
|
|
@ -0,0 +1,280 @@
|
|||
/**
|
||||
* Copyright (C) 2023 SIL International. All rights reserved.
|
||||
*/
|
||||
package com.keyman.engine;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.RectF;
|
||||
import android.net.Uri;
|
||||
import android.util.Log;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.keyman.engine.KeyboardEventHandler.EventType;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.KMManager.KeyboardType;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
public final class KMKeyboardWebViewClient extends WebViewClient {
|
||||
public static final String TAG = "KMKeyboardWebViewClient";
|
||||
|
||||
public static Context context;
|
||||
private static KeyboardType keyboardType;
|
||||
private static boolean keyboardLoaded;
|
||||
|
||||
KMKeyboardWebViewClient(Context context, KeyboardType keyboardType) {
|
||||
KMKeyboardWebViewClient.context = context;
|
||||
KMKeyboardWebViewClient.keyboardType = keyboardType;
|
||||
KMKeyboardWebViewClient.keyboardLoaded = false;
|
||||
|
||||
if (keyboardType != KeyboardType.KEYBOARD_TYPE_INAPP && keyboardType != KeyboardType.KEYBOARD_TYPE_SYSTEM) {
|
||||
KMLog.LogError(TAG, String.format("Cannot initialize: Invalid keyboard type: %s", keyboardType.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
public void setContext(Context context) {
|
||||
KMKeyboardWebViewClient.context = context;
|
||||
}
|
||||
|
||||
public boolean getKeyboardLoaded() {
|
||||
return keyboardLoaded;
|
||||
}
|
||||
|
||||
public void setKeyboardLoaded(boolean keyboardLoaded) {
|
||||
KMKeyboardWebViewClient.keyboardLoaded = keyboardLoaded;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageStarted(WebView view, String url, Bitmap favicon) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
Log.d("KMEA", String.format("onPageFinished: [%s] %s", keyboardType.toString(), url));
|
||||
shouldOverrideUrlLoading(view, url);
|
||||
}
|
||||
|
||||
private void pageLoaded(WebView view, String url) {
|
||||
Log.d("KMEA", String.format("pageLoaded: [%s] %s", keyboardType.toString(), url));
|
||||
KMKeyboard kmKeyboard = KMManager.getKMKeyboard(keyboardType);
|
||||
if (kmKeyboard == null) {
|
||||
KMLog.LogError(TAG, String.format("pageLoaded and %s keyboard null", keyboardType.toString()));
|
||||
return;
|
||||
}
|
||||
kmKeyboard.keyboardSet = false;
|
||||
KMManager.currentLexicalModel = null;
|
||||
|
||||
if (url.startsWith("file")) { // TODO: is this test necessary?
|
||||
KMKeyboardWebViewClient.keyboardLoaded = true;
|
||||
|
||||
SharedPreferences prefs = context.getSharedPreferences(context.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE);
|
||||
int index = prefs.getInt(KMManager.KMKey_UserKeyboardIndex, 0);
|
||||
if (index < 0) {
|
||||
index = 0;
|
||||
}
|
||||
Keyboard keyboardInfo = KMManager.getKeyboardInfo(context, index);
|
||||
String langId = null;
|
||||
if (keyboardInfo != null) {
|
||||
langId = keyboardInfo.getLanguageID();
|
||||
kmKeyboard.setKeyboard(keyboardInfo);
|
||||
} else {
|
||||
// Revert to default (index 0) or fallback keyboard
|
||||
keyboardInfo = KMManager.getKeyboardInfo(context, 0);
|
||||
if (keyboardInfo == null) {
|
||||
// Only log SystemKeyboard to Sentry because some keyboard apps like FV don't install keyboards until the user chooses
|
||||
if (keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM) {
|
||||
KMLog.LogError(TAG, "No keyboards installed. Reverting to fallback");
|
||||
}
|
||||
keyboardInfo = KMManager.getDefaultKeyboard(context);
|
||||
}
|
||||
if (keyboardInfo != null) {
|
||||
langId = keyboardInfo.getLanguageID();
|
||||
kmKeyboard.setKeyboard(keyboardInfo);
|
||||
}
|
||||
}
|
||||
|
||||
KMManager.registerAssociatedLexicalModel(langId);
|
||||
|
||||
kmKeyboard.showHelpBubbleAfterDelay(2000, true); // check if it should be shown at that time!
|
||||
|
||||
kmKeyboard.callJavascriptAfterLoad();
|
||||
kmKeyboard.setSpacebarText(KMManager.getSpacebarText());
|
||||
|
||||
KeyboardEventHandler.notifyListeners(KMTextView.kbEventListeners, keyboardType, EventType.KEYBOARD_LOADED, null);
|
||||
|
||||
// Special handling for in-app TextView context keymanapp/keyman#3809
|
||||
if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP &&
|
||||
KMTextView.activeView != null && KMTextView.activeView.getClass() == KMTextView.class) {
|
||||
KMTextView.updateTextContext();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
Log.d("KMEA", String.format("shouldOverrideUrlLoading [%s]: %s", keyboardType.toString(), url));
|
||||
KMKeyboard kmKeyboard = KMManager.getKMKeyboard(keyboardType);
|
||||
if (kmKeyboard == null) {
|
||||
KMLog.LogError(TAG, String.format("shouldOverrideUrlLoading and %s null", keyboardType.toString()));
|
||||
return false;
|
||||
}
|
||||
|
||||
// URL has actual path to the keyboard.html file as a prefix! We need to replace
|
||||
// just the first intended '#' to get URI-based query param processing.
|
||||
|
||||
// At some point, other parts of the function should be redone to allow use of ? instead
|
||||
// of # in our WebView command "queries" entirely.
|
||||
String cmd = url.replace("keyboard.html#", "keyboard.html?");
|
||||
Uri urlCommand = Uri.parse(cmd);
|
||||
if (url.indexOf("pageLoaded") >= 0) {
|
||||
pageLoaded(view, url);
|
||||
} else if (url.indexOf("hideKeyboard") >= 0) {
|
||||
// Dismiss help bubble - though it should only ever display with KEYBOARD_TYPE_INAPP
|
||||
kmKeyboard.dismissHelpBubble();
|
||||
if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
if (KMTextView.activeView != null && KMTextView.activeView.getClass() == KMTextView.class) {
|
||||
KMTextView textView = (KMTextView) KMTextView.activeView;
|
||||
textView.dismissKeyboard();
|
||||
}
|
||||
} else if (keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM) {
|
||||
if (KMManager.IMService != null) {
|
||||
KMManager.IMService.requestHideSelf(0);
|
||||
}
|
||||
}
|
||||
} else if (urlCommand.getQueryParameter("globeKeyAction") != null) {
|
||||
kmKeyboard.dismissHelpBubble();
|
||||
kmKeyboard.setShouldShowHelpBubble(false);
|
||||
|
||||
// Globe key has been used; disable the internal preference setting.
|
||||
KMManager.setPersistentShouldShowHelpBubble(false);
|
||||
|
||||
KMManager.handleGlobeKeyAction(context, urlCommand.getBooleanQueryParameter("keydown", false),
|
||||
keyboardType);
|
||||
} else if (urlCommand.getQueryParameter("helpBubbleDismissed") != null) {
|
||||
// The user has begun interacting with the keyboard; we'll disable the help bubble
|
||||
// for the rest of the lifetime of this keyboard instance.
|
||||
kmKeyboard.setShouldShowHelpBubble(false);
|
||||
} else if (url.indexOf("showKeyPreview") >= 0) {
|
||||
String deviceType = context.getResources().getString(R.string.device_type);
|
||||
if (deviceType.equals("AndroidTablet")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (kmKeyboard.subKeysWindow != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int start = url.indexOf("x=") + 2;
|
||||
int end = url.indexOf("+y=");
|
||||
float x = Float.valueOf(url.substring(start, end));
|
||||
|
||||
start = url.indexOf("y=") + 2;
|
||||
end = url.indexOf("+w=");
|
||||
float y = Float.valueOf(url.substring(start, end));
|
||||
|
||||
start = url.indexOf("w=") + 2;
|
||||
end = url.indexOf("+h=");
|
||||
float w = Float.valueOf(url.substring(start, end));
|
||||
|
||||
start = url.indexOf("h=") + 2;
|
||||
end = url.indexOf("+t=");
|
||||
float h = Float.valueOf(url.substring(start, end));
|
||||
|
||||
start = url.indexOf("t=") + 2;
|
||||
String t = url.substring(start);
|
||||
String text = kmKeyboard.convertKeyText(t);
|
||||
|
||||
float left = x - w / 2.0f;
|
||||
float right = left + w;
|
||||
float top = y - 1;
|
||||
float bottom = top + h;
|
||||
|
||||
RectF keyFrame = new RectF(left, top, right, bottom);
|
||||
kmKeyboard.showKeyPreview(context, (int) x, (int) y, keyFrame, text);
|
||||
} else if (url.indexOf("dismissKeyPreview") >= 0) {
|
||||
kmKeyboard.dismissKeyPreview(100);
|
||||
} else if (url.indexOf("showMore") >= 0) {
|
||||
if (kmKeyboard.subKeysWindow != null && kmKeyboard.subKeysWindow.isShowing()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int start = url.indexOf("keyPos=") + 7;
|
||||
int end = url.indexOf("+keys=");
|
||||
kmKeyboard.subKeysWindowPos = url.substring(start, end).split("\\,");
|
||||
|
||||
start = end + 6;
|
||||
end = url.indexOf("+font=");
|
||||
if (end < 0) {
|
||||
end = url.length();
|
||||
kmKeyboard.specialOskFont = "";
|
||||
} else {
|
||||
kmKeyboard.specialOskFont = KMManager.KMFilename_Osk_Ttf_Font;
|
||||
}
|
||||
|
||||
String keys = url.substring(start, end);
|
||||
|
||||
String[] keyList = keys.split("\\;");
|
||||
int klCount = keyList.length;
|
||||
kmKeyboard.subKeysList = new ArrayList<HashMap<String, String>>();
|
||||
for (int i = 0; i < klCount; i++) {
|
||||
String[] values = keyList[i].split("\\:");
|
||||
String keyId = (values.length > 0) ? values[0] : "";
|
||||
String keyText = (values.length > 1) ? values[1] : "";
|
||||
|
||||
HashMap<String, String> hashMap = new HashMap<String, String>();
|
||||
hashMap.put("keyId", keyId);
|
||||
hashMap.put("keyText", keyText);
|
||||
kmKeyboard.subKeysList.add(hashMap);
|
||||
}
|
||||
} else if (url.indexOf("refreshBannerHeight") >= 0) {
|
||||
int start = url.indexOf("change=") + 7;
|
||||
String change = url.substring(start);
|
||||
boolean isModelActive = change.equals("active");
|
||||
// appContext instead of context?
|
||||
SharedPreferences prefs = context.getSharedPreferences(context.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE);
|
||||
boolean modelPredictionPref = false;
|
||||
if (KMManager.currentLexicalModel != null) {
|
||||
modelPredictionPref = prefs.getBoolean(KMManager.getLanguagePredictionPreferenceKey(KMManager.currentLexicalModel.get(KMManager.KMKey_LanguageID)), true);
|
||||
}
|
||||
KMManager.currentBanner = (isModelActive && modelPredictionPref) ?
|
||||
KMManager.KM_BANNER_STATE_SUGGESTION : KMManager.KM_BANNER_STATE_BLANK;
|
||||
RelativeLayout.LayoutParams params = KMManager.getKeyboardLayoutParams();
|
||||
kmKeyboard.setLayoutParams(params);
|
||||
} else if (url.indexOf("suggestPopup") >= 0) {
|
||||
double x = Float.parseFloat(urlCommand.getQueryParameter("x"));
|
||||
double y = Float.parseFloat(urlCommand.getQueryParameter("y"));
|
||||
double width = Float.parseFloat(urlCommand.getQueryParameter("w"));
|
||||
double height = Float.parseFloat(urlCommand.getQueryParameter("h"));
|
||||
String suggestionJSON = urlCommand.getQueryParameter("suggestion");
|
||||
|
||||
JSONParser parser = new JSONParser();
|
||||
JSONObject obj = parser.getJSONObjectFromURIString(suggestionJSON);
|
||||
|
||||
/* // For future implementation
|
||||
InAppKeyboard.suggestionWindowPos = new double[]{x, y};
|
||||
InAppKeyboard.suggestionJSON = suggestionJSON;
|
||||
|
||||
try {
|
||||
Log.v("KMEA", "Suggestion display: " + obj.getString("displayAs"));
|
||||
Log.v("KMEA", "Suggestion's banner coords: " + x + ", " + y + ", " + width + ", " + height);
|
||||
Log.v("KMEA", "Is a <keep> suggestion: "); // likely outdated now that tags exist.
|
||||
} catch (JSONException e) {
|
||||
//e.printStackTrace();
|
||||
Log.v("KMEA", "JSON parsing error: " + e.getMessage());
|
||||
}
|
||||
*/
|
||||
} else if (url.indexOf("reloadAfterError") >= 0) {
|
||||
kmKeyboard.reloadAfterError();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (C) 2017 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
|
|
@ -12,7 +12,6 @@ import java.io.InputStream;
|
|||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
|
@ -34,7 +33,6 @@ import android.net.ConnectivityManager;
|
|||
import android.net.NetworkInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.Looper;
|
||||
|
|
@ -62,25 +60,25 @@ import io.sentry.Breadcrumb;
|
|||
import io.sentry.Sentry;
|
||||
import io.sentry.SentryLevel;
|
||||
|
||||
import com.tavultesoft.kmea.KeyboardEventHandler.EventType;
|
||||
import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardDownloadEventListener;
|
||||
import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardEventListener;
|
||||
import com.tavultesoft.kmea.cloud.CloudDataJsonUtil;
|
||||
import com.tavultesoft.kmea.cloud.CloudDownloadMgr;
|
||||
import com.tavultesoft.kmea.data.Dataset;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.data.KeyboardController;
|
||||
import com.tavultesoft.kmea.logic.ResourcesUpdateTool;
|
||||
import com.tavultesoft.kmea.packages.JSONUtils;
|
||||
import com.tavultesoft.kmea.packages.LexicalModelPackageProcessor;
|
||||
import com.tavultesoft.kmea.packages.PackageProcessor;
|
||||
import com.tavultesoft.kmea.util.BCP47;
|
||||
import com.tavultesoft.kmea.util.CharSequenceUtil;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.tavultesoft.kmea.util.KMString;
|
||||
import com.tavultesoft.kmea.util.MapCompat;
|
||||
import com.tavultesoft.kmea.util.WebViewUtils;
|
||||
import com.keyman.engine.KeyboardEventHandler.OnKeyboardDownloadEventListener;
|
||||
import com.keyman.engine.KeyboardEventHandler.OnKeyboardEventListener;
|
||||
import com.keyman.engine.cloud.CloudDownloadMgr;
|
||||
import com.keyman.engine.data.Dataset;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.data.KeyboardController;
|
||||
import com.keyman.engine.logic.ResourcesUpdateTool;
|
||||
import com.keyman.engine.packages.JSONUtils;
|
||||
import com.keyman.engine.packages.LexicalModelPackageProcessor;
|
||||
import com.keyman.engine.packages.PackageProcessor;
|
||||
import com.keyman.engine.util.BCP47;
|
||||
import com.keyman.engine.util.CharSequenceUtil;
|
||||
import com.keyman.engine.util.DependencyUtil;
|
||||
import com.keyman.engine.util.DependencyUtil.LibraryType;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
import com.keyman.engine.util.KMString;
|
||||
import com.keyman.engine.util.MapCompat;
|
||||
import com.keyman.engine.util.WebViewUtils;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
|
@ -159,7 +157,7 @@ public final class KMManager {
|
|||
}
|
||||
};
|
||||
|
||||
private static InputMethodService IMService;
|
||||
protected static InputMethodService IMService;
|
||||
private static boolean debugMode = false;
|
||||
private static boolean shouldAllowSetKeyboard = true;
|
||||
private static boolean didCopyAssets = false;
|
||||
|
|
@ -176,14 +174,14 @@ public final class KMManager {
|
|||
|
||||
private static KMManager.SpacebarText spacebarText = KMManager.SpacebarText.LANGUAGE_KEYBOARD; // must match default given in kmwbase.ts
|
||||
|
||||
protected static boolean InAppKeyboardLoaded = false;
|
||||
protected static boolean SystemKeyboardLoaded = false;
|
||||
protected static boolean InAppKeyboardShouldIgnoreTextChange = false;
|
||||
protected static boolean InAppKeyboardShouldIgnoreSelectionChange = false;
|
||||
protected static boolean SystemKeyboardShouldIgnoreTextChange = false;
|
||||
protected static boolean SystemKeyboardShouldIgnoreSelectionChange = false;
|
||||
protected static KMKeyboard InAppKeyboard = null;
|
||||
protected static KMKeyboard SystemKeyboard = null;
|
||||
protected static KMKeyboardWebViewClient InAppKeyboardWebViewClient = null;
|
||||
protected static KMKeyboardWebViewClient SystemKeyboardWebViewClient = null;
|
||||
protected static HashMap<String, String> currentLexicalModel = null;
|
||||
protected static WebViewUtils.EngineWebViewVersionStatus engineWebViewVersionStatus =
|
||||
WebViewUtils.EngineWebViewVersionStatus.UNDETERMINED;
|
||||
|
|
@ -334,12 +332,12 @@ public final class KMManager {
|
|||
/**
|
||||
* Extract KMEA tier from versionName. Uses parameter so we can unit test.
|
||||
* @param versionName String - If not provided, determine tier from
|
||||
* com.tavultesoft.kmea.BuildConfig.KEYMAN_ENGINE_VERSION_NAME
|
||||
* com.keyman.engine.BuildConfig.KEYMAN_ENGINE_VERSION_NAME
|
||||
* @return Tier (ALPHA, BETA, STABLE)
|
||||
*/
|
||||
public static Tier getTier(String versionName) {
|
||||
if (versionName == null || versionName.isEmpty()) {
|
||||
versionName = com.tavultesoft.kmea.BuildConfig.KEYMAN_ENGINE_VERSION_NAME;
|
||||
versionName = com.keyman.engine.BuildConfig.KEYMAN_ENGINE_VERSION_NAME;
|
||||
}
|
||||
Pattern pattern = Pattern.compile("^(\\d+\\.\\d+\\.\\d+)-(alpha|beta|stable).*");
|
||||
Matcher matcher = pattern.matcher(versionName);
|
||||
|
|
@ -360,7 +358,7 @@ public final class KMManager {
|
|||
*/
|
||||
public static String getMajorVersion() {
|
||||
// Regex needs to match the entire string
|
||||
String appVersion = com.tavultesoft.kmea.BuildConfig.KEYMAN_ENGINE_VERSION_NAME;
|
||||
String appVersion = com.keyman.engine.BuildConfig.KEYMAN_ENGINE_VERSION_NAME;
|
||||
Pattern pattern = Pattern.compile("^(\\d+\\.\\d+)\\.\\d+.*");
|
||||
Matcher matcher = pattern.matcher(appVersion);
|
||||
if (matcher.matches() && matcher.groupCount() >= 1) {
|
||||
|
|
@ -376,7 +374,7 @@ public final class KMManager {
|
|||
*/
|
||||
public static String getVersion() {
|
||||
// Regex needs to match the entire string
|
||||
String appVersion = com.tavultesoft.kmea.BuildConfig.KEYMAN_ENGINE_VERSION_NAME;
|
||||
String appVersion = com.keyman.engine.BuildConfig.KEYMAN_ENGINE_VERSION_NAME;
|
||||
Pattern pattern = Pattern.compile("^(\\d+\\.\\d+\\.\\d+).*");
|
||||
Matcher matcher = pattern.matcher(appVersion);
|
||||
if (matcher.matches() && matcher.groupCount() >= 1) {
|
||||
|
|
@ -618,7 +616,8 @@ public final class KMManager {
|
|||
InAppKeyboard.setLayoutParams(params);
|
||||
InAppKeyboard.setVerticalScrollBarEnabled(false);
|
||||
InAppKeyboard.setHorizontalScrollBarEnabled(false);
|
||||
InAppKeyboard.setWebViewClient(new KMInAppKeyboardWebViewClient(appContext));
|
||||
InAppKeyboardWebViewClient = new KMKeyboardWebViewClient(appContext, KeyboardType.KEYBOARD_TYPE_INAPP);
|
||||
InAppKeyboard.setWebViewClient(InAppKeyboardWebViewClient);
|
||||
InAppKeyboard.addJavascriptInterface(new KMInAppKeyboardJSHandler(appContext, InAppKeyboard), "jsInterface");
|
||||
InAppKeyboard.loadKeyboard();
|
||||
|
||||
|
|
@ -633,7 +632,8 @@ public final class KMManager {
|
|||
SystemKeyboard.setLayoutParams(params);
|
||||
SystemKeyboard.setVerticalScrollBarEnabled(false);
|
||||
SystemKeyboard.setHorizontalScrollBarEnabled(false);
|
||||
SystemKeyboard.setWebViewClient(new KMSystemKeyboardWebViewClient(appContext));
|
||||
SystemKeyboardWebViewClient = new KMKeyboardWebViewClient(appContext, KeyboardType.KEYBOARD_TYPE_SYSTEM);
|
||||
SystemKeyboard.setWebViewClient(SystemKeyboardWebViewClient);
|
||||
SystemKeyboard.addJavascriptInterface(new KMSystemKeyboardJSHandler(appContext, SystemKeyboard), "jsInterface");
|
||||
SystemKeyboard.loadKeyboard();
|
||||
|
||||
|
|
@ -663,9 +663,15 @@ public final class KMManager {
|
|||
|
||||
public static boolean isKeyboardLoaded(KeyboardType type) {
|
||||
if (type == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
return InAppKeyboardLoaded;
|
||||
if (InAppKeyboardWebViewClient != null) {
|
||||
return InAppKeyboardWebViewClient.getKeyboardLoaded();
|
||||
}
|
||||
return false;
|
||||
} else if (type == KeyboardType.KEYBOARD_TYPE_SYSTEM) {
|
||||
return SystemKeyboardLoaded;
|
||||
if (SystemKeyboardWebViewClient != null) {
|
||||
return SystemKeyboardWebViewClient.getKeyboardLoaded();
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
String msg = "Keyboard type undefined";
|
||||
KMLog.LogError(TAG, msg);
|
||||
|
|
@ -1325,12 +1331,12 @@ public final class KMManager {
|
|||
boolean mayCorrect = prefs.getBoolean(getLanguageCorrectionPreferenceKey(languageID), true);
|
||||
|
||||
RelativeLayout.LayoutParams params;
|
||||
if (InAppKeyboard != null && InAppKeyboardLoaded && !InAppKeyboardShouldIgnoreTextChange && modelFileExists) {
|
||||
if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded() && !InAppKeyboardShouldIgnoreTextChange && modelFileExists) {
|
||||
params = getKeyboardLayoutParams();
|
||||
InAppKeyboard.setLayoutParams(params);
|
||||
InAppKeyboard.loadJavascript(KMString.format("enableSuggestions(%s, %s, %s)", model, mayPredict, mayCorrect));
|
||||
}
|
||||
if (SystemKeyboard != null && SystemKeyboardLoaded && !SystemKeyboardShouldIgnoreTextChange && modelFileExists) {
|
||||
if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded() && !SystemKeyboardShouldIgnoreTextChange && modelFileExists) {
|
||||
params = getKeyboardLayoutParams();
|
||||
SystemKeyboard.setLayoutParams(params);
|
||||
SystemKeyboard.loadJavascript(KMString.format("enableSuggestions(%s, %s, %s)", model, mayPredict, mayCorrect));
|
||||
|
|
@ -1345,11 +1351,11 @@ public final class KMManager {
|
|||
}
|
||||
|
||||
String url = KMString.format("deregisterModel('%s')", modelID);
|
||||
if (InAppKeyboard != null) { // && InAppKeyboardLoaded) {
|
||||
if (InAppKeyboard != null) {
|
||||
InAppKeyboard.loadJavascript(url);
|
||||
}
|
||||
|
||||
if (SystemKeyboard != null) { // && SystemKeyboardLoaded) {
|
||||
if (SystemKeyboard != null) {
|
||||
SystemKeyboard.loadJavascript(url);
|
||||
}
|
||||
return true;
|
||||
|
|
@ -1426,7 +1432,7 @@ public final class KMManager {
|
|||
keyboardInfo.setNewKeyboard(true);
|
||||
|
||||
// Log Sentry analytic event, ignoring default keyboard
|
||||
if (Sentry.isEnabled() && !(packageID.equalsIgnoreCase(KMManager.KMDefault_PackageID) &&
|
||||
if (DependencyUtil.libraryExists(LibraryType.SENTRY) && Sentry.isEnabled() && !(packageID.equalsIgnoreCase(KMManager.KMDefault_PackageID) &&
|
||||
keyboardID.equalsIgnoreCase(KMManager.KMDefault_KeyboardID))) {
|
||||
Breadcrumb breadcrumb = new Breadcrumb();
|
||||
breadcrumb.setMessage("KMManager.addKeyboard");
|
||||
|
|
@ -1495,10 +1501,10 @@ public final class KMManager {
|
|||
boolean result1 = false;
|
||||
boolean result2 = false;
|
||||
|
||||
if (InAppKeyboard != null && InAppKeyboardLoaded)
|
||||
if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded())
|
||||
result1 = InAppKeyboard.setKeyboard(packageID, keyboardID, languageID);
|
||||
|
||||
if (SystemKeyboard != null && SystemKeyboardLoaded)
|
||||
if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded())
|
||||
result2 = SystemKeyboard.setKeyboard(packageID, keyboardID, languageID);
|
||||
|
||||
return (result1 || result2);
|
||||
|
|
@ -1508,11 +1514,11 @@ public final class KMManager {
|
|||
boolean result1 = false;
|
||||
boolean result2 = false;
|
||||
|
||||
if (InAppKeyboard != null && InAppKeyboardLoaded && keyboardInfo != null) {
|
||||
if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded() && keyboardInfo != null) {
|
||||
result1 = InAppKeyboard.setKeyboard(keyboardInfo);
|
||||
}
|
||||
|
||||
if (SystemKeyboard != null && SystemKeyboardLoaded && keyboardInfo != null)
|
||||
if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded() && keyboardInfo != null)
|
||||
result2 = SystemKeyboard.setKeyboard(keyboardInfo);
|
||||
|
||||
if (keyboardInfo != null) {
|
||||
|
|
@ -1538,11 +1544,11 @@ public final class KMManager {
|
|||
boolean result1 = false;
|
||||
boolean result2 = false;
|
||||
|
||||
if (InAppKeyboard != null && InAppKeyboardLoaded)
|
||||
if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded())
|
||||
{
|
||||
result1 = InAppKeyboard.prepareKeyboardSwitch(packageID, keyboardID, languageID,keyboardName);
|
||||
}
|
||||
if (SystemKeyboard != null && SystemKeyboardLoaded)
|
||||
if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded())
|
||||
{
|
||||
result2 = SystemKeyboard.prepareKeyboardSwitch(packageID, keyboardID, languageID,keyboardName);
|
||||
}
|
||||
|
|
@ -1557,10 +1563,10 @@ public final class KMManager {
|
|||
boolean result1 = false;
|
||||
boolean result2 = false;
|
||||
|
||||
if (InAppKeyboard != null && (InAppKeyboardLoaded || isTestMode()))
|
||||
if (InAppKeyboard != null && (InAppKeyboardWebViewClient.getKeyboardLoaded() || isTestMode()))
|
||||
result1 = InAppKeyboard.setKeyboard(packageID, keyboardID, languageID, keyboardName, languageName, kFont, kOskFont);
|
||||
|
||||
if (SystemKeyboard != null && SystemKeyboardLoaded)
|
||||
if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded())
|
||||
result2 = SystemKeyboard.setKeyboard(packageID, keyboardID, languageID, keyboardName, languageName, kFont, kOskFont);
|
||||
|
||||
registerAssociatedLexicalModel(languageID);
|
||||
|
|
@ -1600,11 +1606,11 @@ public final class KMManager {
|
|||
}
|
||||
|
||||
public static void clearKeyboardCache() {
|
||||
if (InAppKeyboard != null && InAppKeyboardLoaded) {
|
||||
if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded()) {
|
||||
InAppKeyboard.clearCache(true);
|
||||
InAppKeyboard.loadKeyboard();
|
||||
}
|
||||
if (SystemKeyboard != null && SystemKeyboardLoaded) {
|
||||
if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded()) {
|
||||
SystemKeyboard.clearCache(true);
|
||||
SystemKeyboard.loadKeyboard();
|
||||
}
|
||||
|
|
@ -1852,19 +1858,19 @@ public final class KMManager {
|
|||
}
|
||||
|
||||
public static void applyKeyboardHeight(Context context, int height) {
|
||||
if (InAppKeyboard != null && InAppKeyboardLoaded) {
|
||||
if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded()) {
|
||||
InAppKeyboard.loadJavascript(KMString.format("setOskHeight('%s')", height));
|
||||
RelativeLayout.LayoutParams params = getKeyboardLayoutParams();
|
||||
InAppKeyboard.setLayoutParams(params);
|
||||
}
|
||||
if (SystemKeyboard != null && SystemKeyboardLoaded) {
|
||||
if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded()) {
|
||||
SystemKeyboard.loadJavascript(KMString.format("setOskHeight('%s')", height));
|
||||
RelativeLayout.LayoutParams params = getKeyboardLayoutParams();
|
||||
SystemKeyboard.setLayoutParams(params);
|
||||
}
|
||||
}
|
||||
|
||||
private static void setPersistentShouldShowHelpBubble(boolean flag) {
|
||||
protected static void setPersistentShouldShowHelpBubble(boolean flag) {
|
||||
SharedPreferences prefs = appContext.getSharedPreferences(appContext.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
editor.putBoolean(KMManager.KMKey_ShouldShowHelpBubble, flag);
|
||||
|
|
@ -1927,11 +1933,11 @@ public final class KMManager {
|
|||
|
||||
public static void setNumericLayer(KeyboardType kbType) {
|
||||
if (kbType == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
if (InAppKeyboard != null && InAppKeyboardLoaded && !InAppKeyboardShouldIgnoreTextChange) {
|
||||
if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded() && !InAppKeyboardShouldIgnoreTextChange) {
|
||||
InAppKeyboard.loadJavascript("setNumericLayer()");
|
||||
}
|
||||
} else if (kbType == KeyboardType.KEYBOARD_TYPE_SYSTEM) {
|
||||
if (SystemKeyboard != null && SystemKeyboardLoaded && !SystemKeyboardShouldIgnoreTextChange) {
|
||||
if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded() && !SystemKeyboardShouldIgnoreTextChange) {
|
||||
SystemKeyboard.loadJavascript("setNumericLayer()");
|
||||
}
|
||||
}
|
||||
|
|
@ -1945,14 +1951,14 @@ public final class KMManager {
|
|||
}
|
||||
|
||||
if (kbType == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
if (InAppKeyboard != null && InAppKeyboardLoaded && !InAppKeyboardShouldIgnoreTextChange) {
|
||||
if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded() && !InAppKeyboardShouldIgnoreTextChange) {
|
||||
InAppKeyboard.loadJavascript(KMString.format("updateKMText('%s')", kmText));
|
||||
result = true;
|
||||
}
|
||||
|
||||
InAppKeyboardShouldIgnoreTextChange = false;
|
||||
} else if (kbType == KeyboardType.KEYBOARD_TYPE_SYSTEM) {
|
||||
if (SystemKeyboard != null && SystemKeyboardLoaded && !SystemKeyboardShouldIgnoreTextChange) {
|
||||
if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded() && !SystemKeyboardShouldIgnoreTextChange) {
|
||||
SystemKeyboard.loadJavascript(KMString.format("updateKMText('%s')", kmText));
|
||||
result = true;
|
||||
}
|
||||
|
|
@ -1966,14 +1972,14 @@ public final class KMManager {
|
|||
public static boolean updateSelectionRange(KeyboardType kbType, int selStart, int selEnd) {
|
||||
boolean result = false;
|
||||
if (kbType == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
if (InAppKeyboard != null && InAppKeyboardLoaded && !InAppKeyboardShouldIgnoreSelectionChange) {
|
||||
if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded() && !InAppKeyboardShouldIgnoreSelectionChange) {
|
||||
InAppKeyboard.loadJavascript(KMString.format("updateKMSelectionRange(%d,%d)", selStart, selEnd));
|
||||
result = true;
|
||||
}
|
||||
|
||||
InAppKeyboardShouldIgnoreSelectionChange = false;
|
||||
} else if (kbType == KeyboardType.KEYBOARD_TYPE_SYSTEM) {
|
||||
if (SystemKeyboard != null && SystemKeyboardLoaded && !SystemKeyboardShouldIgnoreSelectionChange) {
|
||||
if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded() && !SystemKeyboardShouldIgnoreSelectionChange) {
|
||||
InputConnection ic = (IMService != null ? IMService.getCurrentInputConnection() : null);
|
||||
if (ic != null) {
|
||||
ExtractedText icText = ic.getExtractedText(new ExtractedTextRequest(), 0);
|
||||
|
|
@ -1994,11 +2000,11 @@ public final class KMManager {
|
|||
|
||||
public static void resetContext(KeyboardType kbType) {
|
||||
if (kbType == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
if (InAppKeyboard != null && InAppKeyboardLoaded) {
|
||||
if (InAppKeyboard != null && InAppKeyboardWebViewClient.getKeyboardLoaded()) {
|
||||
InAppKeyboard.loadJavascript("resetContext()");
|
||||
}
|
||||
} else if (kbType == KeyboardType.KEYBOARD_TYPE_SYSTEM) {
|
||||
if (SystemKeyboard != null && SystemKeyboardLoaded) {
|
||||
if (SystemKeyboard != null && SystemKeyboardWebViewClient.getKeyboardLoaded()) {
|
||||
SystemKeyboard.loadJavascript("resetContext()");
|
||||
}
|
||||
}
|
||||
|
|
@ -2220,435 +2226,6 @@ public final class KMManager {
|
|||
}
|
||||
}
|
||||
|
||||
protected static final class KMInAppKeyboardWebViewClient extends WebViewClient {
|
||||
public static Context context;
|
||||
|
||||
KMInAppKeyboardWebViewClient(Context context) {
|
||||
KMInAppKeyboardWebViewClient.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageStarted(WebView view, String url, Bitmap favicon) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
Log.d("KMEA", "onPageFinished: [inapp] " + url);
|
||||
shouldOverrideUrlLoading(view, url);
|
||||
}
|
||||
|
||||
private void pageLoaded(WebView view, String url) {
|
||||
Log.d("KMEA", "pageLoaded: [inapp] " + url);
|
||||
if (InAppKeyboard == null) {
|
||||
KMLog.LogError(TAG, "pageLoaded and InAppKeyboard null");
|
||||
return;
|
||||
}
|
||||
InAppKeyboard.keyboardSet = false;
|
||||
currentLexicalModel = null;
|
||||
|
||||
if (url.startsWith("file")) { // TODO: is this test necessary?
|
||||
InAppKeyboardLoaded = true;
|
||||
|
||||
SharedPreferences prefs = context.getSharedPreferences(context.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE);
|
||||
int index = prefs.getInt(KMManager.KMKey_UserKeyboardIndex, 0);
|
||||
if (index < 0) {
|
||||
index = 0;
|
||||
}
|
||||
Keyboard keyboardInfo = KMManager.getKeyboardInfo(context, index);
|
||||
String langId = null;
|
||||
if (keyboardInfo != null) {
|
||||
langId = keyboardInfo.getLanguageID();
|
||||
InAppKeyboard.setKeyboard(keyboardInfo);
|
||||
} else {
|
||||
// Revert to default (index 0) or fallback keyboard
|
||||
keyboardInfo = KMManager.getKeyboardInfo(context, 0);
|
||||
if (keyboardInfo == null) {
|
||||
// Not logging to Sentry because some keyboard apps like FV don't install keyboards until the user chooses
|
||||
keyboardInfo = KMManager.getDefaultKeyboard(context);
|
||||
}
|
||||
if (keyboardInfo != null) {
|
||||
langId = keyboardInfo.getLanguageID();
|
||||
InAppKeyboard.setKeyboard(keyboardInfo);
|
||||
}
|
||||
}
|
||||
|
||||
registerAssociatedLexicalModel(langId);
|
||||
|
||||
InAppKeyboard.showHelpBubbleAfterDelay(2000, true); // check if it should be shown at that time!
|
||||
|
||||
InAppKeyboard.callJavascriptAfterLoad();
|
||||
InAppKeyboard.setSpacebarText(spacebarText);
|
||||
|
||||
KeyboardEventHandler.notifyListeners(KMTextView.kbEventListeners, KeyboardType.KEYBOARD_TYPE_INAPP, EventType.KEYBOARD_LOADED, null);
|
||||
|
||||
// Special handling for in-app TextView context keymanapp/keyman#3809
|
||||
if (KMTextView.activeView != null && KMTextView.activeView.getClass() == KMTextView.class) {
|
||||
KMTextView.updateTextContext();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
Log.d("KMEA", "shouldOverrideUrlLoading [inapp]: " + url);
|
||||
if (InAppKeyboard == null) {
|
||||
KMLog.LogError(TAG, "shouldOverrideUrlLoading and InAppKeyboard null");
|
||||
return false;
|
||||
}
|
||||
|
||||
// URL has actual path to the keyboard.html file as a prefix! We need to replace
|
||||
// just the first intended '#' to get URI-based query param processing.
|
||||
// At some point, other parts of the function should be redone to allow use of ? instead
|
||||
// of # in our WebView command "queries" entirely.
|
||||
String cmd = url.replace("keyboard.html#", "keyboard.html?");
|
||||
Uri urlCommand = Uri.parse(cmd);
|
||||
if (url.indexOf("pageLoaded") >= 0) {
|
||||
pageLoaded(view, url);
|
||||
} else if (url.indexOf("hideKeyboard") >= 0) {
|
||||
if (KMTextView.activeView != null && KMTextView.activeView.getClass() == KMTextView.class) {
|
||||
InAppKeyboard.dismissHelpBubble();
|
||||
KMTextView textView = (KMTextView) KMTextView.activeView;
|
||||
textView.dismissKeyboard();
|
||||
}
|
||||
} else if (urlCommand.getQueryParameter("globeKeyAction") != null) {
|
||||
InAppKeyboard.dismissHelpBubble();
|
||||
InAppKeyboard.setShouldShowHelpBubble(false);
|
||||
|
||||
// Globe key has been used; disable the internal preference setting.
|
||||
KMManager.setPersistentShouldShowHelpBubble(false);
|
||||
|
||||
handleGlobeKeyAction(context, urlCommand.getBooleanQueryParameter("keydown", false),
|
||||
KeyboardType.KEYBOARD_TYPE_INAPP);
|
||||
} else if (url.indexOf("helpBubbleDismissed") >= 0) {
|
||||
// The user has begun interacting with the keyboard; we'll disable the help bubble
|
||||
// for the rest of the lifetime of this keyboard instance.
|
||||
InAppKeyboard.setShouldShowHelpBubble(false);
|
||||
} else if (url.indexOf("showKeyPreview") >= 0) {
|
||||
String deviceType = context.getResources().getString(R.string.device_type);
|
||||
if (deviceType.equals("AndroidTablet")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (InAppKeyboard.subKeysWindow != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int start = url.indexOf("x=") + 2;
|
||||
int end = url.indexOf("+y=");
|
||||
float x = Float.valueOf(url.substring(start, end));
|
||||
|
||||
start = url.indexOf("y=") + 2;
|
||||
end = url.indexOf("+w=");
|
||||
float y = Float.valueOf(url.substring(start, end));
|
||||
|
||||
start = url.indexOf("w=") + 2;
|
||||
end = url.indexOf("+h=");
|
||||
float w = Float.valueOf(url.substring(start, end));
|
||||
|
||||
start = url.indexOf("h=") + 2;
|
||||
end = url.indexOf("+t=");
|
||||
float h = Float.valueOf(url.substring(start, end));
|
||||
|
||||
start = url.indexOf("t=") + 2;
|
||||
String t = url.substring(start);
|
||||
String text = InAppKeyboard.convertKeyText(t);
|
||||
|
||||
float left = x - w / 2.0f;
|
||||
float right = left + w;
|
||||
float top = y - 1;
|
||||
float bottom = top + h;
|
||||
|
||||
RectF keyFrame = new RectF(left, top, right, bottom);
|
||||
InAppKeyboard.showKeyPreview(context, (int) x, (int) y, keyFrame, text);
|
||||
} else if (url.indexOf("dismissKeyPreview") >= 0) {
|
||||
InAppKeyboard.dismissKeyPreview(100);
|
||||
} else if (url.indexOf("showMore") >= 0) {
|
||||
if (InAppKeyboard.subKeysWindow != null && InAppKeyboard.subKeysWindow.isShowing()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int start = url.indexOf("keyPos=") + 7;
|
||||
int end = url.indexOf("+keys=");
|
||||
InAppKeyboard.subKeysWindowPos = url.substring(start, end).split("\\,");
|
||||
|
||||
start = end + 6;
|
||||
end = url.indexOf("+font=");
|
||||
if (end < 0) {
|
||||
end = url.length();
|
||||
InAppKeyboard.specialOskFont = "";
|
||||
} else {
|
||||
InAppKeyboard.specialOskFont = KMFilename_Osk_Ttf_Font;
|
||||
}
|
||||
|
||||
String keys = url.substring(start, end);
|
||||
|
||||
String[] keyList = keys.split("\\;");
|
||||
int klCount = keyList.length;
|
||||
InAppKeyboard.subKeysList = new ArrayList<HashMap<String, String>>();
|
||||
for (int i = 0; i < klCount; i++) {
|
||||
String[] values = keyList[i].split("\\:");
|
||||
String keyId = (values.length > 0) ? values[0] : "";
|
||||
String keyText = (values.length > 1) ? values[1] : "";
|
||||
|
||||
HashMap<String, String> hashMap = new HashMap<String, String>();
|
||||
hashMap.put("keyId", keyId);
|
||||
hashMap.put("keyText", keyText);
|
||||
InAppKeyboard.subKeysList.add(hashMap);
|
||||
}
|
||||
} else if (url.indexOf("refreshBannerHeight") >= 0) {
|
||||
int start = url.indexOf("change=") + 7;
|
||||
String change = url.substring(start);
|
||||
boolean isModelActive = change.equals("active");
|
||||
SharedPreferences prefs = appContext.getSharedPreferences(appContext.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE);
|
||||
boolean modelPredictionPref = false;
|
||||
if (currentLexicalModel != null) {
|
||||
modelPredictionPref = prefs.getBoolean(getLanguagePredictionPreferenceKey(currentLexicalModel.get(KMManager.KMKey_LanguageID)), true);
|
||||
}
|
||||
currentBanner = (isModelActive && modelPredictionPref) ?
|
||||
KM_BANNER_STATE_SUGGESTION : KM_BANNER_STATE_BLANK;
|
||||
RelativeLayout.LayoutParams params = getKeyboardLayoutParams();
|
||||
InAppKeyboard.setLayoutParams(params);
|
||||
} else if (url.indexOf("suggestPopup") >= 0) {
|
||||
double x = Float.parseFloat(urlCommand.getQueryParameter("x"));
|
||||
double y = Float.parseFloat(urlCommand.getQueryParameter("y"));
|
||||
double width = Float.parseFloat(urlCommand.getQueryParameter("w"));
|
||||
double height = Float.parseFloat(urlCommand.getQueryParameter("h"));
|
||||
String suggestionJSON = urlCommand.getQueryParameter("suggestion");
|
||||
|
||||
JSONParser parser = new JSONParser();
|
||||
JSONObject obj = parser.getJSONObjectFromURIString(suggestionJSON);
|
||||
|
||||
/* // For future implementation
|
||||
InAppKeyboard.suggestionWindowPos = new double[]{x, y};
|
||||
InAppKeyboard.suggestionJSON = suggestionJSON;
|
||||
|
||||
try {
|
||||
Log.v("KMEA", "Suggestion display: " + obj.getString("displayAs"));
|
||||
Log.v("KMEA", "Suggestion's banner coords: " + x + ", " + y + ", " + width + ", " + height);
|
||||
Log.v("KMEA", "Is a <keep> suggestion: "); // likely outdated now that tags exist.
|
||||
} catch (JSONException e) {
|
||||
//e.printStackTrace();
|
||||
Log.v("KMEA", "JSON parsing error: " + e.getMessage());
|
||||
}
|
||||
*/
|
||||
} else if (url.indexOf("reloadAfterError") >= 0) {
|
||||
InAppKeyboard.reloadAfterError();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected static final class KMSystemKeyboardWebViewClient extends WebViewClient {
|
||||
public static Context context;
|
||||
|
||||
KMSystemKeyboardWebViewClient(Context context) {
|
||||
KMSystemKeyboardWebViewClient.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageStarted(WebView view, String url, Bitmap favicon) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
Log.d("KMEA", "onPageFinished: [system] " + url);
|
||||
shouldOverrideUrlLoading(view, url);
|
||||
}
|
||||
|
||||
private void pageLoaded(WebView view, String url) {
|
||||
Log.d("KMEA", "pageLoaded: [system] " + url);
|
||||
if (SystemKeyboard == null) {
|
||||
KMLog.LogError(TAG, "pageLoaded and SystemKeyboard null");
|
||||
return;
|
||||
}
|
||||
|
||||
SystemKeyboard.keyboardSet = false;
|
||||
currentLexicalModel = null;
|
||||
|
||||
if (url.startsWith("file:")) { // TODO: is this test necessary?
|
||||
SystemKeyboardLoaded = true;
|
||||
|
||||
SharedPreferences prefs = context.getSharedPreferences(context.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE);
|
||||
int index = prefs.getInt(KMManager.KMKey_UserKeyboardIndex, 0);
|
||||
if (index < 0) {
|
||||
index = 0;
|
||||
}
|
||||
Keyboard keyboardInfo = KMManager.getKeyboardInfo(context, index);
|
||||
String langId = null;
|
||||
if (keyboardInfo != null) {
|
||||
langId = keyboardInfo.getLanguageID();
|
||||
SystemKeyboard.setKeyboard(keyboardInfo);
|
||||
} else {
|
||||
// Revert to default (index 0) or fallback keyboard
|
||||
keyboardInfo = KMManager.getKeyboardInfo(context, 0);
|
||||
if (keyboardInfo == null) {
|
||||
KMLog.LogError(TAG, "No keyboards installed. Reverting to fallback");
|
||||
keyboardInfo = KMManager.getDefaultKeyboard(context);
|
||||
}
|
||||
if (keyboardInfo != null) {
|
||||
langId = keyboardInfo.getLanguageID();
|
||||
SystemKeyboard.setKeyboard(keyboardInfo);
|
||||
}
|
||||
}
|
||||
|
||||
registerAssociatedLexicalModel(langId);
|
||||
|
||||
SystemKeyboard.showHelpBubbleAfterDelay(2000, true); // check if it should be shown at that time!
|
||||
|
||||
KeyboardEventHandler.notifyListeners(KMTextView.kbEventListeners, KeyboardType.KEYBOARD_TYPE_SYSTEM, EventType.KEYBOARD_LOADED, null);
|
||||
|
||||
SystemKeyboard.callJavascriptAfterLoad();
|
||||
SystemKeyboard.setSpacebarText(spacebarText);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
if (SystemKeyboard == null) {
|
||||
KMLog.LogError(TAG, "shouldOverrideUrlLoading and SystemKeyboard null");
|
||||
return false;
|
||||
}
|
||||
|
||||
// URL has actual path to the keyboard.html file as a prefix! We need to replace
|
||||
// just the first intended '#' to get URI-based query param processing.
|
||||
|
||||
// At some point, other parts of the function should be redone to allow use of ? instead
|
||||
// of # in our WebView command "queries" entirely.
|
||||
String cmd = url.replace("keyboard.html#", "keyboard.html?");
|
||||
Uri urlCommand = Uri.parse(cmd);
|
||||
if(url.indexOf("pageLoaded") >= 0) {
|
||||
pageLoaded(view, url);
|
||||
} else if (url.indexOf("hideKeyboard") >= 0) {
|
||||
SystemKeyboard.dismissHelpBubble();
|
||||
IMService.requestHideSelf(0);
|
||||
} else if (urlCommand.getQueryParameter("globeKeyAction") != null) {
|
||||
SystemKeyboard.dismissHelpBubble();
|
||||
SystemKeyboard.setShouldShowHelpBubble(false);
|
||||
|
||||
// Globe key has been used; disable the internal preference setting.
|
||||
KMManager.setPersistentShouldShowHelpBubble(false);
|
||||
|
||||
handleGlobeKeyAction(context, urlCommand.getBooleanQueryParameter("keydown", false),
|
||||
KeyboardType.KEYBOARD_TYPE_SYSTEM);
|
||||
} else if (urlCommand.getQueryParameter("helpBubbleDismissed") != null) {
|
||||
// The user has begun interacting with the keyboard; we'll disable the help bubble
|
||||
// for the rest of the lifetime of this keyboard instance.
|
||||
SystemKeyboard.setShouldShowHelpBubble(false);
|
||||
} else if (url.indexOf("showKeyPreview") >= 0) {
|
||||
String deviceType = context.getString(R.string.device_type);
|
||||
if (deviceType.equals("AndroidTablet")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (SystemKeyboard.subKeysWindow != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int start = url.indexOf("x=") + 2;
|
||||
int end = url.indexOf("+y=");
|
||||
float x = Float.valueOf(url.substring(start, end));
|
||||
|
||||
start = url.indexOf("y=") + 2;
|
||||
end = url.indexOf("+w=");
|
||||
float y = Float.valueOf(url.substring(start, end));
|
||||
|
||||
start = url.indexOf("w=") + 2;
|
||||
end = url.indexOf("+h=");
|
||||
float w = Float.valueOf(url.substring(start, end));
|
||||
|
||||
start = url.indexOf("h=") + 2;
|
||||
end = url.indexOf("+t=");
|
||||
float h = Float.valueOf(url.substring(start, end));
|
||||
|
||||
start = url.indexOf("t=") + 2;
|
||||
String t = url.substring(start);
|
||||
String text = SystemKeyboard.convertKeyText(t);
|
||||
|
||||
float left = x - w / 2.0f;
|
||||
float right = left + w;
|
||||
float top = y - 1;
|
||||
float bottom = top + h;
|
||||
|
||||
RectF keyFrame = new RectF(left, top, right, bottom);
|
||||
SystemKeyboard.showKeyPreview(context, (int) x, (int) y, keyFrame, text);
|
||||
} else if (url.indexOf("dismissKeyPreview") >= 0) {
|
||||
SystemKeyboard.dismissKeyPreview(100);
|
||||
} else if (url.indexOf("showMore") >= 0) {
|
||||
if (SystemKeyboard.subKeysWindow != null && SystemKeyboard.subKeysWindow.isShowing()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int start = url.indexOf("keyPos=") + 7;
|
||||
int end = url.indexOf("+keys=");
|
||||
SystemKeyboard.subKeysWindowPos = url.substring(start, end).split("\\,");
|
||||
|
||||
start = end + 6;
|
||||
end = url.indexOf("+font=");
|
||||
if (end < 0) {
|
||||
end = url.length();
|
||||
SystemKeyboard.specialOskFont = "";
|
||||
} else {
|
||||
SystemKeyboard.specialOskFont = KMFilename_Osk_Ttf_Font;
|
||||
}
|
||||
|
||||
String keys = url.substring(start, end);
|
||||
|
||||
String[] keyList = keys.split("\\;");
|
||||
int klCount = keyList.length;
|
||||
SystemKeyboard.subKeysList = new ArrayList<HashMap<String, String>>();
|
||||
for (int i = 0; i < klCount; i++) {
|
||||
String[] values = keyList[i].split("\\:");
|
||||
String keyId = (values.length > 0) ? values[0] : "";
|
||||
String keyText = (values.length > 1) ? values[1] : "";
|
||||
|
||||
HashMap<String, String> hashMap = new HashMap<String, String>();
|
||||
hashMap.put("keyId", keyId);
|
||||
hashMap.put("keyText", keyText);
|
||||
SystemKeyboard.subKeysList.add(hashMap);
|
||||
}
|
||||
} else if (url.indexOf("refreshBannerHeight") >= 0) {
|
||||
int start = url.indexOf("change=") + 7;
|
||||
String change = url.substring(start);
|
||||
boolean isModelActive = change.equals("active");
|
||||
SharedPreferences prefs = appContext.getSharedPreferences(appContext.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE);
|
||||
boolean modelPredictionPref = false;
|
||||
if(currentLexicalModel != null) {
|
||||
modelPredictionPref = prefs.getBoolean(getLanguagePredictionPreferenceKey(currentLexicalModel.get(KMManager.KMKey_LanguageID)), true);
|
||||
}
|
||||
currentBanner = (isModelActive && modelPredictionPref) ?
|
||||
KM_BANNER_STATE_SUGGESTION : KM_BANNER_STATE_BLANK;
|
||||
RelativeLayout.LayoutParams params = getKeyboardLayoutParams();
|
||||
SystemKeyboard.setLayoutParams(params);
|
||||
} else if (url.indexOf("suggestPopup") >= 0) {
|
||||
double x = Float.parseFloat(urlCommand.getQueryParameter("x"));
|
||||
double y = Float.parseFloat(urlCommand.getQueryParameter("y"));
|
||||
double width = Float.parseFloat(urlCommand.getQueryParameter("w"));
|
||||
double height = Float.parseFloat(urlCommand.getQueryParameter("h"));
|
||||
String suggestionJSON = urlCommand.getQueryParameter("suggestion");
|
||||
|
||||
JSONParser parser = new JSONParser();
|
||||
JSONObject obj = parser.getJSONObjectFromURIString(suggestionJSON);
|
||||
|
||||
/* // For future implementation
|
||||
SystemKeyboard.suggestionWindowPos = new double[]{x, y};
|
||||
SystemKeyboard.suggestionJSON = suggestionJSON;
|
||||
|
||||
try {
|
||||
Log.v("KMEA", "Suggestion display: " + obj.getString("displayAs"));
|
||||
Log.v("KMEA", "Suggestion's banner coords: " + x + ", " + y + ", " + width + ", " + height);
|
||||
Log.v("KMEA", "Is a <keep> suggestion: "); // likely outdated now that tags exist.
|
||||
} catch (JSONException e) {
|
||||
//e.printStackTrace();
|
||||
Log.v("KMEA", "JSON parsing error: " + e.getMessage());
|
||||
}
|
||||
*/
|
||||
} else if (url.indexOf("reloadAfterError") >= 0) {
|
||||
SystemKeyboard.reloadAfterError();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static final class KMInAppKeyboardJSHandler extends KMKeyboardJSHandler {
|
||||
|
||||
KMInAppKeyboardJSHandler(Context context, KMKeyboard k) {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (C) 2017 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
public final class KMScanCodeMap {
|
||||
|
||||
|
|
@ -2,14 +2,15 @@
|
|||
* Copyright (C) 2017 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.tavultesoft.kmea.KMManager.KeyboardType;
|
||||
import com.tavultesoft.kmea.KeyboardEventHandler.EventType;
|
||||
import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardEventListener;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.KMKeyboardWebViewClient;
|
||||
import com.keyman.engine.KMManager.KeyboardType;
|
||||
import com.keyman.engine.KeyboardEventHandler.EventType;
|
||||
import com.keyman.engine.KeyboardEventHandler.OnKeyboardEventListener;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
import android.view.ContextThemeWrapper;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
|
@ -120,7 +121,7 @@ public final class KMTextView extends AppCompatEditText {
|
|||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
if (hasFocus) {
|
||||
activeView = v;
|
||||
if (KMManager.InAppKeyboardLoaded) {
|
||||
if (KMManager.InAppKeyboardWebViewClient.getKeyboardLoaded()) {
|
||||
updateTextContext();
|
||||
}
|
||||
showKeyboard();
|
||||
|
|
@ -178,7 +179,7 @@ public final class KMTextView extends AppCompatEditText {
|
|||
|
||||
Window mainWindow = activity.getWindow();
|
||||
if (hasWindowFocus) {
|
||||
KMManager.KMInAppKeyboardWebViewClient.context = context;
|
||||
KMManager.InAppKeyboardWebViewClient.setContext(context);
|
||||
activeView = mainWindow.getCurrentFocus();
|
||||
|
||||
Typeface font = KMManager.getFontTypeface(context, KMKeyboard.textFontFilename());
|
||||
|
|
@ -189,7 +190,7 @@ public final class KMTextView extends AppCompatEditText {
|
|||
}
|
||||
|
||||
if (activeView != null && activeView.equals(this)) {
|
||||
if (KMManager.InAppKeyboardLoaded) {
|
||||
if (KMManager.InAppKeyboardWebViewClient.getKeyboardLoaded()) {
|
||||
updateTextContext();
|
||||
}
|
||||
|
||||
|
|
@ -2,14 +2,14 @@
|
|||
* Copyright (C) 2017 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.tavultesoft.kmea.KMManager.KeyboardType;
|
||||
import com.keyman.engine.KMManager.KeyboardType;
|
||||
|
||||
public final class KeyboardEventHandler {
|
||||
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (C) 2017-2021 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
|
@ -28,13 +28,15 @@ import android.widget.SimpleAdapter;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.util.FileProviderUtils;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.KMString;
|
||||
import com.tavultesoft.kmea.util.MapCompat;
|
||||
import com.tavultesoft.kmea.util.QRCodeUtil;
|
||||
import com.tavultesoft.kmea.KMHelpFileActivity;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.util.DependencyUtil;
|
||||
import com.keyman.engine.util.DependencyUtil.LibraryType;
|
||||
import com.keyman.engine.util.FileProviderUtils;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.KMString;
|
||||
import com.keyman.engine.util.MapCompat;
|
||||
import com.keyman.engine.util.QRCodeUtil;
|
||||
import com.keyman.engine.KMHelpFileActivity;
|
||||
|
||||
// Public access is necessary to avoid IllegalAccessException
|
||||
public final class KeyboardInfoActivity extends BaseActivity {
|
||||
|
|
@ -149,7 +151,7 @@ public final class KeyboardInfoActivity extends BaseActivity {
|
|||
// If QRGen library included, append the QR code View to the
|
||||
// scrollable listview for sharing keyboard
|
||||
View view = getLayoutInflater().inflate(R.layout.qr_layout, null);
|
||||
if (QRCodeUtil.libraryExists(context)) {
|
||||
if (DependencyUtil.libraryExists(LibraryType.QRCODE)) {
|
||||
LinearLayout qrLayout = (LinearLayout) view.findViewById(R.id.qrLayout);
|
||||
listView.addFooterView(qrLayout);
|
||||
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (C) 2017 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
|
|
@ -13,15 +13,15 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.tavultesoft.kmea.data.CloudRepository;
|
||||
import com.tavultesoft.kmea.data.Dataset;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.data.KeyboardController;
|
||||
import com.tavultesoft.kmea.data.LexicalModel;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.tavultesoft.kmea.util.KMString;
|
||||
import com.tavultesoft.kmea.util.MapCompat;
|
||||
import com.keyman.engine.data.CloudRepository;
|
||||
import com.keyman.engine.data.Dataset;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.data.KeyboardController;
|
||||
import com.keyman.engine.data.LexicalModel;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
import com.keyman.engine.util.KMString;
|
||||
import com.keyman.engine.util.MapCompat;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
public enum KmpInstallMode {
|
||||
Silent, // Show no UI while installing a package. Errors may be shown as toasts
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (C) 2017-2021 SIL International. All rights reserved.
|
||||
*/
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
|
@ -19,13 +19,13 @@ import android.widget.ListView;
|
|||
import android.widget.SimpleAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tavultesoft.kmea.data.LexicalModel;
|
||||
import com.tavultesoft.kmea.util.FileProviderUtils;
|
||||
import com.tavultesoft.kmea.util.KMString;
|
||||
import com.tavultesoft.kmea.util.MapCompat;
|
||||
import com.tavultesoft.kmea.KMHelpFileActivity;
|
||||
import com.keyman.engine.data.LexicalModel;
|
||||
import com.keyman.engine.util.FileProviderUtils;
|
||||
import com.keyman.engine.util.KMString;
|
||||
import com.keyman.engine.util.MapCompat;
|
||||
import com.keyman.engine.KMHelpFileActivity;
|
||||
|
||||
import static com.tavultesoft.kmea.ConfirmDialogFragment.DialogType.DIALOG_TYPE_DELETE_MODEL;
|
||||
import static com.keyman.engine.ConfirmDialogFragment.DialogType.DIALOG_TYPE_DELETE_MODEL;
|
||||
|
||||
// Public access is necessary to avoid IllegalAccessException
|
||||
public final class ModelInfoActivity extends BaseActivity {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
package com.tavultesoft.kmea;
|
||||
package com.keyman.engine;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
|
@ -20,15 +20,15 @@ import androidx.annotation.NonNull;
|
|||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import com.tavultesoft.kmea.cloud.CloudApiTypes;
|
||||
import com.tavultesoft.kmea.cloud.CloudDownloadMgr;
|
||||
import com.tavultesoft.kmea.cloud.impl.CloudLexicalModelMetaDataDownloadCallback;
|
||||
import com.tavultesoft.kmea.data.CloudRepository;
|
||||
import com.tavultesoft.kmea.data.Dataset;
|
||||
import com.tavultesoft.kmea.data.LexicalModel;
|
||||
import com.tavultesoft.kmea.data.adapters.NestedAdapter;
|
||||
import com.tavultesoft.kmea.util.BCP47;
|
||||
import com.tavultesoft.kmea.util.MapCompat;
|
||||
import com.keyman.engine.cloud.CloudApiTypes;
|
||||
import com.keyman.engine.cloud.CloudDownloadMgr;
|
||||
import com.keyman.engine.cloud.impl.CloudLexicalModelMetaDataDownloadCallback;
|
||||
import com.keyman.engine.data.CloudRepository;
|
||||
import com.keyman.engine.data.Dataset;
|
||||
import com.keyman.engine.data.LexicalModel;
|
||||
import com.keyman.engine.data.adapters.NestedAdapter;
|
||||
import com.keyman.engine.util.BCP47;
|
||||
import com.keyman.engine.util.MapCompat;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -209,7 +209,7 @@ public final class ModelPickerActivity extends BaseActivity {
|
|||
if(immediateRegister) {
|
||||
// Register associated lexical model if it matches the active keyboard's language code;
|
||||
// it's safe since we're on the same thread. Needs to be called AFTER deinstalling the old one.
|
||||
com.tavultesoft.kmea.data.Keyboard kbInfo = KMManager.getCurrentKeyboardInfo(context);
|
||||
com.keyman.engine.data.Keyboard kbInfo = KMManager.getCurrentKeyboardInfo(context);
|
||||
if(kbInfo != null) {
|
||||
String kbdLgCode = kbInfo.getLanguageID();
|
||||
if(BCP47.languageEquals(kbdLgCode, languageID)) {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea.cloud;
|
||||
package com.keyman.engine.cloud;
|
||||
|
||||
import android.app.DownloadManager;
|
||||
import android.content.Context;
|
||||
|
|
@ -7,9 +7,9 @@ import android.widget.Toast;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.R;
|
||||
import com.tavultesoft.kmea.util.DownloadFileUtils;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.R;
|
||||
import com.keyman.engine.util.DownloadFileUtils;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
|
@ -1,21 +1,22 @@
|
|||
package com.tavultesoft.kmea.cloud;
|
||||
package com.keyman.engine.cloud;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.tavultesoft.kmea.JSONParser;
|
||||
import com.tavultesoft.kmea.KMKeyboardDownloaderActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.KeyboardPickerActivity;
|
||||
import com.tavultesoft.kmea.R;
|
||||
import com.tavultesoft.kmea.cloud.CloudApiTypes;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.data.KeyboardController;
|
||||
import com.tavultesoft.kmea.data.LexicalModel;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.tavultesoft.kmea.util.MapCompat;
|
||||
import com.keyman.engine.JSONParser;
|
||||
import com.keyman.engine.KMKeyboardDownloaderActivity;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.KeyboardPickerActivity;
|
||||
import com.keyman.engine.R;
|
||||
import com.keyman.engine.cloud.CloudApiTypes;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.data.KeyboardController;
|
||||
import com.keyman.engine.data.LexicalModel;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
import com.keyman.engine.util.MapCompat;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
|
@ -158,9 +159,10 @@ public class CloudDataJsonUtil {
|
|||
// Cloud catalog has newer KMP version available
|
||||
String updateKMP = kbd.getUpdateKMP();
|
||||
if (updateKMP != null) {
|
||||
if (!updateKMP.equalsIgnoreCase(cloudKMP)) {
|
||||
// Update keyboard info with the latest KMP link
|
||||
kbd.setUpdateKMP(cloudKMP);
|
||||
if (cloudLinkIsNewer(updateKMP, cloudKMP)) {
|
||||
// Update keyboard info with the latest KMP link after appending languageID
|
||||
String languageID = kbd.getLanguageID();
|
||||
kbd.setUpdateKMP(String.format("%s&bcp47=%s", cloudKMP, languageID));
|
||||
KeyboardController.getInstance().add(kbd);
|
||||
saveKeyboardList = true;
|
||||
}
|
||||
|
|
@ -350,4 +352,38 @@ public class CloudDataJsonUtil {
|
|||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if cloudKMP update link is a newer version.
|
||||
* @param updateKMP - Previously stored kmp link. Could be empty if an update wasn't available before
|
||||
* @param cloudKMP - New kmp link from the cloud query
|
||||
* @return boolean if the kmp paths match and cloud kmp version is newer
|
||||
*/
|
||||
public static boolean cloudLinkIsNewer(String updateKMP, String cloudKMP) {
|
||||
if (cloudKMP == null || cloudKMP.isEmpty()) {
|
||||
if (!KMManager.isTestMode()) {
|
||||
KMLog.LogError(TAG, "cloudKMP is null or empty");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
Uri cloudLink = Uri.parse(cloudKMP);
|
||||
|
||||
if (updateKMP == null || updateKMP.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Uri localLink = Uri.parse(updateKMP);
|
||||
|
||||
boolean pathsMatch = localLink.getLastPathSegment().equalsIgnoreCase(cloudLink.getLastPathSegment());
|
||||
boolean cloudVersionNewer = FileUtils.compareVersions(
|
||||
localLink.getQueryParameter(CDKey_Version), cloudLink.getQueryParameter(CDKey_Version)) == FileUtils.VERSION_LOWER;
|
||||
|
||||
return pathsMatch && cloudVersionNewer;
|
||||
} catch (Exception e) {
|
||||
KMLog.LogException(TAG, "Failed to compare kmp links " + updateKMP + " and " + cloudKMP, e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea.cloud;
|
||||
package com.keyman.engine.cloud;
|
||||
|
||||
import android.app.DownloadManager;
|
||||
import android.content.BroadcastReceiver;
|
||||
|
|
@ -8,7 +8,7 @@ import android.content.IntentFilter;
|
|||
import android.net.Uri;
|
||||
import android.util.Log;
|
||||
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package com.tavultesoft.kmea.cloud;
|
||||
package com.keyman.engine.cloud;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.tavultesoft.kmea.cloud.CloudApiTypes;
|
||||
import com.tavultesoft.kmea.cloud.CloudDownloadMgr;
|
||||
import com.keyman.engine.cloud.CloudApiTypes;
|
||||
import com.keyman.engine.cloud.CloudDownloadMgr;
|
||||
|
||||
/**
|
||||
* Interface for {@link CloudDownloadMgr} as callback to do use case specific task.
|
||||
|
|
@ -1,24 +1,24 @@
|
|||
package com.tavultesoft.kmea.cloud.impl;
|
||||
package com.keyman.engine.cloud.impl;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.KeyboardPickerActivity;
|
||||
import com.tavultesoft.kmea.R;
|
||||
import com.tavultesoft.kmea.cloud.CloudApiTypes;
|
||||
import com.tavultesoft.kmea.cloud.CloudDataJsonUtil;
|
||||
import com.tavultesoft.kmea.cloud.ICloudDownloadCallback;
|
||||
import com.tavultesoft.kmea.data.CloudRepository;
|
||||
import com.tavultesoft.kmea.data.Dataset;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.data.KeyboardController;
|
||||
import com.tavultesoft.kmea.data.LanguageResource;
|
||||
import com.tavultesoft.kmea.data.LexicalModel;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.VersionUtils;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.KeyboardPickerActivity;
|
||||
import com.keyman.engine.R;
|
||||
import com.keyman.engine.cloud.CloudApiTypes;
|
||||
import com.keyman.engine.cloud.CloudDataJsonUtil;
|
||||
import com.keyman.engine.cloud.ICloudDownloadCallback;
|
||||
import com.keyman.engine.data.CloudRepository;
|
||||
import com.keyman.engine.data.Dataset;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.data.KeyboardController;
|
||||
import com.keyman.engine.data.LanguageResource;
|
||||
import com.keyman.engine.data.LexicalModel;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.VersionUtils;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package com.tavultesoft.kmea.cloud.impl;
|
||||
package com.keyman.engine.cloud.impl;
|
||||
|
||||
import com.tavultesoft.kmea.cloud.CloudApiTypes;
|
||||
import com.keyman.engine.cloud.CloudApiTypes;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea.cloud.impl;
|
||||
package com.keyman.engine.cloud.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -1,21 +1,21 @@
|
|||
package com.tavultesoft.kmea.cloud.impl;
|
||||
package com.keyman.engine.cloud.impl;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.KMKeyboardDownloaderActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.KeyboardEventHandler;
|
||||
import com.tavultesoft.kmea.KmpInstallMode;
|
||||
import com.tavultesoft.kmea.R;
|
||||
import com.tavultesoft.kmea.cloud.CloudApiTypes;
|
||||
import com.tavultesoft.kmea.cloud.ICloudDownloadCallback;
|
||||
import com.tavultesoft.kmea.packages.LexicalModelPackageProcessor;
|
||||
import com.tavultesoft.kmea.packages.PackageProcessor;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.KMKeyboardDownloaderActivity;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.KeyboardEventHandler;
|
||||
import com.keyman.engine.KmpInstallMode;
|
||||
import com.keyman.engine.R;
|
||||
import com.keyman.engine.cloud.CloudApiTypes;
|
||||
import com.keyman.engine.cloud.ICloudDownloadCallback;
|
||||
import com.keyman.engine.packages.LexicalModelPackageProcessor;
|
||||
import com.keyman.engine.packages.PackageProcessor;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
import org.json.JSONException;
|
||||
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
/**
|
||||
* Copyright (C) 2020 SIL International. All rights reserved.
|
||||
*/
|
||||
package com.tavultesoft.kmea.cloud.impl;
|
||||
package com.keyman.engine.cloud.impl;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.R;
|
||||
import com.tavultesoft.kmea.cloud.CloudApiTypes;
|
||||
import com.tavultesoft.kmea.cloud.CloudDataJsonUtil;
|
||||
import com.tavultesoft.kmea.cloud.CloudDownloadMgr;
|
||||
import com.tavultesoft.kmea.cloud.ICloudDownloadCallback;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.R;
|
||||
import com.keyman.engine.cloud.CloudApiTypes;
|
||||
import com.keyman.engine.cloud.CloudDataJsonUtil;
|
||||
import com.keyman.engine.cloud.CloudDownloadMgr;
|
||||
import com.keyman.engine.cloud.ICloudDownloadCallback;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
package com.tavultesoft.kmea.cloud.impl;
|
||||
package com.keyman.engine.cloud.impl;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.KMKeyboardDownloaderActivity;
|
||||
import com.tavultesoft.kmea.KeyboardEventHandler;
|
||||
import com.tavultesoft.kmea.R;
|
||||
import com.tavultesoft.kmea.cloud.CloudApiTypes;
|
||||
import com.tavultesoft.kmea.cloud.ICloudDownloadCallback;
|
||||
import com.tavultesoft.kmea.packages.LexicalModelPackageProcessor;
|
||||
import com.tavultesoft.kmea.packages.PackageProcessor;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.KMKeyboardDownloaderActivity;
|
||||
import com.keyman.engine.KeyboardEventHandler;
|
||||
import com.keyman.engine.R;
|
||||
import com.keyman.engine.cloud.CloudApiTypes;
|
||||
import com.keyman.engine.cloud.ICloudDownloadCallback;
|
||||
import com.keyman.engine.packages.LexicalModelPackageProcessor;
|
||||
import com.keyman.engine.packages.PackageProcessor;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
import org.json.JSONException;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea.data;
|
||||
package com.keyman.engine.data;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
|
@ -6,21 +6,21 @@ import android.widget.Toast;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.BuildConfig;
|
||||
import com.tavultesoft.kmea.KMKeyboardDownloaderActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.KeyboardPickerActivity;
|
||||
import com.tavultesoft.kmea.R;
|
||||
import com.tavultesoft.kmea.cloud.CloudApiTypes;
|
||||
import com.tavultesoft.kmea.cloud.impl.CloudCatalogDownloadCallback;
|
||||
import com.tavultesoft.kmea.cloud.impl.CloudCatalogDownloadReturns;
|
||||
import com.tavultesoft.kmea.cloud.CloudDataJsonUtil;
|
||||
import com.tavultesoft.kmea.cloud.CloudDownloadMgr;
|
||||
import com.tavultesoft.kmea.packages.JSONUtils;
|
||||
import com.tavultesoft.kmea.util.BCP47;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.tavultesoft.kmea.util.VersionUtils;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.BuildConfig;
|
||||
import com.keyman.engine.KMKeyboardDownloaderActivity;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.KeyboardPickerActivity;
|
||||
import com.keyman.engine.R;
|
||||
import com.keyman.engine.cloud.CloudApiTypes;
|
||||
import com.keyman.engine.cloud.impl.CloudCatalogDownloadCallback;
|
||||
import com.keyman.engine.cloud.impl.CloudCatalogDownloadReturns;
|
||||
import com.keyman.engine.cloud.CloudDataJsonUtil;
|
||||
import com.keyman.engine.cloud.CloudDownloadMgr;
|
||||
import com.keyman.engine.packages.JSONUtils;
|
||||
import com.keyman.engine.util.BCP47;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
import com.keyman.engine.util.VersionUtils;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea.data;
|
||||
package com.keyman.engine.data;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
|
@ -6,8 +6,8 @@ import android.widget.ArrayAdapter;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.tavultesoft.kmea.data.adapters.AdapterFilter;
|
||||
import com.tavultesoft.kmea.data.adapters.ListBacked;
|
||||
import com.keyman.engine.data.adapters.AdapterFilter;
|
||||
import com.keyman.engine.data.adapters.ListBacked;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
|
@ -1,20 +1,20 @@
|
|||
/**
|
||||
* Copyright (C) 2020 SIL International. All rights reserved.
|
||||
*/
|
||||
package com.tavultesoft.kmea.data;
|
||||
package com.keyman.engine.data;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.tavultesoft.kmea.KMKeyboardDownloaderActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.KeyboardPickerActivity;
|
||||
import com.tavultesoft.kmea.util.BCP47;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.tavultesoft.kmea.util.KMString;
|
||||
import com.keyman.engine.KMKeyboardDownloaderActivity;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.KeyboardPickerActivity;
|
||||
import com.keyman.engine.util.BCP47;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
import com.keyman.engine.util.KMString;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
|
@ -2,19 +2,19 @@
|
|||
* Copyright (C) 2020 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea.data;
|
||||
package com.keyman.engine.data;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.tavultesoft.kmea.JSONParser;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.KeyboardPickerActivity;
|
||||
import com.tavultesoft.kmea.util.BCP47;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.MapCompat;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.JSONParser;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.KeyboardPickerActivity;
|
||||
import com.keyman.engine.util.BCP47;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.MapCompat;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
/**
|
||||
* Copyright (C) 2020 SIL International. All rights reserved.
|
||||
*/
|
||||
package com.tavultesoft.kmea.data;
|
||||
package com.keyman.engine.data;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.tavultesoft.kmea.util.KMString;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
import com.keyman.engine.util.KMString;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
|
@ -1,18 +1,18 @@
|
|||
/**
|
||||
* Copyright (C) 2020 SIL International. All rights reserved.
|
||||
*/
|
||||
package com.tavultesoft.kmea.data;
|
||||
package com.keyman.engine.data;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.tavultesoft.kmea.KMKeyboardDownloaderActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.util.BCP47;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.tavultesoft.kmea.util.KMString;
|
||||
import com.keyman.engine.KMKeyboardDownloaderActivity;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.util.BCP47;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
import com.keyman.engine.util.KMString;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea.data.adapters;
|
||||
package com.keyman.engine.data.adapters;
|
||||
|
||||
import android.widget.ArrayAdapter;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea.data.adapters;
|
||||
package com.keyman.engine.data.adapters;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea.data.adapters;
|
||||
package com.keyman.engine.data.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.DataSetObserver;
|
||||
|
|
@ -7,7 +7,7 @@ import android.widget.ArrayAdapter;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea.logic;
|
||||
package com.keyman.engine.logic;
|
||||
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
|
|
@ -20,15 +20,15 @@ import androidx.core.app.NotificationCompat;
|
|||
import androidx.core.app.NotificationCompat.Builder;
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.KMKeyboardDownloaderActivity;
|
||||
import com.tavultesoft.kmea.KeyboardPickerActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.KeyboardEventHandler;
|
||||
import com.tavultesoft.kmea.R;
|
||||
import com.tavultesoft.kmea.data.CloudRepository;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.tavultesoft.kmea.util.VersionUtils;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.KMKeyboardDownloaderActivity;
|
||||
import com.keyman.engine.KeyboardPickerActivity;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.KeyboardEventHandler;
|
||||
import com.keyman.engine.R;
|
||||
import com.keyman.engine.data.CloudRepository;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
import com.keyman.engine.util.VersionUtils;
|
||||
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
|
|
@ -426,7 +426,7 @@ public class ResourcesUpdateTool implements KeyboardEventHandler.OnKeyboardDownl
|
|||
stackBuilder.addNextIntentWithParentStack(intent);
|
||||
// Get the PendingIntent containing the entire back stack
|
||||
PendingIntent startUpdateIntent =
|
||||
stackBuilder.getPendingIntent(notification_id, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
stackBuilder.getPendingIntent(notification_id, PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
|
||||
Builder builder = new Builder(currentContext, getClass().getName())
|
||||
.setSmallIcon(R.drawable.ic_keyboard)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea.packages;
|
||||
package com.keyman.engine.packages;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
|
|
@ -7,10 +7,10 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.JSONParser;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.JSONParser;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.tavultesoft.kmea.packages;
|
||||
package com.keyman.engine.packages;
|
||||
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
/**
|
||||
* Copyright (C) 2017-2020 SIL International. All rights reserved.
|
||||
*/
|
||||
package com.tavultesoft.kmea.packages;
|
||||
package com.keyman.engine.packages;
|
||||
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.JSONParser;
|
||||
import com.tavultesoft.kmea.data.Keyboard;
|
||||
import com.tavultesoft.kmea.data.KeyboardController;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.tavultesoft.kmea.util.KMLog;
|
||||
import com.tavultesoft.kmea.util.ZipUtils;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.JSONParser;
|
||||
import com.keyman.engine.data.Keyboard;
|
||||
import com.keyman.engine.data.KeyboardController;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
import com.keyman.engine.util.KMLog;
|
||||
import com.keyman.engine.util.ZipUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (C) 2020 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea.util;
|
||||
package com.keyman.engine.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.security.InvalidParameterException;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea.util;
|
||||
package com.keyman.engine.util;
|
||||
|
||||
import java.lang.CharSequence;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea.util;
|
||||
package com.keyman.engine.util;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.IOException;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Copyright (C) 2021 SIL International. All rights reserved.
|
||||
*/
|
||||
package com.tavultesoft.kmea.util;
|
||||
package com.keyman.engine.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.ContextWrapper;
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* Copyright (C) 2022 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.keyman.engine.util;
|
||||
|
||||
public final class DependencyUtil {
|
||||
private static final String TAG = "DependencyUtil";
|
||||
|
||||
public enum LibraryType {
|
||||
SENTRY,
|
||||
QRCODE;
|
||||
|
||||
public static LibraryType fromString(String library) {
|
||||
if(library == null) return SENTRY;
|
||||
switch(library) {
|
||||
case "sentry": return SENTRY;
|
||||
case "qrcode": return QRCODE;
|
||||
}
|
||||
return SENTRY;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
String libraries[] = { "io.sentry.Sentry", "net.glxn.qrgen.android.QRCode" };
|
||||
return libraries[this.ordinal()];
|
||||
}
|
||||
};
|
||||
|
||||
private static Boolean libraryExists[] = {null, null};
|
||||
|
||||
/**
|
||||
* Utility to determine if a dependency library is available in an app
|
||||
* @param library - LibraryType enum of the library to check: SENTRY or QRCODE
|
||||
* @return boolean - true if the library exists
|
||||
*/
|
||||
public static boolean libraryExists(LibraryType library) {
|
||||
int ord = library.ordinal();
|
||||
if (libraryExists[ord] == null) {
|
||||
try {
|
||||
Class.forName(library.toString());
|
||||
libraryExists[ord] = true;
|
||||
} catch (ClassNotFoundException e) {
|
||||
// Intentionally not sending Exception to Sentry
|
||||
// because 3rd party apps may not include the dependency library
|
||||
libraryExists[ord] = false;
|
||||
}
|
||||
}
|
||||
return libraryExists[ord];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Copyright (C) 2020 SIL International. All rights reserved.
|
||||
*/
|
||||
package com.tavultesoft.kmea.util;
|
||||
package com.keyman.engine.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tavultesoft.kmea.util;
|
||||
package com.keyman.engine.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.ContentProviderClient;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Copyright (C) 2020 SIL International. All rights reserved.
|
||||
*/
|
||||
package com.tavultesoft.kmea.util;
|
||||
package com.keyman.engine.util;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (C) 2021 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea.util;
|
||||
package com.keyman.engine.util;
|
||||
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipDescription;
|
||||
|
|
@ -13,11 +13,11 @@ import android.widget.Toast;
|
|||
|
||||
import androidx.core.content.FileProvider;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.R;
|
||||
import com.tavultesoft.kmea.util.FileProviderUtils;
|
||||
import com.tavultesoft.kmea.util.FileUtils;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.R;
|
||||
import com.keyman.engine.util.FileProviderUtils;
|
||||
import com.keyman.engine.util.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
|
|
@ -2,14 +2,16 @@
|
|||
* Copyright (C) 2020 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.tavultesoft.kmea.util;
|
||||
package com.keyman.engine.util;
|
||||
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.BuildConfig;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.keyman.engine.BaseActivity;
|
||||
import com.keyman.engine.BuildConfig;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.util.DependencyUtil;
|
||||
import com.keyman.engine.util.DependencyUtil.LibraryType;
|
||||
|
||||
import io.sentry.Sentry;
|
||||
import io.sentry.SentryLevel;
|
||||
|
|
@ -26,7 +28,7 @@ public final class KMLog {
|
|||
if (msg != null && !msg.isEmpty()) {
|
||||
Log.i(tag, msg);
|
||||
|
||||
if (Sentry.isEnabled()) {
|
||||
if (DependencyUtil.libraryExists(LibraryType.SENTRY) && Sentry.isEnabled()) {
|
||||
Sentry.captureMessage(msg, SentryLevel.INFO);
|
||||
}
|
||||
}
|
||||
|
|
@ -45,7 +47,7 @@ public final class KMLog {
|
|||
BaseActivity.makeToast(null, msg, Toast.LENGTH_LONG);
|
||||
}
|
||||
|
||||
if (Sentry.isEnabled()) {
|
||||
if (DependencyUtil.libraryExists(LibraryType.SENTRY) && Sentry.isEnabled()) {
|
||||
Sentry.captureMessage(msg, SentryLevel.ERROR);
|
||||
}
|
||||
}
|
||||
|
|
@ -70,7 +72,7 @@ public final class KMLog {
|
|||
BaseActivity.makeToast(null, errorMsg, Toast.LENGTH_LONG);
|
||||
}
|
||||
|
||||
if (Sentry.isEnabled()) {
|
||||
if (DependencyUtil.libraryExists(LibraryType.SENTRY) && Sentry.isEnabled()) {
|
||||
Sentry.addBreadcrumb(errorMsg);
|
||||
Sentry.captureException(e);
|
||||
}
|
||||
|
|
@ -86,7 +88,7 @@ public final class KMLog {
|
|||
*/
|
||||
public static void LogExceptionWithData(String tag, String msg,
|
||||
String objName, Object obj, Throwable e) {
|
||||
if (obj != null && Sentry.isEnabled()) {
|
||||
if (obj != null && DependencyUtil.libraryExists(LibraryType.SENTRY) && Sentry.isEnabled()) {
|
||||
String objStr = null;
|
||||
try {
|
||||
objStr = obj.toString();
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
/**
|
||||
* Copyright (C) 2020 SIL International. All rights reserved.
|
||||
*/
|
||||
package com.tavultesoft.kmea.util;
|
||||
package com.keyman.engine.util;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
|
||||
import com.tavultesoft.kmea.BuildConfig;
|
||||
import com.tavultesoft.kmea.KMKeyboardDownloaderActivity;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
import com.tavultesoft.kmea.KMManager.Tier;
|
||||
import com.tavultesoft.kmea.util.KMString;
|
||||
import com.keyman.engine.BuildConfig;
|
||||
import com.keyman.engine.KMKeyboardDownloaderActivity;
|
||||
import com.keyman.engine.KMManager;
|
||||
import com.keyman.engine.KMManager.Tier;
|
||||
import com.keyman.engine.util.KMString;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue