Status Update
Comments
sy...@google.com <sy...@google.com> #2
The issue turns out to be a problem with how the requestFocus()
was being called. in updateFocusRectInWindowSnapshot
, there is a check for isFocused
that should also consider hasFocus()
. The line should be changed from:
if (!view.isFocused) {
to
if (!view.isFocused && !view.hasFocus()) {
b....@gmail.com <b....@gmail.com> #3
Resolved the original issues by using the correct rect value. However the focus shouldn't skip focus even with incorrect value. re-open the issue for investigation purpose. Thank you!
sy...@google.com <sy...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
Author: George Mount <
Link:
Fix requestFocus with bad previous rectangle
Expand for full commit details
Fix requestFocus with bad previous rectangle
Fixes: 388590015
When requestFocus() is called on a ComposeView with a previousRect
set to something that doesn't make sense (empty rectangle from the
wrong direction, for example), the previous behavior would not
find a matching component in that direction. Instead, it would
find the next View to focus on and pass the focus on.
With this CL, if the ComposeView isn't currently focused and a
focusSearch fails to find something focusable in relation to the
previous rectangle, an attempt is made irrespective of the
previous rectangle.
Relnote: "Fixed focus issue where requestFocus() with a
nonsensical previouslyFocusedRect parameter (related to
the focus direction) would skip past a ComposeView."
Test: new test, manual testing
Change-Id: Ifdc2f17b23620d1ae14848624f447f84cc1b0b5d
Files:
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/RequestFocusTest.kt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
Hash: 8501eec732d61bd71c385a90f58a194191816d57
Date: Fri Jan 10 11:04:59 2025
b....@gmail.com <b....@gmail.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui-android:1.8.0-beta01
androidx.compose.ui:ui-jvmstubs:1.8.0-beta01
androidx.compose.ui:ui-linuxx64stubs:1.8.0-beta01
sa...@gmail.com <sa...@gmail.com> #6
@OP: What's the best workaround have you applied?
sy...@google.com <sy...@google.com> #7
Release notes:
Description
Please answer all relevant questions below so that we have enough information to investigate your issue. Providing incomplete information will delay investigation of your issue.
Bug Report Template
Describe the issue: expected vs. observed behavior and/or appearance.
ReconnectionService is trying to start a service in the background. This is causing an IllegalStateException on Android 8+.
com.google.android.gms.cast.framework.ReconnectionService }: app is in background uid UidRecord{c51b1af u0a131 TPSL bg:+2m55s135ms idle change:cached procs:1 seq(0,0,0)}
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1577)
at android.app.ContextImpl.startService(ContextImpl.java:1532)
at android.content.ContextWrapper.startService(ContextWrapper.java:664)
at com.google.android.gms.internal.cast.zzai.zzg$1385ff(Unknown Source:19000)
at com.google.android.gms.internal.cast.zzai.onStatusUpdated(Unknown Source)
at com.google.android.gms.cast.framework.media.zzr.onStatusUpdated(Unknown Source:30)
at com.google.android.gms.internal.cast.zzdh.onStatusUpdated(Unknown Source:6)
at com.google.android.gms.internal.cast.zzdh.zza(Unknown Source:14000)
at com.google.android.gms.cast.framework.media.RemoteMediaClient.zzb(Unknown Source:2)
at com.google.android.gms.internal.cast.zzct.run(Unknown Source:31)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
List steps to reproduce the issue, if known.
We have been unable to reproduce locally but it is our largest crash.
Which version of the Cast SDK are you using?
15.0.1
On which version(s) of the OS (iOS, Android) do you observe the problem?
Android
On which device type(s) such as phones, tablets or laptops (iPad, iPhone, etc.) do you observe the problem?
Android devices
Do you observe the problem when running on a physical device, or the simulator, or both?
We haven't reproduced, but it happens on user devices.
If this is a device discovery or device connectivity issue: Do you observe the problem over Cellular (using Guest Mode), WiFi (using either Guest Mode or local connection), or both?
If this is strictly a UI appearance/styling issue, please take screenshot(s) (for iOS, and Android) illustrating the problem and attach them to the bug report. Also mention whether the problem occurs in portrait orientation, landscape orientation, or both.
If this is not a UI appearance/styling issue, please capture logs from the SDK for a time interval leading up to and including the occurrence of the problem, and attach them to the bug report. For issues relating to device discovery, the log should cover at least 20 seconds. For issues relating to device connectivity, the log should cover the entire time during which you attempted to start a Casting session.
Obtaining iOS Cast SDK Logs:
Obtaining Android Cast SDK Logs: