fix issues with debug version

and some small things
This commit is contained in:
Helium314 2023-06-28 15:21:30 +02:00
parent 8123c79523
commit ae69ffe648
8 changed files with 14 additions and 11 deletions

View file

@ -11,6 +11,8 @@ Plan / to do:
* maybe: rename (package, app, icon), so it can be installed parallel to OpenBoard, and published on F-Droid * maybe: rename (package, app, icon), so it can be installed parallel to OpenBoard, and published on F-Droid
* ~user-selectable dictionaries, https://github.com/openboard-team/openboard/pull/578~ * ~user-selectable dictionaries, https://github.com/openboard-team/openboard/pull/578~
* ~make additional dictionaries available for download (from OpenBoard PRs)~ * ~make additional dictionaries available for download (from OpenBoard PRs)~
* more dictionaries
* proper icon for preference
* ~multi-lingual typing, https://github.com/openboard-team/openboard/pull/586, https://github.com/openboard-team/openboard/pull/593~ * ~multi-lingual typing, https://github.com/openboard-team/openboard/pull/586, https://github.com/openboard-team/openboard/pull/593~
* maybe improve way of merging suggestions from both languages * maybe improve way of merging suggestions from both languages
* test whether it works reasonably well in non-latin scripts * test whether it works reasonably well in non-latin scripts

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hide_soft_input_permission">org.dslul.openboard.inputmethod.latin.debug.HIDE_SOFT_INPUT</string>
</resources>

View file

@ -36,7 +36,7 @@
.setPackage("org.dslul.openboard.inputmethod.latin")); .setPackage("org.dslul.openboard.inputmethod.latin"));
} }
</pre> --> </pre> -->
<permission android:name="org.dslul.openboard.inputmethod.latin.HIDE_SOFT_INPUT" <permission android:name="@string/hide_soft_input_permission"
android:protectionLevel="signature" /> android:protectionLevel="signature" />
<application android:label="@string/english_ime_name" <application android:label="@string/english_ime_name"

View file

@ -530,7 +530,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
Thread.sleep(15000); Thread.sleep(15000);
Log.w(TAG, "End stress in loading"); Log.w(TAG, "End stress in loading");
} catch (InterruptedException e) { } catch (InterruptedException e) {
Log.w("Interrupted while loading: " + mDictName, e); Log.w(TAG, "Interrupted while loading: " + mDictName, e);
} }
} }
final BinaryDictionary oldBinaryDictionary = mBinaryDictionary; final BinaryDictionary oldBinaryDictionary = mBinaryDictionary;

View file

@ -43,7 +43,9 @@ public final class SubtypeLocaleUtils {
static final String TAG = SubtypeLocaleUtils.class.getSimpleName(); static final String TAG = SubtypeLocaleUtils.class.getSimpleName();
// This reference class {@link R} must be located in the same package as LatinIME.java. // This reference class {@link R} must be located in the same package as LatinIME.java.
private static final String RESOURCE_PACKAGE_NAME = R.class.getPackage().getName(); // switched to context.getPackageName(), which works with changed debug package name
// any reason to prefer original version?
// private static final String RESOURCE_PACKAGE_NAME = R.class.getPackage().getName();
// Special language code to represent "no language". // Special language code to represent "no language".
public static final String NO_LANGUAGE = "zz"; public static final String NO_LANGUAGE = "zz";
@ -96,6 +98,7 @@ public final class SubtypeLocaleUtils {
} }
private static void initLocked(final Context context) { private static void initLocked(final Context context) {
final String RESOURCE_PACKAGE_NAME = context.getPackageName();
final Resources res = context.getResources(); final Resources res = context.getResources();
sResources = res; sResources = res;

View file

@ -140,4 +140,6 @@
<item>tr:AsciiCapable,SupportTouchPositionCorrection,EmojiCapable</item> <item>tr:AsciiCapable,SupportTouchPositionCorrection,EmojiCapable</item>
<item>qwerty</item> <item>qwerty</item>
</string-array> </string-array>
<!-- permission name as string to avoid issues with debug build -->
<string name="hide_soft_input_permission">org.dslul.openboard.inputmethod.latin.HIDE_SOFT_INPUT</string>
</resources> </resources>

View file

@ -24,10 +24,6 @@ task makeEmoji(type: JavaExec, dependsOn: ['jar']) {
File.separator + 'main' + File.separator + 'res' File.separator + 'main' + File.separator + 'res'
} }
repositories {
mavenCentral()
}
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
} }

View file

@ -16,10 +16,6 @@ task makeText(type: JavaExec, dependsOn: ['jar']) {
File.separator + 'main' + File.separator + 'java' File.separator + 'main' + File.separator + 'java'
} }
repositories {
mavenCentral()
}
java { java {
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8