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

@ -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"));
}
</pre> -->
<permission android:name="org.dslul.openboard.inputmethod.latin.HIDE_SOFT_INPUT"
<permission android:name="@string/hide_soft_input_permission"
android:protectionLevel="signature" />
<application android:label="@string/english_ime_name"

View file

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

View file

@ -43,7 +43,9 @@ public final class SubtypeLocaleUtils {
static final String TAG = SubtypeLocaleUtils.class.getSimpleName();
// 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".
public static final String NO_LANGUAGE = "zz";
@ -96,6 +98,7 @@ public final class SubtypeLocaleUtils {
}
private static void initLocked(final Context context) {
final String RESOURCE_PACKAGE_NAME = context.getPackageName();
final Resources res = context.getResources();
sResources = res;

View file

@ -140,4 +140,6 @@
<item>tr:AsciiCapable,SupportTouchPositionCorrection,EmojiCapable</item>
<item>qwerty</item>
</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>