]> iEval git - fonbot.git/commitdiff
Allow SMSes to/from null numbers
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 9 Aug 2013 20:29:01 +0000 (23:29 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 9 Aug 2013 20:29:01 +0000 (23:29 +0300)
src/ro/ieval/fonbot/Heavy.java

index 14b729deffd84d35f22a8cd3fcc32b31e7ece370..7ebd3883644df71a6f280d4c4197eb5be60cccb1 100644 (file)
@@ -1465,11 +1465,16 @@ final class Heavy {
                        do {
                                final String fromNumber=cursor.getString(1);
                                final String from;
-                               final String name=Utils.callerId(context, Utils.toNonNull(fromNumber));
-                               if(name==null)
-                                       from=fromNumber;
-                               else
-                                       from=fromNumber+" ("+name+')';
+                               if(fromNumber == null)
+                                       from = null;
+                               else {
+                                       final String name=Utils.callerId(context, Utils.toNonNull(fromNumber));
+                                       if(name==null)
+                                               from=fromNumber;
+                                       else
+                                               from=fromNumber+" ("+name+')';
+                               }
+
                                final String message=cursor.getString(2).replace("\n", "\n                             ");
                                final Date date=new Date(cursor.getLong(3));
 
This page took 0.027264 seconds and 4 git commands to generate.