Skip to content

Commit

Permalink
fix #208
Browse files Browse the repository at this point in the history
  • Loading branch information
ramack committed Sep 15, 2018
1 parent fd33d25 commit beb264d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit beb264d

Please sign in to comment.