Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Project: platform/frameworks/support
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
https://android-review.googlesource.com/1123258
https://goto.google.com/android-sha1/b90079595f33f58fece04026a97faa0d243acdb1
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
[Deleted User] <[Deleted User]> #3
il...@google.com <il...@google.com> #4
Project: platform/frameworks/support
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 ( b/140759491 ).
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
https://android-review.googlesource.com/1288456
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
il...@google.com <il...@google.com> #5
I should clarify: we're deprecating it in alpha02, removing it in a future version.
[Deleted User] <[Deleted User]> #6
Hi. Thanks for the clarification. Looking forward to the next release. :)
lo...@gmail.com <lo...@gmail.com> #7
I got a question regarding the removal of clearTask: originally I have been using clearTask to make sure prevent the user from going back to a splashFragment (see https://stackoverflow.com/questions/50336112/how-to-disable-up-in-navigation-for-some-fragment-with-the-new-navigation-archit/50336319 ). What should I do instead to clear previous fragments from the stack?
mu...@gmail.com <mu...@gmail.com> #8
[Deleted User] <[Deleted User]> #9
Your destinationId in setPopUpTo need to be either id of the graph itself or better be id of the startDestination. You can also achieve this behavior with navigation graph xml attributes popUpTo and popUpToInclusive.
[Deleted User] <[Deleted User]> #10
I'm trying to use popUpTo with popUpToInclusive exactly as instructed, and it works fine for normal actions. However, I can't get it to work for global actions! Clear Task used to work perfectly for global actions.
il...@google.com <il...@google.com> #11
Re #10 - please file a new bug with a sample project that reproduces your issue.
[Deleted User] <[Deleted User]> #12
Re #11 I created a new issue detailing my problem and containing a sample project here: https://issuetracker.google.com/issues/116831650
h....@gmail.com <h....@gmail.com> #13
ok
Description
DETAILS:-
The destination home is an activity with a NavHostFragment (FirstFragment.kt) which initially navigates to the second destination (SecondActivity.kt), then immediately comes back to the FirstFragment, and then navigates to third destination (FirstPopupFragment.kt). (Navigation can be observed in the attached screen-record).
LOG:-
2018-05-27 20:39:52.794 3289-3289/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.cyrilnoah.navigationegapp, PID: 3289
java.lang.IllegalArgumentException: navigation destination com.example.cyrilnoah.navigationegapp:id/action_first_to_first_popup is unknown to this NavController
at androidx.navigation.NavController.navigate(NavController.java:605)
at androidx.navigation.NavController.navigate(NavController.java:565)
at androidx.navigation.NavController.navigate(NavController.java:553)
at com.example.cyrilnoah.navigationegapp.FirstFragment$onViewCreated$1.onClick(FirstFragment.kt:40)
at android.view.View.performClick(View.java:6579)
at android.view.View.performClickInternal(View.java:6556)
at android.view.View.access$3100(View.java:777)
at android.view.View$PerformClick.run(View.java:25660)
at android.os.Handler.handleCallback(Handler.java:819)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
Component used:
"android.arch.navigation:navigation-fragment-ktx:$nav_version"
"android.arch.navigation:navigation-ui-ktx:$nav_version"
Version used:
nav_version = '1.0.0-alpha01'
Devices/Android versions reproduced on:
Tested on Pixel 2 XL (emulator), and Xiaomi Mi Max 2 (real device). Probably crashes on all, not so sure.
- Sample project to trigger the issue.
(Project attached below)
- A screenrecord or screenshots showing the issue (if UI related).
(Screen-record attached below)