From 0645109c10283b3f062b73b58d4ddafe94d71db2 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Fri, 9 Aug 2013 23:29:01 +0300 Subject: [PATCH] Allow SMSes to/from null numbers --- src/ro/ieval/fonbot/Heavy.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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)); -- 2.39.2