Simplify BaseResult, removing subclasses
Test: ./gradlew paging:p-c:test paging:p-run:cC paging:p-rx:cC
Always pass next/prev key in ItemKeyedDataSource
Remove BaseResult subclasses in PageKeyedDataSource
Remove BaseResult subclass in PositionalDataSource
Next step will be to remove BaseResult, use Page directly instead.
Change-Id: I8918e5bb691791a4ed75a54b67f1009ebd58356f
diff --git a/paging/common/api/current.txt b/paging/common/api/current.txt
index 943ab14..cc35710 100644
--- a/paging/common/api/current.txt
+++ b/paging/common/api/current.txt
@@ -38,11 +38,11 @@
method public abstract Key getKey(Value item);
method public final suspend Object load$lintWithKotlin(androidx.paging.DataSource.Params<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.DataSource.BaseResult<Value>> p);
method public abstract void loadAfter(androidx.paging.ItemKeyedDataSource.LoadParams<Key> params, androidx.paging.ItemKeyedDataSource.LoadCallback<Value> callback);
- method @VisibleForTesting public final suspend Object loadAfter$lintWithKotlin(androidx.paging.ItemKeyedDataSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.ItemKeyedDataSource.Result<Value>> p);
+ method @VisibleForTesting public final suspend Object loadAfter$lintWithKotlin(androidx.paging.ItemKeyedDataSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.DataSource.BaseResult<Value>> p);
method public abstract void loadBefore(androidx.paging.ItemKeyedDataSource.LoadParams<Key> params, androidx.paging.ItemKeyedDataSource.LoadCallback<Value> callback);
- method @VisibleForTesting public final suspend Object loadBefore$lintWithKotlin(androidx.paging.ItemKeyedDataSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.ItemKeyedDataSource.Result<Value>> p);
+ method @VisibleForTesting public final suspend Object loadBefore$lintWithKotlin(androidx.paging.ItemKeyedDataSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.DataSource.BaseResult<Value>> p);
method public abstract void loadInitial(androidx.paging.ItemKeyedDataSource.LoadInitialParams<Key> params, androidx.paging.ItemKeyedDataSource.LoadInitialCallback<Value> callback);
- method @VisibleForTesting public final suspend Object loadInitial$lintWithKotlin(androidx.paging.ItemKeyedDataSource.LoadInitialParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.ItemKeyedDataSource.InitialResult<Value>> p);
+ method @VisibleForTesting public final suspend Object loadInitial$lintWithKotlin(androidx.paging.ItemKeyedDataSource.LoadInitialParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.DataSource.BaseResult<Value>> p);
method public final <ToValue> androidx.paging.ItemKeyedDataSource<Key,ToValue> map(androidx.arch.core.util.Function<Value,ToValue> function);
method public final <ToValue> androidx.paging.ItemKeyedDataSource<Key,ToValue> map(kotlin.jvm.functions.Function1<? super Value,? extends ToValue> function);
method public final <ToValue> androidx.paging.ItemKeyedDataSource<Key,ToValue> mapByPage(androidx.arch.core.util.Function<java.util.List<Value>,java.util.List<ToValue>> function);
@@ -72,10 +72,6 @@
field public final int requestedLoadSize;
}
- public final class ItemKeyedDataSourceKt {
- ctor public ItemKeyedDataSourceKt();
- }
-
public abstract sealed class LoadState {
}
@@ -139,10 +135,6 @@
field public final int requestedLoadSize;
}
- public final class PageKeyedDataSourceKt {
- ctor public PageKeyedDataSourceKt();
- }
-
public abstract class PagedList<T> extends java.util.AbstractList<T> {
method @Deprecated public final void addWeakCallback(java.util.List<? extends T>? previousSnapshot, androidx.paging.PagedList.Callback callback);
method public final void addWeakCallback(androidx.paging.PagedList.Callback callback);
@@ -295,7 +287,7 @@
method public int getItemsBefore();
method public Key? getNextKey();
method public Key? getPrevKey();
- field public static final int COUNT_UNDEFINED = -1; // 0xffffffff
+ field public static final int COUNT_UNDEFINED = -2147483648; // 0x80000000
field public static final androidx.paging.PagedSource.LoadResult.Page.Companion! Companion;
}
@@ -312,7 +304,7 @@
method public static final int computeInitialLoadSize(androidx.paging.PositionalDataSource.LoadInitialParams params, int initialLoadPosition, int totalCount);
method public final suspend Object load$lintWithKotlin(androidx.paging.DataSource.Params<java.lang.Integer> params, kotlin.coroutines.Continuation<? super androidx.paging.DataSource.BaseResult<T>> p);
method @WorkerThread public abstract void loadInitial(androidx.paging.PositionalDataSource.LoadInitialParams params, androidx.paging.PositionalDataSource.LoadInitialCallback<T> callback);
- method @VisibleForTesting public final suspend Object loadInitial$lintWithKotlin(androidx.paging.PositionalDataSource.LoadInitialParams params, kotlin.coroutines.Continuation<? super androidx.paging.PositionalDataSource.InitialResult<T>> p);
+ method @VisibleForTesting public final suspend Object loadInitial$lintWithKotlin(androidx.paging.PositionalDataSource.LoadInitialParams params, kotlin.coroutines.Continuation<? super androidx.paging.DataSource.BaseResult<T>> p);
method @WorkerThread public abstract void loadRange(androidx.paging.PositionalDataSource.LoadRangeParams params, androidx.paging.PositionalDataSource.LoadRangeCallback<T> callback);
method public final <V> androidx.paging.PositionalDataSource<V> map(androidx.arch.core.util.Function<T,V> function);
method public final <V> androidx.paging.PositionalDataSource<V> map(kotlin.jvm.functions.Function1<? super T,? extends V> function);