Status Update
Comments
fe...@gmail.com <fe...@gmail.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()) {
in...@gmail.com <in...@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!
[Deleted User] <[Deleted User]> #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
ub...@gmail.com <ub...@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
fi...@gmail.com <fi...@gmail.com> #6
de...@gmail.com <de...@gmail.com> #7
As an alternative I am using FusedLocationProviderClient with PendingIntent:
IntentFilter intentFilter = new IntentFilter(ACTION_LOCATION);
registerReceiver(locationReceiver, intentFilter);
mFusedLocationClient.requestLocationUpdates(mLocationRequest, locationPendingIntent);
and
unregisterReceiver(locationReceiver);
mFusedLocationClient.removeLocationUpdates(locationPendingIntent)
Here is forked LocationUpdates repo with LeakCanary installed and an option to switch between LocationCallback and PendingIntent. LeakCanary not reporting anything when using PendingIntent.
sa...@google.com <sa...@google.com> #8
ub...@gmail.com <ub...@gmail.com> #9
di...@gmail.com <di...@gmail.com> #10
je...@google.com <je...@google.com> #11
ub...@gmail.com <ub...@gmail.com> #12
There is an issuetracker Component available these days for Play Services Location:
Maybe move this issue to that Component to track it better?
je...@google.com <je...@google.com> #13
I can't move it right now, but I think it's ok to stay here.
As I wrote in the code lab issue, I misunderstood when the rewrite went out (which should fix the issue).
It goes live in version 20 (current version location 19.0.1). The engineer who wrote the rewrite checked and wasn't seeing the same issue, i.e., it should be resolved.
However, that does mean we have to wait until 20 is released. I can check in again here when it's live for you to double check.
br...@gmail.com <br...@gmail.com> #14
je...@google.com <je...@google.com> #15
I haven't been on location in awhile, but I wanted to follow up on this.
The issue should be resolved with
Description
Call LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, this); will result in a leak. Even though I'm calling removeLocationUpdates, disconnect, unregisterConnectionCallbacks and unregisterConnectionFailedListener inside onPause/onStop.
See attached project file.
- What happened:
LeakCanary reports a leak in an internal class from the package com.google.android.gms.location.
See attached log.
- What you think the correct behavior should be:
There shouldn't be any leaks.
Android version 6.0
Google Play Services 9.8.0
Related issue: