diff --git a/app/build.gradle b/app/build.gradle index 384aced3d..9d16c8899 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -43,7 +43,7 @@ android { minSdkVersion 21 targetSdkVersion 27 versionCode 131 - versionName "1.3.1-dev" + versionName "1.3.1" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" setProperty("archivesBaseName", "ActivityDiary-" + defaultConfig.versionName) if (project.file('../ActivityDiarySigning.properties').exists()) { diff --git a/app/src/main/java/de/rampro/activitydiary/helpers/ActivityHelper.java b/app/src/main/java/de/rampro/activitydiary/helpers/ActivityHelper.java index 64a12286b..c05d0ed44 100644 --- a/app/src/main/java/de/rampro/activitydiary/helpers/ActivityHelper.java +++ b/app/src/main/java/de/rampro/activitydiary/helpers/ActivityHelper.java @@ -286,7 +286,14 @@ public void reloadAll(){ ContentResolver resolver = ActivityDiaryApplication.getAppContext().getContentResolver(); ContentProviderClient client = resolver.acquireContentProviderClient(ActivityDiaryContract.AUTHORITY); ActivityDiaryContentProvider provider = (ActivityDiaryContentProvider) client.getLocalContentProvider(); - client.close(); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) + { + client.close(); + } + else + { + client.release(); + } provider.resetDatabase(); startQuery(QUERY_ALL_ACTIVITIES, null, ActivityDiaryContract.DiaryActivity.CONTENT_URI,