mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1231549 - Set default profile endpoint server URI for Firefox Accounts not created via the web flow. r=nalexander
This commit is contained in:
parent
8b8d966746
commit
cfd73d0d46
@ -293,18 +293,29 @@ public class AndroidFxAccount {
|
||||
}
|
||||
|
||||
public String getProfileServerURI() {
|
||||
return accountManager.getUserData(account, ACCOUNT_KEY_PROFILE_SERVER);
|
||||
String profileURI = accountManager.getUserData(account, ACCOUNT_KEY_PROFILE_SERVER);
|
||||
if (profileURI == null) {
|
||||
if (isStaging()) {
|
||||
return FxAccountConstants.STAGE_PROFILE_SERVER_ENDPOINT;
|
||||
}
|
||||
return FxAccountConstants.DEFAULT_PROFILE_SERVER_ENDPOINT;
|
||||
}
|
||||
return profileURI;
|
||||
}
|
||||
|
||||
public String getOAuthServerURI() {
|
||||
// Allow testing against stage.
|
||||
if (FxAccountConstants.STAGE_AUTH_SERVER_ENDPOINT.equals(getAccountServerURI())) {
|
||||
if (isStaging()) {
|
||||
return FxAccountConstants.STAGE_OAUTH_SERVER_ENDPOINT;
|
||||
} else {
|
||||
return FxAccountConstants.DEFAULT_OAUTH_SERVER_ENDPOINT;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isStaging() {
|
||||
return FxAccountConstants.STAGE_AUTH_SERVER_ENDPOINT.equals(getAccountServerURI());
|
||||
}
|
||||
|
||||
private String constructPrefsPath(String product, long version, String extra) throws GeneralSecurityException, UnsupportedEncodingException {
|
||||
String profile = getProfile();
|
||||
String username = account.name;
|
||||
|
Loading…
Reference in New Issue
Block a user