Status Update
Comments
si...@google.com <si...@google.com> #2
First of all thanks for this detailed issue.
This issue had been investigated thoroughly when it was first reported internally. The surprising detail in this report is that the issue is not reproducible before 1.7
. I will look into this.
The main problem with POBox is the fact that it is deprecated. Since 2021 Sony has been shipping new Xperia devices with Gboard pre-installed. Although we are aware that there is still a considerable amount of users still using POBox, the described behavior is caused by POBox's noncompliant behavior with InputConnection
and InputMethodManager
documentation. However, this is understandable since TextView
implementation was also not respecting the behavior that is expected from Editors.
Ultimately we have decided to enforce the documented behavior with specifically regards to when editors should call InputMethodManager.updateSelection
. Also, although unconfirmed, there were traces of possible custom code being included in Sony OEM images that changed how InputMethodManager was notified from TextView. If POBox also depended on something like this, it would be impossible for Compose code to replicate the same unknown behavior.
si...@google.com <si...@google.com> #3
Or is that option not available?
Even if the root cause is POBox, from the perspective of the app's customers, it looks like an app bug, so this issue is a blocker against updating Jetpack Compose.
si...@google.com <si...@google.com> #4
Just to be sure, it is dangerous to replace Compose TextField with Android View EditText as a workaround for this issue.
Compose 1.7 has a bug that causes ANR when the focus is on EditText.
Another View-related bug in Compose 1.7 is that an Android View is focused by calling FocusManager.clearFocus().
Perhaps there is a lack of testing of Compose 1.7 in combination with Android View. There is also a possibility that there are other fatal bugs related to View.
In other words, the only options for apps targeting the Japanese market that require POBox support are to continue using Compose 1.6 or to use EditText in combination with various workarounds.
si...@google.com <si...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
Author: Halil Ozercan <
Link:
Fix POBox keyboard issue
Expand for full commit details
Fix POBox keyboard issue
Fix: 373743376
Fix: 329209241
Test: NullableInputConnectionWrapperTest
Change-Id: I94e0e598274fb88b255f977f9fbd50dfbbb1ecb1
Files:
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/input/NullableInputConnectionWrapperTest.kt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/text/input/NullableInputConnectionWrapper.android.kt
Hash: 57f58c4b80d5d8470b2aca325dfdcd55f235231e
Date: Thu Oct 24 01:25:20 2024
cs...@google.com <cs...@google.com> #6
Many thanks again for this report. Especially for giving us a huge clue in terms of what could be going wrong. The fix is now merged and I will ask for a cherry-pick into a stable release.
si...@google.com <si...@google.com>
ap...@google.com <ap...@google.com> #7
Do you have any concrete plan to cherry-pick the fix into current stable version (1.7.x)? We are currently waiting it.
ap...@google.com <ap...@google.com> #8
Yes, this fix is planned to be included in a future 1.7.x
release.
ap...@google.com <ap...@google.com> #9
Thanks for the fix. Sorry to follow up on this. is it possible for you to share specific release version/date for the stable version? We are waiting on this to decide on our direction.
si...@google.com <si...@google.com> #10
Attaching the behavior with different configurations for future.
si...@google.com <si...@google.com>
ap...@google.com <ap...@google.com> #11
Branch: androidx-main
commit 4b23d9be8cfe80dcd00d065e9375ba5b58a8d495
Author: Siyamed Sinir <siyamed@google.com>
Date: Fri Apr 15 19:39:52 2022
Introduce LineHeightTrim
LineHeightBehavior worked with two booleans conceptually related to
each other: trimFirstLineTop, trimLastLineBottom
This CL unifies those two boolean values in a single enum named
LineHeightTrim.
LineHeightTrim have values of 4 states defined by two booleans:
- FirstLineTop
- LastLineBottom
- Both
- None
RelNote: "trimFirstLineTop, trimLastLineBottom attributes of
LineHeightBehavior changed into a single enum: LineHeightTrim.
LineHeightTrim have values of 4 states defined by two booleans:
FirstLineTop, LastLineBottom, Both and None"
Test: ./gradlew compose:ui:ui-text:test
Test: ./gradlew compose:ui:ui-text:cAT
Bug: 181155707
Change-Id: Ifc6a5912eab7a0e41ae6cd4045ea9cbdf3c0a146
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/style/LineHeightBehavior.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphFillBoundingBoxesTest.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeLineHeight.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationLineHeightBehaviorTest.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/TextStyleTest.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/style/LineHeightBehaviorTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.android.kt
ap...@google.com <ap...@google.com> #12
Branch: androidx-main
commit 5095a557ff762472327d950541786ae9828ad036
Author: Siyamed Sinir <siyamed@google.com>
Date: Mon Apr 25 15:35:47 2022
LineHeightBehavior API Review updates
Based on API review, this CL
- Renames LineHeightBehavior into LineHeightStyle
- Renames LineVerticalAlignment into LineHeightStyle.Alignment
- Renames LineHeightTrim into LineHeightStyle.Trim
- Removes default constructor values from LineHeightStyle
RelNote: "
- LineHeightBehavior is renamed as LineHeightStyle
- LineVerticalAlignment is renamed as LineHeightStyle.Alignment
- Renames LineHeightTrim is renamed as LineHeightStyle.Trim
- Default constructor values from LineHeightStyle is removed
"
Test: ./gradlew compose:ui:ui-text:test
Test: ./gradlew compose:ui:ui-text:cAT
Test: ./gradlew text:text:test
Test: ./gradlew text:text:cAT
Bug: 230347691
Bug: 181155707
Change-Id: I582bf09152d60b30362b3cce9bd60d57fc488fe7
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/TextStyleLayoutAttributesTest.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeLineHeight.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationLineHeightStyleTest.kt
M compose/ui/ui-inspection/src/main/java/androidx/compose/ui/inspection/inspector/ParameterFactory.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/ParagraphStyle.kt
M text/text/src/main/java/androidx/compose/ui/text/android/TextLayout.kt
M text/text/src/androidTest/java/androidx/compose/ui/text/android/TextLayoutTest.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/TextStyleTest.kt
M text/text/src/androidTest/java/androidx/compose/ui/text/android/style/LineHeightStyleSpanTest.kt
D compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/style/LineHeightBehavior.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphFillBoundingBoxesTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraphHelper.android.kt
A compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/style/LineHeightStyle.kt
A compose/ui/ui-text/src/test/java/androidx/compose/ui/text/style/LineHeightStyleTest.kt
M text/text/src/main/java/androidx/compose/ui/text/android/style/LineHeightStyleSpan.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextStyle.kt
D compose/ui/ui-text/src/test/java/androidx/compose/ui/text/style/LineHeightBehaviorTest.kt
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.android.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/ParagraphStyleTest.kt
ap...@google.com <ap...@google.com> #13
Branch: androidx-main
commit 5ddf42b0308c9c64303dd378baae8b13aa1f5614
Author: Siyamed Sinir <siyamed@google.com>
Date: Mon Apr 18 11:09:47 2022
Use LineHeightStyle as default for includeFontPadding=true
LineHeightStyle(Alignment.Proportional, Trim.Both) is the current default for
includeFontPadding=false.
This CL makes it the default for includeFontPadding=true as well.
The previous behavior includeFontPadding=true should not change since
it was the same or similar as LineHeightStyle(proportional, trim
both).
The change required no update in regular tests. Treehugger will
validate screenshot tests.
Test: ./gradlew compose:ui:ui-text:test
Test: ./gradlew compose:ui:ui-text:cAT
Test: ./gradlew text:text:test
Test: ./gradlew text:text:cAT
Bug: 181155707
Change-Id: Ib22aaeef41d2b2b6888be7a295524a2baa43c615
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraphHelper.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.android.kt
M text/text/src/androidTest/java/androidx/compose/ui/text/android/TextLayoutIntrinsicWidthTest.kt
D text/text/src/main/java/androidx/compose/ui/text/android/style/LineHeightSpan.kt
M text/text/src/main/java/androidx/compose/ui/text/android/style/LineHeightStyleSpan.kt
ju...@google.com <ju...@google.com> #14
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui-text-android:1.5.0-beta01
Description
created from a suggestion on slack channel
will attach the conversation separately
Related to b/181049465