History log of /frameworks/support/room/runtime/src/main/java/android/arch/persistence/room/Room.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
24418e9aafa6ae3128ae47cf7087eda46dae4f5d 18-Aug-2017 Chris Craik <ccraik@google.com> Revert "Revert "Paging refactor to unify list/data source types, and simplify mutability""

bug:64838013

Fixed build breakage.

This reverts commit c051b0691f4363110fb3d62193a114b04a8ef344.

Change-Id: I4fd2442d185b4b107e2db45c402f79ed9948bc38
/frameworks/support/room/runtime/src/main/java/android/arch/persistence/room/Room.java
c051b0691f4363110fb3d62193a114b04a8ef344 18-Aug-2017 Chris Craik <ccraik@google.com> Revert "Paging refactor to unify list/data source types, and simplify mutability"

bug:64838013 Fix build breakage

This reverts commit 1cb45e73a41f91534febb7e5d799e1f703fb3763.

Change-Id: I88d2c954f48f1c6693ccfc31b3b62a37c5abac9a
/frameworks/support/room/runtime/src/main/java/android/arch/persistence/room/Room.java
1cb45e73a41f91534febb7e5d799e1f703fb3763 15-Jul-2017 Chris Craik <ccraik@google.com> Paging refactor to unify list/data source types, and simplify mutability

Bug: 64809611
Test: new tests passing

- Unified list type for contiguous data sources - null padding is created at initialization, and
consumed as items are loaded. Infinite unpadded, and counted padded lists use same list type
entirely.

- New list and DataSource type for tiled data sources, which can access data at any location.

- Split data source based on keyed vs tiled based implementations. This massively simplified the
few existing data sources, and allowed us to specialize further, making the trivial test (and
limit-offset) code much simpler (and avoiding code that was extremely prone to off by one errors)

- Added PagedListAdapter, which provides convenience wrapper for the AdapterHelper, saving users a
few extra lines of code.

- Uncountable positioning - rework also has relative data source position stored at initialization
so that countable items can use position, without being required to count their dataset. This
supports cases with simple position IDs, but where you: 1) don't want nulls in the data, 2) don't
care about count/scrollbars, 3) can't easily compute the total number.

- PagedList requires data to initialize - Removes need for weird warmup API, avoids showing a list
of nulls to user in countable case, and unifies initialization codepaths.

- PagedList has a snapshot() method that enables DiffUtil to run safely on a background thread on
immutable data, and snapshot-aware diffing that allows a new list to load content while it's being
used in diffing on a background thread.

Not done:

- Parameterized initialization (both init from key, storing key, passing key when creating LiveData<PagedList>)

Change-Id: I7cb945afe37e68aad44cde45277afd7a27416e52
/frameworks/support/room/runtime/src/main/java/android/arch/persistence/room/Room.java
64db0cc15b78b62a1d44a70fc8b4552e660d952c 17-Apr-2017 Yigit Boyar <yboyar@google.com> Mass package renaming from android.support to android.arch

Bug: 37429162
Test: ./gradlew check passes

Change-Id: I911766254b6a9f957ef90429a1efc01c209d693a
/frameworks/support/room/runtime/src/main/java/android/arch/persistence/room/Room.java