Skip to content

Fix crash in MeasureAndLayoutDelegate.forceMeasureTheSubtree() - #127

Merged
Igor Demin (igordmn) merged 1 commit into
release/1.0from
feature/fix_density_change_crash
Nov 25, 2021
Merged

Igor Demin (igordmn) merged 1 commit into
release/1.0from
feature/fix_density_change_crash

Conversation

@igordmn

Copy link
Copy Markdown

Fixes JetBrains/compose-multiplatform#1464
Cherry-picked from https://android-review.googlesource.com/c/platform/frameworks/support/+/1896692

It was happening because we were asserting that the node will not be in NeedsRemeasure state anymore as a result. However it is not always true as we can skip remeasuring for nodes which are not placed and can't affect the parent size. The updated logic will correctly skip such unplaced subtrees.

Fixes: 206732855
Test: new test in NodesRemeasuredOnceTest
Change-Id: I37abed763d269b51b858a86c820fd64038eca505

It was happening because we were asserting that the node will not be in NeedsRemeasure state anymore as a result. However it is not always true as we can skip remeasuring for nodes which are not placed and can't affect the parent size. The updated logic will correctly skip such unplaced subtrees.

Fixes: 206732855
Test: new test in NodesRemeasuredOnceTest
Change-Id: I37abed763d269b51b858a86c820fd64038eca505
@igordmn
Igor Demin (igordmn) merged commit ca6db90 into release/1.0 Nov 25, 2021
Zahari Zahariev (harryzz) pushed a commit to harryzz/compose-multiplatform-core that referenced this pull request Jul 28, 2026
If Bundle contents can be extracted as a Reference, allow parsing the Bundle contents as a Reference.

When navigating via deeplink URI, the user is required to string-ify navigation arguments in order to append them to the URI as query parameters. This PR supports retrieving a Reference type from a Bundle

## Proposed Changes
  - replace `NavType#ReferenceType::parseValue`'s method functionality with `Integer.parseInt`

## Testing
Updated `NavTypeTest` to validate that reference types can be inserted and retrieved from a Bundle.
Test: /gradlew test connectedCheck

## Issues Fixed

Fixes: b/179166693

This is an imported pull request from androidx#127.

Resolves JetBrains#127
Github-Pr-Head-Sha: 78179a9
GitOrigin-RevId: edf5410
Change-Id: I80f4d03a07b04756cd7ea1f3cf43688a115116e4
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.

3 participants