Close cursors (+tidy redundant class qualifiers)

This commit is contained in:
Yusuke Matsubara 2016-07-09 13:09:41 +09:00
parent c5c505964c
commit 95f538edc4
3 changed files with 28 additions and 18 deletions

View file

@ -37,10 +37,14 @@ public class ContributionsSyncAdapter extends AbstractThreadedSyncAdapter {
new String[] { filename },
""
);
return cursor.getCount() != 0;
} catch (RemoteException e) {
throw new RuntimeException(e);
} finally {
if ( cursor != null ) {
cursor.close();
}
}
return cursor != null && cursor.getCount() != 0;
}
@Override