Status Update
Comments
al...@gmail.com <al...@gmail.com> #2
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
al...@gmail.com <al...@gmail.com> #3
al...@gmail.com <al...@gmail.com> #4
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
se...@google.com <se...@google.com> #5
You're right, we should add Rx support for this method.
In meanwhile, you can use SettableFuture
and allows you avoid dependency on restricted APIs.
al...@gmail.com <al...@gmail.com> #6
Thanks for showing that callback. Honestly this whole getForegroundInfoAsync
is still unclear to me--since I'm using RxWorker, I usually create a notification inside createWork
and when the work is ongoing, I display a notification with progress bar via doOnSubscribe
, something like this:
api.doSomeWork()
.doOnSubscribe {
// display notification with progress bar
setForegroundAsync(ForegroundInfo(notificationId, notificationBuilder.build()))
}
So how getForegroundInfoAsync
fits into this, I don't understand. The effect of implementing getForegroundInfoAsync
is that I actually get two notifications, the one that displays a progress bar that's already full, and another one that's actually updated.
Edit: actually never mind, getForegroundInfoAsync
has nothing to do with having two notifs. Just figured it out and getForegroundInfoAsync
is called before createWork
.
ap...@google.com <ap...@google.com> #7
Branch: androidx-main
commit 4d0b5f22951dd44cd4c4ba646fe5ad7a3e87c280
Author: Sergey Vasilinets <sergeyv@google.com>
Date: Fri Nov 05 17:00:43 2021
RxJava2: RxJava wrapper around getForegroundInfoAsync
Test: RxForegroundInfoTest
bug:203851459
Relnote: "
RxWorker has now `getForegroundInfo` returing`Single` that
can be used instead of `getForegroundInfoAsync` that returns
`ListenableFuture`.
"
Change-Id: I21c91cd5db57e85bf1aaa7e1596e2287ab44675c
M work/work-rxjava2/src/main/java/androidx/work/RxWorker.java
M work/work-rxjava2/build.gradle
M work/work-rxjava2/api/public_plus_experimental_current.txt
M work/work-rxjava2/api/current.txt
M work/work-rxjava2/api/restricted_current.txt
M work/work-rxjava2/src/test/java/androidx/work/RxForegroundInfoTest.kt
ap...@google.com <ap...@google.com> #8
Branch: androidx-main
commit 66303e797f590d88fd50d1c68caee02c1bfac077
Author: Sergey Vasilinets <sergeyv@google.com>
Date: Fri Nov 05 17:43:16 2021
RxJava3: RxJava wrapper around setForegroundInfoAsync
Test: RxForegroundInfoTest
bug:203851459
Relnote: "
RxWorker now has `setForeground` returning `Completable` that
can be used instead of `setForegroundInfoAsync` that returns
`ListenableFuture`.
"
Change-Id: I992a32849600b8c3bb37fa362e9775bc46a6462b
M work/work-rxjava3/src/main/java/androidx/work/rxjava3/RxWorker.java
M work/work-rxjava3/src/test/java/androidx/work/rxjava3/RxForegroundInfoTest.kt
M work/work-rxjava3/api/public_plus_experimental_current.txt
M work/work-rxjava3/api/current.txt
M work/work-rxjava3/api/restricted_current.txt
Description
Description has been deleted.