From 09b09c15dcd853d452b24d46a3c81ca63fa090ea Mon Sep 17 00:00:00 2001 From: Matthew Xie Date: Thu, 19 Sep 2013 17:25:05 -0700 Subject: [PATCH] Check null condition of number before contact query bug 10571304 Change-Id: Idb23e7085dc1dc7119e0e2aa8901743707e72285 --- src/com/android/bluetooth/hfp/AtPhonebook.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/bluetooth/hfp/AtPhonebook.java b/src/com/android/bluetooth/hfp/AtPhonebook.java index 88b2a735..e2c1227d 100755 --- a/src/com/android/bluetooth/hfp/AtPhonebook.java +++ b/src/com/android/bluetooth/hfp/AtPhonebook.java @@ -492,7 +492,7 @@ public class AtPhonebook { String number = pbr.cursor.getString(pbr.numberColumn); String name = null; int type = -1; - if (pbr.nameColumn == -1) { + if (pbr.nameColumn == -1 && number != null && number.length() > 0) { // try caller id lookup // TODO: This code is horribly inefficient. I saw it // take 7 seconds to process 100 missed calls. -- 2.11.0