Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ public class KMPBrowserActivity extends BaseActivity {
private static final String TAG = "KMPBrowserActivity";

// URL for keyboard search web page presented to user when they add a keyboard in the app.
private static final String KMP_SEARCH_KEYBOARDS_FORMATSTR = "https://%s/go/android/%s/download-keyboards%s?lang=%s";
private static final String KMP_SEARCH_KEYBOARDS_FORMATSTR = "https://%s/go/android/%s/%s/download-keyboards%s";
private static final String KMP_SEARCH_KEYBOARDS_LANGUAGES = "/languages/%s";

// Patterns for determining if a link should be opened in external browser
// 1. Host isn't keyman.com (production/staging)
// 2. Host is keyman.com but not /keyboards/
private static final String INTERNAL_KEYBOARDS_LINK_FORMATSTR = "^http(s)?://(%s|%s)/keyboards([/?].*)?$";
private static final String INTERNAL_KEYBOARDS_LINK_FORMATSTR = "^http(s)?://(%s|%s)/.*?keyboards([/?].*)?$";
private static final String keyboardPatternFormatStr = KMString.format(INTERNAL_KEYBOARDS_LINK_FORMATSTR,
KMPLink.KMP_PRODUCTION_HOST,
KMPLink.KMP_STAGING_HOST);
Expand Down Expand Up @@ -239,7 +239,7 @@ private String determineSearchUrl() {
String languageStr = (languageID != null) ? KMString.format(KMP_SEARCH_KEYBOARDS_LANGUAGES, languageID) : "";

String appMajorVersion = KMManager.getMajorVersion();
String kmpSearchUrl = KMString.format(KMP_SEARCH_KEYBOARDS_FORMATSTR, host, appMajorVersion, languageStr, displayLang);
String kmpSearchUrl = KMString.format(KMP_SEARCH_KEYBOARDS_FORMATSTR, host, displayLang, appMajorVersion, languageStr);
return kmpSearchUrl;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public final class KMPLink {

public static final String KMP_PRODUCTION_HOST = "keyman.com";
public static final String KMP_STAGING_HOST = "keyman.com"; // #7227 disabling: "keyman-staging.com";
public static final String KMP_STAGING_HOST = "keyman-staging.com"; // #7227 disabling: "keyman-staging.com";

private static final String KMP_INSTALL_KEYBOARDS_PATTERN_FORMATSTR = "^http(s)?://(%s|%s)/keyboards/install/([^\\?/]+)(\\?(.+))?$";
private static final String installPatternFormatStr = KMString.format(KMP_INSTALL_KEYBOARDS_PATTERN_FORMATSTR,
Expand Down
Loading