mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 00:15:32 +00:00
Merge pull request #16237 from keymanapp/chore/android/loglegacy
chore(android): log legacy cloud keyboards This adds a Sentry log if a user is still using legacy cloud keyboards. We do this so that we will learn if there are still users out there or if we can remove the code that deals with those keyboards.
This commit is contained in:
commit
c03e63b41f
1 changed files with 11 additions and 0 deletions
|
|
@ -49,6 +49,7 @@ public class Keyboard extends LanguageResource implements Serializable {
|
|||
*/
|
||||
public Keyboard(JSONObject installedObj) {
|
||||
this.fromJSON(installedObj);
|
||||
logIfLegacyKeyboard();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -79,6 +80,8 @@ public class Keyboard extends LanguageResource implements Serializable {
|
|||
|
||||
this.helpLink = keyboardJSON.optString(KMManager.KMKey_CustomHelpLink,
|
||||
KMString.format(HELP_URL_FORMATSTR, HELP_URL_HOST, this.resourceID, this.version));
|
||||
|
||||
logIfLegacyKeyboard();
|
||||
} catch (JSONException e) {
|
||||
KMLog.LogException(TAG, "Keyboard exception parsing JSON: ", e);
|
||||
}
|
||||
|
|
@ -96,6 +99,8 @@ public class Keyboard extends LanguageResource implements Serializable {
|
|||
this.isNewKeyboard = isNewKeyboard;
|
||||
this.font = (font != null) ? font : "";
|
||||
this.oskFont = (oskFont != null) ? oskFont : "";
|
||||
|
||||
logIfLegacyKeyboard();
|
||||
}
|
||||
|
||||
public Keyboard(Keyboard k) {
|
||||
|
|
@ -108,6 +113,12 @@ public class Keyboard extends LanguageResource implements Serializable {
|
|||
this.displayName = k.getDisplayName();
|
||||
}
|
||||
|
||||
private void logIfLegacyKeyboard() {
|
||||
if (this.packageID.equals(KMManager.KMDefault_UndefinedPackageID)) {
|
||||
KMLog.LogInfo(TAG, "Constructing legacy keyboard: " + this.resourceID);
|
||||
}
|
||||
}
|
||||
|
||||
public String getKeyboardID() { return getResourceID(); }
|
||||
public String getKeyboardName() { return getResourceName(); }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue