private Cursor integrityCheck ( Cursor cursor ) { if ( cursor . moveToNext ( ) ) { String value = cursor . getString ( 0 ) ; if ( value . equals ( "ok" ) ) { cursor . close ( ) ; cursor = null ; } } return cursor ; }
Check the cursor returned from the integrity check to see if things are ok