aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLara Scheidegger <lararennie@google.com>2014-10-10 16:18:36 +0200
committerLara Scheidegger <lararennie@google.com>2014-10-10 16:24:33 +0200
commit2492b8a424c7fb8d0da84dc7d43c865bbf6b0e94 (patch)
treed25b9b622ff4117c98343144b6b13a0bb356f633
parent04d7d378f308c49ff62620c49ae8e4ebc5b899ec (diff)
downloadsrc-2492b8a424c7fb8d0da84dc7d43c865bbf6b0e94.tar.gz
Removing unused private fields in the AddressWidget class. These were previously used to help with error message handling (or in fact, some were never used at all but only there for consistency.)
-rw-r--r--java/src/com/android/i18n/addressinput/AddressWidget.java19
1 files changed, 5 insertions, 14 deletions
diff --git a/java/src/com/android/i18n/addressinput/AddressWidget.java b/java/src/com/android/i18n/addressinput/AddressWidget.java
index 7b9b159..8a598ff 100644
--- a/java/src/com/android/i18n/addressinput/AddressWidget.java
+++ b/java/src/com/android/i18n/addressinput/AddressWidget.java
@@ -81,20 +81,14 @@ public class AddressWidget implements AdapterView.OnItemSelectedListener {
private ScriptType mScript;
- // The appropriate label that should be applied to the admin area field of the current country.
+ // Possible labels that could be applied to the admin area field of the current country.
// Examples include "state", "province", "emirate", etc.
- private String mAdminLabel;
-
- // The appropriate label that should be applied to the locality (city) field of the current
- // country. Examples include "city" or "district".
- private String mLocalityLabel;
-
- // The appropriate label that should be applied to the sublocality field of the current country.
- // Examples include "suburb" or "neighborhood".
- private String mSublocalityLabel;
-
private static final Map<String, Integer> ADMIN_LABELS;
+ // Possible labels that could be applied to the locality (city) field of the current country.
+ // Examples include "city" or "district".
private static final Map<String, Integer> LOCALITY_LABELS;
+ // Possible labels that could be applied to the sublocality field of the current country.
+ // Examples include "suburb" or "neighborhood".
private static final Map<String, Integer> SUBLOCALITY_LABELS;
private static final FormOptions SHOW_ALL_FIELDS = new FormOptions.Builder().build();
@@ -341,7 +335,6 @@ public class AddressWidget implements AdapterView.OnItemSelectedListener {
private String getLocalityFieldName(AddressVerificationNodeData countryNode) {
String localityLabelType = countryNode.get(AddressDataKey.LOCALITY_NAME_TYPE);
- mLocalityLabel = localityLabelType;
Integer result = LOCALITY_LABELS.get(localityLabelType);
if (result == null) {
// Fallback to city.
@@ -352,7 +345,6 @@ public class AddressWidget implements AdapterView.OnItemSelectedListener {
private String getSublocalityFieldName(AddressVerificationNodeData countryNode) {
String sublocalityLabelType = countryNode.get(AddressDataKey.SUBLOCALITY_NAME_TYPE);
- mSublocalityLabel = sublocalityLabelType;
Integer result = SUBLOCALITY_LABELS.get(sublocalityLabelType);
if (result == null) {
// Fallback to suburb.
@@ -363,7 +355,6 @@ public class AddressWidget implements AdapterView.OnItemSelectedListener {
private String getAdminAreaFieldName(AddressVerificationNodeData countryNode) {
String adminLabelType = countryNode.get(AddressDataKey.STATE_NAME_TYPE);
- mAdminLabel = adminLabelType;
Integer result = ADMIN_LABELS.get(adminLabelType);
if (result == null) {
// Fallback to province.