aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2014-10-10 16:32:20 +0200
committerAndy Staudacher <andy.st@gmail.com>2014-10-10 16:32:20 +0200
commit019472109da53b3e3dc4f42f90f33f11f1055f87 (patch)
treed25b9b622ff4117c98343144b6b13a0bb356f633
parent04d7d378f308c49ff62620c49ae8e4ebc5b899ec (diff)
parent2492b8a424c7fb8d0da84dc7d43c865bbf6b0e94 (diff)
downloadsrc-019472109da53b3e3dc4f42f90f33f11f1055f87.tar.gz
Merge pull request #28 from lararennie/label_fixes
Removing unused private fields in the AddressWidget class.
-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.