Skip to content

Restore custom profile editing after activity recreation - #6453

Open
eliotcougar wants to merge 1 commit into
2dust:masterfrom
eliotcougar:fix/custom-editor-recreation
Open

eliotcougar wants to merge 1 commit into
2dust:masterfrom
eliotcougar:fix/custom-editor-recreation

Conversation

@eliotcougar

@eliotcougar eliotcougar commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Changing the system theme, rotation, or display size while editing Custom config or Custom outbound recreates ServerCustomConfigActivity. The JSON draft and selection survive, but the keyboard can remain visible without a focused editor, so typing does nothing until the user taps the JSON again. An open delete confirmation is also dismissed by recreation.

Fix

Save the last focused text field and restore it after the recreated form is laid out. Hide the old window's keyboard state during recreation; the restored field starts a new input session. Save the delete-confirmation state as well, and do not focus a text field behind the restored dialog.

This changes only the custom editor. It does not depend on #6448, which addresses the standard outbound forms through BaseServerActivity, or on any TV UI branch. The existing JSON parsing, save, and delete paths are unchanged.

Validation

On a Pixel 6a emulator (Android 13), reproduced the problem on upstream master. On this branch, verified that changing the theme in Custom config and display density in Custom outbound preserves the unsaved JSON and lets typing continue at the same cursor without another tap. Verified that an open delete confirmation survives another recreation, and that Cancel returns to the editor. Remarks text and focus also survived; retaining the exact Remarks selection is outside this fix.

Play Store debug Kotlin compilation, APK assembly, and the 148-test JVM suite passed. Not run: spoken TalkBack and physical-device checks.

Remember the last focused text field so the recreated window can reconnect its keyboard to the editor. Preserve pending delete confirmation without bringing up the keyboard behind it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant