Status Update
Comments
ig...@jetbrains.com <ig...@jetbrains.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
[Deleted User] <[Deleted User]> #3
ma...@google.com <ma...@google.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
ra...@google.com <ra...@google.com> #5
Thanks for adding me to this discussion.
I'll try to explain what happens on Android. When a user persses a key on the keyboard, they will get a "KeyDown" event, and when they release the key they will get a "KeyUp" event. If the user keeps pressing the key, they will get multiple "KeyDown" events (eg typing "eeeeeeeeeeee" by just holding down the "e" key). When they finally release the key, they will get a single "KeyUp" event.
For the game, when the user minimises the screen, or clicks away from that window, the window loses focus, so it will not receive any more KeyEvents. At this point the game should be paused, and the current velocity saved. When the window gains focus again, the game is resumed and the application assumes that the "W" key was released, so the car starts slowing down. If however the W key was still pressed, the application will receive new "KeyDown" events and it can continue accelerating the car.
I want to avoid adding an API that allows the developer to check for the current state of the keyboard. I think only the component in focus should have access to the keyboard state. This gives the end-user control over where keyboard input is sent, and prevents other applications on the screen from listening/querying for keyboard state.
je...@google.com <je...@google.com>
ap...@google.com <ap...@google.com> #6
Branch: androidx-main
commit 3d2e48d5818401ed48067469de79cfe9be07cba3
Author: George Mount <mount@google.com>
Date: Fri Jul 23 15:48:26 2021
Move desktop's button press and keyboard modifier to common
Fixes: 180075467
Desktop compose has added state for button presses and
modifiers. This CL moves that to common API.
RelNote: "PointerEvent now has support for reading
mouse button state and keyboard modifier state."
Test: new tests, new demo
Change-Id: I6310c8e6bd4d2e383389db7d4a33299aa1c52cd3
M compose/desktop/desktop/samples/src/jvmMain/kotlin/androidx/compose/desktop/examples/example1/Main.jvm.kt
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/UiDemos.kt
A compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/ButtonMetaStateDemo.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/PointerInputEventProcessorTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/input/pointer/PointerEvent.android.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/PointerEvent.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/input/pointer/PointerEvent.desktop.kt
Description
Hello.
There some pointer type specific information that currently isn't available via Pointer API. For example, which mouse button is pressed now. On Desktop we expose AWT raw event object so it's possible to get this info but not for Android.
It also convenient to have active keyboard modifiers, for example, I need it in this CLhttps://android-review.googlesource.com/c/platform/frameworks/support/+/1578803
Both Android and AWT event objects contain this information