Repository navigation
Restore custom profile editing after activity recreation - #6453
Open
eliotcougar wants to merge 1 commit into
Open
eliotcougar wants to merge 1 commit into
eliotcougar wants to merge 1 commit into
Conversation
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.
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.
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.