Merge "Fix ZoomControlDeviceTest#getMaxZoomRatio_isMaxDigitalZoom test for AndroidRZoom" into androidx-main
diff --git a/bluetooth/integration-tests/testapp/src/main/java/androidx/bluetooth/integration/testapp/ui/framework/FwkFragment.kt b/bluetooth/integration-tests/testapp/src/main/java/androidx/bluetooth/integration/testapp/ui/framework/FwkFragment.kt
index 3230f45..d066bbc 100644
--- a/bluetooth/integration-tests/testapp/src/main/java/androidx/bluetooth/integration/testapp/ui/framework/FwkFragment.kt
+++ b/bluetooth/integration-tests/testapp/src/main/java/androidx/bluetooth/integration/testapp/ui/framework/FwkFragment.kt
@@ -95,8 +95,9 @@
             scan()
         }
 
-        binding.switchAdvertise.setOnClickListener {
-            if (binding.switchAdvertise.isChecked) startAdvertise()
+        binding.switchAdvertise.setOnCheckedChangeListener { _, isChecked ->
+            if (isChecked) startAdvertise()
+            else stopAdvertise()
         }
     }
 
@@ -151,7 +152,22 @@
 
         bleAdvertiser?.startAdvertising(advertiseSettings, advertiseData, advertiseCallback)
 
-        Toast.makeText(context, getString(R.string.advertise_start_message), Toast.LENGTH_LONG)
+        Toast.makeText(context, getString(R.string.advertise_start_message), Toast.LENGTH_SHORT)
             .show()
     }
+
+    // Permissions are handled by MainActivity requestBluetoothPermissions
+    @SuppressLint("MissingPermission")
+    private fun stopAdvertise() {
+        Log.d(TAG, "stopAdvertise() called")
+
+        val bluetoothManager =
+            context?.getSystemService(Context.BLUETOOTH_SERVICE) as? BluetoothManager
+
+        val bluetoothAdapter = bluetoothManager?.adapter
+
+        val bleAdvertiser = bluetoothAdapter?.bluetoothLeAdvertiser
+
+        bleAdvertiser?.stopAdvertising(advertiseCallback)
+    }
 }
diff --git a/camera/camera-camera2-pipe-integration/src/androidTest/java/androidx/camera/camera2/pipe/integration/Camera2CameraControlDeviceTest.kt b/camera/camera-camera2-pipe-integration/src/androidTest/java/androidx/camera/camera2/pipe/integration/Camera2CameraControlDeviceTest.kt
index 95ed3c0..2ce4722 100644
--- a/camera/camera-camera2-pipe-integration/src/androidTest/java/androidx/camera/camera2/pipe/integration/Camera2CameraControlDeviceTest.kt
+++ b/camera/camera-camera2-pipe-integration/src/androidTest/java/androidx/camera/camera2/pipe/integration/Camera2CameraControlDeviceTest.kt
@@ -404,7 +404,9 @@
         }.build().apply {
             // set analyzer to make it active.
             setAnalyzer(Dispatchers.Default.asExecutor()) {
-                // Fake analyzer, do nothing.
+                // Fake analyzer, do nothing. Close the ImageProxy immediately to prevent the
+                // closing of the CameraDevice from being stuck.
+                it.close()
             }
         }
 
@@ -477,7 +479,9 @@
         useCase: UseCase = ImageAnalysis.Builder().build().apply {
             // set analyzer to make it active.
             setAnalyzer(Dispatchers.Default.asExecutor()) {
-                // Fake analyzer, do nothing.
+                // Fake analyzer, do nothing. Close the ImageProxy immediately to prevent the
+                // closing of the CameraDevice from being stuck.
+                it.close()
             }
         }
     ) {
diff --git a/camera/camera-camera2-pipe-integration/src/androidTest/java/androidx/camera/camera2/pipe/integration/CameraControlAdapterDeviceTest.kt b/camera/camera-camera2-pipe-integration/src/androidTest/java/androidx/camera/camera2/pipe/integration/CameraControlAdapterDeviceTest.kt
index a9e2aeb..10e7fc0 100644
--- a/camera/camera-camera2-pipe-integration/src/androidTest/java/androidx/camera/camera2/pipe/integration/CameraControlAdapterDeviceTest.kt
+++ b/camera/camera-camera2-pipe-integration/src/androidTest/java/androidx/camera/camera2/pipe/integration/CameraControlAdapterDeviceTest.kt
@@ -111,7 +111,9 @@
     private val imageAnalysis = ImageAnalysis.Builder().build().apply {
         // set analyzer to make it active.
         setAnalyzer(Dispatchers.Default.asExecutor()) {
-            // Fake analyzer, do nothing.
+            // Fake analyzer, do nothing. Close the ImageProxy immediately to prevent the closing
+            // of the CameraDevice from being stuck.
+            it.close()
         }
     }
 
diff --git a/camera/camera-camera2-pipe-integration/src/androidTest/java/androidx/camera/camera2/pipe/integration/EvCompDeviceTest.kt b/camera/camera-camera2-pipe-integration/src/androidTest/java/androidx/camera/camera2/pipe/integration/EvCompDeviceTest.kt
index b1781dd..fe02a63 100644
--- a/camera/camera-camera2-pipe-integration/src/androidTest/java/androidx/camera/camera2/pipe/integration/EvCompDeviceTest.kt
+++ b/camera/camera-camera2-pipe-integration/src/androidTest/java/androidx/camera/camera2/pipe/integration/EvCompDeviceTest.kt
@@ -258,7 +258,9 @@
             ImageAnalysis.Builder().build().apply {
                 // set analyzer to make it active.
                 setAnalyzer(Dispatchers.Default.asExecutor()) {
-                    // Fake analyzer, do nothing.
+                    // Fake analyzer, do nothing. Close the ImageProxy immediately to prevent the
+                    // closing of the CameraDevice from being stuck.
+                    it.close()
                 }
             },
         )
diff --git a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/config/CameraAppConfig.kt b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/config/CameraAppConfig.kt
index 2f41d39..66e6799 100644
--- a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/config/CameraAppConfig.kt
+++ b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/config/CameraAppConfig.kt
@@ -25,6 +25,7 @@
 import androidx.camera.camera2.pipe.integration.impl.CameraInteropStateCallbackRepository
 import androidx.camera.core.impl.CameraFactory
 import androidx.camera.core.impl.CameraThreadConfig
+import androidx.camera.core.impl.utils.executor.CameraXExecutors
 import dagger.Component
 import dagger.Module
 import dagger.Provides
@@ -40,16 +41,26 @@
         @Provides
         fun provideCameraPipe(
             context: Context,
-            cameraInteropStateCallbackRepository: CameraInteropStateCallbackRepository
-        ): CameraPipe = CameraPipe(
-            CameraPipe.Config(
-                appContext = context.applicationContext,
-                cameraInteropConfig = CameraPipe.CameraInteropConfig(
-                    cameraInteropStateCallbackRepository.deviceStateCallback,
-                    cameraInteropStateCallbackRepository.sessionStateCallback
+            cameraThreadConfig: CameraThreadConfig,
+            cameraInteropStateCallbackRepository: CameraInteropStateCallbackRepository,
+        ): CameraPipe {
+            val executor = cameraThreadConfig.cameraExecutor
+            val sequentialExecutor = CameraXExecutors.newSequentialExecutor(executor)
+            return CameraPipe(
+                CameraPipe.Config(
+                    appContext = context.applicationContext,
+                    cameraInteropConfig = CameraPipe.CameraInteropConfig(
+                        cameraInteropStateCallbackRepository.deviceStateCallback,
+                        cameraInteropStateCallbackRepository.sessionStateCallback
+                    ),
+                    threadConfig = CameraPipe.ThreadConfig(
+                        defaultLightweightExecutor = sequentialExecutor,
+                        defaultBackgroundExecutor = executor,
+                        defaultCameraExecutor = sequentialExecutor,
+                    )
                 )
             )
-        )
+        }
 
         @Provides
         fun provideCameraDevices(cameraPipe: CameraPipe): CameraDevices {
diff --git a/camera/integration-tests/coretestapp/src/androidTest/java/androidx/camera/integration/core/Camera2InteropIntegrationTest.kt b/camera/integration-tests/coretestapp/src/androidTest/java/androidx/camera/integration/core/Camera2InteropIntegrationTest.kt
index 812f339..c4eddbe 100644
--- a/camera/integration-tests/coretestapp/src/androidTest/java/androidx/camera/integration/core/Camera2InteropIntegrationTest.kt
+++ b/camera/integration-tests/coretestapp/src/androidTest/java/androidx/camera/integration/core/Camera2InteropIntegrationTest.kt
@@ -262,7 +262,9 @@
             setAnalyzer(
                 CameraXExecutors.highPriorityExecutor()
             ) {
-                // Analyzer nothing to to
+                // Fake analyzer, do nothing. Close the ImageProxy immediately to prevent the
+                // closing of the CameraDevice from being stuck.
+                it.close()
             }
         }
 
diff --git a/compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/AlignmentLine.kt b/compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/AlignmentLine.kt
index 7808c3d..71c9444 100644
--- a/compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/AlignmentLine.kt
+++ b/compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/AlignmentLine.kt
@@ -134,6 +134,10 @@
  * [baseline of the last line of text in the content][LastBaseline] to the bottom of the layout
  * is [bottom].
  *
+ * When the modified layout is min height constrained and the padded layout is smaller than the
+ * constraint, the modified layout will satisfy the min constraint and the content will be
+ * positioned to satisfy the [top] requirement if specified, or the [bottom] requirement otherwise.
+ *
  * @see paddingFrom
  *
  * Example usage:
@@ -142,8 +146,20 @@
 @Stable
 @Suppress("ModifierInspectorInfo")
 fun Modifier.paddingFromBaseline(top: Dp = Dp.Unspecified, bottom: Dp = Dp.Unspecified) = this
-    .then(if (bottom != Dp.Unspecified) paddingFrom(LastBaseline, after = bottom) else Modifier)
-    .then(if (top != Dp.Unspecified) paddingFrom(FirstBaseline, before = top) else Modifier)
+    .then(
+        if (top != Dp.Unspecified) {
+            Modifier.paddingFrom(FirstBaseline, before = top)
+        } else {
+            Modifier
+        }
+    )
+    .then(
+        if (bottom != Dp.Unspecified) {
+            Modifier.paddingFrom(LastBaseline, after = bottom)
+        } else {
+            Modifier
+        }
+    )
 
 /**
  * A [Modifier] that positions the content in a layout such that the distance from the top
@@ -152,6 +168,10 @@
  * [baseline of the last line of text in the content][LastBaseline] to the bottom of the layout
  * is [bottom].
  *
+ * When the modified layout is min height constrained and the padded layout is smaller than the
+ * constraint, the modified layout will satisfy the min constraint and the content will be
+ * positioned to satisfy the [top] requirement if specified, or the [bottom] requirement otherwise.
+ *
  * @see paddingFrom
  *
  * Example usage:
@@ -163,8 +183,12 @@
     top: TextUnit = TextUnit.Unspecified,
     bottom: TextUnit = TextUnit.Unspecified
 ) = this
-    .then(if (!bottom.isUnspecified) paddingFrom(LastBaseline, after = bottom) else Modifier)
-    .then(if (!top.isUnspecified) paddingFrom(FirstBaseline, before = top) else Modifier)
+    .then(
+        if (!top.isUnspecified) Modifier.paddingFrom(FirstBaseline, before = top) else Modifier
+    )
+    .then(
+        if (!bottom.isUnspecified) Modifier.paddingFrom(LastBaseline, after = bottom) else Modifier
+    )
 
 private class AlignmentLineOffsetDp(
     val alignmentLine: AlignmentLine,
diff --git a/window/window/api/current.txt b/window/window/api/current.txt
index 2043669..a1e039c 100644
--- a/window/window/api/current.txt
+++ b/window/window/api/current.txt
@@ -50,15 +50,13 @@
   }
 
   public final class EmbeddingAspectRatio {
-    method public static androidx.window.embedding.EmbeddingAspectRatio alwaysAllow();
-    method public static androidx.window.embedding.EmbeddingAspectRatio alwaysDisallow();
     method public static androidx.window.embedding.EmbeddingAspectRatio ratio(@FloatRange(from=1.0, fromInclusive=false) float ratio);
+    field public static final androidx.window.embedding.EmbeddingAspectRatio ALWAYS_ALLOW;
+    field public static final androidx.window.embedding.EmbeddingAspectRatio ALWAYS_DISALLOW;
     field public static final androidx.window.embedding.EmbeddingAspectRatio.Companion Companion;
   }
 
   public static final class EmbeddingAspectRatio.Companion {
-    method public androidx.window.embedding.EmbeddingAspectRatio alwaysAllow();
-    method public androidx.window.embedding.EmbeddingAspectRatio alwaysDisallow();
     method public androidx.window.embedding.EmbeddingAspectRatio ratio(@FloatRange(from=1.0, fromInclusive=false) float ratio);
   }
 
diff --git a/window/window/api/public_plus_experimental_current.txt b/window/window/api/public_plus_experimental_current.txt
index 8a0792a..3973329 100644
--- a/window/window/api/public_plus_experimental_current.txt
+++ b/window/window/api/public_plus_experimental_current.txt
@@ -57,15 +57,13 @@
   }
 
   public final class EmbeddingAspectRatio {
-    method public static androidx.window.embedding.EmbeddingAspectRatio alwaysAllow();
-    method public static androidx.window.embedding.EmbeddingAspectRatio alwaysDisallow();
     method public static androidx.window.embedding.EmbeddingAspectRatio ratio(@FloatRange(from=1.0, fromInclusive=false) float ratio);
+    field public static final androidx.window.embedding.EmbeddingAspectRatio ALWAYS_ALLOW;
+    field public static final androidx.window.embedding.EmbeddingAspectRatio ALWAYS_DISALLOW;
     field public static final androidx.window.embedding.EmbeddingAspectRatio.Companion Companion;
   }
 
   public static final class EmbeddingAspectRatio.Companion {
-    method public androidx.window.embedding.EmbeddingAspectRatio alwaysAllow();
-    method public androidx.window.embedding.EmbeddingAspectRatio alwaysDisallow();
     method public androidx.window.embedding.EmbeddingAspectRatio ratio(@FloatRange(from=1.0, fromInclusive=false) float ratio);
   }
 
diff --git a/window/window/api/restricted_current.txt b/window/window/api/restricted_current.txt
index 2043669..a1e039c 100644
--- a/window/window/api/restricted_current.txt
+++ b/window/window/api/restricted_current.txt
@@ -50,15 +50,13 @@
   }
 
   public final class EmbeddingAspectRatio {
-    method public static androidx.window.embedding.EmbeddingAspectRatio alwaysAllow();
-    method public static androidx.window.embedding.EmbeddingAspectRatio alwaysDisallow();
     method public static androidx.window.embedding.EmbeddingAspectRatio ratio(@FloatRange(from=1.0, fromInclusive=false) float ratio);
+    field public static final androidx.window.embedding.EmbeddingAspectRatio ALWAYS_ALLOW;
+    field public static final androidx.window.embedding.EmbeddingAspectRatio ALWAYS_DISALLOW;
     field public static final androidx.window.embedding.EmbeddingAspectRatio.Companion Companion;
   }
 
   public static final class EmbeddingAspectRatio.Companion {
-    method public androidx.window.embedding.EmbeddingAspectRatio alwaysAllow();
-    method public androidx.window.embedding.EmbeddingAspectRatio alwaysDisallow();
     method public androidx.window.embedding.EmbeddingAspectRatio ratio(@FloatRange(from=1.0, fromInclusive=false) float ratio);
   }
 
diff --git a/window/window/src/androidTest/java/androidx/window/embedding/EmbeddingRuleConstructionTests.kt b/window/window/src/androidTest/java/androidx/window/embedding/EmbeddingRuleConstructionTests.kt
index 8203078..a60f358 100644
--- a/window/window/src/androidTest/java/androidx/window/embedding/EmbeddingRuleConstructionTests.kt
+++ b/window/window/src/androidTest/java/androidx/window/embedding/EmbeddingRuleConstructionTests.kt
@@ -22,8 +22,8 @@
 import android.graphics.Rect
 import android.util.LayoutDirection
 import androidx.test.core.app.ApplicationProvider
-import androidx.window.embedding.EmbeddingAspectRatio.Companion.alwaysAllow
-import androidx.window.embedding.EmbeddingAspectRatio.Companion.alwaysDisallow
+import androidx.window.embedding.EmbeddingAspectRatio.Companion.ALWAYS_ALLOW
+import androidx.window.embedding.EmbeddingAspectRatio.Companion.ALWAYS_DISALLOW
 import androidx.window.embedding.EmbeddingAspectRatio.Companion.ratio
 import androidx.window.embedding.SplitRule.Companion.SPLIT_MAX_ASPECT_RATIO_LANDSCAPE_DEFAULT
 import androidx.window.embedding.SplitRule.Companion.SPLIT_MAX_ASPECT_RATIO_PORTRAIT_DEFAULT
@@ -84,7 +84,7 @@
         assertEquals(123, rule.minWidthDp)
         assertEquals(456, rule.minSmallestWidthDp)
         assertEquals(1.23f, rule.maxAspectRatioInPortrait.value)
-        assertEquals(alwaysDisallow(), rule.maxAspectRatioInLandscape)
+        assertEquals(ALWAYS_DISALLOW, rule.maxAspectRatioInLandscape)
         assertEquals(FINISH_ALWAYS, rule.finishPrimaryWithSecondary)
         assertEquals(FINISH_NEVER, rule.finishSecondaryWithPrimary)
         assertEquals(true, rule.clearTop)
@@ -203,8 +203,8 @@
         var rule = SplitPairRule.Builder(HashSet())
             .setMinWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
             .setMinSmallestWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
-            .setMaxAspectRatioInLandscape(alwaysAllow())
-            .setMaxAspectRatioInPortrait(alwaysAllow())
+            .setMaxAspectRatioInLandscape(ALWAYS_ALLOW)
+            .setMaxAspectRatioInPortrait(ALWAYS_ALLOW)
             .build()
         var width = 100
         var height = 1000
@@ -215,8 +215,8 @@
         rule = SplitPairRule.Builder(HashSet())
             .setMinWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
             .setMinSmallestWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
-            .setMaxAspectRatioInLandscape(alwaysAllow())
-            .setMaxAspectRatioInPortrait(alwaysDisallow())
+            .setMaxAspectRatioInLandscape(ALWAYS_ALLOW)
+            .setMaxAspectRatioInPortrait(ALWAYS_DISALLOW)
             .build()
         width = 100
         height = 101
@@ -230,7 +230,7 @@
         rule = SplitPairRule.Builder(HashSet())
             .setMinWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
             .setMinSmallestWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
-            .setMaxAspectRatioInLandscape(alwaysAllow())
+            .setMaxAspectRatioInLandscape(ALWAYS_ALLOW)
             .setMaxAspectRatioInPortrait(ratio(1.1f))
             .build()
         // Equals to the max aspect ratio
@@ -258,8 +258,8 @@
         var rule = SplitPairRule.Builder(HashSet())
             .setMinWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
             .setMinSmallestWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
-            .setMaxAspectRatioInPortrait(alwaysAllow())
-            .setMaxAspectRatioInLandscape(alwaysAllow())
+            .setMaxAspectRatioInPortrait(ALWAYS_ALLOW)
+            .setMaxAspectRatioInLandscape(ALWAYS_ALLOW)
             .build()
         var width = 1000
         var height = 100
@@ -270,8 +270,8 @@
         rule = SplitPairRule.Builder(HashSet())
             .setMinWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
             .setMinSmallestWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
-            .setMaxAspectRatioInPortrait(alwaysAllow())
-            .setMaxAspectRatioInLandscape(alwaysDisallow())
+            .setMaxAspectRatioInPortrait(ALWAYS_ALLOW)
+            .setMaxAspectRatioInLandscape(ALWAYS_DISALLOW)
             .build()
         width = 101
         height = 100
@@ -285,7 +285,7 @@
         rule = SplitPairRule.Builder(HashSet())
             .setMinWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
             .setMinSmallestWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
-            .setMaxAspectRatioInPortrait(alwaysAllow())
+            .setMaxAspectRatioInPortrait(ALWAYS_ALLOW)
             .setMaxAspectRatioInLandscape(ratio(1.1f))
             .build()
         // Equals to the max aspect ratio
@@ -338,7 +338,7 @@
         assertEquals(123, rule.minWidthDp)
         assertEquals(456, rule.minSmallestWidthDp)
         assertEquals(1.23f, rule.maxAspectRatioInPortrait.value)
-        assertEquals(alwaysDisallow(), rule.maxAspectRatioInLandscape)
+        assertEquals(ALWAYS_DISALLOW, rule.maxAspectRatioInLandscape)
         assertEquals(FINISH_ADJACENT, rule.finishPrimaryWithPlaceholder)
         assertEquals(true, rule.isSticky)
         assertEquals(0.1f, rule.splitRatio)
@@ -461,8 +461,8 @@
         var rule = SplitPlaceholderRule.Builder(HashSet(), Intent())
             .setMinWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
             .setMinSmallestWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
-            .setMaxAspectRatioInLandscape(alwaysAllow())
-            .setMaxAspectRatioInPortrait(alwaysAllow())
+            .setMaxAspectRatioInLandscape(ALWAYS_ALLOW)
+            .setMaxAspectRatioInPortrait(ALWAYS_ALLOW)
             .build()
         var width = 100
         var height = 1000
@@ -473,8 +473,8 @@
         rule = SplitPlaceholderRule.Builder(HashSet(), Intent())
             .setMinWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
             .setMinSmallestWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
-            .setMaxAspectRatioInLandscape(alwaysAllow())
-            .setMaxAspectRatioInPortrait(alwaysDisallow())
+            .setMaxAspectRatioInLandscape(ALWAYS_ALLOW)
+            .setMaxAspectRatioInPortrait(ALWAYS_DISALLOW)
             .build()
         width = 100
         height = 101
@@ -488,7 +488,7 @@
         rule = SplitPlaceholderRule.Builder(HashSet(), Intent())
             .setMinWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
             .setMinSmallestWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
-            .setMaxAspectRatioInLandscape(alwaysAllow())
+            .setMaxAspectRatioInLandscape(ALWAYS_ALLOW)
             .setMaxAspectRatioInPortrait(ratio(1.1f))
             .build()
         // Equals to the max aspect ratio
@@ -516,8 +516,8 @@
         var rule = SplitPlaceholderRule.Builder(HashSet(), Intent())
             .setMinWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
             .setMinSmallestWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
-            .setMaxAspectRatioInPortrait(alwaysAllow())
-            .setMaxAspectRatioInLandscape(alwaysAllow())
+            .setMaxAspectRatioInPortrait(ALWAYS_ALLOW)
+            .setMaxAspectRatioInLandscape(ALWAYS_ALLOW)
             .build()
         var width = 1000
         var height = 100
@@ -531,8 +531,8 @@
         rule = SplitPlaceholderRule.Builder(HashSet(), Intent())
             .setMinWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
             .setMinSmallestWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
-            .setMaxAspectRatioInPortrait(alwaysAllow())
-            .setMaxAspectRatioInLandscape(alwaysDisallow())
+            .setMaxAspectRatioInPortrait(ALWAYS_ALLOW)
+            .setMaxAspectRatioInLandscape(ALWAYS_DISALLOW)
             .build()
         width = 101
         height = 100
@@ -546,7 +546,7 @@
         rule = SplitPlaceholderRule.Builder(HashSet(), Intent())
             .setMinWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
             .setMinSmallestWidthDp(SPLIT_MIN_DIMENSION_ALWAYS_ALLOW)
-            .setMaxAspectRatioInPortrait(alwaysAllow())
+            .setMaxAspectRatioInPortrait(ALWAYS_ALLOW)
             .setMaxAspectRatioInLandscape(ratio(1.1f))
             .build()
         // Equals to the max aspect ratio
diff --git a/window/window/src/main/java/androidx/window/embedding/ActivityRule.kt b/window/window/src/main/java/androidx/window/embedding/ActivityRule.kt
index d38b78d..fbaebcc 100644
--- a/window/window/src/main/java/androidx/window/embedding/ActivityRule.kt
+++ b/window/window/src/main/java/androidx/window/embedding/ActivityRule.kt
@@ -29,7 +29,7 @@
     /**
      * Whether the activity should always be expanded on launch. Some activities are supposed to
      * expand to the full task bounds, independent of the state of the split. An example is an
-     * activity that blocks all user interactions, like a warning dialog.
+     * activity that blocks all user interactions, such as a warning dialog.
      */
     val alwaysExpand: Boolean = false
 ) : EmbeddingRule() {
@@ -45,7 +45,9 @@
         private var alwaysExpand: Boolean = false
 
         /**
-         * @see ActivityRule.alwaysExpand
+         * Whether the activity should always be expanded on launch. Some activities are supposed to
+         * expand to the full task bounds, independent of the state of the split. An example is an
+         * activity that blocks all user interactions, such as a warning dialog.
          */
         @SuppressWarnings("MissingGetterMatchingBuilder")
         fun setAlwaysExpand(alwaysExpand: Boolean): Builder =
diff --git a/window/window/src/main/java/androidx/window/embedding/EmbeddingAspectRatio.kt b/window/window/src/main/java/androidx/window/embedding/EmbeddingAspectRatio.kt
index 643e6fb..609e357 100644
--- a/window/window/src/main/java/androidx/window/embedding/EmbeddingAspectRatio.kt
+++ b/window/window/src/main/java/androidx/window/embedding/EmbeddingAspectRatio.kt
@@ -60,8 +60,8 @@
          * @param ratio the aspect ratio.
          * @return the [EmbeddingAspectRatio] representing the [ratio].
          *
-         * @see alwaysAllow for always allow embedding.
-         * @see alwaysDisallow for always disallow embedding.
+         * @see ALWAYS_ALLOW for always allow embedding.
+         * @see ALWAYS_DISALLOW for always disallow embedding.
          */
         @JvmStatic
         fun ratio(@FloatRange(from = 1.0, fromInclusive = false) ratio: Float):
@@ -70,18 +70,14 @@
             return EmbeddingAspectRatio("ratio:$ratio", ratio)
         }
 
-        private val ALWAYS_ALLOW = EmbeddingAspectRatio("ALWAYS_ALLOW", 0f)
-
         /**
          * Gets the special [EmbeddingAspectRatio] to represent it always allows embedding.
          *
          * An example use case is to set it on [SplitRule.maxAspectRatioInLandscape] if the app
          * wants to always allow embedding as split when the parent window is in landscape.
          */
-        @JvmStatic
-        fun alwaysAllow() = ALWAYS_ALLOW
-
-        private val ALWAYS_DISALLOW = EmbeddingAspectRatio("ALWAYS_DISALLOW", -1f)
+        @JvmField
+        val ALWAYS_ALLOW = EmbeddingAspectRatio("ALWAYS_ALLOW", 0f)
 
         /**
          * Gets the special [EmbeddingAspectRatio] to represent it always disallows embedding.
@@ -89,8 +85,8 @@
          * An example use case is to set it on [SplitRule.maxAspectRatioInPortrait] if the app
          * wants to disallow embedding as split when the parent window is in portrait.
          */
-        @JvmStatic
-        fun alwaysDisallow() = ALWAYS_DISALLOW
+        @JvmField
+        val ALWAYS_DISALLOW = EmbeddingAspectRatio("ALWAYS_DISALLOW", -1f)
 
         /**
          * Returns a [EmbeddingAspectRatio] with the given [value].
@@ -98,10 +94,10 @@
         internal fun buildAspectRatioFromValue(value: Float): EmbeddingAspectRatio {
             return when (value) {
                 ALWAYS_ALLOW.value -> {
-                    alwaysAllow()
+                    ALWAYS_ALLOW
                 }
                 ALWAYS_DISALLOW.value -> {
-                    alwaysDisallow()
+                    ALWAYS_DISALLOW
                 }
                 else -> {
                     ratio(value)
diff --git a/window/window/src/main/java/androidx/window/embedding/SplitPairRule.kt b/window/window/src/main/java/androidx/window/embedding/SplitPairRule.kt
index 0b684a4..c4311b3 100644
--- a/window/window/src/main/java/androidx/window/embedding/SplitPairRule.kt
+++ b/window/window/src/main/java/androidx/window/embedding/SplitPairRule.kt
@@ -17,8 +17,14 @@
 package androidx.window.embedding
 
 import android.util.LayoutDirection.LOCALE
+import android.util.LayoutDirection.LTR
+import android.util.LayoutDirection.RTL
 import androidx.annotation.FloatRange
 import androidx.annotation.IntRange
+import androidx.window.embedding.SplitRule.Companion.SPLIT_MAX_ASPECT_RATIO_LANDSCAPE_DEFAULT
+import androidx.window.embedding.SplitRule.Companion.SPLIT_MAX_ASPECT_RATIO_PORTRAIT_DEFAULT
+import androidx.window.embedding.SplitRule.Companion.SPLIT_MIN_DIMENSION_ALWAYS_ALLOW
+import androidx.window.embedding.SplitRule.Companion.SPLIT_MIN_DIMENSION_DP_DEFAULT
 
 /**
  * Split configuration rules for activity pairs. Define when activities that were launched on top of
@@ -37,7 +43,10 @@
     /**
      * Determines what happens with the primary container when all activities are finished in the
      * associated secondary container.
-     * @see SplitRule.SplitFinishBehavior
+     *
+     * @see SplitRule.FINISH_NEVER
+     * @see SplitRule.FINISH_ALWAYS
+     * @see SplitRule.FINISH_ADJACENT
      */
     @SplitFinishBehavior
     val finishPrimaryWithSecondary: Int
@@ -45,7 +54,10 @@
     /**
      * Determines what happens with the secondary container when all activities are finished in the
      * associated primary container.
-     * @see SplitRule.SplitFinishBehavior
+     *
+     * @see SplitRule.FINISH_NEVER
+     * @see SplitRule.FINISH_ALWAYS
+     * @see SplitRule.FINISH_ADJACENT
      */
     @SplitFinishBehavior
     val finishSecondaryWithPrimary: Int
@@ -79,7 +91,8 @@
     /**
      * Builder for [SplitPairRule].
      *
-     * @param filters See [SplitPairRule.filters].
+     * @param filters Filters used to choose when to apply this rule. The rule may be used if any
+     * one of the provided filters matches.
      */
     class Builder(
         private val filters: Set<SplitPairFilter>,
@@ -101,31 +114,74 @@
         private var layoutDirection = LOCALE
 
         /**
-         * @see SplitPairRule.minWidthDp
+         * Sets the smallest value of width of the parent window when the split should be used, in
+         * DP.
+         * When the window size is smaller than requested here, activities in the secondary
+         * container will be stacked on top of the activities in the primary one, completely
+         * overlapping them.
+         *
+         * The default is [SPLIT_MIN_DIMENSION_DP_DEFAULT] if the app doesn't set.
+         * [SPLIT_MIN_DIMENSION_ALWAYS_ALLOW] means to always allow split.
          */
         fun setMinWidthDp(@IntRange(from = 0) minWidthDp: Int): Builder =
             apply { this.minWidthDp = minWidthDp }
 
         /**
-         * @see SplitPairRule.minSmallestWidthDp
+         * Sets the smallest value of the smallest possible width of the parent window in any
+         * rotation  when the split should be used, in DP. When the window size is smaller than
+         * requested here, activities in the secondary container will be stacked on top of the
+         * activities in the primary one, completely overlapping them.
+         *
+         * The default is [SPLIT_MIN_DIMENSION_DP_DEFAULT] if the app doesn't set.
+         * [SPLIT_MIN_DIMENSION_ALWAYS_ALLOW] means to always allow split.
          */
         fun setMinSmallestWidthDp(@IntRange(from = 0) minSmallestWidthDp: Int): Builder =
             apply { this.minSmallestWidthDp = minSmallestWidthDp }
 
         /**
-         * @see SplitPairRule.maxAspectRatioInPortrait
+         * Sets the largest value of the aspect ratio, expressed as `height / width` in decimal
+         * form, of the parent window bounds in portrait when the split should be used. When the
+         * window aspect ratio is greater than requested here, activities in the secondary container
+         * will be stacked on top of the activities in the primary one, completely overlapping them.
+         *
+         * This value is only used when the parent window is in portrait (height >= width).
+         *
+         * The default is [SPLIT_MAX_ASPECT_RATIO_PORTRAIT_DEFAULT] if the app doesn't set, which is
+         * the recommend value to only allow split when the parent window is not too stretched in
+         * portrait.
+         *
+         * @see EmbeddingAspectRatio.ratio
+         * @see EmbeddingAspectRatio.ALWAYS_ALLOW
+         * @see EmbeddingAspectRatio.ALWAYS_DISALLOW
          */
         fun setMaxAspectRatioInPortrait(aspectRatio: EmbeddingAspectRatio): Builder =
             apply { this.maxAspectRatioInPortrait = aspectRatio }
 
         /**
-         * @see SplitPairRule.maxAspectRatioInLandscape
+         * Sets the largest value of the aspect ratio, expressed as `width / height` in decimal
+         * form, of the parent window bounds in landscape when the split should be used. When the
+         * window aspect ratio is greater than requested here, activities in the secondary container
+         * will be stacked on top of the activities in the primary one, completely overlapping them.
+         *
+         * This value is only used when the parent window is in landscape (width > height).
+         *
+         * The default is [SPLIT_MAX_ASPECT_RATIO_LANDSCAPE_DEFAULT] if the app doesn't set, which
+         * is the recommend value to always allow split when the parent window is in landscape.
+         *
+         * @see EmbeddingAspectRatio.ratio
+         * @see EmbeddingAspectRatio.ALWAYS_ALLOW
+         * @see EmbeddingAspectRatio.ALWAYS_DISALLOW
          */
         fun setMaxAspectRatioInLandscape(aspectRatio: EmbeddingAspectRatio): Builder =
             apply { this.maxAspectRatioInLandscape = aspectRatio }
 
         /**
-         * @see SplitPairRule.finishPrimaryWithSecondary
+         * Sets the behavior of the primary container when all activities are finished in the
+         * associated secondary container.
+         *
+         * @see SplitRule.FINISH_NEVER
+         * @see SplitRule.FINISH_ALWAYS
+         * @see SplitRule.FINISH_ADJACENT
          */
         fun setFinishPrimaryWithSecondary(
             @SplitFinishBehavior finishPrimaryWithSecondary: Int
@@ -133,7 +189,12 @@
             apply { this.finishPrimaryWithSecondary = finishPrimaryWithSecondary }
 
         /**
-         * @see SplitPairRule.finishSecondaryWithPrimary
+         * Sets the behavior of the secondary container when all activities are finished in the
+         * associated primary container.
+         *
+         * @see SplitRule.FINISH_NEVER
+         * @see SplitRule.FINISH_ALWAYS
+         * @see SplitRule.FINISH_ADJACENT
          */
         fun setFinishSecondaryWithPrimary(
             @SplitFinishBehavior finishSecondaryWithPrimary: Int
@@ -141,20 +202,31 @@
             apply { this.finishSecondaryWithPrimary = finishSecondaryWithPrimary }
 
         /**
-         * @see SplitPairRule.clearTop
+         * Sets whether the existing secondary container on top and all activities in it should be
+         * destroyed when a new split is created using this rule. Otherwise the new secondary will
+         * appear on top by default.
          */
         @SuppressWarnings("MissingGetterMatchingBuilder")
         fun setClearTop(clearTop: Boolean): Builder =
             apply { this.clearTop = clearTop }
 
         /**
-         * @see SplitPairRule.splitRatio
+         * Sets what part of the width should be given to the primary activity.
+         *
+         * The default is `0.5` if the app doesn't set, which is to split with equal width.
          */
         fun setSplitRatio(@FloatRange(from = 0.0, to = 1.0) splitRatio: Float): Builder =
             apply { this.splitRatio = splitRatio }
 
         /**
-         * @see SplitPairRule.layoutDirection
+         * Sets the layout direction for the split. The value must be one of [LTR], [RTL] or
+         * [LOCALE].
+         * - [LTR]: It splits the task bounds vertically, and put the primary container on the left
+         *   portion, and the secondary container on the right portion.
+         * - [RTL]: It splits the task bounds vertically, and put the primary container on the right
+         *   portion, and the secondary container on the left portion.
+         * - [LOCALE]: It splits the task bounds vertically, and the direction is deduced from the
+         *   default language script of locale. The direction can be either [LTR] or [RTL].
          */
         fun setLayoutDirection(@LayoutDirection layoutDirection: Int): Builder =
             apply { this.layoutDirection = layoutDirection }
diff --git a/window/window/src/main/java/androidx/window/embedding/SplitPlaceholderRule.kt b/window/window/src/main/java/androidx/window/embedding/SplitPlaceholderRule.kt
index fe5f896..d693d22 100644
--- a/window/window/src/main/java/androidx/window/embedding/SplitPlaceholderRule.kt
+++ b/window/window/src/main/java/androidx/window/embedding/SplitPlaceholderRule.kt
@@ -18,10 +18,16 @@
 
 import android.content.Intent
 import android.util.LayoutDirection.LOCALE
+import android.util.LayoutDirection.LTR
+import android.util.LayoutDirection.RTL
 import androidx.annotation.FloatRange
 import androidx.annotation.IntDef
 import androidx.annotation.IntRange
 import androidx.core.util.Preconditions.checkArgument
+import androidx.window.embedding.SplitRule.Companion.SPLIT_MAX_ASPECT_RATIO_LANDSCAPE_DEFAULT
+import androidx.window.embedding.SplitRule.Companion.SPLIT_MAX_ASPECT_RATIO_PORTRAIT_DEFAULT
+import androidx.window.embedding.SplitRule.Companion.SPLIT_MIN_DIMENSION_ALWAYS_ALLOW
+import androidx.window.embedding.SplitRule.Companion.SPLIT_MIN_DIMENSION_DP_DEFAULT
 
 /**
  * Configuration rules for split placeholders.
@@ -70,7 +76,9 @@
     /**
      * Determines what happens with the primary container when all activities are finished in the
      * associated placeholder container.
-     * @see SplitPlaceholderFinishBehavior
+     *
+     * @see SplitRule.FINISH_ALWAYS
+     * @see SplitRule.FINISH_ADJACENT
      */
     @SplitPlaceholderFinishBehavior
     val finishPrimaryWithPlaceholder: Int
@@ -100,8 +108,9 @@
     /**
      * Builder for [SplitPlaceholderRule].
      *
-     * @param filters See [SplitPlaceholderRule.filters].
-     * @param placeholderIntent See [SplitPlaceholderRule.placeholderIntent].
+     * @param filters Filters used to choose when to apply this rule. The rule may be used if any
+     * one of the provided filters matches.
+     * @param placeholderIntent Intent to launch the placeholder activity.
      */
     class Builder(
         private val filters: Set<ActivityFilter>,
@@ -122,31 +131,73 @@
         private var layoutDirection = LOCALE
 
         /**
-         * @see SplitPlaceholderRule.minWidthDp
+         * Sets the smallest value of width of the parent window when the split should be used, in
+         * DP.
+         * When the window size is smaller than requested here, activities in the secondary
+         * container will be stacked on top of the activities in the primary one, completely
+         * overlapping them.
+         *
+         * The default is [SPLIT_MIN_DIMENSION_DP_DEFAULT] if the app doesn't set.
+         * [SPLIT_MIN_DIMENSION_ALWAYS_ALLOW] means to always allow split.
          */
         fun setMinWidthDp(@IntRange(from = 0) minWidthDp: Int): Builder =
             apply { this.minWidthDp = minWidthDp }
 
         /**
-         * @see SplitPlaceholderRule.minSmallestWidthDp
+         * Sets the smallest value of the smallest possible width of the parent window in any
+         * rotation  when the split should be used, in DP. When the window size is smaller than
+         * requested here, activities in the secondary container will be stacked on top of the
+         * activities in the primary one, completely overlapping them.
+         *
+         * The default is [SPLIT_MIN_DIMENSION_DP_DEFAULT] if the app doesn't set.
+         * [SPLIT_MIN_DIMENSION_ALWAYS_ALLOW] means to always allow split.
          */
         fun setMinSmallestWidthDp(@IntRange(from = 0) minSmallestWidthDp: Int): Builder =
             apply { this.minSmallestWidthDp = minSmallestWidthDp }
 
         /**
-         * @see SplitPlaceholderRule.maxAspectRatioInPortrait
+         * Sets the largest value of the aspect ratio, expressed as `height / width` in decimal
+         * form, of the parent window bounds in portrait when the split should be used. When the
+         * window aspect ratio is greater than requested here, activities in the secondary container
+         * will be stacked on top of the activities in the primary one, completely overlapping them.
+         *
+         * This value is only used when the parent window is in portrait (height >= width).
+         *
+         * The default is [SPLIT_MAX_ASPECT_RATIO_PORTRAIT_DEFAULT] if the app doesn't set, which is
+         * the recommend value to only allow split when the parent window is not too stretched in
+         * portrait.
+         *
+         * @see EmbeddingAspectRatio.ratio
+         * @see EmbeddingAspectRatio.ALWAYS_ALLOW
+         * @see EmbeddingAspectRatio.ALWAYS_DISALLOW
          */
         fun setMaxAspectRatioInPortrait(aspectRatio: EmbeddingAspectRatio): Builder =
             apply { this.maxAspectRatioInPortrait = aspectRatio }
 
         /**
-         * @see SplitPlaceholderRule.maxAspectRatioInLandscape
+         * Sets the largest value of the aspect ratio, expressed as `width / height` in decimal
+         * form, of the parent window bounds in landscape when the split should be used. When the
+         * window aspect ratio is greater than requested here, activities in the secondary container
+         * will be stacked on top of the activities in the primary one, completely overlapping them.
+         *
+         * This value is only used when the parent window is in landscape (width > height).
+         *
+         * The default is [SPLIT_MAX_ASPECT_RATIO_LANDSCAPE_DEFAULT] if the app doesn't set, which
+         * is the recommend value to always allow split when the parent window is in landscape.
+         *
+         * @see EmbeddingAspectRatio.ratio
+         * @see EmbeddingAspectRatio.ALWAYS_ALLOW
+         * @see EmbeddingAspectRatio.ALWAYS_DISALLOW
          */
         fun setMaxAspectRatioInLandscape(aspectRatio: EmbeddingAspectRatio): Builder =
             apply { this.maxAspectRatioInLandscape = aspectRatio }
 
         /**
-         * @see SplitPlaceholderRule.finishPrimaryWithPlaceholder
+         * Sets the behavior of the primary container when all activities are finished in the
+         * associated placeholder container.
+         *
+         * @see SplitRule.FINISH_ALWAYS
+         * @see SplitRule.FINISH_ADJACENT
          */
         fun setFinishPrimaryWithPlaceholder(
             @SplitPlaceholderFinishBehavior finishPrimaryWithPlaceholder: Int
@@ -156,19 +207,29 @@
             }
 
         /**
-         * @see SplitPlaceholderRule.isSticky
+         * Sets whether the placeholder will show on top in a smaller window size after it first
+         * appeared in a split with sufficient minimum width.
          */
         fun setSticky(isSticky: Boolean): Builder =
             apply { this.isSticky = isSticky }
 
         /**
-         * @see SplitPlaceholderRule.splitRatio
+         * Sets what part of the width should be given to the primary activity.
+         *
+         * The default is `0.5` if the app doesn't set, which is to split with equal width.
          */
         fun setSplitRatio(@FloatRange(from = 0.0, to = 1.0) splitRatio: Float): Builder =
             apply { this.splitRatio = splitRatio }
 
         /**
-         * @see SplitPlaceholderRule.layoutDirection
+         * Sets the layout direction for the split. The value must be one of [LTR], [RTL] or
+         * [LOCALE].
+         * - [LTR]: It splits the task bounds vertically, and put the primary container on the left
+         *   portion, and the secondary container on the right portion.
+         * - [RTL]: It splits the task bounds vertically, and put the primary container on the right
+         *   portion, and the secondary container on the left portion.
+         * - [LOCALE]: It splits the task bounds vertically, and the direction is deduced from the
+         *   default language script of locale. The direction can be either [LTR] or [RTL].
          */
         fun setLayoutDirection(@LayoutDirection layoutDirection: Int): Builder =
             apply { this.layoutDirection = layoutDirection }
diff --git a/window/window/src/main/java/androidx/window/embedding/SplitRule.kt b/window/window/src/main/java/androidx/window/embedding/SplitRule.kt
index c4f7905..d50a8aa 100644
--- a/window/window/src/main/java/androidx/window/embedding/SplitRule.kt
+++ b/window/window/src/main/java/androidx/window/embedding/SplitRule.kt
@@ -29,7 +29,7 @@
 import androidx.annotation.IntRange
 import androidx.annotation.RequiresApi
 import androidx.core.util.Preconditions
-import androidx.window.embedding.EmbeddingAspectRatio.Companion.alwaysAllow
+import androidx.window.embedding.EmbeddingAspectRatio.Companion.ALWAYS_ALLOW
 import androidx.window.embedding.EmbeddingAspectRatio.Companion.ratio
 import androidx.window.embedding.SplitRule.Companion.SPLIT_MIN_DIMENSION_DP_DEFAULT
 import kotlin.math.min
@@ -68,10 +68,10 @@
     val minSmallestWidthDp: Int = SPLIT_MIN_DIMENSION_DP_DEFAULT,
 
     /**
-     * The largest value of the aspect ratio, expressed as (height / width) in decimal form, of the
+     * The largest value of the aspect ratio, expressed as `height / width` in decimal form, of the
      * parent window bounds in portrait when the split should be used. When the window aspect ratio
-     * is greater than requested here, activities in the secondary container will stacked on top of
-     * the activities in the primary one, completely overlapping them.
+     * is greater than requested here, activities in the secondary container will be stacked on top
+     * of the activities in the primary one, completely overlapping them.
      *
      * This value is only used when the parent window is in portrait (height >= width).
      *
@@ -79,16 +79,16 @@
      * recommend value to only allow split when the parent window is not too stretched in portrait.
      *
      * @see EmbeddingAspectRatio.ratio
-     * @see EmbeddingAspectRatio.alwaysAllow
-     * @see EmbeddingAspectRatio.alwaysDisallow
+     * @see EmbeddingAspectRatio.ALWAYS_ALLOW
+     * @see EmbeddingAspectRatio.ALWAYS_DISALLOW
      */
     val maxAspectRatioInPortrait: EmbeddingAspectRatio = SPLIT_MAX_ASPECT_RATIO_PORTRAIT_DEFAULT,
 
     /**
-     * The largest value of the aspect ratio, expressed as (width / height) in decimal form, of the
+     * The largest value of the aspect ratio, expressed as `width / height` in decimal form, of the
      * parent window bounds in landscape when the split should be used. When the window aspect ratio
-     * is greater than requested here, activities in the secondary container will stacked on top of
-     * the activities in the primary one, completely overlapping them.
+     * is greater than requested here, activities in the secondary container will be stacked on top
+     * of the activities in the primary one, completely overlapping them.
      *
      * This value is only used when the parent window is in landscape (width > height).
      *
@@ -96,8 +96,8 @@
      * the recommend value to always allow split when the parent window is in landscape.
      *
      * @see EmbeddingAspectRatio.ratio
-     * @see EmbeddingAspectRatio.alwaysAllow
-     * @see EmbeddingAspectRatio.alwaysDisallow
+     * @see EmbeddingAspectRatio.ALWAYS_ALLOW
+     * @see EmbeddingAspectRatio.ALWAYS_DISALLOW
      */
     val maxAspectRatioInLandscape: EmbeddingAspectRatio = SPLIT_MAX_ASPECT_RATIO_LANDSCAPE_DEFAULT,
 
@@ -200,7 +200,7 @@
          * @see SplitRule.maxAspectRatioInLandscape
          */
         @JvmField
-        val SPLIT_MAX_ASPECT_RATIO_LANDSCAPE_DEFAULT = alwaysAllow()
+        val SPLIT_MAX_ASPECT_RATIO_LANDSCAPE_DEFAULT = ALWAYS_ALLOW
     }
 
     /**
@@ -243,11 +243,11 @@
             min(width, height) >= minSmallestWidthPx
         val validAspectRatio = if (height >= width) {
             // Portrait
-            maxAspectRatioInPortrait == alwaysAllow() ||
+            maxAspectRatioInPortrait == ALWAYS_ALLOW ||
                 height * 1f / width <= maxAspectRatioInPortrait.value
         } else {
             // Landscape
-            maxAspectRatioInLandscape == alwaysAllow() ||
+            maxAspectRatioInLandscape == ALWAYS_ALLOW ||
                 width * 1f / height <= maxAspectRatioInLandscape.value
         }
         return validMinWidth && validSmallestMinWidth && validAspectRatio