fix NPE on Kindle Fire, which has no SMS DB. Duh.

This commit is contained in:
Eric House 2012-11-07 19:43:08 -08:00
parent 83754d626e
commit 949b804f35

View file

@ -634,6 +634,7 @@ public class SMSService extends Service {
ContentResolver resolver = getContentResolver();
String[] columns = new String[] { "body","address" };
Cursor cursor = resolver.query( uri, columns, null, null, null );
if ( null != cursor ) {
if ( 0 < cursor.getCount() ) {
try {
int bodyIndex = cursor.getColumnIndexOrThrow( "body" );
@ -653,6 +654,7 @@ public class SMSService extends Service {
}
cursor.close();
}
}
private void sendResult( MultiEvent event, Object ... args )
{