mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-06 05:24:46 +01:00
fix NPE on Kindle Fire, which has no SMS DB. Duh.
This commit is contained in:
parent
83754d626e
commit
949b804f35
1 changed files with 15 additions and 13 deletions
|
@ -634,6 +634,7 @@ public class SMSService extends Service {
|
||||||
ContentResolver resolver = getContentResolver();
|
ContentResolver resolver = getContentResolver();
|
||||||
String[] columns = new String[] { "body","address" };
|
String[] columns = new String[] { "body","address" };
|
||||||
Cursor cursor = resolver.query( uri, columns, null, null, null );
|
Cursor cursor = resolver.query( uri, columns, null, null, null );
|
||||||
|
if ( null != cursor ) {
|
||||||
if ( 0 < cursor.getCount() ) {
|
if ( 0 < cursor.getCount() ) {
|
||||||
try {
|
try {
|
||||||
int bodyIndex = cursor.getColumnIndexOrThrow( "body" );
|
int bodyIndex = cursor.getColumnIndexOrThrow( "body" );
|
||||||
|
@ -653,6 +654,7 @@ public class SMSService extends Service {
|
||||||
}
|
}
|
||||||
cursor.close();
|
cursor.close();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void sendResult( MultiEvent event, Object ... args )
|
private void sendResult( MultiEvent event, Object ... args )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue