Bug 1081281: Don't double-box in ContactService. r=rnewman
authorChris Kitching <chriskitching@linux.com>
Fri, 10 Oct 2014 20:52:48 +0100
changeset 234457 611ffa760b443c10e1d558a2250749c97b6ebc47
parent 234456 1ef3c935199a778ce6591003a480b07bfd846849
child 234458 efd2ce78cdeb0fe686e3f35bdf97a209e2e9ce61
push id611
push userraliiev@mozilla.com
push dateMon, 05 Jan 2015 23:23:16 +0000
treeherdermozilla-release@345cd3b9c445 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrnewman
bugs1081281
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1081281: Don't double-box in ContactService. r=rnewman
mobile/android/base/ContactService.java
--- a/mobile/android/base/ContactService.java
+++ b/mobile/android/base/ContactService.java
@@ -1893,33 +1893,33 @@ public class ContactService implements G
         mMimeTypeConstantsMap.put("sex", MIMETYPE_SEX);
         mMimeTypeConstantsMap.put("genderidentity", MIMETYPE_GENDER_IDENTITY);
         mMimeTypeConstantsMap.put("key", MIMETYPE_KEY);
     }
 
     private int getAddressType(String addressType) {
         initAddressTypesMap();
         Integer type = mAddressTypesMap.get(addressType.toLowerCase());
-        return (type != null ? Integer.valueOf(type) : StructuredPostal.TYPE_CUSTOM);
+        return type != null ? type : StructuredPostal.TYPE_CUSTOM;
     }
 
     private void initAddressTypesMap() {
         if (mAddressTypesMap != null) {
             return;
         }
         mAddressTypesMap = new HashMap<String, Integer>();
 
         mAddressTypesMap.put("home", StructuredPostal.TYPE_HOME);
         mAddressTypesMap.put("work", StructuredPostal.TYPE_WORK);
     }
 
     private int getPhoneType(String phoneType) {
         initPhoneTypesMap();
         Integer type = mPhoneTypesMap.get(phoneType.toLowerCase());
-        return (type != null ? Integer.valueOf(type) : Phone.TYPE_CUSTOM);
+        return type != null ? type : Phone.TYPE_CUSTOM;
     }
 
     private void initPhoneTypesMap() {
         if (mPhoneTypesMap != null) {
             return;
         }
         mPhoneTypesMap = new HashMap<String, Integer>();
 
@@ -1944,34 +1944,34 @@ public class ContactService implements G
         mPhoneTypesMap.put("work pager", Phone.TYPE_WORK_PAGER);
         mPhoneTypesMap.put("assistant", Phone.TYPE_ASSISTANT);
         mPhoneTypesMap.put("mms", Phone.TYPE_MMS);
     }
 
     private int getEmailType(String emailType) {
         initEmailTypesMap();
         Integer type = mEmailTypesMap.get(emailType.toLowerCase());
-        return (type != null ? Integer.valueOf(type) : Email.TYPE_CUSTOM);
+        return type != null ? type : Email.TYPE_CUSTOM;
     }
 
     private void initEmailTypesMap() {
         if (mEmailTypesMap != null) {
             return;
         }
         mEmailTypesMap = new HashMap<String, Integer>();
 
         mEmailTypesMap.put("home", Email.TYPE_HOME);
         mEmailTypesMap.put("mobile", Email.TYPE_MOBILE);
         mEmailTypesMap.put("work", Email.TYPE_WORK);
     }
 
     private int getWebsiteType(String webisteType) {
         initWebsiteTypesMap();
         Integer type = mWebsiteTypesMap.get(webisteType.toLowerCase());
-        return (type != null ? Integer.valueOf(type) : Website.TYPE_CUSTOM);
+        return type != null ? type : Website.TYPE_CUSTOM;
     }
 
     private void initWebsiteTypesMap() {
         if (mWebsiteTypesMap != null) {
             return;
         }
         mWebsiteTypesMap = new HashMap<String, Integer>();
 
@@ -1981,17 +1981,17 @@ public class ContactService implements G
         mWebsiteTypesMap.put("home", Website.TYPE_HOME);
         mWebsiteTypesMap.put("work", Website.TYPE_WORK);
         mWebsiteTypesMap.put("ftp", Website.TYPE_FTP);
     }
 
     private int getImType(String imType) {
         initImTypesMap();
         Integer type = mImTypesMap.get(imType.toLowerCase());
-        return (type != null ? Integer.valueOf(type) : Im.TYPE_CUSTOM);
+        return type != null ? type : Im.TYPE_CUSTOM;
     }
 
     private void initImTypesMap() {
         if (mImTypesMap != null) {
             return;
         }
         mImTypesMap = new HashMap<String, Integer>();