Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  Updated versionCode and versionName for update 2.4.1
  Fixed occasional crash when Cursor wasn't closed properly
  Fixed readme page
  • Loading branch information
Julian Rosser committed Aug 17, 2016
2 parents 7377656 + 39f7ac2 commit e408d4d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "website.julianrosser.birthdays"
minSdkVersion 11
targetSdkVersion 23
versionCode 240
versionName "2.4"
versionCode 241
versionName "2.4.1"
}

buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ private ArrayList<Contact> loadContacts() {
String name = cur.getString(
cur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));
ContentResolver bd = getActivity().getContentResolver();
Cursor bdc = bd.query(android.provider.ContactsContract.Data.CONTENT_URI, new String[] { ContactsContract.CommonDataKinds.Event.DATA }, android.provider.ContactsContract.Data.CONTACT_ID+" = "+id+" AND "+ ContactsContract.Contacts.Data.MIMETYPE+" = '"+ ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE+"' AND "+ ContactsContract.CommonDataKinds.Event.TYPE+" = "+ ContactsContract.CommonDataKinds.Event.TYPE_BIRTHDAY, null, android.provider.ContactsContract.Data.DISPLAY_NAME);
Cursor bdc = bd.query(android.provider.ContactsContract.Data.CONTENT_URI,
new String[] { ContactsContract.CommonDataKinds.Event.DATA },
android.provider.ContactsContract.Data.CONTACT_ID+" = "+id+" AND "+ ContactsContract.Contacts.Data.MIMETYPE+" = '"+ ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE+"' AND "+ ContactsContract.CommonDataKinds.Event.TYPE+" = "+ ContactsContract.CommonDataKinds.Event.TYPE_BIRTHDAY, null, android.provider.ContactsContract.Data.DISPLAY_NAME);
if (bdc != null && bdc.getCount() > 0) {
while (bdc.moveToNext()) {
String birthday = bdc.getString(0);
Expand All @@ -139,6 +141,8 @@ private ArrayList<Contact> loadContacts() {
Contact con = new Contact(name, birthday);
contactsList.add(con);
}
}
if (bdc != null) {
bdc.close();
}
}
Expand Down

0 comments on commit e408d4d

Please sign in to comment.