mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-23 08:07:40 +00:00
Merge pull request #4782 from keymanapp/fix/android/sanitize-kmw-error-breadcrumbs
fix(android/engine): Sanitize embedded KMW Sentry error
This commit is contained in:
commit
83d5cff078
1 changed files with 4 additions and 1 deletions
|
|
@ -156,7 +156,10 @@ final class KMKeyboard extends WebView {
|
|||
|
||||
if ((cm.messageLevel() == ConsoleMessage.MessageLevel.ERROR) && (!cm.message().startsWith("No keyboard stubs exist"))) {
|
||||
// Make Toast notification of error and send log about falling back to default keyboard (ignore language ID)
|
||||
sendKMWError(cm.lineNumber(), cm.sourceId(), cm.message());
|
||||
// Sanitize sourceId info
|
||||
String NAVIGATION_PATTERN = "^(.*)?(keyboard\\.html#[^-]+)-.*$";
|
||||
String sourceID = cm.sourceId().replaceAll(NAVIGATION_PATTERN, "$1$2");
|
||||
sendKMWError(cm.lineNumber(), sourceID, cm.message());
|
||||
sendError(packageID, keyboardID, "");
|
||||
Keyboard firstKeyboard = KeyboardController.getInstance().getKeyboardInfo(0);
|
||||
if (firstKeyboard != null) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue