Feature Request P2
Status Update
Comments
em...@google.com <em...@google.com>
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
Author: drchen <
Link:
Introduce APIs to support pane preferred heights
Expand for full commit details
Introduce APIs to support pane preferred heights
Note that we need to ignore API checking of adding the modifier
to PaneScaffoldScope, as b/220960090 indicates, the current Metalava
is not able to tell if a sealed interface has been implemented by
an open abstract class. (In our case, all inheritances are sealed or
internal so we are good to ignore the API warning.)
Relnote: "Introduce PaneScaffoldScope.preferredHeight modifier for
devs to provide pane preferred heights that will be applied with
new adapt strategies we are going to introduce."
Test: n/a
Bug: 373490181
Bug: 373489847
Change-Id: I957dd252b2bd154e3b0be048c092147fb6d1b2b8
Files:
- M
compose/material3/adaptive/adaptive-layout/api/current.ignore
- M
compose/material3/adaptive/adaptive-layout/api/current.txt
- M
compose/material3/adaptive/adaptive-layout/api/restricted_current.ignore
- M
compose/material3/adaptive/adaptive-layout/api/restricted_current.txt
- M
compose/material3/adaptive/adaptive-layout/src/commonMain/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffold.kt
- M
compose/material3/adaptive/adaptive-layout/src/commonMain/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldDirective.kt
Hash: 0d7a940f0ce81b2a9a699146f48de72a177357b7
Date: Wed Feb 26 11:34:20 2025
Description
Sealed classes and interfaces cannot be extended directly outside their module. Intuitively this implies they are effectively final, and therefore otherwise incompatible changes would be allowed, such as adding a new abstract method.
Unfortunately, it's possible to extend a sealed class with an abstract class as below and inadvertently expose a new abstract method (
funFromSealed()
in the example below). We should figure out how we want to model this behavior in Metalava, figure out if there's any other considerations to sealed classes, and then maybe updateClassItem.isEffectivelyFinal()
to match.