|
10 | 10 | import android.support.annotation.NonNull; |
11 | 11 | import android.support.annotation.Nullable; |
12 | 12 |
|
| 13 | +import com.raizlabs.android.dbflow.StringUtils; |
13 | 14 | import com.raizlabs.android.dbflow.config.FlowManager; |
14 | 15 | import com.raizlabs.android.dbflow.list.FlowCursorList.OnCursorRefreshListener; |
15 | 16 | import com.raizlabs.android.dbflow.runtime.FlowContentObserver; |
@@ -60,7 +61,9 @@ public class FlowQueryList<TModel> extends FlowContentObserver |
60 | 61 |
|
61 | 62 |
|
62 | 63 | private FlowQueryList(Builder<TModel> builder) { |
63 | | - super(FlowManager.DEFAULT_AUTHORITY); |
| 64 | + super(StringUtils.isNotNullOrEmpty(builder.contentAuthority) |
| 65 | + ? builder.contentAuthority |
| 66 | + : FlowManager.DEFAULT_AUTHORITY); |
64 | 67 | transact = builder.transact; |
65 | 68 | changeInTransaction = builder.changeInTransaction; |
66 | 69 | successCallback = builder.success; |
@@ -671,6 +674,8 @@ public static class Builder<TModel> { |
671 | 674 | private Transaction.Success success; |
672 | 675 | private Transaction.Error error; |
673 | 676 |
|
| 677 | + private String contentAuthority; |
| 678 | + |
674 | 679 | private Builder(FlowCursorList<TModel> cursorList) { |
675 | 680 | table = cursorList.table(); |
676 | 681 | cursor = cursorList.cursor(); |
@@ -708,6 +713,11 @@ public Builder<TModel> modelCache(ModelCache<TModel, ?> modelCache) { |
708 | 713 | return this; |
709 | 714 | } |
710 | 715 |
|
| 716 | + public Builder<TModel> contentAuthority(String contentAuthority) { |
| 717 | + this.contentAuthority = contentAuthority; |
| 718 | + return this; |
| 719 | + } |
| 720 | + |
711 | 721 | /** |
712 | 722 | * If true, when an operation occurs when we call endTransactionAndNotify, we refresh content. |
713 | 723 | */ |
|
0 commit comments