cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject android commit: Update framework/src/org/apache/cordova/ContactAccessorSdk5.java
Date Tue, 12 Feb 2013 21:20:52 GMT
Updated Branches:
  refs/heads/master f9d27e4a6 -> 83d9248ec


Update framework/src/org/apache/cordova/ContactAccessorSdk5.java

`Im.PROTOCOL` is a String, not an int. Treat it as such to prevent an Exception being thrown
when parsing `null`.


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/83d9248e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/83d9248e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/83d9248e

Branch: refs/heads/master
Commit: 83d9248ec8206eb6f5d0402c076e624656b91a80
Parents: f9d27e4
Author: Richard Kolkovich <richard@sigil.org>
Authored: Thu Jan 31 17:56:14 2013 -0700
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Tue Feb 12 16:18:50 2013 -0500

----------------------------------------------------------------------
 .../org/apache/cordova/ContactAccessorSdk5.java    |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/83d9248e/framework/src/org/apache/cordova/ContactAccessorSdk5.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/ContactAccessorSdk5.java b/framework/src/org/apache/cordova/ContactAccessorSdk5.java
index 3d81648..47336c0 100644
--- a/framework/src/org/apache/cordova/ContactAccessorSdk5.java
+++ b/framework/src/org/apache/cordova/ContactAccessorSdk5.java
@@ -860,8 +860,7 @@ public class ContactAccessorSdk5 extends ContactAccessor {
             im.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Im._ID)));
             im.put("pref", false); // Android does not store pref attribute
             im.put("value", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Im.DATA)));
-            String type = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Im.PROTOCOL));
-            im.put("type", getImType(new Integer(type).intValue()));
+            im.put("type", getImType(cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Im.PROTOCOL))));
         } catch (JSONException e) {
             Log.e(LOG_TAG, e.getMessage(), e);
         }


Mime
View raw message