Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e3832a8
Update rear display mode API's
kford55 Jul 6, 2023
3f4bbd3
Update androidx.core:core-pip dependencies
hwwang-google Jan 13, 2026
a77fd8d
Align RuntimeUtilsTest with XrExtensions HitInfo Null-Safety Contract
Dec 31, 2025
4b3dab4
Add a flag to scaffold directive to opt out auto focusing
drchen Jan 15, 2026
0da3905
BENCHMARK = "1.5.0-alpha02"
Jan 15, 2026
1ccb387
Move the changelist to the gapbuffer package
chuckjaz Aug 27, 2025
231fec0
Merge "BENCHMARK = "1.5.0-alpha02"" into androidx-main
Jan 15, 2026
8975ffc
Merge "Add a flag to scaffold directive to opt out auto focusing" int…
drchen Jan 15, 2026
5d09d27
Adds Projected-testing XR library
idzkowski-google Jan 15, 2026
4bb9ff5
Merge "Update androidx.core:core-pip dependencies" into androidx-main
hwwang-google Jan 15, 2026
5a6410a
Keep the version of tracing-perfetto used by compose-runtime-tracing …
tikurahul Jan 14, 2026
eff64a2
Stop dropping trace packets.
tikurahul Jan 15, 2026
1e94acb
Add alecgarcia@ to security-state OWNERS
Jan 15, 2026
06e0f9e
Merge "Adds Projected-testing XR library" into androidx-main
idzkowski-google Jan 15, 2026
cf9ea95
Merge "Stop dropping trace packets." into androidx-main
tikurahul Jan 15, 2026
58a4d15
Merge "Keep the version of tracing-perfetto used by compose-runtime-t…
tikurahul Jan 15, 2026
3a7e930
Merge "Move the changelist to the gapbuffer package" into androidx-main
Jan 15, 2026
d04f5ce
Merge "Add alecgarcia@ to security-state OWNERS" into androidx-main
Jan 15, 2026
cbe576a
Fix(XrExtensions): Use isEqualTo for object comparison after package …
Jan 5, 2026
bf13e91
Merge "Fix(XrExtensions): Use isEqualTo for object comparison after p…
Jan 16, 2026
6006321
Fix: mBuilder was null due to not being initialized in AudioTrackExte…
Jan 5, 2026
6e8cd73
Merge "Fix: mBuilder was null due to not being initialized in AudioTr…
Jan 16, 2026
11e5e2f
Merge "Align RuntimeUtilsTest with XrExtensions HitInfo Null-Safety C…
Jan 16, 2026
68ef61e
Merge "Update rear display mode API's" into androidx-main
Jan 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ package androidx.benchmark.perfetto

import android.os.Build
import android.util.JsonReader
import android.util.Log
import androidx.annotation.CheckResult
import androidx.annotation.RequiresApi
import androidx.annotation.RestrictTo
import androidx.benchmark.BenchmarkState
import androidx.benchmark.Outputs
import androidx.benchmark.Shell
import androidx.benchmark.ShellFile
import androidx.benchmark.UserFile
import androidx.benchmark.UserInfo
import androidx.benchmark.inMemoryTrace
import androidx.benchmark.perfetto.PerfettoCapture.PerfettoSdkConfig.InitialProcessState
import androidx.benchmark.perfetto.PerfettoHelper.Companion.isAbiSupported
import androidx.test.platform.app.InstrumentationRegistry
import androidx.tracing.perfetto.handshake.PerfettoSdkHandshake
Expand Down Expand Up @@ -124,6 +125,7 @@ public class PerfettoCapture(
PerfettoSdkHandshake(
targetPackage = targetPackage,
parseJsonMap = { jsonString: String ->
Log.d(BenchmarkState.TAG, "Handshake Result: $jsonString")
sequence {
JsonReader(StringReader(jsonString)).use { reader ->
reader.beginObject()
Expand All @@ -136,6 +138,7 @@ public class PerfettoCapture(
.toMap()
},
executeShellCommand = { cmd ->
Log.d(BenchmarkState.TAG, "Executing Command: $cmd")
val (stdout, stderr) = Shell.executeScriptCaptureStdoutStderr(cmd)
listOf(stdout, stderr)
.filter { it.isNotBlank() }
Expand Down
4 changes: 4 additions & 0 deletions compose/material3/adaptive/adaptive-layout/api/current.txt
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,9 @@ package androidx.compose.material3.adaptive.layout {

@androidx.compose.runtime.Immutable public final class PaneScaffoldDirective {
ctor @KotlinOnly public PaneScaffoldDirective(int maxHorizontalPartitions, androidx.compose.ui.unit.Dp horizontalPartitionSpacerSize, int maxVerticalPartitions, androidx.compose.ui.unit.Dp verticalPartitionSpacerSize, androidx.compose.ui.unit.Dp defaultPanePreferredWidth, androidx.compose.ui.unit.Dp defaultPanePreferredHeight, java.util.List<androidx.compose.ui.geometry.Rect> excludedBounds);
ctor @KotlinOnly public PaneScaffoldDirective(int maxHorizontalPartitions, androidx.compose.ui.unit.Dp horizontalPartitionSpacerSize, int maxVerticalPartitions, androidx.compose.ui.unit.Dp verticalPartitionSpacerSize, androidx.compose.ui.unit.Dp defaultPanePreferredWidth, androidx.compose.ui.unit.Dp defaultPanePreferredHeight, java.util.List<androidx.compose.ui.geometry.Rect> excludedBounds, boolean shouldAutoFocusCurrentDestination);
ctor @KotlinOnly public PaneScaffoldDirective(int maxHorizontalPartitions, androidx.compose.ui.unit.Dp horizontalPartitionSpacerSize, int maxVerticalPartitions, androidx.compose.ui.unit.Dp verticalPartitionSpacerSize, androidx.compose.ui.unit.Dp defaultPanePreferredWidth, java.util.List<androidx.compose.ui.geometry.Rect> excludedBounds);
ctor @BytecodeOnly public PaneScaffoldDirective(int, float, int, float, float, float, java.util.List!, boolean, kotlin.jvm.internal.DefaultConstructorMarker!);
ctor @BytecodeOnly public PaneScaffoldDirective(int, float, int, float, float, float, java.util.List!, kotlin.jvm.internal.DefaultConstructorMarker!);
ctor @BytecodeOnly public PaneScaffoldDirective(int, float, int, float, float, java.util.List!, kotlin.jvm.internal.DefaultConstructorMarker!);
method @KotlinOnly public androidx.compose.material3.adaptive.layout.PaneScaffoldDirective copy(optional int maxHorizontalPartitions, optional androidx.compose.ui.unit.Dp horizontalPartitionSpacerSize, optional int maxVerticalPartitions, optional androidx.compose.ui.unit.Dp verticalPartitionSpacerSize, optional androidx.compose.ui.unit.Dp defaultPanePreferredWidth, optional java.util.List<androidx.compose.ui.geometry.Rect> excludedBounds, optional androidx.compose.ui.unit.Dp defaultPanePreferredHeight);
Expand All @@ -396,12 +398,14 @@ package androidx.compose.material3.adaptive.layout {
method @InaccessibleFromKotlin public int getMaxHorizontalPartitions();
method @InaccessibleFromKotlin public int getMaxVerticalPartitions();
method @BytecodeOnly public float getVerticalPartitionSpacerSize-D9Ej5fM();
method @InaccessibleFromKotlin public boolean shouldAutoFocusCurrentDestination();
property public androidx.compose.ui.unit.Dp defaultPanePreferredHeight;
property public androidx.compose.ui.unit.Dp defaultPanePreferredWidth;
property public java.util.List<androidx.compose.ui.geometry.Rect> excludedBounds;
property public androidx.compose.ui.unit.Dp horizontalPartitionSpacerSize;
property public int maxHorizontalPartitions;
property public int maxVerticalPartitions;
property public boolean shouldAutoFocusCurrentDestination;
property public androidx.compose.ui.unit.Dp verticalPartitionSpacerSize;
field public static final androidx.compose.material3.adaptive.layout.PaneScaffoldDirective.Companion Companion;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,9 @@ package androidx.compose.material3.adaptive.layout {

@androidx.compose.runtime.Immutable public final class PaneScaffoldDirective {
ctor @KotlinOnly public PaneScaffoldDirective(int maxHorizontalPartitions, androidx.compose.ui.unit.Dp horizontalPartitionSpacerSize, int maxVerticalPartitions, androidx.compose.ui.unit.Dp verticalPartitionSpacerSize, androidx.compose.ui.unit.Dp defaultPanePreferredWidth, androidx.compose.ui.unit.Dp defaultPanePreferredHeight, java.util.List<androidx.compose.ui.geometry.Rect> excludedBounds);
ctor @KotlinOnly public PaneScaffoldDirective(int maxHorizontalPartitions, androidx.compose.ui.unit.Dp horizontalPartitionSpacerSize, int maxVerticalPartitions, androidx.compose.ui.unit.Dp verticalPartitionSpacerSize, androidx.compose.ui.unit.Dp defaultPanePreferredWidth, androidx.compose.ui.unit.Dp defaultPanePreferredHeight, java.util.List<androidx.compose.ui.geometry.Rect> excludedBounds, boolean shouldAutoFocusCurrentDestination);
ctor @KotlinOnly public PaneScaffoldDirective(int maxHorizontalPartitions, androidx.compose.ui.unit.Dp horizontalPartitionSpacerSize, int maxVerticalPartitions, androidx.compose.ui.unit.Dp verticalPartitionSpacerSize, androidx.compose.ui.unit.Dp defaultPanePreferredWidth, java.util.List<androidx.compose.ui.geometry.Rect> excludedBounds);
ctor @BytecodeOnly public PaneScaffoldDirective(int, float, int, float, float, float, java.util.List!, boolean, kotlin.jvm.internal.DefaultConstructorMarker!);
ctor @BytecodeOnly public PaneScaffoldDirective(int, float, int, float, float, float, java.util.List!, kotlin.jvm.internal.DefaultConstructorMarker!);
ctor @BytecodeOnly public PaneScaffoldDirective(int, float, int, float, float, java.util.List!, kotlin.jvm.internal.DefaultConstructorMarker!);
method @KotlinOnly public androidx.compose.material3.adaptive.layout.PaneScaffoldDirective copy(optional int maxHorizontalPartitions, optional androidx.compose.ui.unit.Dp horizontalPartitionSpacerSize, optional int maxVerticalPartitions, optional androidx.compose.ui.unit.Dp verticalPartitionSpacerSize, optional androidx.compose.ui.unit.Dp defaultPanePreferredWidth, optional java.util.List<androidx.compose.ui.geometry.Rect> excludedBounds, optional androidx.compose.ui.unit.Dp defaultPanePreferredHeight);
Expand All @@ -396,12 +398,14 @@ package androidx.compose.material3.adaptive.layout {
method @InaccessibleFromKotlin public int getMaxHorizontalPartitions();
method @InaccessibleFromKotlin public int getMaxVerticalPartitions();
method @BytecodeOnly public float getVerticalPartitionSpacerSize-D9Ej5fM();
method @InaccessibleFromKotlin public boolean shouldAutoFocusCurrentDestination();
property public androidx.compose.ui.unit.Dp defaultPanePreferredHeight;
property public androidx.compose.ui.unit.Dp defaultPanePreferredWidth;
property public java.util.List<androidx.compose.ui.geometry.Rect> excludedBounds;
property public androidx.compose.ui.unit.Dp horizontalPartitionSpacerSize;
property public int maxHorizontalPartitions;
property public int maxVerticalPartitions;
property public boolean shouldAutoFocusCurrentDestination;
property public androidx.compose.ui.unit.Dp verticalPartitionSpacerSize;
field public static final androidx.compose.material3.adaptive.layout.PaneScaffoldDirective.Companion Companion;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ final class androidx.compose.material3.adaptive.layout/PaneMotionData { // andro

final class androidx.compose.material3.adaptive.layout/PaneScaffoldDirective { // androidx.compose.material3.adaptive.layout/PaneScaffoldDirective|null[0]
constructor <init>(kotlin/Int, androidx.compose.ui.unit/Dp, kotlin/Int, androidx.compose.ui.unit/Dp, androidx.compose.ui.unit/Dp, androidx.compose.ui.unit/Dp, kotlin.collections/List<androidx.compose.ui.geometry/Rect>) // androidx.compose.material3.adaptive.layout/PaneScaffoldDirective.<init>|<init>(kotlin.Int;androidx.compose.ui.unit.Dp;kotlin.Int;androidx.compose.ui.unit.Dp;androidx.compose.ui.unit.Dp;androidx.compose.ui.unit.Dp;kotlin.collections.List<androidx.compose.ui.geometry.Rect>){}[0]
constructor <init>(kotlin/Int, androidx.compose.ui.unit/Dp, kotlin/Int, androidx.compose.ui.unit/Dp, androidx.compose.ui.unit/Dp, androidx.compose.ui.unit/Dp, kotlin.collections/List<androidx.compose.ui.geometry/Rect>, kotlin/Boolean) // androidx.compose.material3.adaptive.layout/PaneScaffoldDirective.<init>|<init>(kotlin.Int;androidx.compose.ui.unit.Dp;kotlin.Int;androidx.compose.ui.unit.Dp;androidx.compose.ui.unit.Dp;androidx.compose.ui.unit.Dp;kotlin.collections.List<androidx.compose.ui.geometry.Rect>;kotlin.Boolean){}[0]
constructor <init>(kotlin/Int, androidx.compose.ui.unit/Dp, kotlin/Int, androidx.compose.ui.unit/Dp, androidx.compose.ui.unit/Dp, kotlin.collections/List<androidx.compose.ui.geometry/Rect>) // androidx.compose.material3.adaptive.layout/PaneScaffoldDirective.<init>|<init>(kotlin.Int;androidx.compose.ui.unit.Dp;kotlin.Int;androidx.compose.ui.unit.Dp;androidx.compose.ui.unit.Dp;kotlin.collections.List<androidx.compose.ui.geometry.Rect>){}[0]

final val defaultPanePreferredHeight // androidx.compose.material3.adaptive.layout/PaneScaffoldDirective.defaultPanePreferredHeight|{}defaultPanePreferredHeight[0]
Expand All @@ -365,6 +366,8 @@ final class androidx.compose.material3.adaptive.layout/PaneScaffoldDirective { /
final fun <get-maxHorizontalPartitions>(): kotlin/Int // androidx.compose.material3.adaptive.layout/PaneScaffoldDirective.maxHorizontalPartitions.<get-maxHorizontalPartitions>|<get-maxHorizontalPartitions>(){}[0]
final val maxVerticalPartitions // androidx.compose.material3.adaptive.layout/PaneScaffoldDirective.maxVerticalPartitions|{}maxVerticalPartitions[0]
final fun <get-maxVerticalPartitions>(): kotlin/Int // androidx.compose.material3.adaptive.layout/PaneScaffoldDirective.maxVerticalPartitions.<get-maxVerticalPartitions>|<get-maxVerticalPartitions>(){}[0]
final val shouldAutoFocusCurrentDestination // androidx.compose.material3.adaptive.layout/PaneScaffoldDirective.shouldAutoFocusCurrentDestination|{}shouldAutoFocusCurrentDestination[0]
final fun <get-shouldAutoFocusCurrentDestination>(): kotlin/Boolean // androidx.compose.material3.adaptive.layout/PaneScaffoldDirective.shouldAutoFocusCurrentDestination.<get-shouldAutoFocusCurrentDestination>|<get-shouldAutoFocusCurrentDestination>(){}[0]
final val verticalPartitionSpacerSize // androidx.compose.material3.adaptive.layout/PaneScaffoldDirective.verticalPartitionSpacerSize|{}verticalPartitionSpacerSize[0]
final fun <get-verticalPartitionSpacerSize>(): androidx.compose.ui.unit/Dp // androidx.compose.material3.adaptive.layout/PaneScaffoldDirective.verticalPartitionSpacerSize.<get-verticalPartitionSpacerSize>|<get-verticalPartitionSpacerSize>(){}[0]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.window.core.layout.WindowSizeClass
import kotlin.jvm.JvmInline
import kotlin.jvm.JvmName

/**
* Calculates the recommended [PaneScaffoldDirective] from a given [WindowAdaptiveInfo]. Use this
Expand Down Expand Up @@ -178,6 +179,9 @@ private fun getExcludedVerticalBounds(posture: Posture, hingePolicy: HingePolicy
* used.
* @property excludedBounds the bounds of all areas in the window that the layout needs to avoid
* displaying anything upon it. Usually these bounds represent where physical hinges are.
* @property shouldAutoFocusCurrentDestination set to `true` to make the scaffold automatically move
* focus onto the current destination pane indicated by
* [ThreePaneScaffoldValue.currentDestination] when it changes, otherwise set it to `false`.
*/
@Immutable
class PaneScaffoldDirective(
Expand All @@ -188,6 +192,7 @@ class PaneScaffoldDirective(
val defaultPanePreferredWidth: Dp,
val defaultPanePreferredHeight: Dp,
val excludedBounds: List<Rect>,
@get:JvmName("shouldAutoFocusCurrentDestination") val shouldAutoFocusCurrentDestination: Boolean,
) {
constructor(
maxHorizontalPartitions: Int,
Expand All @@ -206,6 +211,25 @@ class PaneScaffoldDirective(
excludedBounds = excludedBounds,
)

constructor(
maxHorizontalPartitions: Int,
horizontalPartitionSpacerSize: Dp,
maxVerticalPartitions: Int,
verticalPartitionSpacerSize: Dp,
defaultPanePreferredWidth: Dp,
defaultPanePreferredHeight: Dp,
excludedBounds: List<Rect>,
) : this(
maxHorizontalPartitions = maxHorizontalPartitions,
horizontalPartitionSpacerSize = horizontalPartitionSpacerSize,
maxVerticalPartitions = maxVerticalPartitions,
verticalPartitionSpacerSize = verticalPartitionSpacerSize,
defaultPanePreferredWidth = defaultPanePreferredWidth,
defaultPanePreferredHeight = defaultPanePreferredHeight,
excludedBounds = excludedBounds,
shouldAutoFocusCurrentDestination = true,
)

/**
* Returns a new copy of [PaneScaffoldDirective] with specified fields overwritten. Use this
* method to create a custom [PaneScaffoldDirective] from the default instance or the result of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,10 @@ internal fun ThreePaneScaffold(
)
.ThreePaneScaffold()

LaunchedEffect(scaffoldValue.currentDestination) {
scaffoldScope.focusRequesters[scaffoldValue.currentDestination]?.requestFocus()
if (scaffoldDirective.shouldAutoFocusCurrentDestination) {
LaunchedEffect(scaffoldValue.currentDestination) {
scaffoldScope.focusRequesters[scaffoldValue.currentDestination]?.requestFocus()
}
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion compose/runtime/runtime-tracing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ android {
dependencies {
api("androidx.annotation:annotation:1.8.1")
implementation("androidx.compose.runtime:runtime:1.3.3")
implementation("androidx.tracing:tracing-perfetto:1.0.0")
// Keep the versions of tracing-perfetto used by Benchmark and Runtime Tracing in sync.
implementation("androidx.tracing:tracing-perfetto:1.0.1")
implementation("androidx.startup:startup-runtime:1.1.1")
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testRunner)
Expand Down
Loading
Loading