-
Notifications
You must be signed in to change notification settings - Fork 6k
[Android Text Input] Remove Samsung restart input workaround for newer Samsung keyboards #24288
[Android Text Input] Remove Samsung restart input workaround for newer Samsung keyboards #24288
Conversation
|
@justinmc thanks for checking! On my SM-T510 it works fine: example.mp4 |
|
Hmm, do you have any other Samsung devices lying around? Here is a list of a bunch of devices we were able to reproduce the original bug on: flutter/flutter#31512 (comment) |
|
unfortunately that's the only Samsung device I have. It's running Samsung Keyboard version 3.3.31.83, maybe an update changed how composing regions are handled? |
|
v2.0.01-44 for me. |
|
I switched to 1.12.13+hotfix8 and still couldn't repro. Looks like when I connect the tablet to download the Korean language support the keyboard updated itself and fixed the composing region bug. |
|
Remote samsung devices for debugging and testing : https://developer.samsung.com/remotetestlab/rtlDeviceList.action |
justinmc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Hopefully old keyboards like mine are rare and getting rarer, and the vast majority of users get a fully-functioning keyboard.
| } | ||
|
|
||
| // 3.3.31.83 is a known version that's free of the aforementioned bug. | ||
| // TODO(LongCatIsLooong): Find the minimum version that has the fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you plan to do this in this PR or later? Definitely my keyboard v2.0.01-44 has the bug, so it's between these two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I am still not able to reset the IME version. I've tried adb uninstall --user 0. It did uninstall the keyboard but it still wouldn't let me install an earlier version (says downgrade version).
@hamdikahloun thanks for the pointer! It's pretty handy.
| public void setTextInputEditingState_alwaysRestartsOnAffectedDevices() { | ||
| // Initialize a TextInputPlugin with a Samsung keypad. | ||
| ShadowBuild.setManufacturer("samsung"); | ||
| // final ShadowPackageManager packageManager = RuntimeEnvironment.getPackageManager(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented line that maybe you meant to remove.
| final PackageInfo info = new PackageInfo(); | ||
| info.packageName = "com.sec.android.inputmethod"; | ||
| info.versionCode = 200000000; | ||
| packageManager.addPackage(info); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's nice that you were able to fake this 👍
| testView, new TextInputChannel.TextEditState("", 0, 0, -1, -1)); | ||
|
|
||
| // Verify that we've restarted the input. | ||
| // Verify that we've NOT restarted the input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this comment should have stayed as it was?
1c026f4 to
4385f6b
Compare
|
This looks good to go. Can we land this please? |
…for newer Samsung keyboards (flutter/engine#24288)
…for newer Samsung keyboards (flutter/engine#24288)
…for newer Samsung keyboards (flutter/engine#24288)
…for newer Samsung keyboards (flutter/engine#24288)
* 1dc8695 Replace Flutter surface only after all platform views are destroyed (flutter/engine#24363) * 0d4accf Roll Skia from ec24154521f3 to 28698696f1b3 (4 revisions) (flutter/engine#24374) * 454a34f [canvaskit] support adding leaf layers w/o container layers (flutter/engine#24357) * 2edeb47 Roll Dart SDK from 1e0fec6e48cf to add1eac3622c (1 revision) (flutter/engine#24375) * 7376d18 Roll Skia from 28698696f1b3 to 3354f8c4f8cb (2 revisions) (flutter/engine#24378) * 157797e Fix vulkan surface leaks. (flutter/engine#24372) * 72ed416 Roll Skia from 3354f8c4f8cb to 2494942f0d8d (4 revisions) (flutter/engine#24380) * 6747b83 Roll Skia from 2494942f0d8d to 6e73404a782c (3 revisions) (flutter/engine#24383) * 48cf2b9 [canvaskit] fix Path.from (flutter/engine#24382) * 42019c8 Roll Fuchsia Linux SDK from YMY-cajLa... to AjjJVX_95... (flutter/engine#24381) * c3f0894 Roll Skia from 6e73404a782c to ba4c3086ba80 (3 revisions) (flutter/engine#24388) * 4f33430 Roll Dart SDK from add1eac3622c to 6eafd1856eb5 (1 revision) (flutter/engine#24390) * 7661388 Roll Fuchsia Mac SDK from WIqUEANCH... to yyQmi032P... (flutter/engine#24391) * 6b33d4e Roll Skia from ba4c3086ba80 to 4f065e286df6 (2 revisions) (flutter/engine#24393) * 623d9ce Windows: linker compatibility with AppContainer for winuwp target (flutter/engine#24318) * 89c8b6e Roll Dart SDK from 6eafd1856eb5 to e9693f1b2401 (1 revision) (flutter/engine#24394) * 447733c Roll Fuchsia Linux SDK from AjjJVX_95... to uJ8jPHroy... (flutter/engine#24395) * 7b1efcf Roll Fuchsia Mac SDK from yyQmi032P... to NQL9o1B8n... (flutter/engine#24396) * 08dcad7 Roll Dart SDK from e9693f1b2401 to 4c8147b7b41e (1 revision) (flutter/engine#24397) * 102cb3c Roll Skia from 4f065e286df6 to 554aabbaa8e8 (1 revision) (flutter/engine#24398) * 780ba15 Roll Dart SDK from 4c8147b7b41e to 56fa015ca3ec (1 revision) (flutter/engine#24402) * 9286135 Roll Skia from 554aabbaa8e8 to 7a2ff98ce68b (1 revision) (flutter/engine#24403) * 95cc4ce Roll buildroot to e7857d2 (flutter/engine#24399) * 9bc4bf1 Revert "Roll buildroot to e7857d2 (#24399)" * b8126b6 Roll Skia from 7a2ff98ce68b to c3e152b9f795 (2 revisions) (flutter/engine#24404) * cfdbd16 Roll Dart SDK from 56fa015ca3ec to c9b47adb178e (1 revision) (flutter/engine#24408) * 6ece8d1 Roll Fuchsia Mac SDK from NQL9o1B8n... to OHm_snJzB... (flutter/engine#24410) * e3d05a1 Roll Fuchsia Linux SDK from uJ8jPHroy... to JmB58d-3R... (flutter/engine#24411) * 491eeeb Roll Skia from c3e152b9f795 to b44fbb3392f8 (3 revisions) (flutter/engine#24414) * 2349ee9 Roll Skia from b44fbb3392f8 to 56a8fbd21ee2 (3 revisions) (flutter/engine#24415) * cce0869 Roll Dart SDK from c9b47adb178e to 648d5f951915 (1 revision) (flutter/engine#24416) * 138ec27 Roll Skia from 56a8fbd21ee2 to 7cb0f6e9702a (1 revision) (flutter/engine#24418) * dbded38 Roll Fuchsia Mac SDK from OHm_snJzB... to H0v5Ox4Vs... (flutter/engine#24419) * 05347d4 Roll Fuchsia Linux SDK from JmB58d-3R... to KKD5xVYLO... (flutter/engine#24420) * 5659b56 Roll Dart SDK from 648d5f951915 to 39dc63439396 (1 revision) (flutter/engine#24421) * 0561a98 Add missing header guard, namespace (flutter/engine#24423) * 3e91ee2 Adjust header guards for updated paths (flutter/engine#24424) * d71c030 Roll Skia from 7cb0f6e9702a to 330578e81158 (1 revision) (flutter/engine#24427) * dcb0c0f Roll Fuchsia Mac SDK from H0v5Ox4Vs... to eG4TqZBn9... (flutter/engine#24425) * d7705f9 Roll Fuchsia Linux SDK from KKD5xVYLO... to C2FaCuCLB... (flutter/engine#24430) * e1f03cd Roll Dart SDK from 39dc63439396 to 4db0f5599c85 (1 revision) (flutter/engine#24431) * 1687040 [Android Text Input] Remove Samsung restart input workaround for newer Samsung keyboards (flutter/engine#24288) * bee0d2a Roll Skia from 330578e81158 to 4a3ec173b31b (5 revisions) (flutter/engine#24434) * 8490ec2 [ci] Remove null safety experiment flag (flutter/engine#24392) * 6993cb2 Revert Dart SDK to 1e0fec6e48cf89f46973af38a5c2de4bc760a135 (flutter/engine#24436)
| .getContext() | ||
| .getPackageManager() | ||
| .getPackageInfo("com.sec.android.inputmethod", 0) | ||
| .getLongVersionCode(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API was added in API level 28 (Pie) but the check above only requires Lollipop to get to this point. This is crashing on old devices, and blocking everything in the flutter/plugins tree. Please fix or revert this ASAP.
|
There is an issue open about a similar problem on a different keyboard: a Japanese keyboard called Simeji flutter/flutter#72980. Edit: I missed the comment above about reverting this, my comment was unrelated. |
newer Samsung keyboards" flutter#24288
…r Samsung keyboards (flutter#24288)
…for newer Samsung keyboards (flutter#24288)" (flutter#24486)


Fixes flutter/flutter#73433, where holding the backspace on a Samsung keyboard only deletes 1 character at a time. To delete more characters you'd have to press the backspace key again.
The Samsung "always-restart-input" workaround doesn't seem to be needed anymore on newer Samsung keyboards (tested on a Galaxy Tab A SMT510, Samsung Keyboard 3.3.31.83, the duplication bug didn't happen with this patch applied).
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.