Status Update
Comments
kl...@google.com <kl...@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.
ap...@google.com <ap...@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.
ap...@google.com <ap...@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.
ap...@google.com <ap...@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
ap...@google.com <ap...@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.
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.
ap...@google.com <ap...@google.com> #10
Branch: androidx-main
commit 896cb13251c8f135b3a2a2d058d3024c382268d8
Author: Zach Klippenstein <klippenstein@google.com>
Date: Wed Apr 12 11:42:05 2023
Polish the documentation for BasicTextField2.
Bug:
Test: n/a
Relnote: n/a
Change-Id: Ida2413908b80bd45c8ca2bf885462a07ccf78f94
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/TextEditFilter.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/TextEditResult.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/TextFieldBuffer.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/TextFieldBufferWithSelection.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/TextFieldCharSequence.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/TextFieldLineLimits.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/TextFieldState.kt
ap...@google.com <ap...@google.com> #11
Branch: androidx-main
commit a33f98c60601b1b62c685c41df2b70b834a5e910
Author: Halil Ozercan <halilibo@google.com>
Date: Wed Apr 12 20:51:48 2023
BasicTextField2 further docs polish
Bug:
Test: N/A
Change-Id: Ia0ee67d5077b784631bff9ef63ce212926f792f5
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/BasicSecureTextField.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/BasicTextField2.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/TextEditFilter.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/TextEditResult.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/TextFieldBuffer.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/TextFieldBufferWithSelection.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/TextFieldLineLimits.kt
ap...@google.com <ap...@google.com> #12
Branch: androidx-main
commit a3c2042a21930d2e820f06fa5db63865b41e33d9
Author: Zach Klippenstein <klippenstein@google.com>
Date: Wed Apr 12 15:48:34 2023
Add a demo of building a custom PIN input with BasicTextField2.
Also added TextFieldState.clearText().
Screencast:
Bug:
Test: n/a
Relnote: n/a
Change-Id: I71876e87dd4aee62cd91980c3ec6bf43e17f508c
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt
A compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text2/BasicTextField2CustomPinFieldDemo.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/TextFieldState.kt
lo...@gmail.com <lo...@gmail.com> #13
Just mentioning that the issue mentioned just above that was marked as duplicate is about "Input events are dropped if animations are running".
I'm doing this because this issue doesn't seem to mention this problem at all for the time being.
ap...@google.com <ap...@google.com> #14
Branch: androidx-main
commit 0d92f9936b46c7f380d4114c1334f1eca5e2818f
Author: Zach Klippenstein <klippenstein@google.com>
Date: Fri Mar 10 14:27:30 2023
Rewrite PlatformTextInput* to be more session-oriented.
This completely changes how text input clients interact with the
PlatformTextInput system. Instead of reading a composition local to get
the registry, and then asking the registry for the adapter for their
plugin, they now must implement a Modifier.Node that implements the
PlatformTextInputModifierNode interface. Such nodes have access to a
suspend function that will show the keyboard and ask the system to start
a new input session. The function takes platform-specific input that
specifies how to wire up to the platform APIs. The lifetime of the
coroutine is tied to the lifetime of the input session: the function
will suspend the calling coroutine until the session is closed, and
cancelling the coroutine early will close the session. When the last
session is closed the keyboard will automatically be hidden.
See go/platform-text-input for more info.
PlatformTextInput APIs were originally introduced in aosp/2406439.
Fixes:
Fixes:
Bug:
Test: AndroidTextInputSessionRequestTest
Test: AndroidPlatformTextInputSessionTest
Test: NullableInputConnectionWrapperTest
Test: SessionMutexTest
Test: PlatformTextInputViewIntegrationTest
Test: DesktopTextInputSessionTest
Relnote: "Completely redesigned `PlatformTextInput*` API."
Change-Id: I6c93a1111561b5cb55c6a34e2fc3738be3c8941d
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/PlatformTextInputAdapterDemo.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text2/BasicTextField2Demos.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text2/BasicTextField2ImmIntegrationTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text2/BasicTextField2Test.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text2/TextFieldKeyboardActionsTest.kt
D compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text2/input/internal/AndroidTextInputAdapterTest.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text2/input/internal/AndroidTextInputSessionTest.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/BasicTextField2.kt
D compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/internal/AndroidTextInputAdapter.kt
D compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/internal/AndroidTextInputPlugin.kt
A compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/internal/AndroidTextInputSession.android.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text2/input/internal/TextFieldDecoratorModifier.kt
D compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text2/input/internal/TextInputCommandExecutorTest.kt
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/api/restricted_current.txt
D compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/input/PlatformTextInputAdapter.android.kt
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/input/PlatformTextInputMethodRequest.android.kt
D compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/input/PlatformTextInputAdapter.kt
A compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/input/PlatformTextInputMethodRequest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/input/TextInputService.kt
D compose/ui/ui-text/src/desktopMain/kotlin/androidx/compose/ui/text/input/PlatformTextInputAdapter.desktop.kt
A compose/ui/ui-text/src/desktopMain/kotlin/androidx/compose/ui/text/input/PlatformTextInputMethodRequest.desktop.kt
M compose/ui/ui/api/current.ignore
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/restricted_current.ignore
M compose/ui/ui/api/restricted_current.txt
A compose/ui/ui/samples/src/main/java/androidx/compose/ui/samples/PlatformTextInputModifierNodeSample.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidComposeViewAccessibilityDelegateCompatTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/HitPathTrackerTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/PointerInputEventProcessorTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/layout/Helpers.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/platform/LocalSoftwareKeyboardControllerTest.kt
A compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/text/input/AndroidPlatformTextInputSessionTest.kt
A compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/text/input/NullableInputConnectionWrapperTest.kt
D compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/text/input/PlatformTextInputAdapterRegistryTest.kt
D compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/text/input/PlatformTextInputEditTextIntegrationTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/text/input/PlatformTextInputViewIntegrationTest.kt
A compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/text/input/TestInputMethodRequest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
A compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidPlatformTextInputSession.kt
A compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/PlatformTextInputSession.android.kt
D compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/text/input/AndroidTextInputServicePlugin.kt
A compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/text/input/NullableInputConnectionWrapper.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/text/input/TextInputServiceAndroid.android.kt
A compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/AtomicReference.kt
A compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/SessionMutex.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/Owner.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/CompositionLocals.kt
A compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/PlatformTextInputModifierNode.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/awt/ComposeLayer.desktop.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopPlatformInput.desktop.kt
A compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopTextInputSession.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/PlatformComponent.desktop.kt
A compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/PlatformTextInputSession.desktop.kt
A compose/ui/ui/src/desktopTest/kotlin/androidx/compose/ui/platform/DesktopTextInputSessionTest.kt
A compose/ui/ui/src/jvmMain/kotlin/androidx/compose/ui/AtomicReference.jvm.kt
M compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/platform/PlatformInput.skiko.kt
M compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/platform/SkiaBasedOwner.skiko.kt
A compose/ui/ui/src/test/kotlin/androidx/compose/ui/SessionMutexTest.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/ModifierLocalConsumerEntityTest.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/text/input/TextInputServiceAndroidCommandDebouncingTest.kt
M development/build_log_simplifier/messages.ignore
ap...@google.com <ap...@google.com> #15
Branch: androidx-main
commit c7d007e2d42935c757bdb47677781f06cf5629ef
Author: Halil Ozercan <halilibo@google.com>
Date: Sat Apr 01 07:23:46 2023
KeyboardActions Demos for BTF2
Bug:
Test: just a demo change
Change-Id: I9878ddd81196040f0d8a5bcd53ccc236e081588f
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt
A compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text2/KeyboardActionsDemos.kt
Description
Tracking bug for CLs related to the TextField API rewrite project.
Ideally, we would have tagged this bug on all related CLs, but we didn't think of doing that until now so I'll just list the ones up to the time of filing here. Future CLs should tag this bug with:
Bug: b/277380808