Bug 1375571 - Part 1: Remove unused fxaccount_remote_error_* strings. r=grisha
This is follow-up to
Bug 1220892, which just forgot to remove these strings.
MozReview-Commit-ID: 2WLa0AC8BZp
--- a/mobile/android/base/locales/en-US/sync_strings.dtd
+++ b/mobile/android/base/locales/en-US/sync_strings.dtd
@@ -98,31 +98,16 @@
<!-- Localization note: these are shown by the Android system itself,
when the user navigates to the Android > Accounts > {Firefox
Account} Screen. The link takes the user to the Firefox Account
status activity, which lets them manage their Firefox
Account. -->
<!ENTITY fxaccount_options_title '&syncBrand.shortName.label; Options'>
<!ENTITY fxaccount_options_configure_title 'Configure &syncBrand.shortName.label;'>
-<!-- Localization note: these error messages are shown after a request
- has been made to the remote server, and an error of some type has
- been returned. -->
-<!ENTITY fxaccount_remote_error_UPGRADE_REQUIRED 'You need to upgrade Firefox'>
-
-<!-- Localization note: the format string will be fxaccount_sign_in_button_label, linkified. -->
-<!ENTITY fxaccount_remote_error_ATTEMPT_TO_CREATE_AN_ACCOUNT_THAT_ALREADY_EXISTS_2 'Account already exists. &formatS1;'>
-<!ENTITY fxaccount_remote_error_ATTEMPT_TO_ACCESS_AN_ACCOUNT_THAT_DOES_NOT_EXIST 'Invalid email or password'>
-<!ENTITY fxaccount_remote_error_INCORRECT_PASSWORD 'Invalid email or password'>
-<!ENTITY fxaccount_remote_error_ATTEMPT_TO_OPERATE_ON_AN_UNVERIFIED_ACCOUNT 'Account is not verified'>
-<!ENTITY fxaccount_remote_error_CLIENT_HAS_SENT_TOO_MANY_REQUESTS 'Server busy, try again soon'>
-<!ENTITY fxaccount_remote_error_SERVICE_TEMPORARILY_UNAVAILABLE_TO_DUE_HIGH_LOAD 'Server busy, try again soon'>
-<!ENTITY fxaccount_remote_error_UNKNOWN_ERROR 'There was a problem'>
-<!ENTITY fxaccount_remote_error_ACCOUNT_LOCKED 'Account is locked. &formatS1;'>
-
<!ENTITY fxaccount_sync_sign_in_error_notification_title2 '&syncBrand.shortName.label; is not connected'>
<!-- Localization note: the format string below will be replaced
with the Firefox Account's email address. -->
<!ENTITY fxaccount_sync_sign_in_error_notification_text2 'Tap to sign in as &formatS;'>
<!ENTITY fxaccount_sync_finish_migrating_notification_title 'Finish upgrading &syncBrand.shortName.label;?'>
<!-- Localization note: the format string below will be replaced
with the Firefox Account's email address. -->
--- a/mobile/android/services/src/main/java/org/mozilla/gecko/background/fxa/FxAccountClientException.java
+++ b/mobile/android/services/src/main/java/org/mozilla/gecko/background/fxa/FxAccountClientException.java
@@ -1,15 +1,14 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.background.fxa;
-import org.mozilla.gecko.R;
import org.mozilla.gecko.sync.ExtendedJSONObject;
import org.mozilla.gecko.sync.HTTPFailureException;
import org.mozilla.gecko.sync.net.SyncStorageResponse;
import ch.boye.httpclientandroidlib.HttpResponse;
import ch.boye.httpclientandroidlib.HttpStatus;
/**
@@ -94,38 +93,16 @@ public class FxAccountClientException ex
public boolean isBadEmailCase() {
return apiErrorNumber == FxAccountRemoteError.INCORRECT_EMAIL_CASE;
}
public boolean isAccountLocked() {
return apiErrorNumber == FxAccountRemoteError.ACCOUNT_LOCKED;
}
-
- public int getErrorMessageStringResource() {
- if (isUpgradeRequired()) {
- return R.string.fxaccount_remote_error_UPGRADE_REQUIRED;
- } else if (isAccountAlreadyExists()) {
- return R.string.fxaccount_remote_error_ATTEMPT_TO_CREATE_AN_ACCOUNT_THAT_ALREADY_EXISTS;
- } else if (isAccountDoesNotExist()) {
- return R.string.fxaccount_remote_error_ATTEMPT_TO_ACCESS_AN_ACCOUNT_THAT_DOES_NOT_EXIST;
- } else if (isBadPassword()) {
- return R.string.fxaccount_remote_error_INCORRECT_PASSWORD;
- } else if (isUnverified()) {
- return R.string.fxaccount_remote_error_ATTEMPT_TO_OPERATE_ON_AN_UNVERIFIED_ACCOUNT;
- } else if (isTooManyRequests()) {
- return R.string.fxaccount_remote_error_CLIENT_HAS_SENT_TOO_MANY_REQUESTS;
- } else if (isServerUnavailable()) {
- return R.string.fxaccount_remote_error_SERVICE_TEMPORARILY_UNAVAILABLE_TO_DUE_HIGH_LOAD;
- } else if (isAccountLocked()) {
- return R.string.fxaccount_remote_error_ACCOUNT_LOCKED;
- } else {
- return R.string.fxaccount_remote_error_UNKNOWN_ERROR;
- }
- }
}
public static class FxAccountClientMalformedResponseException extends FxAccountClientRemoteException {
private static final long serialVersionUID = 2209313149952001098L;
public FxAccountClientMalformedResponseException(HttpResponse response) {
super(response, 0, FxAccountRemoteError.UNKNOWN_ERROR, "Response malformed", "Response malformed", "Response malformed", new ExtendedJSONObject());
}
--- a/mobile/android/services/strings.xml.in
+++ b/mobile/android/services/strings.xml.in
@@ -56,26 +56,16 @@
<string name="fxaccount_status_more">&fxaccount_status_more;</string>
<string name="fxaccount_remove_account">&fxaccount_remove_account;</string>
<string name="fxaccount_label">&fxaccount_account_type_label;</string>
<string name="fxaccount_options_title">&fxaccount_options_title;</string>
<string name="fxaccount_options_configure_title">&fxaccount_options_configure_title;</string>
-<string name="fxaccount_remote_error_UPGRADE_REQUIRED">&fxaccount_remote_error_UPGRADE_REQUIRED;</string>
-<string name="fxaccount_remote_error_ATTEMPT_TO_CREATE_AN_ACCOUNT_THAT_ALREADY_EXISTS">&fxaccount_remote_error_ATTEMPT_TO_CREATE_AN_ACCOUNT_THAT_ALREADY_EXISTS_2;</string>
-<string name="fxaccount_remote_error_ATTEMPT_TO_ACCESS_AN_ACCOUNT_THAT_DOES_NOT_EXIST">&fxaccount_remote_error_ATTEMPT_TO_ACCESS_AN_ACCOUNT_THAT_DOES_NOT_EXIST;</string>
-<string name="fxaccount_remote_error_INCORRECT_PASSWORD">&fxaccount_remote_error_INCORRECT_PASSWORD;</string>
-<string name="fxaccount_remote_error_ATTEMPT_TO_OPERATE_ON_AN_UNVERIFIED_ACCOUNT">&fxaccount_remote_error_ATTEMPT_TO_OPERATE_ON_AN_UNVERIFIED_ACCOUNT;</string>
-<string name="fxaccount_remote_error_CLIENT_HAS_SENT_TOO_MANY_REQUESTS">&fxaccount_remote_error_CLIENT_HAS_SENT_TOO_MANY_REQUESTS;</string>
-<string name="fxaccount_remote_error_SERVICE_TEMPORARILY_UNAVAILABLE_TO_DUE_HIGH_LOAD">&fxaccount_remote_error_SERVICE_TEMPORARILY_UNAVAILABLE_TO_DUE_HIGH_LOAD;</string>
-<string name="fxaccount_remote_error_UNKNOWN_ERROR">&fxaccount_remote_error_UNKNOWN_ERROR;</string>
-<string name="fxaccount_remote_error_ACCOUNT_LOCKED">&fxaccount_remote_error_ACCOUNT_LOCKED;</string>
-
<string name="fxaccount_sync_sign_in_error_notification_title">&fxaccount_sync_sign_in_error_notification_title2;</string>
<string name="fxaccount_sync_sign_in_error_notification_text">&fxaccount_sync_sign_in_error_notification_text2;</string>
<!-- Remove Account -->
<string name="fxaccount_remove_account_dialog_title">&fxaccount_remove_account_dialog_title2;</string>
<string name="fxaccount_remove_account_dialog_message">&fxaccount_remove_account_dialog_message2;</string>
<string name="fxaccount_remove_account_dialog_action_confirm">&fxaccount_remove_account_dialog_action_confirm;</string>
<string name="fxaccount_remove_account_toast">&fxaccount_remove_account_toast2;</string>