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:
Eberhard Beilharz 2026-07-14 18:11:20 +02:00 committed by GitHub
commit c03e63b41f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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(); }