Fixed
Status Update
Comments
yb...@google.com <yb...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: George Mount <
Link:
Fix focus move within child AndroidViews
Expand for full commit details
Fix focus move within child AndroidViews
Fixes: 389994198
Fixes: 391378895
Relnote: "Fixes focus travel within child AndroidViews where it
can sometimes jump out of the child to the ComposeView"
Sometimes the native FocusFinder doesn't act properly and finds
the wrong View when searching. This CL changes the FocusFinder to
use a newer copy of FocusFinder for all focus search operations
in AndroidComposeView.
Test: new test, manual testing
Change-Id: I678c864afe086879c5c45b018dd82da4f23be440
Files:
- M
compose/ui/ui/src/androidInstrumentedTest/AndroidManifest.xml
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/FocusListenerTest.kt
- A
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/test/TestActivity2.kt
- A
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/MixedFocusChangeTest.kt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/FocusFinderCompat.android.kt
Hash: b028bcc322095634123da91c7146bac9e23c13c7
Date: Tue Jan 14 13:48:11 2025
ro...@gmail.com <ro...@gmail.com> #3
Project: platform/frameworks/support
Branch: androidx-main
Author: Ralston Da Silva <
Link:
Disabling isViewFocusFixEnabled and isRemoveFocusedViewFixEnabled
Expand for full commit details
Disabling isViewFocusFixEnabled and isRemoveFocusedViewFixEnabled
Disabling these flag to unblock 1.8 RC.
These were features/bug-fixes that were not regressions
from 1.7
Bug: 406327273
Bug: 369256395
Bug: 378570682
Bug: 376142752
Bug: 384056227
Bug: 388590015
Bug: 389994198
Bug: 391378895
Test: Ran presubmits and added TODOs to the affected tests
Change-Id: I5ffb7ff27c662838c8b464560d1df830751f015c
Files:
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/FocusViewInteropTest.kt
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/OwnerFocusTest.kt
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/RequestFocusTest.kt
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/MixedFocusChangeTest.kt
- M
compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/ComposeUiFlags.kt
Hash: 1a33d21734ef7f68d4cad37c8d333831f304a339
Date: Tue Apr 01 17:46:50 2025
ro...@gmail.com <ro...@gmail.com> #4
I tried 1.0.0-beta2 and the problem is still there. Using Kotlin version 1.2.31 as well..
yb...@google.com <yb...@google.com> #5
looks like the problem happens when the entity is in java (if entity is in kotlin, works fine, in fact we have a test for it).
Given that we are already in beta2 for 1.1, i'll try to ship a spot fix in beta3 instead of trying to find an overall fix where we ensure to properly handle wildcard types.
Given that we are already in beta2 for 1.1, i'll try to ship a spot fix in beta3 instead of trying to find an overall fix where we ensure to properly handle wildcard types.
yb...@google.com <yb...@google.com> #6
fixed in beta3.
Description
Version used:
Devices/Android versions reproduced on: Android API 26
- Sample project is here:
- Kotlin annotation processor throws this error: "e: [kapt] An exception occurred: java.lang.IllegalArgumentException: ? extends com.codepath.apps.restclienttemplate.models.Tweetcannot be converted to an Element".
The particular line in question is here:
@Query("SELECT * FROM User WHERE userId = :id")
UserTweetsFail byId(long id); // change to UserTweetsWorks to see this pass
Where UserTweetsFail.kt is:
class UserTweetsFail {
@Embedded var user: User? = null
@Relation(parentColumn = "userId", entityColumn = "id", entity=Tweet::class)
var tweets: List<Tweet> = listOf()
}
If I change to use UserTweetWorks to use the Java version
UserTweetWorks.java:
public class UserTweetsWorks {
@Embedded
User user;
@Relation(parentColumn = "userId", entityColumn = "id", entity=Tweet.class)
List<Tweet> tweets;
}
The difference seems to be that a Kotlin collection of tweets is essentially:
@Relation(parentColumn = "userId", entityColumn = "id", entity=Tweet.class)
List<? extends Tweet> tweets;
This seems to break the Auto library, since the list is now a subtype of Tweet.
I'm confused why this didn't show up in the integration tests in AOSP -- there seems to be an exact class (