Permalink
Browse files

Fix issue 2034, this should be fixed at the source at some point, to …

…assign a default type to phone numbers upon import/sync.
  • Loading branch information...
1 parent 35cebec commit 86441ddbcf65469dd90c1f4b81ef90e42716338a @mtwebster mtwebster committed Aug 20, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/com/android/contacts/ViewContactActivity.java
@@ -948,7 +948,12 @@ private final void buildEntries() {
mPhoneEntries.add(entry);
//Wysie: Workaround for the entry.type bug, since entry.type always returns -1
- final Integer type = entryValues.getAsInteger(Phone.TYPE);
+ Integer type;
+ try {
+ type = entryValues.getAsInteger(Phone.TYPE);
+ } catch (NullPointerException e) {
+ type = CommonDataKinds.Phone.TYPE_HOME;
+ }
//Wysie: Bug here, entry.type always returns -1.
if (/*entry.type*/type == CommonDataKinds.Phone.TYPE_MOBILE || mShowSmsLinksForAllPhones) {

0 comments on commit 86441dd

Please sign in to comment.