From: Marius Gavrilescu Date: Fri, 9 Aug 2013 20:29:01 +0000 (+0300) Subject: Allow SMSes to/from null numbers X-Git-Tag: 0.000_001~7 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=0645109c10283b3f062b73b58d4ddafe94d71db2;p=fonbot.git Allow SMSes to/from null numbers --- diff --git a/src/ro/ieval/fonbot/Heavy.java b/src/ro/ieval/fonbot/Heavy.java index 14b729d..7ebd388 100644 --- a/src/ro/ieval/fonbot/Heavy.java +++ b/src/ro/ieval/fonbot/Heavy.java @@ -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));