OSDN Git Service

Check null condition of number before contact query
authorMatthew Xie <mattx@google.com>
Fri, 20 Sep 2013 00:25:05 +0000 (17:25 -0700)
committerMatthew Xie <mattx@google.com>
Fri, 20 Sep 2013 00:26:00 +0000 (17:26 -0700)
bug 10571304

Change-Id: Idb23e7085dc1dc7119e0e2aa8901743707e72285

src/com/android/bluetooth/hfp/AtPhonebook.java

index 88b2a73..e2c1227 100755 (executable)
@@ -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.