Repository navigation
Fix overlay crash on edge-to-edge Compose activities; add endless feed sample - #18
Merged
Merged
Conversation
…d screen to the sample
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.
What changed
DevDeck.installadded its overlayComposeViewinonActivityStarted, before the window was attached. On recent Android an edge-to-edge window can measure it before attaching it, which crashes with "Cannot locate windowRecomposer; … is not attached to a window" (Android Studio's new-project template callsenableEdgeToEdge(), so many apps would hit this; 1.0.0 is affected). The overlay is now added once the window is attached, posted so it isn't added mid attach pass, and never to a finishing or destroyed activity.includeActivity, which is how the crash above was found.How it was tested
./gradlew ktlintFormat ktlintCheck lintDebug lintRelease testDebugUnitTest assembleDebug assembleRelease publishToMavenLocal apiCheck :sample:assembleQapasses.enableEdgeToEdge()before/aftersuper.onCreate()and opens fine with the fix; the main (hosted) and View-based screens still get the drawer; no crashes in the crash buffer.Checklist
CHANGELOG.md(or theskip-changeloglabel is set)./gradlew ktlintFormat ktlintCheck lintDebug testDebugUnitTestpasses