mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-19 14:17:40 +00:00
fix(android): add permissions for Sentry and set default keyboard
This change fixes two problems that cause a script error in Sample1 app: - add internet access permissions so that the Sentry server can be reached - explicitly set the default keyboard since sil_euro_latin keyboard is not included in the sample apps. This works around #16215. Fixes: #16180 Build-bot: release:android
This commit is contained in:
parent
00c213ba4e
commit
b22798de44
5 changed files with 13 additions and 2 deletions
|
|
@ -1,5 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- allow Sentry reports -->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
KMManager.KMDefault_KeyboardFont, // Font for KMSample1 text field
|
||||
KMManager.KMDefault_KeyboardFont); // Font for OSK
|
||||
KMManager.addKeyboard(this, kbInfo);
|
||||
KMManager.setDefaultKeyboard(kbInfo); // Workaround for #16215
|
||||
|
||||
// Add a dictionary
|
||||
HashMap<String, String>lexicalModelInfo = new HashMap<String, String>();
|
||||
|
|
@ -132,7 +133,7 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
KMManager.onConfigurationChanged(newConfig);
|
||||
|
||||
|
||||
resizeTextView(textView.isKeyboardVisible());
|
||||
lastOrientation = newConfig.orientation;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- allow Sentry reports -->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ public class SystemKeyboard extends InputMethodService implements OnKeyboardEven
|
|||
KMManager.KMDefault_KeyboardFont, // Font for KMSample2
|
||||
KMManager.KMDefault_KeyboardFont); // Font for OSK
|
||||
KMManager.addKeyboard(this, kbInfo);
|
||||
KMManager.setDefaultKeyboard(kbInfo); // Workaround for #16215
|
||||
|
||||
// Add a dictionary
|
||||
HashMap<String, String>lexicalModelInfo = new HashMap<String, String>();
|
||||
|
|
@ -262,4 +263,4 @@ public class SystemKeyboard extends InputMethodService implements OnKeyboardEven
|
|||
public boolean onKeyLongPress(int keyCode, KeyEvent event) {
|
||||
return interpreter.onKeyLongPress(keyCode, event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- allow Sentry reports -->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue