Fixed
Status Update
Comments
da...@google.com <da...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 8739fcde521e3f7f92111b7424ab924fb22eed16
Author: rohitsat13 <rohitsat@google.com>
Date: Fri Nov 20 10:29:57 2020
RxDataStore.kt, the RxJava wrapper for the core API.
Future cls: 1) RxDataBuilder 2) RxDataMigration
Test: RxDataStoreTest.java
Relnote: There is now a RxJava Wrapper for the core DataStore API. Future updates will include a Builder and RxDataMigrations.
Bug: 170311106
Change-Id: I3e7e099488035cca906b5f6e6de0a387acb5b964
A datastore/datastore-rxjava2/api/current.txt
A datastore/datastore-rxjava2/api/public_plus_experimental_current.txt
A datastore/datastore-rxjava2/api/res-current.txt
A datastore/datastore-rxjava2/api/restricted_current.txt
A datastore/datastore-rxjava2/build.gradle
A datastore/datastore-rxjava2/src/main/AndroidManifest.xml
A datastore/datastore-rxjava2/src/main/java/androidx/datastore/rxjava2/RxDataStore.kt
A datastore/datastore-rxjava2/src/test-common/java/androidx/datastore/rxjava2/TestingSerializer.kt
A datastore/datastore-rxjava2/src/test/java/androidx/datastore/rxjava2/RxDataStoreTest.java
M docs-tip-of-tree/build.gradle
M settings.gradle
https://android-review.googlesource.com/1470342
Branch: androidx-master-dev
commit 8739fcde521e3f7f92111b7424ab924fb22eed16
Author: rohitsat13 <rohitsat@google.com>
Date: Fri Nov 20 10:29:57 2020
RxDataStore.kt, the RxJava wrapper for the core API.
Future cls: 1) RxDataBuilder 2) RxDataMigration
Test: RxDataStoreTest.java
Relnote: There is now a RxJava Wrapper for the core DataStore API. Future updates will include a Builder and RxDataMigrations.
Bug: 170311106
Change-Id: I3e7e099488035cca906b5f6e6de0a387acb5b964
A datastore/datastore-rxjava2/api/current.txt
A datastore/datastore-rxjava2/api/public_plus_experimental_current.txt
A datastore/datastore-rxjava2/api/res-current.txt
A datastore/datastore-rxjava2/api/restricted_current.txt
A datastore/datastore-rxjava2/build.gradle
A datastore/datastore-rxjava2/src/main/AndroidManifest.xml
A datastore/datastore-rxjava2/src/main/java/androidx/datastore/rxjava2/RxDataStore.kt
A datastore/datastore-rxjava2/src/test-common/java/androidx/datastore/rxjava2/TestingSerializer.kt
A datastore/datastore-rxjava2/src/test/java/androidx/datastore/rxjava2/RxDataStoreTest.java
M docs-tip-of-tree/build.gradle
M settings.gradle
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit a65952abc062e0b8cde3b291cde64c804b70701c
Author: rohitsat13 <rohitsat@google.com>
Date: Fri Nov 20 10:39:49 2020
RxDataStoreBuilder.kt to make constructing DataStores from java easier.
Relnote: Added a builder to make constructing Datastores from java easier.
Test: RxDataStoreBuilderTest
Bug: 170311106
Change-Id: Id2b5a4fdcd166cab45aea92db6e76f9e7814e24f
M datastore/datastore-rxjava2/api/current.txt
M datastore/datastore-rxjava2/api/public_plus_experimental_current.txt
M datastore/datastore-rxjava2/api/restricted_current.txt
A datastore/datastore-rxjava2/src/androidTest/java/androidx/datastore/rxjava2/AssertThrows.kt
A datastore/datastore-rxjava2/src/androidTest/java/androidx/datastore/rxjava2/RxDataStoreBuilderTest.java
A datastore/datastore-rxjava2/src/main/java/androidx/datastore/rxjava2/RxDataStoreBuilder.kt
https://android-review.googlesource.com/1470343
Branch: androidx-master-dev
commit a65952abc062e0b8cde3b291cde64c804b70701c
Author: rohitsat13 <rohitsat@google.com>
Date: Fri Nov 20 10:39:49 2020
RxDataStoreBuilder.kt to make constructing DataStores from java easier.
Relnote: Added a builder to make constructing Datastores from java easier.
Test: RxDataStoreBuilderTest
Bug: 170311106
Change-Id: Id2b5a4fdcd166cab45aea92db6e76f9e7814e24f
M datastore/datastore-rxjava2/api/current.txt
M datastore/datastore-rxjava2/api/public_plus_experimental_current.txt
M datastore/datastore-rxjava2/api/restricted_current.txt
A datastore/datastore-rxjava2/src/androidTest/java/androidx/datastore/rxjava2/AssertThrows.kt
A datastore/datastore-rxjava2/src/androidTest/java/androidx/datastore/rxjava2/RxDataStoreBuilderTest.java
A datastore/datastore-rxjava2/src/main/java/androidx/datastore/rxjava2/RxDataStoreBuilder.kt
da...@google.com <da...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 0e34cf4861bfffcd328a07d59fdeb78f7211019c
Author: rohitsat13 <rohitsat@google.com>
Date: Mon Nov 30 14:06:48 2020
Modify RxDataStoreBuilder constructors to accept required params.
Test: Modified existing tests.
Bug: 170311106
Relnote: N/A
Change-Id: I7f4190dec2f4f62500818c97f2beb55034774c35
M datastore/datastore-rxjava2/api/current.txt
M datastore/datastore-rxjava2/api/public_plus_experimental_current.txt
M datastore/datastore-rxjava2/api/restricted_current.txt
M datastore/datastore-rxjava2/src/androidTest/java/androidx/datastore/rxjava2/RxDataStoreBuilderTest.java
M datastore/datastore-rxjava2/src/main/java/androidx/datastore/rxjava2/RxDataStoreBuilder.kt
https://android-review.googlesource.com/1513602
Branch: androidx-master-dev
commit 0e34cf4861bfffcd328a07d59fdeb78f7211019c
Author: rohitsat13 <rohitsat@google.com>
Date: Mon Nov 30 14:06:48 2020
Modify RxDataStoreBuilder constructors to accept required params.
Test: Modified existing tests.
Bug: 170311106
Relnote: N/A
Change-Id: I7f4190dec2f4f62500818c97f2beb55034774c35
M datastore/datastore-rxjava2/api/current.txt
M datastore/datastore-rxjava2/api/public_plus_experimental_current.txt
M datastore/datastore-rxjava2/api/restricted_current.txt
M datastore/datastore-rxjava2/src/androidTest/java/androidx/datastore/rxjava2/RxDataStoreBuilderTest.java
M datastore/datastore-rxjava2/src/main/java/androidx/datastore/rxjava2/RxDataStoreBuilder.kt
an...@google.com <an...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit aba42ee317b69068fb6da49575dca03671ec547f
Author: rohitsat13 <rohitsat@google.com>
Date: Fri Nov 20 10:40:14 2020
RxDataMigration and RxSharedPreferencesMigration.
Add a wrapper for the RxDataMigration interface so that people can define migrations using RxJava
Relnote: """Added support for migrations written using RxJava with the RxDataMigration interface. The RxDataMigration interface is like the DataMigration interface, except using reactivex.Single's instead of suspend functions. You can implement this interface to define a custom migration.
This change also adds support for SharedPreferencesMigrationBuilder which allows easier construction of SharedPreferencesMigrations from java.
"""
Test: RxSharedPreferencesMigrationTest.kt
Bug: 170311106
Change-Id: If929664956cd1434eee5178432958b58722cd76c
M datastore/datastore-rxjava2/api/current.txt
M datastore/datastore-rxjava2/api/public_plus_experimental_current.txt
M datastore/datastore-rxjava2/api/restricted_current.txt
M datastore/datastore-rxjava2/build.gradle
M datastore/datastore-rxjava2/src/androidTest/java/androidx/datastore/rxjava2/RxDataStoreBuilderTest.java
A datastore/datastore-rxjava2/src/androidTest/java/androidx/datastore/rxjava2/RxSharedPreferencesMigrationTest.java
A datastore/datastore-rxjava2/src/main/java/androidx/datastore/rxjava2/RxDataMigration.java
M datastore/datastore-rxjava2/src/main/java/androidx/datastore/rxjava2/RxDataStoreBuilder.kt
A datastore/datastore-rxjava2/src/main/java/androidx/datastore/rxjava2/RxSharedPreferencesMigration.kt
M testutils/testutils-truth/src/main/java/androidx/testutils/assertions.kt
A testutils/testutils-truth/src/test/java/androidx/testutils/AssertionsTest.kt
https://android-review.googlesource.com/1470344
Branch: androidx-master-dev
commit aba42ee317b69068fb6da49575dca03671ec547f
Author: rohitsat13 <rohitsat@google.com>
Date: Fri Nov 20 10:40:14 2020
RxDataMigration and RxSharedPreferencesMigration.
Add a wrapper for the RxDataMigration interface so that people can define migrations using RxJava
Relnote: """Added support for migrations written using RxJava with the RxDataMigration interface. The RxDataMigration interface is like the DataMigration interface, except using reactivex.Single's instead of suspend functions. You can implement this interface to define a custom migration.
This change also adds support for SharedPreferencesMigrationBuilder which allows easier construction of SharedPreferencesMigrations from java.
"""
Test: RxSharedPreferencesMigrationTest.kt
Bug: 170311106
Change-Id: If929664956cd1434eee5178432958b58722cd76c
M datastore/datastore-rxjava2/api/current.txt
M datastore/datastore-rxjava2/api/public_plus_experimental_current.txt
M datastore/datastore-rxjava2/api/restricted_current.txt
M datastore/datastore-rxjava2/build.gradle
M datastore/datastore-rxjava2/src/androidTest/java/androidx/datastore/rxjava2/RxDataStoreBuilderTest.java
A datastore/datastore-rxjava2/src/androidTest/java/androidx/datastore/rxjava2/RxSharedPreferencesMigrationTest.java
A datastore/datastore-rxjava2/src/main/java/androidx/datastore/rxjava2/RxDataMigration.java
M datastore/datastore-rxjava2/src/main/java/androidx/datastore/rxjava2/RxDataStoreBuilder.kt
A datastore/datastore-rxjava2/src/main/java/androidx/datastore/rxjava2/RxSharedPreferencesMigration.kt
M testutils/testutils-truth/src/main/java/androidx/testutils/assertions.kt
A testutils/testutils-truth/src/test/java/androidx/testutils/AssertionsTest.kt
Description
Version used: 2.2.0
Devices/Android versions reproduced on:
- device usb:336662528X product:xcover4ltexx model:SM_G390F device:xcover4lte transport_id:5
- device product:sdk_gphone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:4
- device usb:336662528X product:zerofltexx model:SM_G920F device:zeroflte transport_id:15
In Version 2.1.0 annotation @Relation was only allowed for list types, if you used it on a non-list type the following runtime error occured:
error: Fields annotated with @Relation must be a List or Set.
Since Version 2.2.0 @Relation can be used on non-list types, in order to model relations with a single object reference.
This is handy if you have 1-to-1 relations and you don't have to explicitly get the first item from the result list, instead you get the object directly.
release notes:
One-to-One Relations: The restriction in POJO fields annotated with @Relation to be of type List or Set has been lifted, effectively allowing single-value relations to be represented.
It seems that this new feature is only supported up to a certain amount of table rows. In more details it means that if you run a query on tables with 100 rows, the returned POJOs have all valid non-null references to the object specified by the @Relation annotation. If you run the same query on tables with more than 999 rows (999 still works, 1000 will fail) the result will be that all returned POJOs have NULL as referenced object (see my example project).
If you use the list type with @Relation annotation you don't have this limitation.
Please refer to the attached example project unit test.
In the example project the same entities are used but with two different POJO types. One is using a List<> type annotated with @Relation, and the other is using the newly supported object type.
Android unit test show that the list type always works but the object type works up to 999 rows, after that it starts to fail.