Status Update
Comments
ae...@google.com <ae...@google.com>
al...@mercari.com <al...@mercari.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.
be...@google.com <be...@google.com>
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.
Description
Jetpack Compose component used: androidx.compose.ui.res.painterResource
Android Studio Build:
Android Studio Bumblebee | 2021.1.1 Patch 3
Build #AI-211.7628.21.2111.8309675, built on March 16, 2022
Runtime version: 11.0.11+0-b60-7590822 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.6.5
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 16
Registry: external.system.auto.import.disabled=true, ide.instant.shutdown=false
Non-Bundled Plugins: com.dubreuia (2.2.0), com.intellij.javafx (1.0.4), org.jetbrains.kotlin (211-1.6.20-release-275-AS7442.40), com.intellij.lang.jsgraphql (3.1.2), org.intellij.plugins.markdown (211.7142.37),
Kotlin version: 1.6.10
Steps to Reproduce or Code Sample to Reproduce:
1. Display an Image composable using a painterResource, where the drawable resource has both a light and a night version.
2. Add the following to your activity in your AndroidManifest.xml: android:configChanges="colorMode|density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
3. Rebuild and run the application and view your image from step 1.
4. Toggle the Night/Light Mode setting on the device
5. See that the displayed image is not updated to utilize the night mode version of the resource.
KotlinLang Slack discussion for more context/Info:
Stack trace (if applicable):