diff --git a/README.md b/README.md index 68f011cdf..9089d7473 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![Image](https://github.com/agrosner/DBFlow/blob/develop/dbflow_banner.png?raw=true) -[![JitPack.io](https://img.shields.io/badge/JitPack.io-4.2.0-red.svg?style=flat)](https://jitpack.io/#Raizlabs/DBFlow) [![Android Weekly](http://img.shields.io/badge/Android%20Weekly-%23129-2CB3E5.svg?style=flat)](http://androidweekly.net/issues/issue-129) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-DBFlow-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1134) +[![JitPack.io](https://img.shields.io/badge/JitPack.io-4.2.1-red.svg?style=flat)](https://jitpack.io/#Raizlabs/DBFlow) [![Android Weekly](http://img.shields.io/badge/Android%20Weekly-%23129-2CB3E5.svg?style=flat)](http://androidweekly.net/issues/issue-129) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-DBFlow-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1134) A robust, powerful, and very simple ORM android database library with **annotation processing**. @@ -43,7 +43,7 @@ Add the library to the project-level build.gradle, using the apt plugin to enabl apply plugin: 'kotlin-kapt' // required for kotlin. - def dbflow_version = "4.2.0" + def dbflow_version = "4.2.1" // or dbflow_version = "develop-SNAPSHOT" for grabbing latest dependency in your project on the develop branch // or 10-digit short-hash of a specific commit. (Useful for bugs fixed in develop, but not in a release yet) diff --git a/dbflow/src/main/java/com/raizlabs/android/dbflow/list/FlowQueryList.java b/dbflow/src/main/java/com/raizlabs/android/dbflow/list/FlowQueryList.java index ba83b4f67..3cf92935b 100644 --- a/dbflow/src/main/java/com/raizlabs/android/dbflow/list/FlowQueryList.java +++ b/dbflow/src/main/java/com/raizlabs/android/dbflow/list/FlowQueryList.java @@ -10,6 +10,7 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import com.raizlabs.android.dbflow.StringUtils; import com.raizlabs.android.dbflow.config.FlowManager; import com.raizlabs.android.dbflow.list.FlowCursorList.OnCursorRefreshListener; import com.raizlabs.android.dbflow.runtime.FlowContentObserver; @@ -60,7 +61,9 @@ public class FlowQueryList extends FlowContentObserver private FlowQueryList(Builder builder) { - super(FlowManager.DEFAULT_AUTHORITY); + super(StringUtils.isNotNullOrEmpty(builder.contentAuthority) + ? builder.contentAuthority + : FlowManager.DEFAULT_AUTHORITY); transact = builder.transact; changeInTransaction = builder.changeInTransaction; successCallback = builder.success; @@ -671,6 +674,8 @@ public static class Builder { private Transaction.Success success; private Transaction.Error error; + private String contentAuthority; + private Builder(FlowCursorList cursorList) { table = cursorList.table(); cursor = cursorList.cursor(); @@ -708,6 +713,11 @@ public Builder modelCache(ModelCache modelCache) { return this; } + public Builder contentAuthority(String contentAuthority) { + this.contentAuthority = contentAuthority; + return this; + } + /** * If true, when an operation occurs when we call endTransactionAndNotify, we refresh content. */ diff --git a/gradle.properties b/gradle.properties index 120393fbe..a407d4a8c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=4.2.0 +version=4.2.1 version_code=1 group=com.raizlabs.android bt_siteUrl=https://github.com/Raizlabs/DBFlow