Status Update
Comments
al...@google.com <al...@google.com> #2
al...@google.com <al...@google.com> #3
Thanks for the report!
al...@google.com <al...@google.com> #4
The release notes documentation has been edited to clarify this change in behavior for line height.
To support non-standard text sizes, we encourage users to follow the Material design system and use a different style = LocalTextStyle.current.copy(lineHeight = TextUnit.Unspecified)
, or create a custom Typography
entirely.
ow...@google.com <ow...@google.com> #5
al...@google.com <al...@google.com> #6
In my case, I have multiple font sizes in the same Text
(using SpanStyle
in AnnotatedString
). There are legitimate reasons for this. For example, when combining Chinese and English (phonetic) together (for language-learning purposes).
ap...@google.com <ap...@google.com> #7
Branch: androidx-main
commit 78cb5d98af3a7e4433e6623c90f56a311dc4fdd5
Author: Alan Viverette <alanv@google.com>
Date: Tue Apr 25 16:06:46 2023
Use WeakReference for caching DisplayManagerCompat instances
Relnote: Fixed Context leak in DisplayManagerCompat
Fixes: 279625765
Test: DisplayManagerCompatTest
Change-Id: I3409b324301609dba940ef5894ff349b0f229d13
A core/core/src/androidTest/java/androidx/core/hardware/display/DisplayManagerCompatTest.kt
M core/core/src/main/java/androidx/core/hardware/display/DisplayManagerCompat.java
na...@google.com <na...@google.com> #8
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.core:core:1.11.0-alpha04
Description
Component used: androidx-core
Version used: 1.10.0
Devices/Android versions reproduced on: All
DisplayManagerCompat leaks the Context argument used for
DisplayManagerCompat.getInstance(Context)
. This is easily seen from code inspection:getInstance(Context)
populatesDisplayManagerCompat.sInstances
, which is of typeWeakHashMap<Context, DisplayManagerCompat>
.WeakHashMap has weak keys, not weak values. DisplayManagerCompat.mContext is a hard reference to the same (key) Context object, and therefore causes the entire DisplayManagerCompat instance to leak, including the Context. This circular behavior caveat is spelled out in the javadoc for WeakHashMap.
This issue was one of the root causes for https://issuetracker.google.com/issues/37137738