Fixed
Status Update
Comments
ra...@google.com <ra...@google.com>
ra...@google.com <ra...@google.com> #2
so...@google.com <so...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 8aea0fa4e7bed4d9dee1f03482328014e4dd86c2
Author: John Nichol <jnichol@google.com>
Date: Fri Oct 21 17:21:35 2022
Correct ScalingLazyListState.centerItemIndex calculation
Change the calculation of centerItemIndex/centerItemOffset to ensure that the closest item to the center of the viewport is returned.
The previous (incorrect) behaviour found the first items that had its itemEnd below the center line.
As a result it was possible in some edge conditions for an items which sat just above the center line to be ignored and the first items below the center line to be selected - even it was further away from the center line.
Bug: 254257769
Test: ./gradlew :wear:compose:compose-material:connectedCheck --info --daemon
Relnote: "We have corrected the calculation of `ScalingLazyListState.centerItemIndex/centerItemOffset` so that if two items sit either side of the viewport center line the one that is closest will be considered as the centerItem."
Change-Id: I307091167e04914d1ae29d5324f84ec18ed7b8a8
M wear/compose/compose-material/src/androidAndroidTest/kotlin/androidx/wear/compose/material/ScalingLazyListLayoutInfoTest.kt
M wear/compose/compose-material/src/commonMain/kotlin/androidx/wear/compose/material/ScalingLazyListItemInfo.kt
M wear/compose/compose-material/src/commonMain/kotlin/androidx/wear/compose/material/ScalingLazyListState.kt
M wear/compose/integration-tests/demos/src/main/java/androidx/wear/compose/integration/demos/ScalingLazyColumnDemo.kt
https://android-review.googlesource.com/2263181
Branch: androidx-main
commit 8aea0fa4e7bed4d9dee1f03482328014e4dd86c2
Author: John Nichol <jnichol@google.com>
Date: Fri Oct 21 17:21:35 2022
Correct ScalingLazyListState.centerItemIndex calculation
Change the calculation of centerItemIndex/centerItemOffset to ensure that the closest item to the center of the viewport is returned.
The previous (incorrect) behaviour found the first items that had its itemEnd below the center line.
As a result it was possible in some edge conditions for an items which sat just above the center line to be ignored and the first items below the center line to be selected - even it was further away from the center line.
Bug: 254257769
Test: ./gradlew :wear:compose:compose-material:connectedCheck --info --daemon
Relnote: "We have corrected the calculation of `ScalingLazyListState.centerItemIndex/centerItemOffset` so that if two items sit either side of the viewport center line the one that is closest will be considered as the centerItem."
Change-Id: I307091167e04914d1ae29d5324f84ec18ed7b8a8
M wear/compose/compose-material/src/androidAndroidTest/kotlin/androidx/wear/compose/material/ScalingLazyListLayoutInfoTest.kt
M wear/compose/compose-material/src/commonMain/kotlin/androidx/wear/compose/material/ScalingLazyListItemInfo.kt
M wear/compose/compose-material/src/commonMain/kotlin/androidx/wear/compose/material/ScalingLazyListState.kt
M wear/compose/integration-tests/demos/src/main/java/androidx/wear/compose/integration/demos/ScalingLazyColumnDemo.kt
ma...@gmail.com <ma...@gmail.com> #4
ma...@gmail.com <ma...@gmail.com> #6
so...@google.com <so...@google.com>
so...@google.com <so...@google.com> #7
so...@google.com <so...@google.com> #8
ca...@gmail.com <ca...@gmail.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.wear.compose:compose-material:1.1.0-rc01
so...@google.com <so...@google.com> #10
No, that is an intentional change in 21.0.0 (FusedLocationProviderClient is now an interface rather than an abstract class). The major version bump indicates there may be incompatibilities between the v19 release and the v20 release. You will need to recompile your code most likely.
so...@google.com <so...@google.com> #11
play-service-location:21.0.1 is now released and I have confirmed this bug is fixed.
aq...@gmail.com <aq...@gmail.com> #12
Estoy que me rebienta una hacker con su Caos tau la tela araña .riesgo de vida del software
th...@gmail.com <th...@gmail.com> #13
Thank you all I'm just trying to get by in life and just keep getting hurt by weman in every relationship I have been in so when it is going to stop I'm 47 years old it time to just start have fun so let do things
as...@gmail.com <as...@gmail.com> #14
my google play service doesn't work & I can't download it
nt...@gmail.com <nt...@gmail.com> #15
I'm Ntobeko Mni I have a problem with my phone it doesn't want to play Dstv
so...@google.com <so...@google.com>
go...@gmail.com <go...@gmail.com> #16
Comment has been deleted.
go...@gmail.com <go...@gmail.com> #17
Getting Crash using 21.0.1 location lib. version . Kindly guide how to solve it.
// problem
implementation "com.google.android.gms:play-services-location:21.0.1"
// no problem
implementation "com.google.android.gms:play-services-location:20.0.0"
java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.FusedLocationProviderClient, but class was expected (declaration of 'com.google.android.gms.location.FusedLocationProviderClient' appears
at com.google.android.libraries.maps.ka.zzcj.zzf(LocationSourceImpl.java:17)
at com.google.android.libraries.maps.ka.zzcj.zza(LocationSourceImpl.java:44)
at com.google.android.libraries.maps.ka.zzba.zzc(GoogleMapImpl.java:716)
at com.google.android.libraries.maps.GoogleMap.setMyLocationEnabled(GoogleMap.java:60)
at com.google.android.libraries.maps.zzak.zza(Unknown Source:2)
at com.google.android.libraries.maps.ka.zzbc.run(Unknown Source:3)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:223)
at android.os.Looper.loop(Looper.java:324)
at android.app.ActivityThread.main(ActivityThread.java:8482)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1061)
// problem
implementation "com.google.android.gms:play-services-location:21.0.1"
// no problem
implementation "com.google.android.gms:play-services-location:20.0.0"
java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.FusedLocationProviderClient, but class was expected (declaration of 'com.google.android.gms.location.FusedLocationProviderClient' appears
at com.google.android.libraries.maps.ka.zzcj.zzf(LocationSourceImpl.java:17)
at com.google.android.libraries.maps.ka.zzcj.zza(LocationSourceImpl.java:44)
at com.google.android.libraries.maps.ka.zzba.zzc(GoogleMapImpl.java:716)
at com.google.android.libraries.maps.GoogleMap.setMyLocationEnabled(GoogleMap.java:60)
at com.google.android.libraries.maps.zzak.zza(Unknown Source:2)
at com.google.android.libraries.maps.ka.zzbc.run(Unknown Source:3)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:223)
at android.os.Looper.loop(Looper.java:324)
at android.app.ActivityThread.main(ActivityThread.java:8482)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1061)
so...@google.com <so...@google.com> #18
FusedLocationProviderClient has changed from an abstract class in 20 to an interface in 21. You will need to recompile your code accordingly.
an...@gmail.com <an...@gmail.com> #19
LocationServices: cannot cast APIException to ResolvableApiException with following dependencies
com.google.android.gms:play-services-location:21.0.1
com.google.android.gms:play-services-base:18.01
Device details:
Google Pixel 6a, Android 13, Play Service version 23.23.16 (190400-540660214)
I had to use the suggested workaround:
val locationRequest = LocationRequest.Builder(Priority.PRIORITY_HIGH_ACCURACY, 1000).build()
val client: SettingsClient = LocationServices.getSettingsClient(context)
val builder: LocationSettingsRequest.Builder = LocationSettingsRequest
.Builder()
.addLocationRequest(locationRequest)
val gpsSettingTask: Task<LocationSettingsResponse> = client.checkLocationSettings(builder.build())
gpsSettingTask.addOnCompleteListener {locationSettingsResponseTask ->
try {
val settingsResponse = locationSettingsResponseTask.getResult(ApiException::class.java)
// request location
} catch (e: ApiException) {
when (e.statusCode) {
LocationSettingsStatusCodes.RESOLUTION_REQUIRED -> {
try {
if (e is ResolvableApiException) {
val resolvableException = e as ResolvableApiException
val intentSenderRequest = IntentSenderRequest
.Builder(resolvableException.resolution)
.build()
// request settings dialog
} else if (e.status.resolution != null) {
val intentSenderRequest = IntentSenderRequest
.Builder(e.status.resolution!!)
.build()
// request settings dialog
}
} catch (ex: Exception) {
}
}
else -> {
}
}
}
}
com.google.android.gms:play-services-location:21.0.1
com.google.android.gms:play-services-base:18.01
Device details:
Google Pixel 6a, Android 13, Play Service version 23.23.16 (190400-540660214)
I had to use the suggested workaround:
val locationRequest = LocationRequest.Builder(Priority.PRIORITY_HIGH_ACCURACY, 1000).build()
val client: SettingsClient = LocationServices.getSettingsClient(context)
val builder: LocationSettingsRequest.Builder = LocationSettingsRequest
.Builder()
.addLocationRequest(locationRequest)
val gpsSettingTask: Task<LocationSettingsResponse> = client.checkLocationSettings(builder.build())
gpsSettingTask.addOnCompleteListener {locationSettingsResponseTask ->
try {
val settingsResponse = locationSettingsResponseTask.getResult(ApiException::class.java)
// request location
} catch (e: ApiException) {
when (e.statusCode) {
LocationSettingsStatusCodes.RESOLUTION_REQUIRED -> {
try {
if (e is ResolvableApiException) {
val resolvableException = e as ResolvableApiException
val intentSenderRequest = IntentSenderRequest
.Builder(resolvableException.resolution)
.build()
// request settings dialog
} else if (e.status.resolution != null) {
val intentSenderRequest = IntentSenderRequest
.Builder(e.status.resolution!!)
.build()
// request settings dialog
}
} catch (ex: Exception) {
}
}
else -> {
}
}
}
}
st...@gmail.com <st...@gmail.com> #20
I need play store services on my phone
Description
Device Info
problem code
What was the expected result?
if take
exception.statusCode = LocationSettingsStatusCodes.RESOLUTION_REQUIRED
will be cast
exception as ResolvableApiException
What was the actual result? exception is not ResolvableApiException
Relevant logcat output
Addendum. My product code gives a different error.
Link to captured Android bug report (shared privately in Drive.)
none
Optional: Link to any screenshot(s) that demonstrate the issue (shared privately in Drive)
none