Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 94d10ce53e73c28bbe31a84f004c69899a9f9109
Author: Diego Vela <diegovela@google.com>
Date: Fri Feb 02 18:31:11 2024
Fix crash on wrapped Activity.
Fix a crash on a wrapped Activity. The crash was happening because we
did not use the unwrapped Activity. Instead we were using the wrapped
Context causing a cast exception.
Bug: 318787482
Test: ./gradlew window:window:cAT
Change-Id: Id97daf9f78c33aedb73a1e481d7486b00e70af46
M window/window/src/androidTest/java/androidx/window/layout/WindowMetricsCalculatorCompatTest.kt
M window/window/src/main/java/androidx/window/layout/WindowMetricsCalculatorCompat.kt
https://android-review.googlesource.com/2945802
Branch: androidx-main
commit 94d10ce53e73c28bbe31a84f004c69899a9f9109
Author: Diego Vela <diegovela@google.com>
Date: Fri Feb 02 18:31:11 2024
Fix crash on wrapped Activity.
Fix a crash on a wrapped Activity. The crash was happening because we
did not use the unwrapped Activity. Instead we were using the wrapped
Context causing a cast exception.
Bug: 318787482
Test: ./gradlew window:window:cAT
Change-Id: Id97daf9f78c33aedb73a1e481d7486b00e70af46
M window/window/src/androidTest/java/androidx/window/layout/WindowMetricsCalculatorCompatTest.kt
M window/window/src/main/java/androidx/window/layout/WindowMetricsCalculatorCompat.kt
di...@google.com <di...@google.com> #3
This will be fixed in the next release 1.3.0-alpha03 and above.
na...@google.com <na...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.window:window:1.3.0-alpha03
Description
Component used: Jetpack WindowManager
Version used: 1.2.0/latest git
Devices/Android versions reproduced on: Any devices/versions
When using
WindowMetricsCalculator.getOrCreate().computeCurrentWindowMetrics(context)
, the following crash happens.This is because in this line , the origin
context
instead of the unwrapped context (unwrapUiContext(context)
) is casted toActivity
.