Conversation
Keep composition and explicit editing while suppressing automatic assistance, expansion, learning and stale suggestion delivery. Share optional toolbar, pinned and JSON controls without changing stored preferences. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an optional Literal typing action for URLs, code, and other text that should stay as typed. Enable the action in Settings → Toolbar → Toolbar keys or Pinned toolbar keys; it is not forced into existing enabled layouts. Tap once to enable it for the current field, and again to restore normal typing. Custom layouts can use
{"label":"literal"}or keycode-10078(TOGGLE_LITERAL_MODE).The state belongs to the active LatinIME/editor session, not saved preferences. New fields, input finish, and service destruction reset it; hiding the keyboard and identifiable same-editor restarts retain it. Ambiguous zero-ID restarts reset conservatively.
Behavior
This is an explicit optional mode, not automatic URL/code detection or a general fix for unknown capitalization/contraction behavior. No changes to RichInputConnection, contraction ranking, GIF/media support, platform dependencies, or minSDK.
Validation
On JDK 21 with the existing Android SDK, the focused
:app:testStandardDebugUnitTestrun passed: 107 passed, 1 existing ignored Hangul test. Scope: all 100 InputLogic tests (99 passed), both new Literal JSON/numeric/popup parser cases, the existing toolbar-popup parser case, and 5 settings tests. The Literal cases exercise actual owner lifecycle/reset/destroy, settings reload and per-app forced correction, composing text/cursor preservation, Hangul, explicit case/paste/emoji/TLD text, toolbar+pinned click dispatch/activation, learning suppression, and queued/running stale-result rejection.A broader run also executed all ParserTest cases: 8 existing layout-asset lookup failures (
NoSuchElementExceptioninLayoutUtils.getContent). All eight were reproduced with the same method names and messages on an untouched detached checkout of baseb718d832c41ba01e1cce613f14e6209c279e9d17(46 parser tests at base; 48 with this feature). No tests, baselines, or production asset behavior were relaxed to hide them. No APK build, native-glide library execution, or phone/device testing is claimed.Port scope
One independent commit on upstream
b718d832c41ba01e1cce613f14e6209c279e9d17, adapted from source feature998dbcb56591dc1b0cc2f8ebb828c816dade186a. All added/removed production lines match that immutable feature exactly. Port-only adjustments: omit the fork-only row-swipe test; add its missing expansion-test setup helper/import using existing upstream APIs; add two focused Literal parser tests and usage/keycode documentation. No other fork commits or sibling PRs are required.