Merge "Upgrade to AGP 8.9.0-alpha06" into androidx-main
diff --git a/.gitignore b/.gitignore
index 9b7bb83..ee07b90 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@
!.idea/copyright/AndroidCopyright.xml
!.idea/copyright/profiles_settings.xml
!.idea/inspectionProfiles/Project_Default.xml
+!.idea/ktfmt.xml
.project
.settings/
project.properties
diff --git a/.idea/ktfmt.xml b/.idea/ktfmt.xml
new file mode 100644
index 0000000..a2d5a3a
--- /dev/null
+++ b/.idea/ktfmt.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="KtfmtSettings">
+ <option name="enableKtfmt" value="Enabled" />
+ <option name="enabled" value="true" />
+ <option name="uiFormatterStyle" value="Kotlinlang" />
+ </component>
+</project>
\ No newline at end of file
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/studio/StudioTask.kt b/buildSrc/private/src/main/kotlin/androidx/build/studio/StudioTask.kt
index ede03af..fe26e2c 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/studio/StudioTask.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/studio/StudioTask.kt
@@ -26,10 +26,13 @@
import java.io.File
import java.nio.file.Files
import java.nio.file.Paths
+import java.security.MessageDigest
import javax.inject.Inject
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
import org.gradle.api.Project
+import org.gradle.api.file.ArchiveOperations
+import org.gradle.api.file.FileSystemOperations
import org.gradle.api.internal.tasks.userinput.UserInputHandler
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Input
@@ -59,6 +62,7 @@
fun studiow() {
validateEnvironment()
install()
+ installKtfmtPlugin()
launch()
}
@@ -66,8 +70,12 @@
StudioPlatformUtilities.get(projectRoot, studioInstallationDir)
}
+ @get:Inject abstract val archiveOperations: ArchiveOperations
+
@get:Inject abstract val execOperations: ExecOperations
+ @get:Inject abstract val fileSystemOperations: FileSystemOperations
+
/**
* If `true`, checks for `ANDROIDX_PROJECTS` environment variable to decide which projects need
* to be loaded.
@@ -106,6 +114,29 @@
File(studioInstallationDir.parentFile, studioArchiveName).absolutePath
}
+ /** Directory where Studio downloads plugins to */
+ private val studioPluginDir =
+ File(System.getenv("HOME"), ".AndroidStudioAndroidX/config/plugins").also { it.mkdirs() }
+
+ private val studioKtfmtPluginVersion by lazy { project.getVersionByName("ktfmtIdeaPlugin") }
+
+ /**
+ * This ID changes for each ktfmt plugin version; see
+ * https://plugins.jetbrains.com/plugin/14912-ktfmt/versions/stable and you'll see the number in
+ * the redirection URL when hovering over the [studioKtfmtPluginVersion] you want downloaded
+ */
+ private val studioKtfmtPluginId = "553364"
+
+ private val studioKtfmtPluginDownloadUrl =
+ "https://downloads.marketplace.jetbrains.com/files/14912/$studioKtfmtPluginId/ktfmt_idea_plugin-$studioKtfmtPluginVersion.zip"
+
+ /** Storage location for the ktfmt plugin zip file */
+ private val studioKtfmtPluginZip = File(studioPluginDir, "ktfmt-$studioKtfmtPluginVersion.zip")
+
+ /** Download ktfmt plugin zip file and run `shasum -a 256 ./path/to/zip` to get checksum */
+ private val studioKtfmtPluginChecksum =
+ "79602c7fa94a23df7ca5c06effd50b180bc6518396488e20662f8d5d52b323db"
+
/** The idea.properties file that we want to tell Studio to use */
@get:Internal protected abstract val ideaProperties: File
@@ -159,6 +190,40 @@
}
}
+ private fun installKtfmtPlugin() {
+ // TODO: When upgrading to ktfmt_idea_plugin 1.2.x.x, remove the `instrumented-` prefix from
+ // the plugin jar name
+ if (
+ File(
+ studioPluginDir,
+ "ktfmt_idea_plugin/lib/instrumented-ktfmt_idea_plugin-$studioKtfmtPluginVersion.jar"
+ )
+ .exists()
+ ) {
+ return
+ } else {
+ File(studioPluginDir, "ktfmt_idea_plugin").deleteRecursively()
+ }
+
+ println("Downloading ktfmt plugin from $studioKtfmtPluginDownloadUrl")
+ execOperations.exec { execSpec ->
+ with(execSpec) {
+ executable("curl")
+ args(studioKtfmtPluginDownloadUrl, "--output", studioKtfmtPluginZip.absolutePath)
+ }
+ }
+
+ studioKtfmtPluginZip.verifyChecksum()
+
+ println("Installing ktfmt plugin into ${studioPluginDir.absolutePath}")
+ fileSystemOperations.copy {
+ it.from(archiveOperations.zipTree(studioKtfmtPluginZip))
+ it.into(studioPluginDir)
+ }
+ studioKtfmtPluginZip.delete()
+ println("ktfmt plugin installed successfully.")
+ }
+
/** Attempts to symlink the system-images and emulator SDK directories to a canonical SDK. */
private fun setupSymlinksIfNeeded() {
val paths = listOf("system-images", "emulator")
@@ -177,7 +242,7 @@
}
}
- val canonicalSdkPath = File(File(System.getProperty("user.home")).parent, relativeSdkPath)
+ val canonicalSdkPath = File(System.getenv("HOME"), relativeSdkPath)
if (!canonicalSdkPath.exists()) {
// In the future, we might want to try a little harder to locate a canonical SDK path.
println("Failed to locate canonical SDK, not found at: $canonicalSdkPath")
@@ -333,6 +398,26 @@
File(studioArchivePath).delete()
}
+ private fun File.verifyChecksum() {
+ val actualChecksum =
+ MessageDigest.getInstance("SHA-256")
+ .also { it.update(this.readBytes()) }
+ .digest()
+ .joinToString(separator = "") { "%02x".format(it) }
+
+ if (actualChecksum != studioKtfmtPluginChecksum) {
+ this.delete()
+ throw GradleException(
+ """
+ Checksum mismatch for file: ${this.absolutePath}
+ Expected: $studioKtfmtPluginChecksum
+ Actual: $actualChecksum
+ """
+ .trimIndent()
+ )
+ }
+ }
+
companion object {
private const val STUDIO_TASK = "studio"
diff --git a/collection/collection-ktx/api/1.5.0-beta02.txt b/collection/collection-ktx/api/1.5.0-beta02.txt
new file mode 100644
index 0000000..e6f50d0
--- /dev/null
+++ b/collection/collection-ktx/api/1.5.0-beta02.txt
@@ -0,0 +1 @@
+// Signature format: 4.0
diff --git a/collection/collection-ktx/api/restricted_1.5.0-beta02.txt b/collection/collection-ktx/api/restricted_1.5.0-beta02.txt
new file mode 100644
index 0000000..e6f50d0
--- /dev/null
+++ b/collection/collection-ktx/api/restricted_1.5.0-beta02.txt
@@ -0,0 +1 @@
+// Signature format: 4.0
diff --git a/collection/collection/api/1.5.0-beta02.txt b/collection/collection/api/1.5.0-beta02.txt
new file mode 100644
index 0000000..1594610
--- /dev/null
+++ b/collection/collection/api/1.5.0-beta02.txt
@@ -0,0 +1,2394 @@
+// Signature format: 4.0
+package androidx.collection {
+
+ public class ArrayMap<K, V> extends androidx.collection.SimpleArrayMap<K!,V!> implements java.util.Map<K!,V!> {
+ ctor public ArrayMap();
+ ctor public ArrayMap(androidx.collection.SimpleArrayMap?);
+ ctor public ArrayMap(int);
+ method public boolean containsAll(java.util.Collection<? extends java.lang.Object!>);
+ method public boolean containsKey(Object?);
+ method public boolean containsValue(Object?);
+ method public java.util.Set<java.util.Map.Entry<K!,V!>!> entrySet();
+ method public V! get(Object?);
+ method public java.util.Set<K!> keySet();
+ method public void putAll(java.util.Map<? extends K!,? extends V!>);
+ method public V! remove(Object?);
+ method public boolean removeAll(java.util.Collection<? extends java.lang.Object!>);
+ method public boolean retainAll(java.util.Collection<? extends java.lang.Object!>);
+ method public java.util.Collection<V!> values();
+ }
+
+ public final class ArrayMapKt {
+ method public static inline <K, V> androidx.collection.ArrayMap<K,V> arrayMapOf();
+ method public static <K, V> androidx.collection.ArrayMap<K,V> arrayMapOf(kotlin.Pair<? extends K,? extends V>... pairs);
+ }
+
+ public final class ArraySet<E> implements java.util.Collection<E> kotlin.jvm.internal.markers.KMutableCollection kotlin.jvm.internal.markers.KMutableSet java.util.Set<E> {
+ ctor public ArraySet();
+ ctor public ArraySet(androidx.collection.ArraySet<? extends E>? set);
+ ctor public ArraySet(E[]? array);
+ ctor public ArraySet(optional int capacity);
+ ctor public ArraySet(java.util.Collection<? extends E>? set);
+ method public boolean add(E element);
+ method public void addAll(androidx.collection.ArraySet<? extends E> array);
+ method public boolean addAll(java.util.Collection<? extends E> elements);
+ method public void clear();
+ method public operator boolean contains(E element);
+ method public boolean containsAll(java.util.Collection<? extends E> elements);
+ method public void ensureCapacity(int minimumCapacity);
+ method public int getSize();
+ method public int indexOf(Object? key);
+ method public boolean isEmpty();
+ method public java.util.Iterator<E> iterator();
+ method public boolean remove(E element);
+ method public boolean removeAll(androidx.collection.ArraySet<? extends E> array);
+ method public boolean removeAll(java.util.Collection<? extends E> elements);
+ method public E removeAt(int index);
+ method public boolean retainAll(java.util.Collection<? extends E> elements);
+ method public Object?[] toArray();
+ method public <T> T[] toArray(T[] array);
+ method public E valueAt(int index);
+ property public int size;
+ }
+
+ public final class ArraySetKt {
+ method public static inline <T> androidx.collection.ArraySet<T> arraySetOf();
+ method public static <T> androidx.collection.ArraySet<T> arraySetOf(T... values);
+ }
+
+ public final class CircularArray<E> {
+ ctor public CircularArray();
+ ctor public CircularArray(optional int minCapacity);
+ method public void addFirst(E element);
+ method public void addLast(E element);
+ method public void clear();
+ method public operator E get(int index);
+ method public E getFirst();
+ method public E getLast();
+ method public boolean isEmpty();
+ method public E popFirst();
+ method public E popLast();
+ method public void removeFromEnd(int count);
+ method public void removeFromStart(int count);
+ method public int size();
+ property public final E first;
+ property public final E last;
+ }
+
+ public final class CircularIntArray {
+ ctor public CircularIntArray();
+ ctor public CircularIntArray(optional int minCapacity);
+ method public void addFirst(int element);
+ method public void addLast(int element);
+ method public void clear();
+ method public operator int get(int index);
+ method public int getFirst();
+ method public int getLast();
+ method public boolean isEmpty();
+ method public int popFirst();
+ method public int popLast();
+ method public void removeFromEnd(int count);
+ method public void removeFromStart(int count);
+ method public int size();
+ property public final int first;
+ property public final int last;
+ }
+
+ public abstract sealed class DoubleList {
+ method public final inline boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final int binarySearch(int element);
+ method public final int binarySearch(int element, optional int fromIndex);
+ method public final int binarySearch(int element, optional int fromIndex, optional int toIndex);
+ method public final operator boolean contains(double element);
+ method public final boolean containsAll(androidx.collection.DoubleList elements);
+ method public final inline int count();
+ method public final inline int count(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final double elementAt(@IntRange(from=0L) int index);
+ method public final inline double elementAtOrElse(@IntRange(from=0L) int index, kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Double> defaultValue);
+ method public final double first();
+ method public final inline double first(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final inline <R> R fold(R initial, kotlin.jvm.functions.Function2<? super R,? super java.lang.Double,? extends R> operation);
+ method public final inline <R> R foldIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super R,? super java.lang.Double,? extends R> operation);
+ method public final inline <R> R foldRight(R initial, kotlin.jvm.functions.Function2<? super java.lang.Double,? super R,? extends R> operation);
+ method public final inline <R> R foldRightIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super java.lang.Double,? super R,? extends R> operation);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super java.lang.Double,kotlin.Unit> block);
+ method public final inline void forEachIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Double,kotlin.Unit> block);
+ method public final inline void forEachReversed(kotlin.jvm.functions.Function1<? super java.lang.Double,kotlin.Unit> block);
+ method public final inline void forEachReversedIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Double,kotlin.Unit> block);
+ method public final operator double get(@IntRange(from=0L) int index);
+ method public final inline kotlin.ranges.IntRange getIndices();
+ method @IntRange(from=-1L) public final inline int getLastIndex();
+ method @IntRange(from=0L) public final inline int getSize();
+ method public final int indexOf(double element);
+ method public final inline int indexOfFirst(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final inline int indexOfLast(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final inline boolean isEmpty();
+ method public final inline boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final double last();
+ method public final inline double last(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final int lastIndexOf(double element);
+ method public final inline boolean none();
+ method public final inline boolean reversedAny(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ property public final inline kotlin.ranges.IntRange indices;
+ property @IntRange(from=-1L) public final inline int lastIndex;
+ property @IntRange(from=0L) public final inline int size;
+ }
+
+ public final class DoubleListKt {
+ method public static inline androidx.collection.DoubleList buildDoubleList(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableDoubleList,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.DoubleList buildDoubleList(kotlin.jvm.functions.Function1<? super androidx.collection.MutableDoubleList,kotlin.Unit> builderAction);
+ method public static androidx.collection.DoubleList doubleListOf();
+ method public static androidx.collection.DoubleList doubleListOf(double element1);
+ method public static androidx.collection.DoubleList doubleListOf(double element1, double element2);
+ method public static androidx.collection.DoubleList doubleListOf(double element1, double element2, double element3);
+ method public static androidx.collection.DoubleList doubleListOf(double... elements);
+ method public static androidx.collection.DoubleList emptyDoubleList();
+ method public static inline androidx.collection.MutableDoubleList mutableDoubleListOf();
+ method public static androidx.collection.MutableDoubleList mutableDoubleListOf(double element1);
+ method public static androidx.collection.MutableDoubleList mutableDoubleListOf(double element1, double element2);
+ method public static androidx.collection.MutableDoubleList mutableDoubleListOf(double element1, double element2, double element3);
+ method public static inline androidx.collection.MutableDoubleList mutableDoubleListOf(double... elements);
+ }
+
+ public abstract sealed class FloatFloatMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(float key);
+ method public final boolean containsKey(float key);
+ method public final boolean containsValue(float value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final operator float get(float key);
+ method public final int getCapacity();
+ method public final float getOrDefault(float key, float defaultValue);
+ method public final inline float getOrElse(float key, kotlin.jvm.functions.Function0<java.lang.Float> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property public final int size;
+ }
+
+ public final class FloatFloatMapKt {
+ method public static inline androidx.collection.FloatFloatMap buildFloatFloatMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatFloatMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.FloatFloatMap buildFloatFloatMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatFloatMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.FloatFloatMap emptyFloatFloatMap();
+ method public static androidx.collection.FloatFloatMap floatFloatMapOf();
+ method public static androidx.collection.FloatFloatMap floatFloatMapOf(float key1, float value1);
+ method public static androidx.collection.FloatFloatMap floatFloatMapOf(float key1, float value1, float key2, float value2);
+ method public static androidx.collection.FloatFloatMap floatFloatMapOf(float key1, float value1, float key2, float value2, float key3, float value3);
+ method public static androidx.collection.FloatFloatMap floatFloatMapOf(float key1, float value1, float key2, float value2, float key3, float value3, float key4, float value4);
+ method public static androidx.collection.FloatFloatMap floatFloatMapOf(float key1, float value1, float key2, float value2, float key3, float value3, float key4, float value4, float key5, float value5);
+ method public static androidx.collection.MutableFloatFloatMap mutableFloatFloatMapOf();
+ method public static androidx.collection.MutableFloatFloatMap mutableFloatFloatMapOf(float key1, float value1);
+ method public static androidx.collection.MutableFloatFloatMap mutableFloatFloatMapOf(float key1, float value1, float key2, float value2);
+ method public static androidx.collection.MutableFloatFloatMap mutableFloatFloatMapOf(float key1, float value1, float key2, float value2, float key3, float value3);
+ method public static androidx.collection.MutableFloatFloatMap mutableFloatFloatMapOf(float key1, float value1, float key2, float value2, float key3, float value3, float key4, float value4);
+ method public static androidx.collection.MutableFloatFloatMap mutableFloatFloatMapOf(float key1, float value1, float key2, float value2, float key3, float value3, float key4, float value4, float key5, float value5);
+ }
+
+ @kotlin.jvm.JvmInline public final value class FloatFloatPair {
+ ctor public FloatFloatPair(float first, float second);
+ method public inline operator float component1();
+ method public inline operator float component2();
+ property public final inline float first;
+ property public final long packedValue;
+ property public final inline float second;
+ field public final long packedValue;
+ }
+
+ public abstract sealed class FloatIntMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(float key);
+ method public final boolean containsKey(float key);
+ method public final boolean containsValue(int value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final operator int get(float key);
+ method public final int getCapacity();
+ method public final int getOrDefault(float key, int defaultValue);
+ method public final inline int getOrElse(float key, kotlin.jvm.functions.Function0<java.lang.Integer> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property public final int size;
+ }
+
+ public final class FloatIntMapKt {
+ method public static inline androidx.collection.FloatIntMap buildFloatIntMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatIntMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.FloatIntMap buildFloatIntMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatIntMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.FloatIntMap emptyFloatIntMap();
+ method public static androidx.collection.FloatIntMap floatIntMapOf();
+ method public static androidx.collection.FloatIntMap floatIntMapOf(float key1, int value1);
+ method public static androidx.collection.FloatIntMap floatIntMapOf(float key1, int value1, float key2, int value2);
+ method public static androidx.collection.FloatIntMap floatIntMapOf(float key1, int value1, float key2, int value2, float key3, int value3);
+ method public static androidx.collection.FloatIntMap floatIntMapOf(float key1, int value1, float key2, int value2, float key3, int value3, float key4, int value4);
+ method public static androidx.collection.FloatIntMap floatIntMapOf(float key1, int value1, float key2, int value2, float key3, int value3, float key4, int value4, float key5, int value5);
+ method public static androidx.collection.MutableFloatIntMap mutableFloatIntMapOf();
+ method public static androidx.collection.MutableFloatIntMap mutableFloatIntMapOf(float key1, int value1);
+ method public static androidx.collection.MutableFloatIntMap mutableFloatIntMapOf(float key1, int value1, float key2, int value2);
+ method public static androidx.collection.MutableFloatIntMap mutableFloatIntMapOf(float key1, int value1, float key2, int value2, float key3, int value3);
+ method public static androidx.collection.MutableFloatIntMap mutableFloatIntMapOf(float key1, int value1, float key2, int value2, float key3, int value3, float key4, int value4);
+ method public static androidx.collection.MutableFloatIntMap mutableFloatIntMapOf(float key1, int value1, float key2, int value2, float key3, int value3, float key4, int value4, float key5, int value5);
+ }
+
+ public abstract sealed class FloatList {
+ method public final inline boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final int binarySearch(int element);
+ method public final int binarySearch(int element, optional int fromIndex);
+ method public final int binarySearch(int element, optional int fromIndex, optional int toIndex);
+ method public final operator boolean contains(float element);
+ method public final boolean containsAll(androidx.collection.FloatList elements);
+ method public final inline int count();
+ method public final inline int count(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final float elementAt(@IntRange(from=0L) int index);
+ method public final inline float elementAtOrElse(@IntRange(from=0L) int index, kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Float> defaultValue);
+ method public final float first();
+ method public final inline float first(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline <R> R fold(R initial, kotlin.jvm.functions.Function2<? super R,? super java.lang.Float,? extends R> operation);
+ method public final inline <R> R foldIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super R,? super java.lang.Float,? extends R> operation);
+ method public final inline <R> R foldRight(R initial, kotlin.jvm.functions.Function2<? super java.lang.Float,? super R,? extends R> operation);
+ method public final inline <R> R foldRightIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super java.lang.Float,? super R,? extends R> operation);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachReversed(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachReversedIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,kotlin.Unit> block);
+ method public final operator float get(@IntRange(from=0L) int index);
+ method public final inline kotlin.ranges.IntRange getIndices();
+ method @IntRange(from=-1L) public final inline int getLastIndex();
+ method @IntRange(from=0L) public final inline int getSize();
+ method public final int indexOf(float element);
+ method public final inline int indexOfFirst(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline int indexOfLast(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline boolean isEmpty();
+ method public final inline boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final float last();
+ method public final inline float last(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final int lastIndexOf(float element);
+ method public final inline boolean none();
+ method public final inline boolean reversedAny(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ property public final inline kotlin.ranges.IntRange indices;
+ property @IntRange(from=-1L) public final inline int lastIndex;
+ property @IntRange(from=0L) public final inline int size;
+ }
+
+ public final class FloatListKt {
+ method public static inline androidx.collection.FloatList buildFloatList(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatList,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.FloatList buildFloatList(kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatList,kotlin.Unit> builderAction);
+ method public static androidx.collection.FloatList emptyFloatList();
+ method public static androidx.collection.FloatList floatListOf();
+ method public static androidx.collection.FloatList floatListOf(float element1);
+ method public static androidx.collection.FloatList floatListOf(float element1, float element2);
+ method public static androidx.collection.FloatList floatListOf(float element1, float element2, float element3);
+ method public static androidx.collection.FloatList floatListOf(float... elements);
+ method public static inline androidx.collection.MutableFloatList mutableFloatListOf();
+ method public static androidx.collection.MutableFloatList mutableFloatListOf(float element1);
+ method public static androidx.collection.MutableFloatList mutableFloatListOf(float element1, float element2);
+ method public static androidx.collection.MutableFloatList mutableFloatListOf(float element1, float element2, float element3);
+ method public static inline androidx.collection.MutableFloatList mutableFloatListOf(float... elements);
+ }
+
+ public abstract sealed class FloatLongMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(float key);
+ method public final boolean containsKey(float key);
+ method public final boolean containsValue(long value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final operator long get(float key);
+ method public final int getCapacity();
+ method public final long getOrDefault(float key, long defaultValue);
+ method public final inline long getOrElse(float key, kotlin.jvm.functions.Function0<java.lang.Long> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property public final int size;
+ }
+
+ public final class FloatLongMapKt {
+ method public static inline androidx.collection.FloatLongMap buildFloatLongMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatLongMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.FloatLongMap buildFloatLongMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatLongMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.FloatLongMap emptyFloatLongMap();
+ method public static androidx.collection.FloatLongMap floatLongMapOf();
+ method public static androidx.collection.FloatLongMap floatLongMapOf(float key1, long value1);
+ method public static androidx.collection.FloatLongMap floatLongMapOf(float key1, long value1, float key2, long value2);
+ method public static androidx.collection.FloatLongMap floatLongMapOf(float key1, long value1, float key2, long value2, float key3, long value3);
+ method public static androidx.collection.FloatLongMap floatLongMapOf(float key1, long value1, float key2, long value2, float key3, long value3, float key4, long value4);
+ method public static androidx.collection.FloatLongMap floatLongMapOf(float key1, long value1, float key2, long value2, float key3, long value3, float key4, long value4, float key5, long value5);
+ method public static androidx.collection.MutableFloatLongMap mutableFloatLongMapOf();
+ method public static androidx.collection.MutableFloatLongMap mutableFloatLongMapOf(float key1, long value1);
+ method public static androidx.collection.MutableFloatLongMap mutableFloatLongMapOf(float key1, long value1, float key2, long value2);
+ method public static androidx.collection.MutableFloatLongMap mutableFloatLongMapOf(float key1, long value1, float key2, long value2, float key3, long value3);
+ method public static androidx.collection.MutableFloatLongMap mutableFloatLongMapOf(float key1, long value1, float key2, long value2, float key3, long value3, float key4, long value4);
+ method public static androidx.collection.MutableFloatLongMap mutableFloatLongMapOf(float key1, long value1, float key2, long value2, float key3, long value3, float key4, long value4, float key5, long value5);
+ }
+
+ public abstract sealed class FloatObjectMap<V> {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(float key);
+ method public final boolean containsKey(float key);
+ method public final boolean containsValue(V value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super V,kotlin.Unit> block);
+ method public final operator V? get(float key);
+ method public final int getCapacity();
+ method public final V getOrDefault(float key, V defaultValue);
+ method public final inline V getOrElse(float key, kotlin.jvm.functions.Function0<? extends V> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property public final int size;
+ }
+
+ public final class FloatObjectMapKt {
+ method public static inline <V> androidx.collection.FloatObjectMap<V> buildFloatObjectMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatObjectMap<V>,kotlin.Unit> builderAction);
+ method public static inline <V> androidx.collection.FloatObjectMap<V> buildFloatObjectMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatObjectMap<V>,kotlin.Unit> builderAction);
+ method public static <V> androidx.collection.FloatObjectMap<V> emptyFloatObjectMap();
+ method public static <V> androidx.collection.FloatObjectMap<V> floatObjectMapOf();
+ method public static <V> androidx.collection.FloatObjectMap<V> floatObjectMapOf(float key1, V value1);
+ method public static <V> androidx.collection.FloatObjectMap<V> floatObjectMapOf(float key1, V value1, float key2, V value2);
+ method public static <V> androidx.collection.FloatObjectMap<V> floatObjectMapOf(float key1, V value1, float key2, V value2, float key3, V value3);
+ method public static <V> androidx.collection.FloatObjectMap<V> floatObjectMapOf(float key1, V value1, float key2, V value2, float key3, V value3, float key4, V value4);
+ method public static <V> androidx.collection.FloatObjectMap<V> floatObjectMapOf(float key1, V value1, float key2, V value2, float key3, V value3, float key4, V value4, float key5, V value5);
+ method public static <V> androidx.collection.MutableFloatObjectMap<V> mutableFloatObjectMapOf();
+ method public static <V> androidx.collection.MutableFloatObjectMap<V> mutableFloatObjectMapOf(float key1, V value1);
+ method public static <V> androidx.collection.MutableFloatObjectMap<V> mutableFloatObjectMapOf(float key1, V value1, float key2, V value2);
+ method public static <V> androidx.collection.MutableFloatObjectMap<V> mutableFloatObjectMapOf(float key1, V value1, float key2, V value2, float key3, V value3);
+ method public static <V> androidx.collection.MutableFloatObjectMap<V> mutableFloatObjectMapOf(float key1, V value1, float key2, V value2, float key3, V value3, float key4, V value4);
+ method public static <V> androidx.collection.MutableFloatObjectMap<V> mutableFloatObjectMapOf(float key1, V value1, float key2, V value2, float key3, V value3, float key4, V value4, float key5, V value5);
+ }
+
+ public abstract sealed class FloatSet {
+ method public final inline boolean all(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final operator boolean contains(float element);
+ method @IntRange(from=0L) public final int count();
+ method @IntRange(from=0L) public final inline int count(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline float first();
+ method public final inline float first(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method @IntRange(from=0L) public final int getCapacity();
+ method @IntRange(from=0L) public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property @IntRange(from=0L) public final int capacity;
+ property @IntRange(from=0L) public final int size;
+ }
+
+ public final class FloatSetKt {
+ method public static inline androidx.collection.FloatSet buildFloatSet(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatSet,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.FloatSet buildFloatSet(kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatSet,kotlin.Unit> builderAction);
+ method public static androidx.collection.FloatSet emptyFloatSet();
+ method public static androidx.collection.FloatSet floatSetOf();
+ method public static androidx.collection.FloatSet floatSetOf(float element1);
+ method public static androidx.collection.FloatSet floatSetOf(float element1, float element2);
+ method public static androidx.collection.FloatSet floatSetOf(float element1, float element2, float element3);
+ method public static androidx.collection.FloatSet floatSetOf(float... elements);
+ method public static androidx.collection.MutableFloatSet mutableFloatSetOf();
+ method public static androidx.collection.MutableFloatSet mutableFloatSetOf(float element1);
+ method public static androidx.collection.MutableFloatSet mutableFloatSetOf(float element1, float element2);
+ method public static androidx.collection.MutableFloatSet mutableFloatSetOf(float element1, float element2, float element3);
+ method public static androidx.collection.MutableFloatSet mutableFloatSetOf(float... elements);
+ }
+
+ public abstract sealed class IntFloatMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(int key);
+ method public final boolean containsKey(int key);
+ method public final boolean containsValue(float value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final operator float get(int key);
+ method public final int getCapacity();
+ method public final float getOrDefault(int key, float defaultValue);
+ method public final inline float getOrElse(int key, kotlin.jvm.functions.Function0<java.lang.Float> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property public final int size;
+ }
+
+ public final class IntFloatMapKt {
+ method public static inline androidx.collection.IntFloatMap buildIntFloatMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntFloatMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.IntFloatMap buildIntFloatMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntFloatMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.IntFloatMap emptyIntFloatMap();
+ method public static androidx.collection.IntFloatMap intFloatMapOf();
+ method public static androidx.collection.IntFloatMap intFloatMapOf(int key1, float value1);
+ method public static androidx.collection.IntFloatMap intFloatMapOf(int key1, float value1, int key2, float value2);
+ method public static androidx.collection.IntFloatMap intFloatMapOf(int key1, float value1, int key2, float value2, int key3, float value3);
+ method public static androidx.collection.IntFloatMap intFloatMapOf(int key1, float value1, int key2, float value2, int key3, float value3, int key4, float value4);
+ method public static androidx.collection.IntFloatMap intFloatMapOf(int key1, float value1, int key2, float value2, int key3, float value3, int key4, float value4, int key5, float value5);
+ method public static androidx.collection.MutableIntFloatMap mutableIntFloatMapOf();
+ method public static androidx.collection.MutableIntFloatMap mutableIntFloatMapOf(int key1, float value1);
+ method public static androidx.collection.MutableIntFloatMap mutableIntFloatMapOf(int key1, float value1, int key2, float value2);
+ method public static androidx.collection.MutableIntFloatMap mutableIntFloatMapOf(int key1, float value1, int key2, float value2, int key3, float value3);
+ method public static androidx.collection.MutableIntFloatMap mutableIntFloatMapOf(int key1, float value1, int key2, float value2, int key3, float value3, int key4, float value4);
+ method public static androidx.collection.MutableIntFloatMap mutableIntFloatMapOf(int key1, float value1, int key2, float value2, int key3, float value3, int key4, float value4, int key5, float value5);
+ }
+
+ public abstract sealed class IntIntMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(int key);
+ method public final boolean containsKey(int key);
+ method public final boolean containsValue(int value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final operator int get(int key);
+ method public final int getCapacity();
+ method public final int getOrDefault(int key, int defaultValue);
+ method public final inline int getOrElse(int key, kotlin.jvm.functions.Function0<java.lang.Integer> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property public final int size;
+ }
+
+ public final class IntIntMapKt {
+ method public static inline androidx.collection.IntIntMap buildIntIntMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntIntMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.IntIntMap buildIntIntMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntIntMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.IntIntMap emptyIntIntMap();
+ method public static androidx.collection.IntIntMap intIntMapOf();
+ method public static androidx.collection.IntIntMap intIntMapOf(int key1, int value1);
+ method public static androidx.collection.IntIntMap intIntMapOf(int key1, int value1, int key2, int value2);
+ method public static androidx.collection.IntIntMap intIntMapOf(int key1, int value1, int key2, int value2, int key3, int value3);
+ method public static androidx.collection.IntIntMap intIntMapOf(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4);
+ method public static androidx.collection.IntIntMap intIntMapOf(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4, int key5, int value5);
+ method public static androidx.collection.MutableIntIntMap mutableIntIntMapOf();
+ method public static androidx.collection.MutableIntIntMap mutableIntIntMapOf(int key1, int value1);
+ method public static androidx.collection.MutableIntIntMap mutableIntIntMapOf(int key1, int value1, int key2, int value2);
+ method public static androidx.collection.MutableIntIntMap mutableIntIntMapOf(int key1, int value1, int key2, int value2, int key3, int value3);
+ method public static androidx.collection.MutableIntIntMap mutableIntIntMapOf(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4);
+ method public static androidx.collection.MutableIntIntMap mutableIntIntMapOf(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4, int key5, int value5);
+ }
+
+ @kotlin.jvm.JvmInline public final value class IntIntPair {
+ ctor public IntIntPair(int first, int second);
+ method public inline operator int component1();
+ method public inline operator int component2();
+ property public final int first;
+ property public final long packedValue;
+ property public final int second;
+ field public final long packedValue;
+ }
+
+ public abstract sealed class IntList {
+ method public final inline boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final int binarySearch(int element);
+ method public final int binarySearch(int element, optional int fromIndex);
+ method public final int binarySearch(int element, optional int fromIndex, optional int toIndex);
+ method public final operator boolean contains(int element);
+ method public final boolean containsAll(androidx.collection.IntList elements);
+ method public final inline int count();
+ method public final inline int count(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final int elementAt(@IntRange(from=0L) int index);
+ method public final inline int elementAtOrElse(@IntRange(from=0L) int index, kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Integer> defaultValue);
+ method public final int first();
+ method public final inline int first(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline <R> R fold(R initial, kotlin.jvm.functions.Function2<? super R,? super java.lang.Integer,? extends R> operation);
+ method public final inline <R> R foldIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super R,? super java.lang.Integer,? extends R> operation);
+ method public final inline <R> R foldRight(R initial, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super R,? extends R> operation);
+ method public final inline <R> R foldRightIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super java.lang.Integer,? super R,? extends R> operation);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachReversed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachReversedIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,kotlin.Unit> block);
+ method public final operator int get(@IntRange(from=0L) int index);
+ method public final inline kotlin.ranges.IntRange getIndices();
+ method @IntRange(from=-1L) public final inline int getLastIndex();
+ method @IntRange(from=0L) public final inline int getSize();
+ method public final int indexOf(int element);
+ method public final inline int indexOfFirst(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline int indexOfLast(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline boolean isEmpty();
+ method public final inline boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final int last();
+ method public final inline int last(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final int lastIndexOf(int element);
+ method public final inline boolean none();
+ method public final inline boolean reversedAny(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ property public final inline kotlin.ranges.IntRange indices;
+ property @IntRange(from=-1L) public final inline int lastIndex;
+ property @IntRange(from=0L) public final inline int size;
+ }
+
+ public final class IntListKt {
+ method public static inline androidx.collection.IntList buildIntList(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntList,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.IntList buildIntList(kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntList,kotlin.Unit> builderAction);
+ method public static androidx.collection.IntList emptyIntList();
+ method public static androidx.collection.IntList intListOf();
+ method public static androidx.collection.IntList intListOf(int element1);
+ method public static androidx.collection.IntList intListOf(int element1, int element2);
+ method public static androidx.collection.IntList intListOf(int element1, int element2, int element3);
+ method public static androidx.collection.IntList intListOf(int... elements);
+ method public static inline androidx.collection.MutableIntList mutableIntListOf();
+ method public static androidx.collection.MutableIntList mutableIntListOf(int element1);
+ method public static androidx.collection.MutableIntList mutableIntListOf(int element1, int element2);
+ method public static androidx.collection.MutableIntList mutableIntListOf(int element1, int element2, int element3);
+ method public static inline androidx.collection.MutableIntList mutableIntListOf(int... elements);
+ }
+
+ public abstract sealed class IntLongMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(int key);
+ method public final boolean containsKey(int key);
+ method public final boolean containsValue(long value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final operator long get(int key);
+ method public final int getCapacity();
+ method public final long getOrDefault(int key, long defaultValue);
+ method public final inline long getOrElse(int key, kotlin.jvm.functions.Function0<java.lang.Long> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property public final int size;
+ }
+
+ public final class IntLongMapKt {
+ method public static inline androidx.collection.IntLongMap buildIntLongMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntLongMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.IntLongMap buildIntLongMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntLongMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.IntLongMap emptyIntLongMap();
+ method public static androidx.collection.IntLongMap intLongMapOf();
+ method public static androidx.collection.IntLongMap intLongMapOf(int key1, long value1);
+ method public static androidx.collection.IntLongMap intLongMapOf(int key1, long value1, int key2, long value2);
+ method public static androidx.collection.IntLongMap intLongMapOf(int key1, long value1, int key2, long value2, int key3, long value3);
+ method public static androidx.collection.IntLongMap intLongMapOf(int key1, long value1, int key2, long value2, int key3, long value3, int key4, long value4);
+ method public static androidx.collection.IntLongMap intLongMapOf(int key1, long value1, int key2, long value2, int key3, long value3, int key4, long value4, int key5, long value5);
+ method public static androidx.collection.MutableIntLongMap mutableIntLongMapOf();
+ method public static androidx.collection.MutableIntLongMap mutableIntLongMapOf(int key1, long value1);
+ method public static androidx.collection.MutableIntLongMap mutableIntLongMapOf(int key1, long value1, int key2, long value2);
+ method public static androidx.collection.MutableIntLongMap mutableIntLongMapOf(int key1, long value1, int key2, long value2, int key3, long value3);
+ method public static androidx.collection.MutableIntLongMap mutableIntLongMapOf(int key1, long value1, int key2, long value2, int key3, long value3, int key4, long value4);
+ method public static androidx.collection.MutableIntLongMap mutableIntLongMapOf(int key1, long value1, int key2, long value2, int key3, long value3, int key4, long value4, int key5, long value5);
+ }
+
+ public abstract sealed class IntObjectMap<V> {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(int key);
+ method public final boolean containsKey(int key);
+ method public final boolean containsValue(V value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super V,kotlin.Unit> block);
+ method public final operator V? get(int key);
+ method public final int getCapacity();
+ method public final V getOrDefault(int key, V defaultValue);
+ method public final inline V getOrElse(int key, kotlin.jvm.functions.Function0<? extends V> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property public final int size;
+ }
+
+ public final class IntObjectMapKt {
+ method public static inline <V> androidx.collection.IntObjectMap<V> buildIntObjectMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntObjectMap<V>,kotlin.Unit> builderAction);
+ method public static inline <V> androidx.collection.IntObjectMap<V> buildIntObjectMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntObjectMap<V>,kotlin.Unit> builderAction);
+ method public static <V> androidx.collection.IntObjectMap<V> emptyIntObjectMap();
+ method public static <V> androidx.collection.IntObjectMap<V> intObjectMapOf();
+ method public static <V> androidx.collection.IntObjectMap<V> intObjectMapOf(int key1, V value1);
+ method public static <V> androidx.collection.IntObjectMap<V> intObjectMapOf(int key1, V value1, int key2, V value2);
+ method public static <V> androidx.collection.IntObjectMap<V> intObjectMapOf(int key1, V value1, int key2, V value2, int key3, V value3);
+ method public static <V> androidx.collection.IntObjectMap<V> intObjectMapOf(int key1, V value1, int key2, V value2, int key3, V value3, int key4, V value4);
+ method public static <V> androidx.collection.IntObjectMap<V> intObjectMapOf(int key1, V value1, int key2, V value2, int key3, V value3, int key4, V value4, int key5, V value5);
+ method public static <V> androidx.collection.MutableIntObjectMap<V> mutableIntObjectMapOf();
+ method public static <V> androidx.collection.MutableIntObjectMap<V> mutableIntObjectMapOf(int key1, V value1);
+ method public static <V> androidx.collection.MutableIntObjectMap<V> mutableIntObjectMapOf(int key1, V value1, int key2, V value2);
+ method public static <V> androidx.collection.MutableIntObjectMap<V> mutableIntObjectMapOf(int key1, V value1, int key2, V value2, int key3, V value3);
+ method public static <V> androidx.collection.MutableIntObjectMap<V> mutableIntObjectMapOf(int key1, V value1, int key2, V value2, int key3, V value3, int key4, V value4);
+ method public static <V> androidx.collection.MutableIntObjectMap<V> mutableIntObjectMapOf(int key1, V value1, int key2, V value2, int key3, V value3, int key4, V value4, int key5, V value5);
+ }
+
+ public abstract sealed class IntSet {
+ method public final inline boolean all(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final operator boolean contains(int element);
+ method @IntRange(from=0L) public final int count();
+ method @IntRange(from=0L) public final inline int count(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline int first();
+ method public final inline int first(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method @IntRange(from=0L) public final int getCapacity();
+ method @IntRange(from=0L) public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property @IntRange(from=0L) public final int capacity;
+ property @IntRange(from=0L) public final int size;
+ }
+
+ public final class IntSetKt {
+ method public static inline androidx.collection.IntSet buildIntSet(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntSet,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.IntSet buildIntSet(kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntSet,kotlin.Unit> builderAction);
+ method public static androidx.collection.IntSet emptyIntSet();
+ method public static androidx.collection.IntSet intSetOf();
+ method public static androidx.collection.IntSet intSetOf(int element1);
+ method public static androidx.collection.IntSet intSetOf(int element1, int element2);
+ method public static androidx.collection.IntSet intSetOf(int element1, int element2, int element3);
+ method public static androidx.collection.IntSet intSetOf(int... elements);
+ method public static androidx.collection.MutableIntSet mutableIntSetOf();
+ method public static androidx.collection.MutableIntSet mutableIntSetOf(int element1);
+ method public static androidx.collection.MutableIntSet mutableIntSetOf(int element1, int element2);
+ method public static androidx.collection.MutableIntSet mutableIntSetOf(int element1, int element2, int element3);
+ method public static androidx.collection.MutableIntSet mutableIntSetOf(int... elements);
+ }
+
+ public abstract sealed class LongFloatMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(long key);
+ method public final boolean containsKey(long key);
+ method public final boolean containsValue(float value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final operator float get(long key);
+ method public final int getCapacity();
+ method public final float getOrDefault(long key, float defaultValue);
+ method public final inline float getOrElse(long key, kotlin.jvm.functions.Function0<java.lang.Float> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property public final int size;
+ }
+
+ public final class LongFloatMapKt {
+ method public static inline androidx.collection.LongFloatMap buildLongFloatMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongFloatMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.LongFloatMap buildLongFloatMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongFloatMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.LongFloatMap emptyLongFloatMap();
+ method public static androidx.collection.LongFloatMap longFloatMapOf();
+ method public static androidx.collection.LongFloatMap longFloatMapOf(long key1, float value1);
+ method public static androidx.collection.LongFloatMap longFloatMapOf(long key1, float value1, long key2, float value2);
+ method public static androidx.collection.LongFloatMap longFloatMapOf(long key1, float value1, long key2, float value2, long key3, float value3);
+ method public static androidx.collection.LongFloatMap longFloatMapOf(long key1, float value1, long key2, float value2, long key3, float value3, long key4, float value4);
+ method public static androidx.collection.LongFloatMap longFloatMapOf(long key1, float value1, long key2, float value2, long key3, float value3, long key4, float value4, long key5, float value5);
+ method public static androidx.collection.MutableLongFloatMap mutableLongFloatMapOf();
+ method public static androidx.collection.MutableLongFloatMap mutableLongFloatMapOf(long key1, float value1);
+ method public static androidx.collection.MutableLongFloatMap mutableLongFloatMapOf(long key1, float value1, long key2, float value2);
+ method public static androidx.collection.MutableLongFloatMap mutableLongFloatMapOf(long key1, float value1, long key2, float value2, long key3, float value3);
+ method public static androidx.collection.MutableLongFloatMap mutableLongFloatMapOf(long key1, float value1, long key2, float value2, long key3, float value3, long key4, float value4);
+ method public static androidx.collection.MutableLongFloatMap mutableLongFloatMapOf(long key1, float value1, long key2, float value2, long key3, float value3, long key4, float value4, long key5, float value5);
+ }
+
+ public abstract sealed class LongIntMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(long key);
+ method public final boolean containsKey(long key);
+ method public final boolean containsValue(int value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final operator int get(long key);
+ method public final int getCapacity();
+ method public final int getOrDefault(long key, int defaultValue);
+ method public final inline int getOrElse(long key, kotlin.jvm.functions.Function0<java.lang.Integer> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property public final int size;
+ }
+
+ public final class LongIntMapKt {
+ method public static inline androidx.collection.LongIntMap buildLongIntMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongIntMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.LongIntMap buildLongIntMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongIntMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.LongIntMap emptyLongIntMap();
+ method public static androidx.collection.LongIntMap longIntMapOf();
+ method public static androidx.collection.LongIntMap longIntMapOf(long key1, int value1);
+ method public static androidx.collection.LongIntMap longIntMapOf(long key1, int value1, long key2, int value2);
+ method public static androidx.collection.LongIntMap longIntMapOf(long key1, int value1, long key2, int value2, long key3, int value3);
+ method public static androidx.collection.LongIntMap longIntMapOf(long key1, int value1, long key2, int value2, long key3, int value3, long key4, int value4);
+ method public static androidx.collection.LongIntMap longIntMapOf(long key1, int value1, long key2, int value2, long key3, int value3, long key4, int value4, long key5, int value5);
+ method public static androidx.collection.MutableLongIntMap mutableLongIntMapOf();
+ method public static androidx.collection.MutableLongIntMap mutableLongIntMapOf(long key1, int value1);
+ method public static androidx.collection.MutableLongIntMap mutableLongIntMapOf(long key1, int value1, long key2, int value2);
+ method public static androidx.collection.MutableLongIntMap mutableLongIntMapOf(long key1, int value1, long key2, int value2, long key3, int value3);
+ method public static androidx.collection.MutableLongIntMap mutableLongIntMapOf(long key1, int value1, long key2, int value2, long key3, int value3, long key4, int value4);
+ method public static androidx.collection.MutableLongIntMap mutableLongIntMapOf(long key1, int value1, long key2, int value2, long key3, int value3, long key4, int value4, long key5, int value5);
+ }
+
+ public abstract sealed class LongList {
+ method public final inline boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final int binarySearch(int element);
+ method public final int binarySearch(int element, optional int fromIndex);
+ method public final int binarySearch(int element, optional int fromIndex, optional int toIndex);
+ method public final operator boolean contains(long element);
+ method public final boolean containsAll(androidx.collection.LongList elements);
+ method public final inline int count();
+ method public final inline int count(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final long elementAt(@IntRange(from=0L) int index);
+ method public final inline long elementAtOrElse(@IntRange(from=0L) int index, kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Long> defaultValue);
+ method public final long first();
+ method public final inline long first(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline <R> R fold(R initial, kotlin.jvm.functions.Function2<? super R,? super java.lang.Long,? extends R> operation);
+ method public final inline <R> R foldIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super R,? super java.lang.Long,? extends R> operation);
+ method public final inline <R> R foldRight(R initial, kotlin.jvm.functions.Function2<? super java.lang.Long,? super R,? extends R> operation);
+ method public final inline <R> R foldRightIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super java.lang.Long,? super R,? extends R> operation);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachReversed(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachReversedIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,kotlin.Unit> block);
+ method public final operator long get(@IntRange(from=0L) int index);
+ method public final inline kotlin.ranges.IntRange getIndices();
+ method @IntRange(from=-1L) public final inline int getLastIndex();
+ method @IntRange(from=0L) public final inline int getSize();
+ method public final int indexOf(long element);
+ method public final inline int indexOfFirst(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline int indexOfLast(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline boolean isEmpty();
+ method public final inline boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final long last();
+ method public final inline long last(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final int lastIndexOf(long element);
+ method public final inline boolean none();
+ method public final inline boolean reversedAny(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ property public final inline kotlin.ranges.IntRange indices;
+ property @IntRange(from=-1L) public final inline int lastIndex;
+ property @IntRange(from=0L) public final inline int size;
+ }
+
+ public final class LongListKt {
+ method public static inline androidx.collection.LongList buildLongList(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongList,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.LongList buildLongList(kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongList,kotlin.Unit> builderAction);
+ method public static androidx.collection.LongList emptyLongList();
+ method public static androidx.collection.LongList longListOf();
+ method public static androidx.collection.LongList longListOf(long element1);
+ method public static androidx.collection.LongList longListOf(long element1, long element2);
+ method public static androidx.collection.LongList longListOf(long element1, long element2, long element3);
+ method public static androidx.collection.LongList longListOf(long... elements);
+ method public static inline androidx.collection.MutableLongList mutableLongListOf();
+ method public static androidx.collection.MutableLongList mutableLongListOf(long element1);
+ method public static androidx.collection.MutableLongList mutableLongListOf(long element1, long element2);
+ method public static androidx.collection.MutableLongList mutableLongListOf(long element1, long element2, long element3);
+ method public static inline androidx.collection.MutableLongList mutableLongListOf(long... elements);
+ }
+
+ public abstract sealed class LongLongMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(long key);
+ method public final boolean containsKey(long key);
+ method public final boolean containsValue(long value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final operator long get(long key);
+ method public final int getCapacity();
+ method public final long getOrDefault(long key, long defaultValue);
+ method public final inline long getOrElse(long key, kotlin.jvm.functions.Function0<java.lang.Long> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property public final int size;
+ }
+
+ public final class LongLongMapKt {
+ method public static inline androidx.collection.LongLongMap buildLongLongMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongLongMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.LongLongMap buildLongLongMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongLongMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.LongLongMap emptyLongLongMap();
+ method public static androidx.collection.LongLongMap longLongMapOf();
+ method public static androidx.collection.LongLongMap longLongMapOf(long key1, long value1);
+ method public static androidx.collection.LongLongMap longLongMapOf(long key1, long value1, long key2, long value2);
+ method public static androidx.collection.LongLongMap longLongMapOf(long key1, long value1, long key2, long value2, long key3, long value3);
+ method public static androidx.collection.LongLongMap longLongMapOf(long key1, long value1, long key2, long value2, long key3, long value3, long key4, long value4);
+ method public static androidx.collection.LongLongMap longLongMapOf(long key1, long value1, long key2, long value2, long key3, long value3, long key4, long value4, long key5, long value5);
+ method public static androidx.collection.MutableLongLongMap mutableLongLongMapOf();
+ method public static androidx.collection.MutableLongLongMap mutableLongLongMapOf(long key1, long value1);
+ method public static androidx.collection.MutableLongLongMap mutableLongLongMapOf(long key1, long value1, long key2, long value2);
+ method public static androidx.collection.MutableLongLongMap mutableLongLongMapOf(long key1, long value1, long key2, long value2, long key3, long value3);
+ method public static androidx.collection.MutableLongLongMap mutableLongLongMapOf(long key1, long value1, long key2, long value2, long key3, long value3, long key4, long value4);
+ method public static androidx.collection.MutableLongLongMap mutableLongLongMapOf(long key1, long value1, long key2, long value2, long key3, long value3, long key4, long value4, long key5, long value5);
+ }
+
+ public final class LongLongPair {
+ ctor public LongLongPair(long first, long second);
+ method public inline operator long component1();
+ method public inline operator long component2();
+ method public long getFirst();
+ method public long getSecond();
+ property public final long first;
+ property public final long second;
+ }
+
+ public abstract sealed class LongObjectMap<V> {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(long key);
+ method public final boolean containsKey(long key);
+ method public final boolean containsValue(V value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super V,kotlin.Unit> block);
+ method public final operator V? get(long key);
+ method public final int getCapacity();
+ method public final V getOrDefault(long key, V defaultValue);
+ method public final inline V getOrElse(long key, kotlin.jvm.functions.Function0<? extends V> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property public final int size;
+ }
+
+ public final class LongObjectMapKt {
+ method public static inline <V> androidx.collection.LongObjectMap<V> buildLongObjectMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongObjectMap<V>,kotlin.Unit> builderAction);
+ method public static inline <V> androidx.collection.LongObjectMap<V> buildLongObjectMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongObjectMap<V>,kotlin.Unit> builderAction);
+ method public static <V> androidx.collection.LongObjectMap<V> emptyLongObjectMap();
+ method public static <V> androidx.collection.LongObjectMap<V> longObjectMapOf();
+ method public static <V> androidx.collection.LongObjectMap<V> longObjectMapOf(long key1, V value1);
+ method public static <V> androidx.collection.LongObjectMap<V> longObjectMapOf(long key1, V value1, long key2, V value2);
+ method public static <V> androidx.collection.LongObjectMap<V> longObjectMapOf(long key1, V value1, long key2, V value2, long key3, V value3);
+ method public static <V> androidx.collection.LongObjectMap<V> longObjectMapOf(long key1, V value1, long key2, V value2, long key3, V value3, long key4, V value4);
+ method public static <V> androidx.collection.LongObjectMap<V> longObjectMapOf(long key1, V value1, long key2, V value2, long key3, V value3, long key4, V value4, long key5, V value5);
+ method public static <V> androidx.collection.MutableLongObjectMap<V> mutableLongObjectMapOf();
+ method public static <V> androidx.collection.MutableLongObjectMap<V> mutableLongObjectMapOf(long key1, V value1);
+ method public static <V> androidx.collection.MutableLongObjectMap<V> mutableLongObjectMapOf(long key1, V value1, long key2, V value2);
+ method public static <V> androidx.collection.MutableLongObjectMap<V> mutableLongObjectMapOf(long key1, V value1, long key2, V value2, long key3, V value3);
+ method public static <V> androidx.collection.MutableLongObjectMap<V> mutableLongObjectMapOf(long key1, V value1, long key2, V value2, long key3, V value3, long key4, V value4);
+ method public static <V> androidx.collection.MutableLongObjectMap<V> mutableLongObjectMapOf(long key1, V value1, long key2, V value2, long key3, V value3, long key4, V value4, long key5, V value5);
+ }
+
+ public abstract sealed class LongSet {
+ method public final inline boolean all(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final operator boolean contains(long element);
+ method @IntRange(from=0L) public final int count();
+ method @IntRange(from=0L) public final inline int count(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline long first();
+ method public final inline long first(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method @IntRange(from=0L) public final int getCapacity();
+ method @IntRange(from=0L) public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property @IntRange(from=0L) public final int capacity;
+ property @IntRange(from=0L) public final int size;
+ }
+
+ public final class LongSetKt {
+ method public static inline androidx.collection.LongSet buildLongSet(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongSet,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.LongSet buildLongSet(kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongSet,kotlin.Unit> builderAction);
+ method public static androidx.collection.LongSet emptyLongSet();
+ method public static androidx.collection.LongSet longSetOf();
+ method public static androidx.collection.LongSet longSetOf(long element1);
+ method public static androidx.collection.LongSet longSetOf(long element1, long element2);
+ method public static androidx.collection.LongSet longSetOf(long element1, long element2, long element3);
+ method public static androidx.collection.LongSet longSetOf(long... elements);
+ method public static androidx.collection.MutableLongSet mutableLongSetOf();
+ method public static androidx.collection.MutableLongSet mutableLongSetOf(long element1);
+ method public static androidx.collection.MutableLongSet mutableLongSetOf(long element1, long element2);
+ method public static androidx.collection.MutableLongSet mutableLongSetOf(long element1, long element2, long element3);
+ method public static androidx.collection.MutableLongSet mutableLongSetOf(long... elements);
+ }
+
+ public class LongSparseArray<E> implements java.lang.Cloneable {
+ ctor public LongSparseArray();
+ ctor public LongSparseArray(optional int initialCapacity);
+ method public void append(long key, E value);
+ method public void clear();
+ method public androidx.collection.LongSparseArray<E> clone();
+ method public boolean containsKey(long key);
+ method public boolean containsValue(E value);
+ method @Deprecated public void delete(long key);
+ method public operator E? get(long key);
+ method public E get(long key, E defaultValue);
+ method public int indexOfKey(long key);
+ method public int indexOfValue(E value);
+ method public boolean isEmpty();
+ method public long keyAt(int index);
+ method public void put(long key, E value);
+ method public void putAll(androidx.collection.LongSparseArray<? extends E> other);
+ method public E? putIfAbsent(long key, E value);
+ method public void remove(long key);
+ method public boolean remove(long key, E value);
+ method public void removeAt(int index);
+ method public E? replace(long key, E value);
+ method public boolean replace(long key, E oldValue, E newValue);
+ method public void setValueAt(int index, E value);
+ method public int size();
+ method public E valueAt(int index);
+ }
+
+ public final class LongSparseArrayKt {
+ method public static inline operator <T> boolean contains(androidx.collection.LongSparseArray<T>, long key);
+ method public static inline <T> void forEach(androidx.collection.LongSparseArray<T>, kotlin.jvm.functions.Function2<? super java.lang.Long,? super T,kotlin.Unit> action);
+ method public static inline <T> T getOrDefault(androidx.collection.LongSparseArray<T>, long key, T defaultValue);
+ method public static inline <T> T getOrElse(androidx.collection.LongSparseArray<T>, long key, kotlin.jvm.functions.Function0<? extends T> defaultValue);
+ method public static inline <T> int getSize(androidx.collection.LongSparseArray<T>);
+ method public static inline <T> boolean isNotEmpty(androidx.collection.LongSparseArray<T>);
+ method public static <T> kotlin.collections.LongIterator keyIterator(androidx.collection.LongSparseArray<T>);
+ method public static operator <T> androidx.collection.LongSparseArray<T> plus(androidx.collection.LongSparseArray<T>, androidx.collection.LongSparseArray<T> other);
+ method @Deprecated public static <T> boolean remove(androidx.collection.LongSparseArray<T>, long key, T value);
+ method public static inline operator <T> void set(androidx.collection.LongSparseArray<T>, long key, T value);
+ method public static <T> java.util.Iterator<T> valueIterator(androidx.collection.LongSparseArray<T>);
+ }
+
+ public class LruCache<K, V> {
+ ctor public LruCache(@IntRange(from=1L, to=androidx.collection.LruCacheKt.MAX_SIZE) int maxSize);
+ method protected V? create(K key);
+ method public final int createCount();
+ method protected void entryRemoved(boolean evicted, K key, V oldValue, V? newValue);
+ method public final void evictAll();
+ method public final int evictionCount();
+ method public final operator V? get(K key);
+ method public final int hitCount();
+ method public final int maxSize();
+ method public final int missCount();
+ method public final V? put(K key, V value);
+ method public final int putCount();
+ method public final V? remove(K key);
+ method public void resize(@IntRange(from=1L, to=androidx.collection.LruCacheKt.MAX_SIZE) int maxSize);
+ method public final int size();
+ method protected int sizeOf(K key, V value);
+ method public final java.util.Map<K,V> snapshot();
+ method public void trimToSize(int maxSize);
+ }
+
+ public final class LruCacheKt {
+ method public static inline <K, V> androidx.collection.LruCache<K,V> lruCache(int maxSize, optional kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Integer> sizeOf, optional kotlin.jvm.functions.Function1<? super K,? extends V?> create, optional kotlin.jvm.functions.Function4<? super java.lang.Boolean,? super K,? super V,? super V?,kotlin.Unit> onEntryRemoved);
+ }
+
+ public final class MutableDoubleList extends androidx.collection.DoubleList {
+ ctor public MutableDoubleList();
+ ctor public MutableDoubleList(optional int initialCapacity);
+ method public boolean add(double element);
+ method public void add(@IntRange(from=0L) int index, double element);
+ method public inline boolean addAll(androidx.collection.DoubleList elements);
+ method public inline boolean addAll(double[] elements);
+ method public boolean addAll(@IntRange(from=0L) int index, androidx.collection.DoubleList elements);
+ method public boolean addAll(@IntRange(from=0L) int index, double[] elements);
+ method public void clear();
+ method public void ensureCapacity(int capacity);
+ method public inline int getCapacity();
+ method public operator void minusAssign(androidx.collection.DoubleList elements);
+ method public inline operator void minusAssign(double element);
+ method public operator void minusAssign(double[] elements);
+ method public inline operator void plusAssign(androidx.collection.DoubleList elements);
+ method public inline operator void plusAssign(double element);
+ method public inline operator void plusAssign(double[] elements);
+ method public boolean remove(double element);
+ method public boolean removeAll(androidx.collection.DoubleList elements);
+ method public boolean removeAll(double[] elements);
+ method public double removeAt(@IntRange(from=0L) int index);
+ method public void removeRange(@IntRange(from=0L) int start, @IntRange(from=0L) int end);
+ method public boolean retainAll(androidx.collection.DoubleList elements);
+ method public boolean retainAll(double[] elements);
+ method public operator double set(@IntRange(from=0L) int index, double element);
+ method public void sort();
+ method public void sortDescending();
+ method public void trim(optional int minCapacity);
+ property public final inline int capacity;
+ }
+
+ public final class MutableFloatFloatMap extends androidx.collection.FloatFloatMap {
+ ctor public MutableFloatFloatMap();
+ ctor public MutableFloatFloatMap(optional int initialCapacity);
+ method public void clear();
+ method public inline float getOrPut(float key, kotlin.jvm.functions.Function0<java.lang.Float> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.FloatList keys);
+ method public inline operator void minusAssign(androidx.collection.FloatSet keys);
+ method public inline operator void minusAssign(float key);
+ method public inline operator void minusAssign(float[] keys);
+ method public inline operator void plusAssign(androidx.collection.FloatFloatMap from);
+ method public void put(float key, float value);
+ method public float put(float key, float value, float default);
+ method public void putAll(androidx.collection.FloatFloatMap from);
+ method public void remove(float key);
+ method public boolean remove(float key, float value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public operator void set(float key, float value);
+ method public int trim();
+ }
+
+ public final class MutableFloatIntMap extends androidx.collection.FloatIntMap {
+ ctor public MutableFloatIntMap();
+ ctor public MutableFloatIntMap(optional int initialCapacity);
+ method public void clear();
+ method public inline int getOrPut(float key, kotlin.jvm.functions.Function0<java.lang.Integer> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.FloatList keys);
+ method public inline operator void minusAssign(androidx.collection.FloatSet keys);
+ method public inline operator void minusAssign(float key);
+ method public inline operator void minusAssign(float[] keys);
+ method public inline operator void plusAssign(androidx.collection.FloatIntMap from);
+ method public void put(float key, int value);
+ method public int put(float key, int value, int default);
+ method public void putAll(androidx.collection.FloatIntMap from);
+ method public void remove(float key);
+ method public boolean remove(float key, int value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public operator void set(float key, int value);
+ method public int trim();
+ }
+
+ public final class MutableFloatList extends androidx.collection.FloatList {
+ ctor public MutableFloatList();
+ ctor public MutableFloatList(optional int initialCapacity);
+ method public boolean add(float element);
+ method public void add(@IntRange(from=0L) int index, float element);
+ method public inline boolean addAll(androidx.collection.FloatList elements);
+ method public inline boolean addAll(float[] elements);
+ method public boolean addAll(@IntRange(from=0L) int index, androidx.collection.FloatList elements);
+ method public boolean addAll(@IntRange(from=0L) int index, float[] elements);
+ method public void clear();
+ method public void ensureCapacity(int capacity);
+ method public inline int getCapacity();
+ method public operator void minusAssign(androidx.collection.FloatList elements);
+ method public inline operator void minusAssign(float element);
+ method public operator void minusAssign(float[] elements);
+ method public inline operator void plusAssign(androidx.collection.FloatList elements);
+ method public inline operator void plusAssign(float element);
+ method public inline operator void plusAssign(float[] elements);
+ method public boolean remove(float element);
+ method public boolean removeAll(androidx.collection.FloatList elements);
+ method public boolean removeAll(float[] elements);
+ method public float removeAt(@IntRange(from=0L) int index);
+ method public void removeRange(@IntRange(from=0L) int start, @IntRange(from=0L) int end);
+ method public boolean retainAll(androidx.collection.FloatList elements);
+ method public boolean retainAll(float[] elements);
+ method public operator float set(@IntRange(from=0L) int index, float element);
+ method public void sort();
+ method public void sortDescending();
+ method public void trim(optional int minCapacity);
+ property public final inline int capacity;
+ }
+
+ public final class MutableFloatLongMap extends androidx.collection.FloatLongMap {
+ ctor public MutableFloatLongMap();
+ ctor public MutableFloatLongMap(optional int initialCapacity);
+ method public void clear();
+ method public inline long getOrPut(float key, kotlin.jvm.functions.Function0<java.lang.Long> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.FloatList keys);
+ method public inline operator void minusAssign(androidx.collection.FloatSet keys);
+ method public inline operator void minusAssign(float key);
+ method public inline operator void minusAssign(float[] keys);
+ method public inline operator void plusAssign(androidx.collection.FloatLongMap from);
+ method public void put(float key, long value);
+ method public long put(float key, long value, long default);
+ method public void putAll(androidx.collection.FloatLongMap from);
+ method public void remove(float key);
+ method public boolean remove(float key, long value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public operator void set(float key, long value);
+ method public int trim();
+ }
+
+ public final class MutableFloatObjectMap<V> extends androidx.collection.FloatObjectMap<V> {
+ ctor public MutableFloatObjectMap();
+ ctor public MutableFloatObjectMap(optional int initialCapacity);
+ method public void clear();
+ method public inline V getOrPut(float key, kotlin.jvm.functions.Function0<? extends V> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.FloatList keys);
+ method public inline operator void minusAssign(androidx.collection.FloatSet keys);
+ method public inline operator void minusAssign(float key);
+ method public inline operator void minusAssign(float[] keys);
+ method public inline operator void plusAssign(androidx.collection.FloatObjectMap<V> from);
+ method public V? put(float key, V value);
+ method public void putAll(androidx.collection.FloatObjectMap<V> from);
+ method public V? remove(float key);
+ method public boolean remove(float key, V value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,java.lang.Boolean> predicate);
+ method public operator void set(float key, V value);
+ method public int trim();
+ }
+
+ public final class MutableFloatSet extends androidx.collection.FloatSet {
+ ctor public MutableFloatSet();
+ ctor public MutableFloatSet(optional int initialCapacity);
+ method public boolean add(float element);
+ method public boolean addAll(androidx.collection.FloatSet elements);
+ method public boolean addAll(float[] elements);
+ method public void clear();
+ method public operator void minusAssign(androidx.collection.FloatSet elements);
+ method public operator void minusAssign(float element);
+ method public operator void minusAssign(float[] elements);
+ method public operator void plusAssign(androidx.collection.FloatSet elements);
+ method public operator void plusAssign(float element);
+ method public operator void plusAssign(float[] elements);
+ method public boolean remove(float element);
+ method public boolean removeAll(androidx.collection.FloatSet elements);
+ method public boolean removeAll(float[] elements);
+ method @IntRange(from=0L) public int trim();
+ }
+
+ public final class MutableIntFloatMap extends androidx.collection.IntFloatMap {
+ ctor public MutableIntFloatMap();
+ ctor public MutableIntFloatMap(optional int initialCapacity);
+ method public void clear();
+ method public inline float getOrPut(int key, kotlin.jvm.functions.Function0<java.lang.Float> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.IntList keys);
+ method public inline operator void minusAssign(androidx.collection.IntSet keys);
+ method public inline operator void minusAssign(int key);
+ method public inline operator void minusAssign(int[] keys);
+ method public inline operator void plusAssign(androidx.collection.IntFloatMap from);
+ method public void put(int key, float value);
+ method public float put(int key, float value, float default);
+ method public void putAll(androidx.collection.IntFloatMap from);
+ method public void remove(int key);
+ method public boolean remove(int key, float value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public operator void set(int key, float value);
+ method public int trim();
+ }
+
+ public final class MutableIntIntMap extends androidx.collection.IntIntMap {
+ ctor public MutableIntIntMap();
+ ctor public MutableIntIntMap(optional int initialCapacity);
+ method public void clear();
+ method public inline int getOrPut(int key, kotlin.jvm.functions.Function0<java.lang.Integer> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.IntList keys);
+ method public inline operator void minusAssign(androidx.collection.IntSet keys);
+ method public inline operator void minusAssign(int key);
+ method public inline operator void minusAssign(int[] keys);
+ method public inline operator void plusAssign(androidx.collection.IntIntMap from);
+ method public void put(int key, int value);
+ method public int put(int key, int value, int default);
+ method public void putAll(androidx.collection.IntIntMap from);
+ method public void remove(int key);
+ method public boolean remove(int key, int value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public operator void set(int key, int value);
+ method public int trim();
+ }
+
+ public final class MutableIntList extends androidx.collection.IntList {
+ ctor public MutableIntList();
+ ctor public MutableIntList(optional int initialCapacity);
+ method public boolean add(int element);
+ method public void add(@IntRange(from=0L) int index, int element);
+ method public inline boolean addAll(androidx.collection.IntList elements);
+ method public boolean addAll(@IntRange(from=0L) int index, androidx.collection.IntList elements);
+ method public boolean addAll(@IntRange(from=0L) int index, int[] elements);
+ method public inline boolean addAll(int[] elements);
+ method public void clear();
+ method public void ensureCapacity(int capacity);
+ method public inline int getCapacity();
+ method public operator void minusAssign(androidx.collection.IntList elements);
+ method public inline operator void minusAssign(int element);
+ method public operator void minusAssign(int[] elements);
+ method public inline operator void plusAssign(androidx.collection.IntList elements);
+ method public inline operator void plusAssign(int element);
+ method public inline operator void plusAssign(int[] elements);
+ method public boolean remove(int element);
+ method public boolean removeAll(androidx.collection.IntList elements);
+ method public boolean removeAll(int[] elements);
+ method public int removeAt(@IntRange(from=0L) int index);
+ method public void removeRange(@IntRange(from=0L) int start, @IntRange(from=0L) int end);
+ method public boolean retainAll(androidx.collection.IntList elements);
+ method public boolean retainAll(int[] elements);
+ method public operator int set(@IntRange(from=0L) int index, int element);
+ method public void sort();
+ method public void sortDescending();
+ method public void trim(optional int minCapacity);
+ property public final inline int capacity;
+ }
+
+ public final class MutableIntLongMap extends androidx.collection.IntLongMap {
+ ctor public MutableIntLongMap();
+ ctor public MutableIntLongMap(optional int initialCapacity);
+ method public void clear();
+ method public inline long getOrPut(int key, kotlin.jvm.functions.Function0<java.lang.Long> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.IntList keys);
+ method public inline operator void minusAssign(androidx.collection.IntSet keys);
+ method public inline operator void minusAssign(int key);
+ method public inline operator void minusAssign(int[] keys);
+ method public inline operator void plusAssign(androidx.collection.IntLongMap from);
+ method public void put(int key, long value);
+ method public long put(int key, long value, long default);
+ method public void putAll(androidx.collection.IntLongMap from);
+ method public void remove(int key);
+ method public boolean remove(int key, long value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public operator void set(int key, long value);
+ method public int trim();
+ }
+
+ public final class MutableIntObjectMap<V> extends androidx.collection.IntObjectMap<V> {
+ ctor public MutableIntObjectMap();
+ ctor public MutableIntObjectMap(optional int initialCapacity);
+ method public void clear();
+ method public inline V getOrPut(int key, kotlin.jvm.functions.Function0<? extends V> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.IntList keys);
+ method public inline operator void minusAssign(androidx.collection.IntSet keys);
+ method public inline operator void minusAssign(int key);
+ method public inline operator void minusAssign(int[] keys);
+ method public inline operator void plusAssign(androidx.collection.IntObjectMap<V> from);
+ method public V? put(int key, V value);
+ method public void putAll(androidx.collection.IntObjectMap<V> from);
+ method public V? remove(int key);
+ method public boolean remove(int key, V value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,java.lang.Boolean> predicate);
+ method public operator void set(int key, V value);
+ method public int trim();
+ }
+
+ public final class MutableIntSet extends androidx.collection.IntSet {
+ ctor public MutableIntSet();
+ ctor public MutableIntSet(optional int initialCapacity);
+ method public boolean add(int element);
+ method public boolean addAll(androidx.collection.IntSet elements);
+ method public boolean addAll(int[] elements);
+ method public void clear();
+ method public operator void minusAssign(androidx.collection.IntSet elements);
+ method public operator void minusAssign(int element);
+ method public operator void minusAssign(int[] elements);
+ method public operator void plusAssign(androidx.collection.IntSet elements);
+ method public operator void plusAssign(int element);
+ method public operator void plusAssign(int[] elements);
+ method public boolean remove(int element);
+ method public boolean removeAll(androidx.collection.IntSet elements);
+ method public boolean removeAll(int[] elements);
+ method @IntRange(from=0L) public int trim();
+ }
+
+ public final class MutableLongFloatMap extends androidx.collection.LongFloatMap {
+ ctor public MutableLongFloatMap();
+ ctor public MutableLongFloatMap(optional int initialCapacity);
+ method public void clear();
+ method public inline float getOrPut(long key, kotlin.jvm.functions.Function0<java.lang.Float> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.LongList keys);
+ method public inline operator void minusAssign(androidx.collection.LongSet keys);
+ method public inline operator void minusAssign(long key);
+ method public inline operator void minusAssign(long[] keys);
+ method public inline operator void plusAssign(androidx.collection.LongFloatMap from);
+ method public void put(long key, float value);
+ method public float put(long key, float value, float default);
+ method public void putAll(androidx.collection.LongFloatMap from);
+ method public void remove(long key);
+ method public boolean remove(long key, float value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public operator void set(long key, float value);
+ method public int trim();
+ }
+
+ public final class MutableLongIntMap extends androidx.collection.LongIntMap {
+ ctor public MutableLongIntMap();
+ ctor public MutableLongIntMap(optional int initialCapacity);
+ method public void clear();
+ method public inline int getOrPut(long key, kotlin.jvm.functions.Function0<java.lang.Integer> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.LongList keys);
+ method public inline operator void minusAssign(androidx.collection.LongSet keys);
+ method public inline operator void minusAssign(long key);
+ method public inline operator void minusAssign(long[] keys);
+ method public inline operator void plusAssign(androidx.collection.LongIntMap from);
+ method public void put(long key, int value);
+ method public int put(long key, int value, int default);
+ method public void putAll(androidx.collection.LongIntMap from);
+ method public void remove(long key);
+ method public boolean remove(long key, int value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public operator void set(long key, int value);
+ method public int trim();
+ }
+
+ public final class MutableLongList extends androidx.collection.LongList {
+ ctor public MutableLongList();
+ ctor public MutableLongList(optional int initialCapacity);
+ method public void add(@IntRange(from=0L) int index, long element);
+ method public boolean add(long element);
+ method public inline boolean addAll(androidx.collection.LongList elements);
+ method public boolean addAll(@IntRange(from=0L) int index, androidx.collection.LongList elements);
+ method public boolean addAll(@IntRange(from=0L) int index, long[] elements);
+ method public inline boolean addAll(long[] elements);
+ method public void clear();
+ method public void ensureCapacity(int capacity);
+ method public inline int getCapacity();
+ method public operator void minusAssign(androidx.collection.LongList elements);
+ method public inline operator void minusAssign(long element);
+ method public operator void minusAssign(long[] elements);
+ method public inline operator void plusAssign(androidx.collection.LongList elements);
+ method public inline operator void plusAssign(long element);
+ method public inline operator void plusAssign(long[] elements);
+ method public boolean remove(long element);
+ method public boolean removeAll(androidx.collection.LongList elements);
+ method public boolean removeAll(long[] elements);
+ method public long removeAt(@IntRange(from=0L) int index);
+ method public void removeRange(@IntRange(from=0L) int start, @IntRange(from=0L) int end);
+ method public boolean retainAll(androidx.collection.LongList elements);
+ method public boolean retainAll(long[] elements);
+ method public operator long set(@IntRange(from=0L) int index, long element);
+ method public void sort();
+ method public void sortDescending();
+ method public void trim(optional int minCapacity);
+ property public final inline int capacity;
+ }
+
+ public final class MutableLongLongMap extends androidx.collection.LongLongMap {
+ ctor public MutableLongLongMap();
+ ctor public MutableLongLongMap(optional int initialCapacity);
+ method public void clear();
+ method public inline long getOrPut(long key, kotlin.jvm.functions.Function0<java.lang.Long> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.LongList keys);
+ method public inline operator void minusAssign(androidx.collection.LongSet keys);
+ method public inline operator void minusAssign(long key);
+ method public inline operator void minusAssign(long[] keys);
+ method public inline operator void plusAssign(androidx.collection.LongLongMap from);
+ method public void put(long key, long value);
+ method public long put(long key, long value, long default);
+ method public void putAll(androidx.collection.LongLongMap from);
+ method public void remove(long key);
+ method public boolean remove(long key, long value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public operator void set(long key, long value);
+ method public int trim();
+ }
+
+ public final class MutableLongObjectMap<V> extends androidx.collection.LongObjectMap<V> {
+ ctor public MutableLongObjectMap();
+ ctor public MutableLongObjectMap(optional int initialCapacity);
+ method public void clear();
+ method public inline V getOrPut(long key, kotlin.jvm.functions.Function0<? extends V> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.LongList keys);
+ method public inline operator void minusAssign(androidx.collection.LongSet keys);
+ method public inline operator void minusAssign(long key);
+ method public inline operator void minusAssign(long[] keys);
+ method public inline operator void plusAssign(androidx.collection.LongObjectMap<V> from);
+ method public V? put(long key, V value);
+ method public void putAll(androidx.collection.LongObjectMap<V> from);
+ method public V? remove(long key);
+ method public boolean remove(long key, V value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,java.lang.Boolean> predicate);
+ method public operator void set(long key, V value);
+ method public int trim();
+ }
+
+ public final class MutableLongSet extends androidx.collection.LongSet {
+ ctor public MutableLongSet();
+ ctor public MutableLongSet(optional int initialCapacity);
+ method public boolean add(long element);
+ method public boolean addAll(androidx.collection.LongSet elements);
+ method public boolean addAll(long[] elements);
+ method public void clear();
+ method public operator void minusAssign(androidx.collection.LongSet elements);
+ method public operator void minusAssign(long element);
+ method public operator void minusAssign(long[] elements);
+ method public operator void plusAssign(androidx.collection.LongSet elements);
+ method public operator void plusAssign(long element);
+ method public operator void plusAssign(long[] elements);
+ method public boolean remove(long element);
+ method public boolean removeAll(androidx.collection.LongSet elements);
+ method public boolean removeAll(long[] elements);
+ method @IntRange(from=0L) public int trim();
+ }
+
+ public final class MutableObjectFloatMap<K> extends androidx.collection.ObjectFloatMap<K> {
+ ctor public MutableObjectFloatMap();
+ ctor public MutableObjectFloatMap(optional int initialCapacity);
+ method public void clear();
+ method public inline float getOrPut(K key, kotlin.jvm.functions.Function0<java.lang.Float> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.ScatterSet<K> keys);
+ method public inline operator void minusAssign(Iterable<? extends K> keys);
+ method public inline operator void minusAssign(K key);
+ method public inline operator void minusAssign(K[] keys);
+ method public inline operator void minusAssign(kotlin.sequences.Sequence<? extends K> keys);
+ method public inline operator void plusAssign(androidx.collection.ObjectFloatMap<K> from);
+ method public void put(K key, float value);
+ method public float put(K key, float value, float default);
+ method public void putAll(androidx.collection.ObjectFloatMap<K> from);
+ method public void remove(K key);
+ method public boolean remove(K key, float value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public operator void set(K key, float value);
+ method public int trim();
+ }
+
+ public final class MutableObjectIntMap<K> extends androidx.collection.ObjectIntMap<K> {
+ ctor public MutableObjectIntMap();
+ ctor public MutableObjectIntMap(optional int initialCapacity);
+ method public void clear();
+ method public inline int getOrPut(K key, kotlin.jvm.functions.Function0<java.lang.Integer> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.ScatterSet<K> keys);
+ method public inline operator void minusAssign(Iterable<? extends K> keys);
+ method public inline operator void minusAssign(K key);
+ method public inline operator void minusAssign(K[] keys);
+ method public inline operator void minusAssign(kotlin.sequences.Sequence<? extends K> keys);
+ method public inline operator void plusAssign(androidx.collection.ObjectIntMap<K> from);
+ method public void put(K key, int value);
+ method public int put(K key, int value, int default);
+ method public void putAll(androidx.collection.ObjectIntMap<K> from);
+ method public void remove(K key);
+ method public boolean remove(K key, int value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public operator void set(K key, int value);
+ method public int trim();
+ }
+
+ public final class MutableObjectList<E> extends androidx.collection.ObjectList<E> {
+ ctor public MutableObjectList();
+ ctor public MutableObjectList(optional int initialCapacity);
+ method public boolean add(E element);
+ method public void add(@IntRange(from=0L) int index, E element);
+ method public boolean addAll(androidx.collection.ObjectList<E> elements);
+ method public boolean addAll(androidx.collection.ScatterSet<E> elements);
+ method public boolean addAll(E[] elements);
+ method public boolean addAll(@IntRange(from=0L) int index, androidx.collection.ObjectList<E> elements);
+ method public boolean addAll(@IntRange(from=0L) int index, E[] elements);
+ method public boolean addAll(@IntRange(from=0L) int index, java.util.Collection<? extends E> elements);
+ method public boolean addAll(Iterable<? extends E> elements);
+ method public boolean addAll(java.util.List<? extends E> elements);
+ method public boolean addAll(kotlin.sequences.Sequence<? extends E> elements);
+ method public java.util.List<E> asList();
+ method public java.util.List<E> asMutableList();
+ method public void clear();
+ method public inline void ensureCapacity(int capacity);
+ method public inline int getCapacity();
+ method public operator void minusAssign(androidx.collection.ObjectList<E> elements);
+ method public operator void minusAssign(androidx.collection.ScatterSet<E> elements);
+ method public inline operator void minusAssign(E element);
+ method public operator void minusAssign(E[] elements);
+ method public operator void minusAssign(Iterable<? extends E> elements);
+ method public operator void minusAssign(java.util.List<? extends E> elements);
+ method public operator void minusAssign(kotlin.sequences.Sequence<? extends E> elements);
+ method public operator void plusAssign(androidx.collection.ObjectList<E> elements);
+ method public operator void plusAssign(androidx.collection.ScatterSet<E> elements);
+ method public inline operator void plusAssign(E element);
+ method public operator void plusAssign(E[] elements);
+ method public operator void plusAssign(Iterable<? extends E> elements);
+ method public operator void plusAssign(java.util.List<? extends E> elements);
+ method public operator void plusAssign(kotlin.sequences.Sequence<? extends E> elements);
+ method public boolean remove(E element);
+ method public boolean removeAll(androidx.collection.ObjectList<E> elements);
+ method public boolean removeAll(androidx.collection.ScatterSet<E> elements);
+ method public boolean removeAll(E[] elements);
+ method public boolean removeAll(Iterable<? extends E> elements);
+ method public boolean removeAll(java.util.List<? extends E> elements);
+ method public boolean removeAll(kotlin.sequences.Sequence<? extends E> elements);
+ method public E removeAt(@IntRange(from=0L) int index);
+ method public inline void removeIf(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public void removeRange(@IntRange(from=0L) int start, @IntRange(from=0L) int end);
+ method public boolean retainAll(androidx.collection.ObjectList<E> elements);
+ method public boolean retainAll(E[] elements);
+ method public boolean retainAll(Iterable<? extends E> elements);
+ method public boolean retainAll(java.util.Collection<? extends E> elements);
+ method public boolean retainAll(kotlin.sequences.Sequence<? extends E> elements);
+ method public operator E set(@IntRange(from=0L) int index, E element);
+ method public void trim(optional int minCapacity);
+ property public final inline int capacity;
+ }
+
+ public final class MutableObjectLongMap<K> extends androidx.collection.ObjectLongMap<K> {
+ ctor public MutableObjectLongMap();
+ ctor public MutableObjectLongMap(optional int initialCapacity);
+ method public void clear();
+ method public inline long getOrPut(K key, kotlin.jvm.functions.Function0<java.lang.Long> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.ScatterSet<K> keys);
+ method public inline operator void minusAssign(Iterable<? extends K> keys);
+ method public inline operator void minusAssign(K key);
+ method public inline operator void minusAssign(K[] keys);
+ method public inline operator void minusAssign(kotlin.sequences.Sequence<? extends K> keys);
+ method public inline operator void plusAssign(androidx.collection.ObjectLongMap<K> from);
+ method public void put(K key, long value);
+ method public long put(K key, long value, long default);
+ method public void putAll(androidx.collection.ObjectLongMap<K> from);
+ method public void remove(K key);
+ method public boolean remove(K key, long value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public operator void set(K key, long value);
+ method public int trim();
+ }
+
+ public final class MutableOrderedScatterSet<E> extends androidx.collection.OrderedScatterSet<E> {
+ ctor public MutableOrderedScatterSet();
+ ctor public MutableOrderedScatterSet(optional int initialCapacity);
+ method public boolean add(E element);
+ method public boolean addAll(androidx.collection.ObjectList<E> elements);
+ method public boolean addAll(androidx.collection.OrderedScatterSet<E> elements);
+ method public boolean addAll(androidx.collection.ScatterSet<E> elements);
+ method public boolean addAll(E[] elements);
+ method public boolean addAll(Iterable<? extends E> elements);
+ method public boolean addAll(kotlin.sequences.Sequence<? extends E> elements);
+ method public java.util.Set<E> asMutableSet();
+ method public void clear();
+ method public operator void minusAssign(androidx.collection.ObjectList<E> elements);
+ method public operator void minusAssign(androidx.collection.OrderedScatterSet<E> elements);
+ method public operator void minusAssign(androidx.collection.ScatterSet<E> elements);
+ method public operator void minusAssign(E element);
+ method public operator void minusAssign(E[] elements);
+ method public operator void minusAssign(Iterable<? extends E> elements);
+ method public operator void minusAssign(kotlin.sequences.Sequence<? extends E> elements);
+ method public operator void plusAssign(androidx.collection.ObjectList<E> elements);
+ method public operator void plusAssign(androidx.collection.OrderedScatterSet<E> elements);
+ method public operator void plusAssign(androidx.collection.ScatterSet<E> elements);
+ method public operator void plusAssign(E element);
+ method public operator void plusAssign(E[] elements);
+ method public operator void plusAssign(Iterable<? extends E> elements);
+ method public operator void plusAssign(kotlin.sequences.Sequence<? extends E> elements);
+ method public boolean remove(E element);
+ method public boolean removeAll(androidx.collection.ObjectList<E> elements);
+ method public boolean removeAll(androidx.collection.OrderedScatterSet<E> elements);
+ method public boolean removeAll(androidx.collection.ScatterSet<E> elements);
+ method public boolean removeAll(E[] elements);
+ method public boolean removeAll(Iterable<? extends E> elements);
+ method public boolean removeAll(kotlin.sequences.Sequence<? extends E> elements);
+ method public inline void removeIf(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public boolean retainAll(androidx.collection.OrderedScatterSet<E> elements);
+ method public boolean retainAll(androidx.collection.ScatterSet<E> elements);
+ method public boolean retainAll(java.util.Collection<? extends E> elements);
+ method public inline boolean retainAll(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method @IntRange(from=0L) public int trim();
+ method public void trimToSize(int maxSize);
+ }
+
+ public final class MutableScatterMap<K, V> extends androidx.collection.ScatterMap<K,V> {
+ ctor public MutableScatterMap();
+ ctor public MutableScatterMap(optional int initialCapacity);
+ method public java.util.Map<K,V> asMutableMap();
+ method public void clear();
+ method public inline V compute(K key, kotlin.jvm.functions.Function2<? super K,? super V?,? extends V> computeBlock);
+ method public inline V getOrPut(K key, kotlin.jvm.functions.Function0<? extends V> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.ObjectList<K> keys);
+ method public inline operator void minusAssign(androidx.collection.ScatterSet<K> keys);
+ method public inline operator void minusAssign(Iterable<? extends K> keys);
+ method public inline operator void minusAssign(K key);
+ method public inline operator void minusAssign(K[] keys);
+ method public inline operator void minusAssign(kotlin.sequences.Sequence<? extends K> keys);
+ method public inline operator void plusAssign(androidx.collection.ScatterMap<K,V> from);
+ method public inline operator void plusAssign(Iterable<? extends kotlin.Pair<? extends K,? extends V>> pairs);
+ method public inline operator void plusAssign(java.util.Map<K,? extends V> from);
+ method public inline operator void plusAssign(kotlin.Pair<? extends K,? extends V> pair);
+ method public inline operator void plusAssign(kotlin.Pair<? extends K,? extends V>[] pairs);
+ method public inline operator void plusAssign(kotlin.sequences.Sequence<? extends kotlin.Pair<? extends K,? extends V>> pairs);
+ method public V? put(K key, V value);
+ method public void putAll(androidx.collection.ScatterMap<K,V> from);
+ method public void putAll(Iterable<? extends kotlin.Pair<? extends K,? extends V>> pairs);
+ method public void putAll(java.util.Map<K,? extends V> from);
+ method public void putAll(kotlin.Pair<? extends K,? extends V>[] pairs);
+ method public void putAll(kotlin.sequences.Sequence<? extends kotlin.Pair<? extends K,? extends V>> pairs);
+ method public V? remove(K key);
+ method public boolean remove(K key, V value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Boolean> predicate);
+ method public operator void set(K key, V value);
+ method public int trim();
+ }
+
+ public final class MutableScatterSet<E> extends androidx.collection.ScatterSet<E> {
+ ctor public MutableScatterSet();
+ ctor public MutableScatterSet(optional int initialCapacity);
+ method public boolean add(E element);
+ method public boolean addAll(androidx.collection.ObjectList<E> elements);
+ method public boolean addAll(androidx.collection.OrderedScatterSet<E> elements);
+ method public boolean addAll(androidx.collection.ScatterSet<E> elements);
+ method public boolean addAll(E[] elements);
+ method public boolean addAll(Iterable<? extends E> elements);
+ method public boolean addAll(kotlin.sequences.Sequence<? extends E> elements);
+ method public java.util.Set<E> asMutableSet();
+ method public void clear();
+ method public operator void minusAssign(androidx.collection.ObjectList<E> elements);
+ method public operator void minusAssign(androidx.collection.OrderedScatterSet<E> elements);
+ method public operator void minusAssign(androidx.collection.ScatterSet<E> elements);
+ method public operator void minusAssign(E element);
+ method public operator void minusAssign(E[] elements);
+ method public operator void minusAssign(Iterable<? extends E> elements);
+ method public operator void minusAssign(kotlin.sequences.Sequence<? extends E> elements);
+ method public operator void plusAssign(androidx.collection.ObjectList<E> elements);
+ method public operator void plusAssign(androidx.collection.OrderedScatterSet<E> elements);
+ method public operator void plusAssign(androidx.collection.ScatterSet<E> elements);
+ method public operator void plusAssign(E element);
+ method public operator void plusAssign(E[] elements);
+ method public operator void plusAssign(Iterable<? extends E> elements);
+ method public operator void plusAssign(kotlin.sequences.Sequence<? extends E> elements);
+ method public boolean remove(E element);
+ method public boolean removeAll(androidx.collection.ObjectList<E> elements);
+ method public boolean removeAll(androidx.collection.OrderedScatterSet<E> elements);
+ method public boolean removeAll(androidx.collection.ScatterSet<E> elements);
+ method public boolean removeAll(E[] elements);
+ method public boolean removeAll(Iterable<? extends E> elements);
+ method public boolean removeAll(kotlin.sequences.Sequence<? extends E> elements);
+ method public inline void removeIf(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public boolean retainAll(androidx.collection.OrderedScatterSet<E> elements);
+ method public boolean retainAll(androidx.collection.ScatterSet<E> elements);
+ method public boolean retainAll(java.util.Collection<? extends E> elements);
+ method public boolean retainAll(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method @IntRange(from=0L) public int trim();
+ }
+
+ public abstract sealed class ObjectFloatMap<K> {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(K key);
+ method public final boolean containsKey(K key);
+ method public final boolean containsValue(float value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super K,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final operator float get(K key);
+ method public final int getCapacity();
+ method public final float getOrDefault(K key, float defaultValue);
+ method public final inline float getOrElse(K key, kotlin.jvm.functions.Function0<java.lang.Float> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property public final int size;
+ }
+
+ public final class ObjectFloatMapKt {
+ method public static inline <K> androidx.collection.ObjectFloatMap<K> buildObjectFloatMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableObjectFloatMap<K>,kotlin.Unit> builderAction);
+ method public static inline <K> androidx.collection.ObjectFloatMap<K> buildObjectFloatMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableObjectFloatMap<K>,kotlin.Unit> builderAction);
+ method public static <K> androidx.collection.ObjectFloatMap<K> emptyObjectFloatMap();
+ method public static <K> androidx.collection.MutableObjectFloatMap<K> mutableObjectFloatMapOf();
+ method public static <K> androidx.collection.MutableObjectFloatMap<K> mutableObjectFloatMapOf(K key1, float value1);
+ method public static <K> androidx.collection.MutableObjectFloatMap<K> mutableObjectFloatMapOf(K key1, float value1, K key2, float value2);
+ method public static <K> androidx.collection.MutableObjectFloatMap<K> mutableObjectFloatMapOf(K key1, float value1, K key2, float value2, K key3, float value3);
+ method public static <K> androidx.collection.MutableObjectFloatMap<K> mutableObjectFloatMapOf(K key1, float value1, K key2, float value2, K key3, float value3, K key4, float value4);
+ method public static <K> androidx.collection.MutableObjectFloatMap<K> mutableObjectFloatMapOf(K key1, float value1, K key2, float value2, K key3, float value3, K key4, float value4, K key5, float value5);
+ method public static <K> androidx.collection.ObjectFloatMap<K> objectFloatMap();
+ method public static <K> androidx.collection.ObjectFloatMap<K> objectFloatMapOf(K key1, float value1);
+ method public static <K> androidx.collection.ObjectFloatMap<K> objectFloatMapOf(K key1, float value1, K key2, float value2);
+ method public static <K> androidx.collection.ObjectFloatMap<K> objectFloatMapOf(K key1, float value1, K key2, float value2, K key3, float value3);
+ method public static <K> androidx.collection.ObjectFloatMap<K> objectFloatMapOf(K key1, float value1, K key2, float value2, K key3, float value3, K key4, float value4);
+ method public static <K> androidx.collection.ObjectFloatMap<K> objectFloatMapOf(K key1, float value1, K key2, float value2, K key3, float value3, K key4, float value4, K key5, float value5);
+ }
+
+ public abstract sealed class ObjectIntMap<K> {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(K key);
+ method public final boolean containsKey(K key);
+ method public final boolean containsValue(int value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super K,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final operator int get(K key);
+ method public final int getCapacity();
+ method public final int getOrDefault(K key, int defaultValue);
+ method public final inline int getOrElse(K key, kotlin.jvm.functions.Function0<java.lang.Integer> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property public final int size;
+ }
+
+ public final class ObjectIntMapKt {
+ method public static inline <K> androidx.collection.ObjectIntMap<K> buildObjectIntMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableObjectIntMap<K>,kotlin.Unit> builderAction);
+ method public static inline <K> androidx.collection.ObjectIntMap<K> buildObjectIntMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableObjectIntMap<K>,kotlin.Unit> builderAction);
+ method public static <K> androidx.collection.ObjectIntMap<K> emptyObjectIntMap();
+ method public static <K> androidx.collection.MutableObjectIntMap<K> mutableObjectIntMapOf();
+ method public static <K> androidx.collection.MutableObjectIntMap<K> mutableObjectIntMapOf(K key1, int value1);
+ method public static <K> androidx.collection.MutableObjectIntMap<K> mutableObjectIntMapOf(K key1, int value1, K key2, int value2);
+ method public static <K> androidx.collection.MutableObjectIntMap<K> mutableObjectIntMapOf(K key1, int value1, K key2, int value2, K key3, int value3);
+ method public static <K> androidx.collection.MutableObjectIntMap<K> mutableObjectIntMapOf(K key1, int value1, K key2, int value2, K key3, int value3, K key4, int value4);
+ method public static <K> androidx.collection.MutableObjectIntMap<K> mutableObjectIntMapOf(K key1, int value1, K key2, int value2, K key3, int value3, K key4, int value4, K key5, int value5);
+ method public static <K> androidx.collection.ObjectIntMap<K> objectIntMap();
+ method public static <K> androidx.collection.ObjectIntMap<K> objectIntMapOf(K key1, int value1);
+ method public static <K> androidx.collection.ObjectIntMap<K> objectIntMapOf(K key1, int value1, K key2, int value2);
+ method public static <K> androidx.collection.ObjectIntMap<K> objectIntMapOf(K key1, int value1, K key2, int value2, K key3, int value3);
+ method public static <K> androidx.collection.ObjectIntMap<K> objectIntMapOf(K key1, int value1, K key2, int value2, K key3, int value3, K key4, int value4);
+ method public static <K> androidx.collection.ObjectIntMap<K> objectIntMapOf(K key1, int value1, K key2, int value2, K key3, int value3, K key4, int value4, K key5, int value5);
+ }
+
+ public abstract sealed class ObjectList<E> {
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public abstract java.util.List<E> asList();
+ method public final operator boolean contains(E element);
+ method public final boolean containsAll(androidx.collection.ObjectList<E> elements);
+ method public final boolean containsAll(E[] elements);
+ method public final boolean containsAll(Iterable<? extends E> elements);
+ method public final boolean containsAll(java.util.List<? extends E> elements);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final E elementAt(@IntRange(from=0L) int index);
+ method public final inline E elementAtOrElse(@IntRange(from=0L) int index, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends E> defaultValue);
+ method public final E first();
+ method public final inline E first(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final inline E? firstOrNull();
+ method public final inline E? firstOrNull(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final inline <R> R fold(R initial, kotlin.jvm.functions.Function2<? super R,? super E,? extends R> operation);
+ method public final inline <R> R foldIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super R,? super E,? extends R> operation);
+ method public final inline <R> R foldRight(R initial, kotlin.jvm.functions.Function2<? super E,? super R,? extends R> operation);
+ method public final inline <R> R foldRightIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super E,? super R,? extends R> operation);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super E,kotlin.Unit> block);
+ method public final inline void forEachIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super E,kotlin.Unit> block);
+ method public final inline void forEachReversed(kotlin.jvm.functions.Function1<? super E,kotlin.Unit> block);
+ method public final inline void forEachReversedIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super E,kotlin.Unit> block);
+ method public final operator E get(@IntRange(from=0L) int index);
+ method public final inline kotlin.ranges.IntRange getIndices();
+ method @IntRange(from=-1L) public final inline int getLastIndex();
+ method @IntRange(from=0L) public final int getSize();
+ method public final int indexOf(E element);
+ method public final inline int indexOfFirst(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final inline int indexOfLast(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, optional kotlin.jvm.functions.Function1<? super E,? extends java.lang.CharSequence>? transform);
+ method public final E last();
+ method public final inline E last(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final int lastIndexOf(E element);
+ method public final inline E? lastOrNull();
+ method public final inline E? lastOrNull(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final boolean none();
+ method public final inline boolean reversedAny(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ property public final inline kotlin.ranges.IntRange indices;
+ property @IntRange(from=-1L) public final inline int lastIndex;
+ property @IntRange(from=0L) public final int size;
+ }
+
+ public final class ObjectListKt {
+ method public static <E> androidx.collection.ObjectList<E> emptyObjectList();
+ method public static inline <E> androidx.collection.MutableObjectList<E> mutableObjectListOf();
+ method public static <E> androidx.collection.MutableObjectList<E> mutableObjectListOf(E element1);
+ method public static <E> androidx.collection.MutableObjectList<E> mutableObjectListOf(E element1, E element2);
+ method public static <E> androidx.collection.MutableObjectList<E> mutableObjectListOf(E element1, E element2, E element3);
+ method public static inline <E> androidx.collection.MutableObjectList<E> mutableObjectListOf(E... elements);
+ method public static <E> androidx.collection.ObjectList<E> objectListOf();
+ method public static <E> androidx.collection.ObjectList<E> objectListOf(E element1);
+ method public static <E> androidx.collection.ObjectList<E> objectListOf(E element1, E element2);
+ method public static <E> androidx.collection.ObjectList<E> objectListOf(E element1, E element2, E element3);
+ method public static <E> androidx.collection.ObjectList<E> objectListOf(E... elements);
+ }
+
+ public abstract sealed class ObjectLongMap<K> {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(K key);
+ method public final boolean containsKey(K key);
+ method public final boolean containsValue(long value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super K,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final operator long get(K key);
+ method public final int getCapacity();
+ method public final long getOrDefault(K key, long defaultValue);
+ method public final inline long getOrElse(K key, kotlin.jvm.functions.Function0<java.lang.Long> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property public final int size;
+ }
+
+ public final class ObjectLongMapKt {
+ method public static inline <K> androidx.collection.ObjectLongMap<K> buildObjectLongMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableObjectLongMap<K>,kotlin.Unit> builderAction);
+ method public static inline <K> androidx.collection.ObjectLongMap<K> buildObjectLongMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableObjectLongMap<K>,kotlin.Unit> builderAction);
+ method public static <K> androidx.collection.ObjectLongMap<K> emptyObjectLongMap();
+ method public static <K> androidx.collection.MutableObjectLongMap<K> mutableObjectLongMapOf();
+ method public static <K> androidx.collection.MutableObjectLongMap<K> mutableObjectLongMapOf(K key1, long value1);
+ method public static <K> androidx.collection.MutableObjectLongMap<K> mutableObjectLongMapOf(K key1, long value1, K key2, long value2);
+ method public static <K> androidx.collection.MutableObjectLongMap<K> mutableObjectLongMapOf(K key1, long value1, K key2, long value2, K key3, long value3);
+ method public static <K> androidx.collection.MutableObjectLongMap<K> mutableObjectLongMapOf(K key1, long value1, K key2, long value2, K key3, long value3, K key4, long value4);
+ method public static <K> androidx.collection.MutableObjectLongMap<K> mutableObjectLongMapOf(K key1, long value1, K key2, long value2, K key3, long value3, K key4, long value4, K key5, long value5);
+ method public static <K> androidx.collection.ObjectLongMap<K> objectLongMap();
+ method public static <K> androidx.collection.ObjectLongMap<K> objectLongMapOf(K key1, long value1);
+ method public static <K> androidx.collection.ObjectLongMap<K> objectLongMapOf(K key1, long value1, K key2, long value2);
+ method public static <K> androidx.collection.ObjectLongMap<K> objectLongMapOf(K key1, long value1, K key2, long value2, K key3, long value3);
+ method public static <K> androidx.collection.ObjectLongMap<K> objectLongMapOf(K key1, long value1, K key2, long value2, K key3, long value3, K key4, long value4);
+ method public static <K> androidx.collection.ObjectLongMap<K> objectLongMapOf(K key1, long value1, K key2, long value2, K key3, long value3, K key4, long value4, K key5, long value5);
+ }
+
+ public abstract sealed class OrderedScatterSet<E> {
+ method public final inline boolean all(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final java.util.Set<E> asSet();
+ method public final operator boolean contains(E element);
+ method @IntRange(from=0L) public final int count();
+ method @IntRange(from=0L) public final inline int count(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final E first();
+ method public final inline E first(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final inline E? firstOrNull(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super E,kotlin.Unit> block);
+ method public final inline void forEachReverse(kotlin.jvm.functions.Function1<? super E,kotlin.Unit> block);
+ method @IntRange(from=0L) public final int getCapacity();
+ method @IntRange(from=0L) public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, optional kotlin.jvm.functions.Function1<? super E,? extends java.lang.CharSequence>? transform);
+ method public final E last();
+ method public final inline E last(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final inline E? lastOrNull(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final boolean none();
+ method public final inline java.util.List<E> toList();
+ property @IntRange(from=0L) public final int capacity;
+ property @IntRange(from=0L) public final int size;
+ }
+
+ public final class OrderedScatterSetKt {
+ method public static <E> androidx.collection.OrderedScatterSet<E> emptyOrderedScatterSet();
+ method public static <E> androidx.collection.MutableOrderedScatterSet<E> mutableOrderedScatterSetOf();
+ method public static <E> androidx.collection.MutableOrderedScatterSet<E> mutableOrderedScatterSetOf(E element1);
+ method public static <E> androidx.collection.MutableOrderedScatterSet<E> mutableOrderedScatterSetOf(E element1, E element2);
+ method public static <E> androidx.collection.MutableOrderedScatterSet<E> mutableOrderedScatterSetOf(E element1, E element2, E element3);
+ method public static <E> androidx.collection.MutableOrderedScatterSet<E> mutableOrderedScatterSetOf(E... elements);
+ method public static <E> androidx.collection.OrderedScatterSet<E> orderedScatterSetOf();
+ method public static <E> androidx.collection.OrderedScatterSet<E> orderedScatterSetOf(E element1);
+ method public static <E> androidx.collection.OrderedScatterSet<E> orderedScatterSetOf(E element1, E element2);
+ method public static <E> androidx.collection.OrderedScatterSet<E> orderedScatterSetOf(E element1, E element2, E element3);
+ method public static <E> androidx.collection.OrderedScatterSet<E> orderedScatterSetOf(E... elements);
+ }
+
+ public abstract sealed class ScatterMap<K, V> {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Boolean> predicate);
+ method public final java.util.Map<K,V> asMap();
+ method public final operator boolean contains(K key);
+ method public final boolean containsKey(K key);
+ method public final boolean containsValue(V value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super K,? super V,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super K,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super V,kotlin.Unit> block);
+ method public final operator V? get(K key);
+ method public final int getCapacity();
+ method public final V getOrDefault(K key, V defaultValue);
+ method public final inline V getOrElse(K key, kotlin.jvm.functions.Function0<? extends V> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, optional kotlin.jvm.functions.Function2<? super K,? super V,? extends java.lang.CharSequence>? transform);
+ method public final boolean none();
+ property public final int capacity;
+ property public final int size;
+ }
+
+ public final class ScatterMapKt {
+ method public static <K, V> androidx.collection.ScatterMap<K,V> emptyScatterMap();
+ method public static <K, V> androidx.collection.MutableScatterMap<K,V> mutableScatterMapOf();
+ method public static <K, V> androidx.collection.MutableScatterMap<K,V> mutableScatterMapOf(kotlin.Pair<? extends K,? extends V>... pairs);
+ }
+
+ public abstract sealed class ScatterSet<E> {
+ method public final inline boolean all(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final java.util.Set<E> asSet();
+ method public final operator boolean contains(E element);
+ method @IntRange(from=0L) public final int count();
+ method @IntRange(from=0L) public final inline int count(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final E first();
+ method public final inline E first(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final inline E? firstOrNull(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super E,kotlin.Unit> block);
+ method @IntRange(from=0L) public final int getCapacity();
+ method @IntRange(from=0L) public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, optional kotlin.jvm.functions.Function1<? super E,? extends java.lang.CharSequence>? transform);
+ method public final boolean none();
+ property @IntRange(from=0L) public final int capacity;
+ property @IntRange(from=0L) public final int size;
+ }
+
+ public final class ScatterSetKt {
+ method public static <E> androidx.collection.ScatterSet<E> emptyScatterSet();
+ method public static <E> androidx.collection.MutableScatterSet<E> mutableScatterSetOf();
+ method public static <E> androidx.collection.MutableScatterSet<E> mutableScatterSetOf(E element1);
+ method public static <E> androidx.collection.MutableScatterSet<E> mutableScatterSetOf(E element1, E element2);
+ method public static <E> androidx.collection.MutableScatterSet<E> mutableScatterSetOf(E element1, E element2, E element3);
+ method public static <E> androidx.collection.MutableScatterSet<E> mutableScatterSetOf(E... elements);
+ method public static <E> androidx.collection.ScatterSet<E> scatterSetOf();
+ method public static <E> androidx.collection.ScatterSet<E> scatterSetOf(E element1);
+ method public static <E> androidx.collection.ScatterSet<E> scatterSetOf(E element1, E element2);
+ method public static <E> androidx.collection.ScatterSet<E> scatterSetOf(E element1, E element2, E element3);
+ method public static <E> androidx.collection.ScatterSet<E> scatterSetOf(E... elements);
+ }
+
+ public final class SieveCache<K, V> {
+ ctor public SieveCache(@IntRange(from=1L, to=androidx.collection.SieveCacheKt.MaxSize) int maxSize, optional @IntRange(from=0L, to=androidx.collection.SieveCacheKt.MaxSize) int initialCapacity, optional kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Integer> sizeOf, optional kotlin.jvm.functions.Function1<? super K,? extends V?> createValueFromKey, optional kotlin.jvm.functions.Function4<? super K,? super V,? super V?,? super java.lang.Boolean,kotlin.Unit> onEntryRemoved);
+ method public inline boolean all(kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Boolean> predicate);
+ method public boolean any();
+ method public inline boolean any(kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Boolean> predicate);
+ method public operator boolean contains(K key);
+ method public boolean containsKey(K key);
+ method public boolean containsValue(V value);
+ method public int count();
+ method public inline int count(kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Boolean> predicate);
+ method public void evictAll();
+ method public inline void forEach(kotlin.jvm.functions.Function2<? super K,? super V,kotlin.Unit> block);
+ method public inline void forEachKey(kotlin.jvm.functions.Function1<? super K,kotlin.Unit> block);
+ method public inline void forEachValue(kotlin.jvm.functions.Function1<? super V,kotlin.Unit> block);
+ method public operator V? get(K key);
+ method public int getCapacity();
+ method public int getCount();
+ method public int getMaxSize();
+ method public int getSize();
+ method public boolean isEmpty();
+ method public boolean isNotEmpty();
+ method public inline operator void minusAssign(androidx.collection.ObjectList<K> keys);
+ method public inline operator void minusAssign(androidx.collection.ScatterSet<K> keys);
+ method public inline operator void minusAssign(Iterable<? extends K> keys);
+ method public inline operator void minusAssign(K key);
+ method public inline operator void minusAssign(K[] keys);
+ method public inline operator void minusAssign(kotlin.sequences.Sequence<? extends K> keys);
+ method public boolean none();
+ method public inline operator void plusAssign(androidx.collection.ScatterMap<K,V> from);
+ method public inline operator void plusAssign(androidx.collection.SieveCache<K,V> from);
+ method public inline operator void plusAssign(Iterable<? extends kotlin.Pair<? extends K,? extends V>> pairs);
+ method public inline operator void plusAssign(java.util.Map<K,? extends V> from);
+ method public inline operator void plusAssign(kotlin.Pair<? extends K,? extends V> pair);
+ method public inline operator void plusAssign(kotlin.Pair<? extends K,? extends V>[] pairs);
+ method public inline operator void plusAssign(kotlin.sequences.Sequence<? extends kotlin.Pair<? extends K,? extends V>> pairs);
+ method public V? put(K key, V value);
+ method public void putAll(androidx.collection.ScatterMap<K,V> from);
+ method public void putAll(androidx.collection.SieveCache<K,V> from);
+ method public void putAll(Iterable<? extends kotlin.Pair<? extends K,? extends V>> pairs);
+ method public void putAll(java.util.Map<K,? extends V> from);
+ method public void putAll(kotlin.Pair<? extends K,? extends V>[] pairs);
+ method public void putAll(kotlin.sequences.Sequence<? extends kotlin.Pair<? extends K,? extends V>> pairs);
+ method public V? remove(K key);
+ method public boolean remove(K key, V value);
+ method public void removeIf(kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Boolean> predicate);
+ method public void resize(@IntRange(from=1L, to=androidx.collection.SieveCacheKt.MaxSize) int maxSize);
+ method public inline operator void set(K key, V value);
+ method public void trimToSize(int maxSize);
+ property public final int capacity;
+ property public final int count;
+ property public final int maxSize;
+ property public final int size;
+ }
+
+ public class SimpleArrayMap<K, V> {
+ ctor public SimpleArrayMap();
+ ctor public SimpleArrayMap(androidx.collection.SimpleArrayMap<? extends K,? extends V>? map);
+ ctor public SimpleArrayMap(optional int capacity);
+ method public void clear();
+ method public boolean containsKey(K key);
+ method public boolean containsValue(V value);
+ method public void ensureCapacity(int minimumCapacity);
+ method public operator V? get(K key);
+ method public V getOrDefault(Object? key, V defaultValue);
+ method public int indexOfKey(K key);
+ method public boolean isEmpty();
+ method public K keyAt(int index);
+ method public V? put(K key, V value);
+ method public void putAll(androidx.collection.SimpleArrayMap<? extends K,? extends V> map);
+ method public V? putIfAbsent(K key, V value);
+ method public V? remove(K key);
+ method public boolean remove(K key, V value);
+ method public V removeAt(int index);
+ method public V? replace(K key, V value);
+ method public boolean replace(K key, V oldValue, V newValue);
+ method public V setValueAt(int index, V value);
+ method public int size();
+ method public V valueAt(int index);
+ }
+
+ public class SparseArrayCompat<E> implements java.lang.Cloneable {
+ ctor public SparseArrayCompat();
+ ctor public SparseArrayCompat(optional int initialCapacity);
+ method public void append(int key, E value);
+ method public void clear();
+ method public androidx.collection.SparseArrayCompat<E> clone();
+ method public boolean containsKey(int key);
+ method public boolean containsValue(E value);
+ method @Deprecated public void delete(int key);
+ method public operator E? get(int key);
+ method public E get(int key, E defaultValue);
+ method public final boolean getIsEmpty();
+ method public int indexOfKey(int key);
+ method public int indexOfValue(E value);
+ method public boolean isEmpty();
+ method public int keyAt(int index);
+ method public void put(int key, E value);
+ method public void putAll(androidx.collection.SparseArrayCompat<? extends E> other);
+ method public E? putIfAbsent(int key, E value);
+ method public void remove(int key);
+ method public boolean remove(int key, Object? value);
+ method public void removeAt(int index);
+ method public void removeAtRange(int index, int size);
+ method public E? replace(int key, E value);
+ method public boolean replace(int key, E oldValue, E newValue);
+ method public void setValueAt(int index, E value);
+ method public int size();
+ method public E valueAt(int index);
+ property public final boolean isEmpty;
+ }
+
+ public final class SparseArrayKt {
+ method public static inline operator <T> boolean contains(androidx.collection.SparseArrayCompat<T>, int key);
+ method public static inline <T> void forEach(androidx.collection.SparseArrayCompat<T>, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super T,kotlin.Unit> action);
+ method public static inline <T> T getOrDefault(androidx.collection.SparseArrayCompat<T>, int key, T defaultValue);
+ method public static inline <T> T getOrElse(androidx.collection.SparseArrayCompat<T>, int key, kotlin.jvm.functions.Function0<? extends T> defaultValue);
+ method public static inline <T> int getSize(androidx.collection.SparseArrayCompat<T>);
+ method public static inline <T> boolean isNotEmpty(androidx.collection.SparseArrayCompat<T>);
+ method public static <T> kotlin.collections.IntIterator keyIterator(androidx.collection.SparseArrayCompat<T>);
+ method public static operator <T> androidx.collection.SparseArrayCompat<T> plus(androidx.collection.SparseArrayCompat<T>, androidx.collection.SparseArrayCompat<T> other);
+ method @Deprecated public static <T> boolean remove(androidx.collection.SparseArrayCompat<T>, int key, T value);
+ method public static inline operator <T> void set(androidx.collection.SparseArrayCompat<T>, int key, T value);
+ method public static <T> java.util.Iterator<T> valueIterator(androidx.collection.SparseArrayCompat<T>);
+ }
+
+}
+
diff --git a/collection/collection/api/restricted_1.5.0-beta02.txt b/collection/collection/api/restricted_1.5.0-beta02.txt
new file mode 100644
index 0000000..385c7f5
--- /dev/null
+++ b/collection/collection/api/restricted_1.5.0-beta02.txt
@@ -0,0 +1,2627 @@
+// Signature format: 4.0
+package androidx.collection {
+
+ public class ArrayMap<K, V> extends androidx.collection.SimpleArrayMap<K!,V!> implements java.util.Map<K!,V!> {
+ ctor public ArrayMap();
+ ctor public ArrayMap(androidx.collection.SimpleArrayMap?);
+ ctor public ArrayMap(int);
+ method public boolean containsAll(java.util.Collection<? extends java.lang.Object!>);
+ method public boolean containsKey(Object?);
+ method public boolean containsValue(Object?);
+ method public java.util.Set<java.util.Map.Entry<K!,V!>!> entrySet();
+ method public V! get(Object?);
+ method public java.util.Set<K!> keySet();
+ method public void putAll(java.util.Map<? extends K!,? extends V!>);
+ method public V! remove(Object?);
+ method public boolean removeAll(java.util.Collection<? extends java.lang.Object!>);
+ method public boolean retainAll(java.util.Collection<? extends java.lang.Object!>);
+ method public java.util.Collection<V!> values();
+ }
+
+ public final class ArrayMapKt {
+ method public static inline <K, V> androidx.collection.ArrayMap<K,V> arrayMapOf();
+ method public static <K, V> androidx.collection.ArrayMap<K,V> arrayMapOf(kotlin.Pair<? extends K,? extends V>... pairs);
+ }
+
+ public final class ArraySet<E> implements java.util.Collection<E> kotlin.jvm.internal.markers.KMutableCollection kotlin.jvm.internal.markers.KMutableSet java.util.Set<E> {
+ ctor public ArraySet();
+ ctor public ArraySet(androidx.collection.ArraySet<? extends E>? set);
+ ctor public ArraySet(E[]? array);
+ ctor public ArraySet(optional int capacity);
+ ctor public ArraySet(java.util.Collection<? extends E>? set);
+ method public boolean add(E element);
+ method public void addAll(androidx.collection.ArraySet<? extends E> array);
+ method public boolean addAll(java.util.Collection<? extends E> elements);
+ method public void clear();
+ method public operator boolean contains(E element);
+ method public boolean containsAll(java.util.Collection<? extends E> elements);
+ method public void ensureCapacity(int minimumCapacity);
+ method public int getSize();
+ method public int indexOf(Object? key);
+ method public boolean isEmpty();
+ method public java.util.Iterator<E> iterator();
+ method public boolean remove(E element);
+ method public boolean removeAll(androidx.collection.ArraySet<? extends E> array);
+ method public boolean removeAll(java.util.Collection<? extends E> elements);
+ method public E removeAt(int index);
+ method public boolean retainAll(java.util.Collection<? extends E> elements);
+ method public Object?[] toArray();
+ method public <T> T[] toArray(T[] array);
+ method public E valueAt(int index);
+ property public int size;
+ }
+
+ public final class ArraySetKt {
+ method public static inline <T> androidx.collection.ArraySet<T> arraySetOf();
+ method public static <T> androidx.collection.ArraySet<T> arraySetOf(T... values);
+ }
+
+ public final class CircularArray<E> {
+ ctor public CircularArray();
+ ctor public CircularArray(optional int minCapacity);
+ method public void addFirst(E element);
+ method public void addLast(E element);
+ method public void clear();
+ method public operator E get(int index);
+ method public E getFirst();
+ method public E getLast();
+ method public boolean isEmpty();
+ method public E popFirst();
+ method public E popLast();
+ method public void removeFromEnd(int count);
+ method public void removeFromStart(int count);
+ method public int size();
+ property public final E first;
+ property public final E last;
+ }
+
+ public final class CircularIntArray {
+ ctor public CircularIntArray();
+ ctor public CircularIntArray(optional int minCapacity);
+ method public void addFirst(int element);
+ method public void addLast(int element);
+ method public void clear();
+ method public operator int get(int index);
+ method public int getFirst();
+ method public int getLast();
+ method public boolean isEmpty();
+ method public int popFirst();
+ method public int popLast();
+ method public void removeFromEnd(int count);
+ method public void removeFromStart(int count);
+ method public int size();
+ property public final int first;
+ property public final int last;
+ }
+
+ public abstract sealed class DoubleList {
+ method public final inline boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final int binarySearch(int element);
+ method public final int binarySearch(int element, optional int fromIndex);
+ method public final int binarySearch(int element, optional int fromIndex, optional int toIndex);
+ method public final operator boolean contains(double element);
+ method public final boolean containsAll(androidx.collection.DoubleList elements);
+ method public final inline int count();
+ method public final inline int count(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final double elementAt(@IntRange(from=0L) int index);
+ method public final inline double elementAtOrElse(@IntRange(from=0L) int index, kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Double> defaultValue);
+ method public final double first();
+ method public final inline double first(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final inline <R> R fold(R initial, kotlin.jvm.functions.Function2<? super R,? super java.lang.Double,? extends R> operation);
+ method public final inline <R> R foldIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super R,? super java.lang.Double,? extends R> operation);
+ method public final inline <R> R foldRight(R initial, kotlin.jvm.functions.Function2<? super java.lang.Double,? super R,? extends R> operation);
+ method public final inline <R> R foldRightIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super java.lang.Double,? super R,? extends R> operation);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super java.lang.Double,kotlin.Unit> block);
+ method public final inline void forEachIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Double,kotlin.Unit> block);
+ method public final inline void forEachReversed(kotlin.jvm.functions.Function1<? super java.lang.Double,kotlin.Unit> block);
+ method public final inline void forEachReversedIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Double,kotlin.Unit> block);
+ method public final operator double get(@IntRange(from=0L) int index);
+ method public final inline kotlin.ranges.IntRange getIndices();
+ method @IntRange(from=-1L) public final inline int getLastIndex();
+ method @IntRange(from=0L) public final inline int getSize();
+ method public final int indexOf(double element);
+ method public final inline int indexOfFirst(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final inline int indexOfLast(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final inline boolean isEmpty();
+ method public final inline boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final double last();
+ method public final inline double last(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final int lastIndexOf(double element);
+ method public final inline boolean none();
+ method public final inline boolean reversedAny(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ property @kotlin.PublishedApi internal final int _size;
+ property @kotlin.PublishedApi internal final double[] content;
+ property public final inline kotlin.ranges.IntRange indices;
+ property @IntRange(from=-1L) public final inline int lastIndex;
+ property @IntRange(from=0L) public final inline int size;
+ field @kotlin.PublishedApi internal int _size;
+ field @kotlin.PublishedApi internal double[] content;
+ }
+
+ public final class DoubleListKt {
+ method public static inline androidx.collection.DoubleList buildDoubleList(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableDoubleList,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.DoubleList buildDoubleList(kotlin.jvm.functions.Function1<? super androidx.collection.MutableDoubleList,kotlin.Unit> builderAction);
+ method public static androidx.collection.DoubleList doubleListOf();
+ method public static androidx.collection.DoubleList doubleListOf(double element1);
+ method public static androidx.collection.DoubleList doubleListOf(double element1, double element2);
+ method public static androidx.collection.DoubleList doubleListOf(double element1, double element2, double element3);
+ method public static androidx.collection.DoubleList doubleListOf(double... elements);
+ method public static androidx.collection.DoubleList emptyDoubleList();
+ method public static inline androidx.collection.MutableDoubleList mutableDoubleListOf();
+ method public static androidx.collection.MutableDoubleList mutableDoubleListOf(double element1);
+ method public static androidx.collection.MutableDoubleList mutableDoubleListOf(double element1, double element2);
+ method public static androidx.collection.MutableDoubleList mutableDoubleListOf(double element1, double element2, double element3);
+ method public static inline androidx.collection.MutableDoubleList mutableDoubleListOf(double... elements);
+ }
+
+ public abstract sealed class FloatFloatMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(float key);
+ method public final boolean containsKey(float key);
+ method public final boolean containsValue(float value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal final int findKeyIndex(float key);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final operator float get(float key);
+ method public final int getCapacity();
+ method public final float getOrDefault(float key, float defaultValue);
+ method public final inline float getOrElse(float key, kotlin.jvm.functions.Function0<java.lang.Float> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property @kotlin.PublishedApi internal final float[] keys;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final float[] values;
+ field @kotlin.PublishedApi internal float[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal float[] values;
+ }
+
+ public final class FloatFloatMapKt {
+ method public static inline androidx.collection.FloatFloatMap buildFloatFloatMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatFloatMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.FloatFloatMap buildFloatFloatMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatFloatMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.FloatFloatMap emptyFloatFloatMap();
+ method public static androidx.collection.FloatFloatMap floatFloatMapOf();
+ method public static androidx.collection.FloatFloatMap floatFloatMapOf(float key1, float value1);
+ method public static androidx.collection.FloatFloatMap floatFloatMapOf(float key1, float value1, float key2, float value2);
+ method public static androidx.collection.FloatFloatMap floatFloatMapOf(float key1, float value1, float key2, float value2, float key3, float value3);
+ method public static androidx.collection.FloatFloatMap floatFloatMapOf(float key1, float value1, float key2, float value2, float key3, float value3, float key4, float value4);
+ method public static androidx.collection.FloatFloatMap floatFloatMapOf(float key1, float value1, float key2, float value2, float key3, float value3, float key4, float value4, float key5, float value5);
+ method public static androidx.collection.MutableFloatFloatMap mutableFloatFloatMapOf();
+ method public static androidx.collection.MutableFloatFloatMap mutableFloatFloatMapOf(float key1, float value1);
+ method public static androidx.collection.MutableFloatFloatMap mutableFloatFloatMapOf(float key1, float value1, float key2, float value2);
+ method public static androidx.collection.MutableFloatFloatMap mutableFloatFloatMapOf(float key1, float value1, float key2, float value2, float key3, float value3);
+ method public static androidx.collection.MutableFloatFloatMap mutableFloatFloatMapOf(float key1, float value1, float key2, float value2, float key3, float value3, float key4, float value4);
+ method public static androidx.collection.MutableFloatFloatMap mutableFloatFloatMapOf(float key1, float value1, float key2, float value2, float key3, float value3, float key4, float value4, float key5, float value5);
+ }
+
+ @kotlin.jvm.JvmInline public final value class FloatFloatPair {
+ ctor public FloatFloatPair(float first, float second);
+ method public inline operator float component1();
+ method public inline operator float component2();
+ property public final inline float first;
+ property public final long packedValue;
+ property public final inline float second;
+ field public final long packedValue;
+ }
+
+ public abstract sealed class FloatIntMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(float key);
+ method public final boolean containsKey(float key);
+ method public final boolean containsValue(int value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal final int findKeyIndex(float key);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final operator int get(float key);
+ method public final int getCapacity();
+ method public final int getOrDefault(float key, int defaultValue);
+ method public final inline int getOrElse(float key, kotlin.jvm.functions.Function0<java.lang.Integer> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property @kotlin.PublishedApi internal final float[] keys;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final int[] values;
+ field @kotlin.PublishedApi internal float[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal int[] values;
+ }
+
+ public final class FloatIntMapKt {
+ method public static inline androidx.collection.FloatIntMap buildFloatIntMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatIntMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.FloatIntMap buildFloatIntMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatIntMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.FloatIntMap emptyFloatIntMap();
+ method public static androidx.collection.FloatIntMap floatIntMapOf();
+ method public static androidx.collection.FloatIntMap floatIntMapOf(float key1, int value1);
+ method public static androidx.collection.FloatIntMap floatIntMapOf(float key1, int value1, float key2, int value2);
+ method public static androidx.collection.FloatIntMap floatIntMapOf(float key1, int value1, float key2, int value2, float key3, int value3);
+ method public static androidx.collection.FloatIntMap floatIntMapOf(float key1, int value1, float key2, int value2, float key3, int value3, float key4, int value4);
+ method public static androidx.collection.FloatIntMap floatIntMapOf(float key1, int value1, float key2, int value2, float key3, int value3, float key4, int value4, float key5, int value5);
+ method public static androidx.collection.MutableFloatIntMap mutableFloatIntMapOf();
+ method public static androidx.collection.MutableFloatIntMap mutableFloatIntMapOf(float key1, int value1);
+ method public static androidx.collection.MutableFloatIntMap mutableFloatIntMapOf(float key1, int value1, float key2, int value2);
+ method public static androidx.collection.MutableFloatIntMap mutableFloatIntMapOf(float key1, int value1, float key2, int value2, float key3, int value3);
+ method public static androidx.collection.MutableFloatIntMap mutableFloatIntMapOf(float key1, int value1, float key2, int value2, float key3, int value3, float key4, int value4);
+ method public static androidx.collection.MutableFloatIntMap mutableFloatIntMapOf(float key1, int value1, float key2, int value2, float key3, int value3, float key4, int value4, float key5, int value5);
+ }
+
+ public abstract sealed class FloatList {
+ method public final inline boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final int binarySearch(int element);
+ method public final int binarySearch(int element, optional int fromIndex);
+ method public final int binarySearch(int element, optional int fromIndex, optional int toIndex);
+ method public final operator boolean contains(float element);
+ method public final boolean containsAll(androidx.collection.FloatList elements);
+ method public final inline int count();
+ method public final inline int count(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final float elementAt(@IntRange(from=0L) int index);
+ method public final inline float elementAtOrElse(@IntRange(from=0L) int index, kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Float> defaultValue);
+ method public final float first();
+ method public final inline float first(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline <R> R fold(R initial, kotlin.jvm.functions.Function2<? super R,? super java.lang.Float,? extends R> operation);
+ method public final inline <R> R foldIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super R,? super java.lang.Float,? extends R> operation);
+ method public final inline <R> R foldRight(R initial, kotlin.jvm.functions.Function2<? super java.lang.Float,? super R,? extends R> operation);
+ method public final inline <R> R foldRightIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super java.lang.Float,? super R,? extends R> operation);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachReversed(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachReversedIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,kotlin.Unit> block);
+ method public final operator float get(@IntRange(from=0L) int index);
+ method public final inline kotlin.ranges.IntRange getIndices();
+ method @IntRange(from=-1L) public final inline int getLastIndex();
+ method @IntRange(from=0L) public final inline int getSize();
+ method public final int indexOf(float element);
+ method public final inline int indexOfFirst(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline int indexOfLast(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline boolean isEmpty();
+ method public final inline boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final float last();
+ method public final inline float last(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final int lastIndexOf(float element);
+ method public final inline boolean none();
+ method public final inline boolean reversedAny(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ property @kotlin.PublishedApi internal final int _size;
+ property @kotlin.PublishedApi internal final float[] content;
+ property public final inline kotlin.ranges.IntRange indices;
+ property @IntRange(from=-1L) public final inline int lastIndex;
+ property @IntRange(from=0L) public final inline int size;
+ field @kotlin.PublishedApi internal int _size;
+ field @kotlin.PublishedApi internal float[] content;
+ }
+
+ public final class FloatListKt {
+ method public static inline androidx.collection.FloatList buildFloatList(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatList,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.FloatList buildFloatList(kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatList,kotlin.Unit> builderAction);
+ method public static androidx.collection.FloatList emptyFloatList();
+ method public static androidx.collection.FloatList floatListOf();
+ method public static androidx.collection.FloatList floatListOf(float element1);
+ method public static androidx.collection.FloatList floatListOf(float element1, float element2);
+ method public static androidx.collection.FloatList floatListOf(float element1, float element2, float element3);
+ method public static androidx.collection.FloatList floatListOf(float... elements);
+ method public static inline androidx.collection.MutableFloatList mutableFloatListOf();
+ method public static androidx.collection.MutableFloatList mutableFloatListOf(float element1);
+ method public static androidx.collection.MutableFloatList mutableFloatListOf(float element1, float element2);
+ method public static androidx.collection.MutableFloatList mutableFloatListOf(float element1, float element2, float element3);
+ method public static inline androidx.collection.MutableFloatList mutableFloatListOf(float... elements);
+ }
+
+ public abstract sealed class FloatLongMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(float key);
+ method public final boolean containsKey(float key);
+ method public final boolean containsValue(long value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal final int findKeyIndex(float key);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final operator long get(float key);
+ method public final int getCapacity();
+ method public final long getOrDefault(float key, long defaultValue);
+ method public final inline long getOrElse(float key, kotlin.jvm.functions.Function0<java.lang.Long> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property @kotlin.PublishedApi internal final float[] keys;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final long[] values;
+ field @kotlin.PublishedApi internal float[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal long[] values;
+ }
+
+ public final class FloatLongMapKt {
+ method public static inline androidx.collection.FloatLongMap buildFloatLongMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatLongMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.FloatLongMap buildFloatLongMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatLongMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.FloatLongMap emptyFloatLongMap();
+ method public static androidx.collection.FloatLongMap floatLongMapOf();
+ method public static androidx.collection.FloatLongMap floatLongMapOf(float key1, long value1);
+ method public static androidx.collection.FloatLongMap floatLongMapOf(float key1, long value1, float key2, long value2);
+ method public static androidx.collection.FloatLongMap floatLongMapOf(float key1, long value1, float key2, long value2, float key3, long value3);
+ method public static androidx.collection.FloatLongMap floatLongMapOf(float key1, long value1, float key2, long value2, float key3, long value3, float key4, long value4);
+ method public static androidx.collection.FloatLongMap floatLongMapOf(float key1, long value1, float key2, long value2, float key3, long value3, float key4, long value4, float key5, long value5);
+ method public static androidx.collection.MutableFloatLongMap mutableFloatLongMapOf();
+ method public static androidx.collection.MutableFloatLongMap mutableFloatLongMapOf(float key1, long value1);
+ method public static androidx.collection.MutableFloatLongMap mutableFloatLongMapOf(float key1, long value1, float key2, long value2);
+ method public static androidx.collection.MutableFloatLongMap mutableFloatLongMapOf(float key1, long value1, float key2, long value2, float key3, long value3);
+ method public static androidx.collection.MutableFloatLongMap mutableFloatLongMapOf(float key1, long value1, float key2, long value2, float key3, long value3, float key4, long value4);
+ method public static androidx.collection.MutableFloatLongMap mutableFloatLongMapOf(float key1, long value1, float key2, long value2, float key3, long value3, float key4, long value4, float key5, long value5);
+ }
+
+ public abstract sealed class FloatObjectMap<V> {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(float key);
+ method public final boolean containsKey(float key);
+ method public final boolean containsValue(V value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super V,kotlin.Unit> block);
+ method public final operator V? get(float key);
+ method public final int getCapacity();
+ method public final V getOrDefault(float key, V defaultValue);
+ method public final inline V getOrElse(float key, kotlin.jvm.functions.Function0<? extends V> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property @kotlin.PublishedApi internal final float[] keys;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final Object?[] values;
+ field @kotlin.PublishedApi internal float[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal Object?[] values;
+ }
+
+ public final class FloatObjectMapKt {
+ method public static inline <V> androidx.collection.FloatObjectMap<V> buildFloatObjectMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatObjectMap<V>,kotlin.Unit> builderAction);
+ method public static inline <V> androidx.collection.FloatObjectMap<V> buildFloatObjectMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatObjectMap<V>,kotlin.Unit> builderAction);
+ method public static <V> androidx.collection.FloatObjectMap<V> emptyFloatObjectMap();
+ method public static <V> androidx.collection.FloatObjectMap<V> floatObjectMapOf();
+ method public static <V> androidx.collection.FloatObjectMap<V> floatObjectMapOf(float key1, V value1);
+ method public static <V> androidx.collection.FloatObjectMap<V> floatObjectMapOf(float key1, V value1, float key2, V value2);
+ method public static <V> androidx.collection.FloatObjectMap<V> floatObjectMapOf(float key1, V value1, float key2, V value2, float key3, V value3);
+ method public static <V> androidx.collection.FloatObjectMap<V> floatObjectMapOf(float key1, V value1, float key2, V value2, float key3, V value3, float key4, V value4);
+ method public static <V> androidx.collection.FloatObjectMap<V> floatObjectMapOf(float key1, V value1, float key2, V value2, float key3, V value3, float key4, V value4, float key5, V value5);
+ method public static <V> androidx.collection.MutableFloatObjectMap<V> mutableFloatObjectMapOf();
+ method public static <V> androidx.collection.MutableFloatObjectMap<V> mutableFloatObjectMapOf(float key1, V value1);
+ method public static <V> androidx.collection.MutableFloatObjectMap<V> mutableFloatObjectMapOf(float key1, V value1, float key2, V value2);
+ method public static <V> androidx.collection.MutableFloatObjectMap<V> mutableFloatObjectMapOf(float key1, V value1, float key2, V value2, float key3, V value3);
+ method public static <V> androidx.collection.MutableFloatObjectMap<V> mutableFloatObjectMapOf(float key1, V value1, float key2, V value2, float key3, V value3, float key4, V value4);
+ method public static <V> androidx.collection.MutableFloatObjectMap<V> mutableFloatObjectMapOf(float key1, V value1, float key2, V value2, float key3, V value3, float key4, V value4, float key5, V value5);
+ }
+
+ public abstract sealed class FloatSet {
+ method public final inline boolean all(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final operator boolean contains(float element);
+ method @IntRange(from=0L) public final int count();
+ method @IntRange(from=0L) public final inline int count(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline float first();
+ method public final inline float first(kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndex(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method @IntRange(from=0L) public final int getCapacity();
+ method @IntRange(from=0L) public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function1<? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property @IntRange(from=0L) public final int capacity;
+ property @kotlin.PublishedApi internal final float[] elements;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property @IntRange(from=0L) public final int size;
+ field @kotlin.PublishedApi internal float[] elements;
+ field @kotlin.PublishedApi internal long[] metadata;
+ }
+
+ public final class FloatSetKt {
+ method public static inline androidx.collection.FloatSet buildFloatSet(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatSet,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.FloatSet buildFloatSet(kotlin.jvm.functions.Function1<? super androidx.collection.MutableFloatSet,kotlin.Unit> builderAction);
+ method public static androidx.collection.FloatSet emptyFloatSet();
+ method public static androidx.collection.FloatSet floatSetOf();
+ method public static androidx.collection.FloatSet floatSetOf(float element1);
+ method public static androidx.collection.FloatSet floatSetOf(float element1, float element2);
+ method public static androidx.collection.FloatSet floatSetOf(float element1, float element2, float element3);
+ method public static androidx.collection.FloatSet floatSetOf(float... elements);
+ method public static androidx.collection.MutableFloatSet mutableFloatSetOf();
+ method public static androidx.collection.MutableFloatSet mutableFloatSetOf(float element1);
+ method public static androidx.collection.MutableFloatSet mutableFloatSetOf(float element1, float element2);
+ method public static androidx.collection.MutableFloatSet mutableFloatSetOf(float element1, float element2, float element3);
+ method public static androidx.collection.MutableFloatSet mutableFloatSetOf(float... elements);
+ }
+
+ public abstract sealed class IntFloatMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(int key);
+ method public final boolean containsKey(int key);
+ method public final boolean containsValue(float value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal final int findKeyIndex(int key);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final operator float get(int key);
+ method public final int getCapacity();
+ method public final float getOrDefault(int key, float defaultValue);
+ method public final inline float getOrElse(int key, kotlin.jvm.functions.Function0<java.lang.Float> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property @kotlin.PublishedApi internal final int[] keys;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final float[] values;
+ field @kotlin.PublishedApi internal int[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal float[] values;
+ }
+
+ public final class IntFloatMapKt {
+ method public static inline androidx.collection.IntFloatMap buildIntFloatMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntFloatMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.IntFloatMap buildIntFloatMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntFloatMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.IntFloatMap emptyIntFloatMap();
+ method public static androidx.collection.IntFloatMap intFloatMapOf();
+ method public static androidx.collection.IntFloatMap intFloatMapOf(int key1, float value1);
+ method public static androidx.collection.IntFloatMap intFloatMapOf(int key1, float value1, int key2, float value2);
+ method public static androidx.collection.IntFloatMap intFloatMapOf(int key1, float value1, int key2, float value2, int key3, float value3);
+ method public static androidx.collection.IntFloatMap intFloatMapOf(int key1, float value1, int key2, float value2, int key3, float value3, int key4, float value4);
+ method public static androidx.collection.IntFloatMap intFloatMapOf(int key1, float value1, int key2, float value2, int key3, float value3, int key4, float value4, int key5, float value5);
+ method public static androidx.collection.MutableIntFloatMap mutableIntFloatMapOf();
+ method public static androidx.collection.MutableIntFloatMap mutableIntFloatMapOf(int key1, float value1);
+ method public static androidx.collection.MutableIntFloatMap mutableIntFloatMapOf(int key1, float value1, int key2, float value2);
+ method public static androidx.collection.MutableIntFloatMap mutableIntFloatMapOf(int key1, float value1, int key2, float value2, int key3, float value3);
+ method public static androidx.collection.MutableIntFloatMap mutableIntFloatMapOf(int key1, float value1, int key2, float value2, int key3, float value3, int key4, float value4);
+ method public static androidx.collection.MutableIntFloatMap mutableIntFloatMapOf(int key1, float value1, int key2, float value2, int key3, float value3, int key4, float value4, int key5, float value5);
+ }
+
+ public abstract sealed class IntIntMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(int key);
+ method public final boolean containsKey(int key);
+ method public final boolean containsValue(int value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal final int findKeyIndex(int key);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final operator int get(int key);
+ method public final int getCapacity();
+ method public final int getOrDefault(int key, int defaultValue);
+ method public final inline int getOrElse(int key, kotlin.jvm.functions.Function0<java.lang.Integer> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property @kotlin.PublishedApi internal final int[] keys;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final int[] values;
+ field @kotlin.PublishedApi internal int[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal int[] values;
+ }
+
+ public final class IntIntMapKt {
+ method public static inline androidx.collection.IntIntMap buildIntIntMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntIntMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.IntIntMap buildIntIntMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntIntMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.IntIntMap emptyIntIntMap();
+ method public static androidx.collection.IntIntMap intIntMapOf();
+ method public static androidx.collection.IntIntMap intIntMapOf(int key1, int value1);
+ method public static androidx.collection.IntIntMap intIntMapOf(int key1, int value1, int key2, int value2);
+ method public static androidx.collection.IntIntMap intIntMapOf(int key1, int value1, int key2, int value2, int key3, int value3);
+ method public static androidx.collection.IntIntMap intIntMapOf(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4);
+ method public static androidx.collection.IntIntMap intIntMapOf(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4, int key5, int value5);
+ method public static androidx.collection.MutableIntIntMap mutableIntIntMapOf();
+ method public static androidx.collection.MutableIntIntMap mutableIntIntMapOf(int key1, int value1);
+ method public static androidx.collection.MutableIntIntMap mutableIntIntMapOf(int key1, int value1, int key2, int value2);
+ method public static androidx.collection.MutableIntIntMap mutableIntIntMapOf(int key1, int value1, int key2, int value2, int key3, int value3);
+ method public static androidx.collection.MutableIntIntMap mutableIntIntMapOf(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4);
+ method public static androidx.collection.MutableIntIntMap mutableIntIntMapOf(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4, int key5, int value5);
+ }
+
+ @kotlin.jvm.JvmInline public final value class IntIntPair {
+ ctor public IntIntPair(int first, int second);
+ method public inline operator int component1();
+ method public inline operator int component2();
+ property public final int first;
+ property public final long packedValue;
+ property public final int second;
+ field public final long packedValue;
+ }
+
+ public abstract sealed class IntList {
+ method public final inline boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final int binarySearch(int element);
+ method public final int binarySearch(int element, optional int fromIndex);
+ method public final int binarySearch(int element, optional int fromIndex, optional int toIndex);
+ method public final operator boolean contains(int element);
+ method public final boolean containsAll(androidx.collection.IntList elements);
+ method public final inline int count();
+ method public final inline int count(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final int elementAt(@IntRange(from=0L) int index);
+ method public final inline int elementAtOrElse(@IntRange(from=0L) int index, kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Integer> defaultValue);
+ method public final int first();
+ method public final inline int first(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline <R> R fold(R initial, kotlin.jvm.functions.Function2<? super R,? super java.lang.Integer,? extends R> operation);
+ method public final inline <R> R foldIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super R,? super java.lang.Integer,? extends R> operation);
+ method public final inline <R> R foldRight(R initial, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super R,? extends R> operation);
+ method public final inline <R> R foldRightIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super java.lang.Integer,? super R,? extends R> operation);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachReversed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachReversedIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,kotlin.Unit> block);
+ method public final operator int get(@IntRange(from=0L) int index);
+ method public final inline kotlin.ranges.IntRange getIndices();
+ method @IntRange(from=-1L) public final inline int getLastIndex();
+ method @IntRange(from=0L) public final inline int getSize();
+ method public final int indexOf(int element);
+ method public final inline int indexOfFirst(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline int indexOfLast(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline boolean isEmpty();
+ method public final inline boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final int last();
+ method public final inline int last(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final int lastIndexOf(int element);
+ method public final inline boolean none();
+ method public final inline boolean reversedAny(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ property @kotlin.PublishedApi internal final int _size;
+ property @kotlin.PublishedApi internal final int[] content;
+ property public final inline kotlin.ranges.IntRange indices;
+ property @IntRange(from=-1L) public final inline int lastIndex;
+ property @IntRange(from=0L) public final inline int size;
+ field @kotlin.PublishedApi internal int _size;
+ field @kotlin.PublishedApi internal int[] content;
+ }
+
+ public final class IntListKt {
+ method public static inline androidx.collection.IntList buildIntList(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntList,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.IntList buildIntList(kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntList,kotlin.Unit> builderAction);
+ method public static androidx.collection.IntList emptyIntList();
+ method public static androidx.collection.IntList intListOf();
+ method public static androidx.collection.IntList intListOf(int element1);
+ method public static androidx.collection.IntList intListOf(int element1, int element2);
+ method public static androidx.collection.IntList intListOf(int element1, int element2, int element3);
+ method public static androidx.collection.IntList intListOf(int... elements);
+ method public static inline androidx.collection.MutableIntList mutableIntListOf();
+ method public static androidx.collection.MutableIntList mutableIntListOf(int element1);
+ method public static androidx.collection.MutableIntList mutableIntListOf(int element1, int element2);
+ method public static androidx.collection.MutableIntList mutableIntListOf(int element1, int element2, int element3);
+ method public static inline androidx.collection.MutableIntList mutableIntListOf(int... elements);
+ }
+
+ public abstract sealed class IntLongMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(int key);
+ method public final boolean containsKey(int key);
+ method public final boolean containsValue(long value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal final int findKeyIndex(int key);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final operator long get(int key);
+ method public final int getCapacity();
+ method public final long getOrDefault(int key, long defaultValue);
+ method public final inline long getOrElse(int key, kotlin.jvm.functions.Function0<java.lang.Long> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property @kotlin.PublishedApi internal final int[] keys;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final long[] values;
+ field @kotlin.PublishedApi internal int[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal long[] values;
+ }
+
+ public final class IntLongMapKt {
+ method public static inline androidx.collection.IntLongMap buildIntLongMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntLongMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.IntLongMap buildIntLongMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntLongMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.IntLongMap emptyIntLongMap();
+ method public static androidx.collection.IntLongMap intLongMapOf();
+ method public static androidx.collection.IntLongMap intLongMapOf(int key1, long value1);
+ method public static androidx.collection.IntLongMap intLongMapOf(int key1, long value1, int key2, long value2);
+ method public static androidx.collection.IntLongMap intLongMapOf(int key1, long value1, int key2, long value2, int key3, long value3);
+ method public static androidx.collection.IntLongMap intLongMapOf(int key1, long value1, int key2, long value2, int key3, long value3, int key4, long value4);
+ method public static androidx.collection.IntLongMap intLongMapOf(int key1, long value1, int key2, long value2, int key3, long value3, int key4, long value4, int key5, long value5);
+ method public static androidx.collection.MutableIntLongMap mutableIntLongMapOf();
+ method public static androidx.collection.MutableIntLongMap mutableIntLongMapOf(int key1, long value1);
+ method public static androidx.collection.MutableIntLongMap mutableIntLongMapOf(int key1, long value1, int key2, long value2);
+ method public static androidx.collection.MutableIntLongMap mutableIntLongMapOf(int key1, long value1, int key2, long value2, int key3, long value3);
+ method public static androidx.collection.MutableIntLongMap mutableIntLongMapOf(int key1, long value1, int key2, long value2, int key3, long value3, int key4, long value4);
+ method public static androidx.collection.MutableIntLongMap mutableIntLongMapOf(int key1, long value1, int key2, long value2, int key3, long value3, int key4, long value4, int key5, long value5);
+ }
+
+ public abstract sealed class IntObjectMap<V> {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(int key);
+ method public final boolean containsKey(int key);
+ method public final boolean containsValue(V value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super V,kotlin.Unit> block);
+ method public final operator V? get(int key);
+ method public final int getCapacity();
+ method public final V getOrDefault(int key, V defaultValue);
+ method public final inline V getOrElse(int key, kotlin.jvm.functions.Function0<? extends V> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property @kotlin.PublishedApi internal final int[] keys;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final Object?[] values;
+ field @kotlin.PublishedApi internal int[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal Object?[] values;
+ }
+
+ public final class IntObjectMapKt {
+ method public static inline <V> androidx.collection.IntObjectMap<V> buildIntObjectMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntObjectMap<V>,kotlin.Unit> builderAction);
+ method public static inline <V> androidx.collection.IntObjectMap<V> buildIntObjectMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntObjectMap<V>,kotlin.Unit> builderAction);
+ method public static <V> androidx.collection.IntObjectMap<V> emptyIntObjectMap();
+ method public static <V> androidx.collection.IntObjectMap<V> intObjectMapOf();
+ method public static <V> androidx.collection.IntObjectMap<V> intObjectMapOf(int key1, V value1);
+ method public static <V> androidx.collection.IntObjectMap<V> intObjectMapOf(int key1, V value1, int key2, V value2);
+ method public static <V> androidx.collection.IntObjectMap<V> intObjectMapOf(int key1, V value1, int key2, V value2, int key3, V value3);
+ method public static <V> androidx.collection.IntObjectMap<V> intObjectMapOf(int key1, V value1, int key2, V value2, int key3, V value3, int key4, V value4);
+ method public static <V> androidx.collection.IntObjectMap<V> intObjectMapOf(int key1, V value1, int key2, V value2, int key3, V value3, int key4, V value4, int key5, V value5);
+ method public static <V> androidx.collection.MutableIntObjectMap<V> mutableIntObjectMapOf();
+ method public static <V> androidx.collection.MutableIntObjectMap<V> mutableIntObjectMapOf(int key1, V value1);
+ method public static <V> androidx.collection.MutableIntObjectMap<V> mutableIntObjectMapOf(int key1, V value1, int key2, V value2);
+ method public static <V> androidx.collection.MutableIntObjectMap<V> mutableIntObjectMapOf(int key1, V value1, int key2, V value2, int key3, V value3);
+ method public static <V> androidx.collection.MutableIntObjectMap<V> mutableIntObjectMapOf(int key1, V value1, int key2, V value2, int key3, V value3, int key4, V value4);
+ method public static <V> androidx.collection.MutableIntObjectMap<V> mutableIntObjectMapOf(int key1, V value1, int key2, V value2, int key3, V value3, int key4, V value4, int key5, V value5);
+ }
+
+ public abstract sealed class IntSet {
+ method public final inline boolean all(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final operator boolean contains(int element);
+ method @IntRange(from=0L) public final int count();
+ method @IntRange(from=0L) public final inline int count(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline int first();
+ method public final inline int first(kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndex(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method @IntRange(from=0L) public final int getCapacity();
+ method @IntRange(from=0L) public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property @IntRange(from=0L) public final int capacity;
+ property @kotlin.PublishedApi internal final int[] elements;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property @IntRange(from=0L) public final int size;
+ field @kotlin.PublishedApi internal int[] elements;
+ field @kotlin.PublishedApi internal long[] metadata;
+ }
+
+ public final class IntSetKt {
+ method public static inline androidx.collection.IntSet buildIntSet(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntSet,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.IntSet buildIntSet(kotlin.jvm.functions.Function1<? super androidx.collection.MutableIntSet,kotlin.Unit> builderAction);
+ method public static androidx.collection.IntSet emptyIntSet();
+ method public static androidx.collection.IntSet intSetOf();
+ method public static androidx.collection.IntSet intSetOf(int element1);
+ method public static androidx.collection.IntSet intSetOf(int element1, int element2);
+ method public static androidx.collection.IntSet intSetOf(int element1, int element2, int element3);
+ method public static androidx.collection.IntSet intSetOf(int... elements);
+ method public static androidx.collection.MutableIntSet mutableIntSetOf();
+ method public static androidx.collection.MutableIntSet mutableIntSetOf(int element1);
+ method public static androidx.collection.MutableIntSet mutableIntSetOf(int element1, int element2);
+ method public static androidx.collection.MutableIntSet mutableIntSetOf(int element1, int element2, int element3);
+ method public static androidx.collection.MutableIntSet mutableIntSetOf(int... elements);
+ }
+
+ public abstract sealed class LongFloatMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(long key);
+ method public final boolean containsKey(long key);
+ method public final boolean containsValue(float value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal final int findKeyIndex(long key);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final operator float get(long key);
+ method public final int getCapacity();
+ method public final float getOrDefault(long key, float defaultValue);
+ method public final inline float getOrElse(long key, kotlin.jvm.functions.Function0<java.lang.Float> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property @kotlin.PublishedApi internal final long[] keys;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final float[] values;
+ field @kotlin.PublishedApi internal long[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal float[] values;
+ }
+
+ public final class LongFloatMapKt {
+ method public static inline androidx.collection.LongFloatMap buildLongFloatMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongFloatMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.LongFloatMap buildLongFloatMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongFloatMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.LongFloatMap emptyLongFloatMap();
+ method public static androidx.collection.LongFloatMap longFloatMapOf();
+ method public static androidx.collection.LongFloatMap longFloatMapOf(long key1, float value1);
+ method public static androidx.collection.LongFloatMap longFloatMapOf(long key1, float value1, long key2, float value2);
+ method public static androidx.collection.LongFloatMap longFloatMapOf(long key1, float value1, long key2, float value2, long key3, float value3);
+ method public static androidx.collection.LongFloatMap longFloatMapOf(long key1, float value1, long key2, float value2, long key3, float value3, long key4, float value4);
+ method public static androidx.collection.LongFloatMap longFloatMapOf(long key1, float value1, long key2, float value2, long key3, float value3, long key4, float value4, long key5, float value5);
+ method public static androidx.collection.MutableLongFloatMap mutableLongFloatMapOf();
+ method public static androidx.collection.MutableLongFloatMap mutableLongFloatMapOf(long key1, float value1);
+ method public static androidx.collection.MutableLongFloatMap mutableLongFloatMapOf(long key1, float value1, long key2, float value2);
+ method public static androidx.collection.MutableLongFloatMap mutableLongFloatMapOf(long key1, float value1, long key2, float value2, long key3, float value3);
+ method public static androidx.collection.MutableLongFloatMap mutableLongFloatMapOf(long key1, float value1, long key2, float value2, long key3, float value3, long key4, float value4);
+ method public static androidx.collection.MutableLongFloatMap mutableLongFloatMapOf(long key1, float value1, long key2, float value2, long key3, float value3, long key4, float value4, long key5, float value5);
+ }
+
+ public abstract sealed class LongIntMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(long key);
+ method public final boolean containsKey(long key);
+ method public final boolean containsValue(int value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal final int findKeyIndex(long key);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final operator int get(long key);
+ method public final int getCapacity();
+ method public final int getOrDefault(long key, int defaultValue);
+ method public final inline int getOrElse(long key, kotlin.jvm.functions.Function0<java.lang.Integer> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property @kotlin.PublishedApi internal final long[] keys;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final int[] values;
+ field @kotlin.PublishedApi internal long[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal int[] values;
+ }
+
+ public final class LongIntMapKt {
+ method public static inline androidx.collection.LongIntMap buildLongIntMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongIntMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.LongIntMap buildLongIntMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongIntMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.LongIntMap emptyLongIntMap();
+ method public static androidx.collection.LongIntMap longIntMapOf();
+ method public static androidx.collection.LongIntMap longIntMapOf(long key1, int value1);
+ method public static androidx.collection.LongIntMap longIntMapOf(long key1, int value1, long key2, int value2);
+ method public static androidx.collection.LongIntMap longIntMapOf(long key1, int value1, long key2, int value2, long key3, int value3);
+ method public static androidx.collection.LongIntMap longIntMapOf(long key1, int value1, long key2, int value2, long key3, int value3, long key4, int value4);
+ method public static androidx.collection.LongIntMap longIntMapOf(long key1, int value1, long key2, int value2, long key3, int value3, long key4, int value4, long key5, int value5);
+ method public static androidx.collection.MutableLongIntMap mutableLongIntMapOf();
+ method public static androidx.collection.MutableLongIntMap mutableLongIntMapOf(long key1, int value1);
+ method public static androidx.collection.MutableLongIntMap mutableLongIntMapOf(long key1, int value1, long key2, int value2);
+ method public static androidx.collection.MutableLongIntMap mutableLongIntMapOf(long key1, int value1, long key2, int value2, long key3, int value3);
+ method public static androidx.collection.MutableLongIntMap mutableLongIntMapOf(long key1, int value1, long key2, int value2, long key3, int value3, long key4, int value4);
+ method public static androidx.collection.MutableLongIntMap mutableLongIntMapOf(long key1, int value1, long key2, int value2, long key3, int value3, long key4, int value4, long key5, int value5);
+ }
+
+ public abstract sealed class LongList {
+ method public final inline boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final int binarySearch(int element);
+ method public final int binarySearch(int element, optional int fromIndex);
+ method public final int binarySearch(int element, optional int fromIndex, optional int toIndex);
+ method public final operator boolean contains(long element);
+ method public final boolean containsAll(androidx.collection.LongList elements);
+ method public final inline int count();
+ method public final inline int count(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final long elementAt(@IntRange(from=0L) int index);
+ method public final inline long elementAtOrElse(@IntRange(from=0L) int index, kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Long> defaultValue);
+ method public final long first();
+ method public final inline long first(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline <R> R fold(R initial, kotlin.jvm.functions.Function2<? super R,? super java.lang.Long,? extends R> operation);
+ method public final inline <R> R foldIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super R,? super java.lang.Long,? extends R> operation);
+ method public final inline <R> R foldRight(R initial, kotlin.jvm.functions.Function2<? super java.lang.Long,? super R,? extends R> operation);
+ method public final inline <R> R foldRightIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super java.lang.Long,? super R,? extends R> operation);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachReversed(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachReversedIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,kotlin.Unit> block);
+ method public final operator long get(@IntRange(from=0L) int index);
+ method public final inline kotlin.ranges.IntRange getIndices();
+ method @IntRange(from=-1L) public final inline int getLastIndex();
+ method @IntRange(from=0L) public final inline int getSize();
+ method public final int indexOf(long element);
+ method public final inline int indexOfFirst(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline int indexOfLast(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline boolean isEmpty();
+ method public final inline boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final long last();
+ method public final inline long last(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final int lastIndexOf(long element);
+ method public final inline boolean none();
+ method public final inline boolean reversedAny(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ property @kotlin.PublishedApi internal final int _size;
+ property @kotlin.PublishedApi internal final long[] content;
+ property public final inline kotlin.ranges.IntRange indices;
+ property @IntRange(from=-1L) public final inline int lastIndex;
+ property @IntRange(from=0L) public final inline int size;
+ field @kotlin.PublishedApi internal int _size;
+ field @kotlin.PublishedApi internal long[] content;
+ }
+
+ public final class LongListKt {
+ method public static inline androidx.collection.LongList buildLongList(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongList,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.LongList buildLongList(kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongList,kotlin.Unit> builderAction);
+ method public static androidx.collection.LongList emptyLongList();
+ method public static androidx.collection.LongList longListOf();
+ method public static androidx.collection.LongList longListOf(long element1);
+ method public static androidx.collection.LongList longListOf(long element1, long element2);
+ method public static androidx.collection.LongList longListOf(long element1, long element2, long element3);
+ method public static androidx.collection.LongList longListOf(long... elements);
+ method public static inline androidx.collection.MutableLongList mutableLongListOf();
+ method public static androidx.collection.MutableLongList mutableLongListOf(long element1);
+ method public static androidx.collection.MutableLongList mutableLongListOf(long element1, long element2);
+ method public static androidx.collection.MutableLongList mutableLongListOf(long element1, long element2, long element3);
+ method public static inline androidx.collection.MutableLongList mutableLongListOf(long... elements);
+ }
+
+ public abstract sealed class LongLongMap {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(long key);
+ method public final boolean containsKey(long key);
+ method public final boolean containsValue(long value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal final int findKeyIndex(long key);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final operator long get(long key);
+ method public final int getCapacity();
+ method public final long getOrDefault(long key, long defaultValue);
+ method public final inline long getOrElse(long key, kotlin.jvm.functions.Function0<java.lang.Long> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property @kotlin.PublishedApi internal final long[] keys;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final long[] values;
+ field @kotlin.PublishedApi internal long[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal long[] values;
+ }
+
+ public final class LongLongMapKt {
+ method public static inline androidx.collection.LongLongMap buildLongLongMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongLongMap,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.LongLongMap buildLongLongMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongLongMap,kotlin.Unit> builderAction);
+ method public static androidx.collection.LongLongMap emptyLongLongMap();
+ method public static androidx.collection.LongLongMap longLongMapOf();
+ method public static androidx.collection.LongLongMap longLongMapOf(long key1, long value1);
+ method public static androidx.collection.LongLongMap longLongMapOf(long key1, long value1, long key2, long value2);
+ method public static androidx.collection.LongLongMap longLongMapOf(long key1, long value1, long key2, long value2, long key3, long value3);
+ method public static androidx.collection.LongLongMap longLongMapOf(long key1, long value1, long key2, long value2, long key3, long value3, long key4, long value4);
+ method public static androidx.collection.LongLongMap longLongMapOf(long key1, long value1, long key2, long value2, long key3, long value3, long key4, long value4, long key5, long value5);
+ method public static androidx.collection.MutableLongLongMap mutableLongLongMapOf();
+ method public static androidx.collection.MutableLongLongMap mutableLongLongMapOf(long key1, long value1);
+ method public static androidx.collection.MutableLongLongMap mutableLongLongMapOf(long key1, long value1, long key2, long value2);
+ method public static androidx.collection.MutableLongLongMap mutableLongLongMapOf(long key1, long value1, long key2, long value2, long key3, long value3);
+ method public static androidx.collection.MutableLongLongMap mutableLongLongMapOf(long key1, long value1, long key2, long value2, long key3, long value3, long key4, long value4);
+ method public static androidx.collection.MutableLongLongMap mutableLongLongMapOf(long key1, long value1, long key2, long value2, long key3, long value3, long key4, long value4, long key5, long value5);
+ }
+
+ public final class LongLongPair {
+ ctor public LongLongPair(long first, long second);
+ method public inline operator long component1();
+ method public inline operator long component2();
+ method public long getFirst();
+ method public long getSecond();
+ property public final long first;
+ property public final long second;
+ }
+
+ public abstract sealed class LongObjectMap<V> {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(long key);
+ method public final boolean containsKey(long key);
+ method public final boolean containsValue(V value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super V,kotlin.Unit> block);
+ method public final operator V? get(long key);
+ method public final int getCapacity();
+ method public final V getOrDefault(long key, V defaultValue);
+ method public final inline V getOrElse(long key, kotlin.jvm.functions.Function0<? extends V> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property @kotlin.PublishedApi internal final long[] keys;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final Object?[] values;
+ field @kotlin.PublishedApi internal long[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal Object?[] values;
+ }
+
+ public final class LongObjectMapKt {
+ method public static inline <V> androidx.collection.LongObjectMap<V> buildLongObjectMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongObjectMap<V>,kotlin.Unit> builderAction);
+ method public static inline <V> androidx.collection.LongObjectMap<V> buildLongObjectMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongObjectMap<V>,kotlin.Unit> builderAction);
+ method public static <V> androidx.collection.LongObjectMap<V> emptyLongObjectMap();
+ method public static <V> androidx.collection.LongObjectMap<V> longObjectMapOf();
+ method public static <V> androidx.collection.LongObjectMap<V> longObjectMapOf(long key1, V value1);
+ method public static <V> androidx.collection.LongObjectMap<V> longObjectMapOf(long key1, V value1, long key2, V value2);
+ method public static <V> androidx.collection.LongObjectMap<V> longObjectMapOf(long key1, V value1, long key2, V value2, long key3, V value3);
+ method public static <V> androidx.collection.LongObjectMap<V> longObjectMapOf(long key1, V value1, long key2, V value2, long key3, V value3, long key4, V value4);
+ method public static <V> androidx.collection.LongObjectMap<V> longObjectMapOf(long key1, V value1, long key2, V value2, long key3, V value3, long key4, V value4, long key5, V value5);
+ method public static <V> androidx.collection.MutableLongObjectMap<V> mutableLongObjectMapOf();
+ method public static <V> androidx.collection.MutableLongObjectMap<V> mutableLongObjectMapOf(long key1, V value1);
+ method public static <V> androidx.collection.MutableLongObjectMap<V> mutableLongObjectMapOf(long key1, V value1, long key2, V value2);
+ method public static <V> androidx.collection.MutableLongObjectMap<V> mutableLongObjectMapOf(long key1, V value1, long key2, V value2, long key3, V value3);
+ method public static <V> androidx.collection.MutableLongObjectMap<V> mutableLongObjectMapOf(long key1, V value1, long key2, V value2, long key3, V value3, long key4, V value4);
+ method public static <V> androidx.collection.MutableLongObjectMap<V> mutableLongObjectMapOf(long key1, V value1, long key2, V value2, long key3, V value3, long key4, V value4, long key5, V value5);
+ }
+
+ public abstract sealed class LongSet {
+ method public final inline boolean all(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final operator boolean contains(long element);
+ method @IntRange(from=0L) public final int count();
+ method @IntRange(from=0L) public final inline int count(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline long first();
+ method public final inline long first(kotlin.jvm.functions.Function1<? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndex(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method @IntRange(from=0L) public final int getCapacity();
+ method @IntRange(from=0L) public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property @IntRange(from=0L) public final int capacity;
+ property @kotlin.PublishedApi internal final long[] elements;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property @IntRange(from=0L) public final int size;
+ field @kotlin.PublishedApi internal long[] elements;
+ field @kotlin.PublishedApi internal long[] metadata;
+ }
+
+ public final class LongSetKt {
+ method public static inline androidx.collection.LongSet buildLongSet(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongSet,kotlin.Unit> builderAction);
+ method public static inline androidx.collection.LongSet buildLongSet(kotlin.jvm.functions.Function1<? super androidx.collection.MutableLongSet,kotlin.Unit> builderAction);
+ method public static androidx.collection.LongSet emptyLongSet();
+ method public static androidx.collection.LongSet longSetOf();
+ method public static androidx.collection.LongSet longSetOf(long element1);
+ method public static androidx.collection.LongSet longSetOf(long element1, long element2);
+ method public static androidx.collection.LongSet longSetOf(long element1, long element2, long element3);
+ method public static androidx.collection.LongSet longSetOf(long... elements);
+ method public static androidx.collection.MutableLongSet mutableLongSetOf();
+ method public static androidx.collection.MutableLongSet mutableLongSetOf(long element1);
+ method public static androidx.collection.MutableLongSet mutableLongSetOf(long element1, long element2);
+ method public static androidx.collection.MutableLongSet mutableLongSetOf(long element1, long element2, long element3);
+ method public static androidx.collection.MutableLongSet mutableLongSetOf(long... elements);
+ }
+
+ public class LongSparseArray<E> implements java.lang.Cloneable {
+ ctor public LongSparseArray();
+ ctor public LongSparseArray(optional int initialCapacity);
+ method public void append(long key, E value);
+ method public void clear();
+ method public androidx.collection.LongSparseArray<E> clone();
+ method public boolean containsKey(long key);
+ method public boolean containsValue(E value);
+ method @Deprecated public void delete(long key);
+ method public operator E? get(long key);
+ method public E get(long key, E defaultValue);
+ method public int indexOfKey(long key);
+ method public int indexOfValue(E value);
+ method public boolean isEmpty();
+ method public long keyAt(int index);
+ method public void put(long key, E value);
+ method public void putAll(androidx.collection.LongSparseArray<? extends E> other);
+ method public E? putIfAbsent(long key, E value);
+ method public void remove(long key);
+ method public boolean remove(long key, E value);
+ method public void removeAt(int index);
+ method public E? replace(long key, E value);
+ method public boolean replace(long key, E oldValue, E newValue);
+ method public void setValueAt(int index, E value);
+ method public int size();
+ method public E valueAt(int index);
+ }
+
+ public final class LongSparseArrayKt {
+ method public static inline operator <T> boolean contains(androidx.collection.LongSparseArray<T>, long key);
+ method public static inline <T> void forEach(androidx.collection.LongSparseArray<T>, kotlin.jvm.functions.Function2<? super java.lang.Long,? super T,kotlin.Unit> action);
+ method public static inline <T> T getOrDefault(androidx.collection.LongSparseArray<T>, long key, T defaultValue);
+ method public static inline <T> T getOrElse(androidx.collection.LongSparseArray<T>, long key, kotlin.jvm.functions.Function0<? extends T> defaultValue);
+ method public static inline <T> int getSize(androidx.collection.LongSparseArray<T>);
+ method public static inline <T> boolean isNotEmpty(androidx.collection.LongSparseArray<T>);
+ method public static <T> kotlin.collections.LongIterator keyIterator(androidx.collection.LongSparseArray<T>);
+ method public static operator <T> androidx.collection.LongSparseArray<T> plus(androidx.collection.LongSparseArray<T>, androidx.collection.LongSparseArray<T> other);
+ method @Deprecated public static <T> boolean remove(androidx.collection.LongSparseArray<T>, long key, T value);
+ method public static inline operator <T> void set(androidx.collection.LongSparseArray<T>, long key, T value);
+ method public static <T> java.util.Iterator<T> valueIterator(androidx.collection.LongSparseArray<T>);
+ }
+
+ public class LruCache<K, V> {
+ ctor public LruCache(@IntRange(from=1L, to=androidx.collection.LruCacheKt.MAX_SIZE) int maxSize);
+ method protected V? create(K key);
+ method public final int createCount();
+ method protected void entryRemoved(boolean evicted, K key, V oldValue, V? newValue);
+ method public final void evictAll();
+ method public final int evictionCount();
+ method public final operator V? get(K key);
+ method public final int hitCount();
+ method public final int maxSize();
+ method public final int missCount();
+ method public final V? put(K key, V value);
+ method public final int putCount();
+ method public final V? remove(K key);
+ method public void resize(@IntRange(from=1L, to=androidx.collection.LruCacheKt.MAX_SIZE) int maxSize);
+ method public final int size();
+ method protected int sizeOf(K key, V value);
+ method public final java.util.Map<K,V> snapshot();
+ method public void trimToSize(int maxSize);
+ }
+
+ public final class LruCacheKt {
+ method public static inline <K, V> androidx.collection.LruCache<K,V> lruCache(int maxSize, optional kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Integer> sizeOf, optional kotlin.jvm.functions.Function1<? super K,? extends V?> create, optional kotlin.jvm.functions.Function4<? super java.lang.Boolean,? super K,? super V,? super V?,kotlin.Unit> onEntryRemoved);
+ }
+
+ public final class MutableDoubleList extends androidx.collection.DoubleList {
+ ctor public MutableDoubleList();
+ ctor public MutableDoubleList(optional int initialCapacity);
+ method public boolean add(double element);
+ method public void add(@IntRange(from=0L) int index, double element);
+ method public inline boolean addAll(androidx.collection.DoubleList elements);
+ method public inline boolean addAll(double[] elements);
+ method public boolean addAll(@IntRange(from=0L) int index, androidx.collection.DoubleList elements);
+ method public boolean addAll(@IntRange(from=0L) int index, double[] elements);
+ method public void clear();
+ method public void ensureCapacity(int capacity);
+ method public inline int getCapacity();
+ method public operator void minusAssign(androidx.collection.DoubleList elements);
+ method public inline operator void minusAssign(double element);
+ method public operator void minusAssign(double[] elements);
+ method public inline operator void plusAssign(androidx.collection.DoubleList elements);
+ method public inline operator void plusAssign(double element);
+ method public inline operator void plusAssign(double[] elements);
+ method public boolean remove(double element);
+ method public boolean removeAll(androidx.collection.DoubleList elements);
+ method public boolean removeAll(double[] elements);
+ method public double removeAt(@IntRange(from=0L) int index);
+ method public void removeRange(@IntRange(from=0L) int start, @IntRange(from=0L) int end);
+ method public boolean retainAll(androidx.collection.DoubleList elements);
+ method public boolean retainAll(double[] elements);
+ method public operator double set(@IntRange(from=0L) int index, double element);
+ method public void sort();
+ method public void sortDescending();
+ method public void trim(optional int minCapacity);
+ property public final inline int capacity;
+ }
+
+ public final class MutableFloatFloatMap extends androidx.collection.FloatFloatMap {
+ ctor public MutableFloatFloatMap();
+ ctor public MutableFloatFloatMap(optional int initialCapacity);
+ method public void clear();
+ method public inline float getOrPut(float key, kotlin.jvm.functions.Function0<java.lang.Float> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.FloatList keys);
+ method public inline operator void minusAssign(androidx.collection.FloatSet keys);
+ method public inline operator void minusAssign(float key);
+ method public inline operator void minusAssign(float[] keys);
+ method public inline operator void plusAssign(androidx.collection.FloatFloatMap from);
+ method public void put(float key, float value);
+ method public float put(float key, float value, float default);
+ method public void putAll(androidx.collection.FloatFloatMap from);
+ method public void remove(float key);
+ method public boolean remove(float key, float value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal void removeValueAt(int index);
+ method public operator void set(float key, float value);
+ method public int trim();
+ }
+
+ public final class MutableFloatIntMap extends androidx.collection.FloatIntMap {
+ ctor public MutableFloatIntMap();
+ ctor public MutableFloatIntMap(optional int initialCapacity);
+ method public void clear();
+ method public inline int getOrPut(float key, kotlin.jvm.functions.Function0<java.lang.Integer> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.FloatList keys);
+ method public inline operator void minusAssign(androidx.collection.FloatSet keys);
+ method public inline operator void minusAssign(float key);
+ method public inline operator void minusAssign(float[] keys);
+ method public inline operator void plusAssign(androidx.collection.FloatIntMap from);
+ method public void put(float key, int value);
+ method public int put(float key, int value, int default);
+ method public void putAll(androidx.collection.FloatIntMap from);
+ method public void remove(float key);
+ method public boolean remove(float key, int value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal void removeValueAt(int index);
+ method public operator void set(float key, int value);
+ method public int trim();
+ }
+
+ public final class MutableFloatList extends androidx.collection.FloatList {
+ ctor public MutableFloatList();
+ ctor public MutableFloatList(optional int initialCapacity);
+ method public boolean add(float element);
+ method public void add(@IntRange(from=0L) int index, float element);
+ method public inline boolean addAll(androidx.collection.FloatList elements);
+ method public inline boolean addAll(float[] elements);
+ method public boolean addAll(@IntRange(from=0L) int index, androidx.collection.FloatList elements);
+ method public boolean addAll(@IntRange(from=0L) int index, float[] elements);
+ method public void clear();
+ method public void ensureCapacity(int capacity);
+ method public inline int getCapacity();
+ method public operator void minusAssign(androidx.collection.FloatList elements);
+ method public inline operator void minusAssign(float element);
+ method public operator void minusAssign(float[] elements);
+ method public inline operator void plusAssign(androidx.collection.FloatList elements);
+ method public inline operator void plusAssign(float element);
+ method public inline operator void plusAssign(float[] elements);
+ method public boolean remove(float element);
+ method public boolean removeAll(androidx.collection.FloatList elements);
+ method public boolean removeAll(float[] elements);
+ method public float removeAt(@IntRange(from=0L) int index);
+ method public void removeRange(@IntRange(from=0L) int start, @IntRange(from=0L) int end);
+ method public boolean retainAll(androidx.collection.FloatList elements);
+ method public boolean retainAll(float[] elements);
+ method public operator float set(@IntRange(from=0L) int index, float element);
+ method public void sort();
+ method public void sortDescending();
+ method public void trim(optional int minCapacity);
+ property public final inline int capacity;
+ }
+
+ public final class MutableFloatLongMap extends androidx.collection.FloatLongMap {
+ ctor public MutableFloatLongMap();
+ ctor public MutableFloatLongMap(optional int initialCapacity);
+ method public void clear();
+ method public inline long getOrPut(float key, kotlin.jvm.functions.Function0<java.lang.Long> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.FloatList keys);
+ method public inline operator void minusAssign(androidx.collection.FloatSet keys);
+ method public inline operator void minusAssign(float key);
+ method public inline operator void minusAssign(float[] keys);
+ method public inline operator void plusAssign(androidx.collection.FloatLongMap from);
+ method public void put(float key, long value);
+ method public long put(float key, long value, long default);
+ method public void putAll(androidx.collection.FloatLongMap from);
+ method public void remove(float key);
+ method public boolean remove(float key, long value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Long,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal void removeValueAt(int index);
+ method public operator void set(float key, long value);
+ method public int trim();
+ }
+
+ public final class MutableFloatObjectMap<V> extends androidx.collection.FloatObjectMap<V> {
+ ctor public MutableFloatObjectMap();
+ ctor public MutableFloatObjectMap(optional int initialCapacity);
+ method public void clear();
+ method public inline V getOrPut(float key, kotlin.jvm.functions.Function0<? extends V> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.FloatList keys);
+ method public inline operator void minusAssign(androidx.collection.FloatSet keys);
+ method public inline operator void minusAssign(float key);
+ method public inline operator void minusAssign(float[] keys);
+ method public inline operator void plusAssign(androidx.collection.FloatObjectMap<V> from);
+ method public V? put(float key, V value);
+ method public void putAll(androidx.collection.FloatObjectMap<V> from);
+ method public V? remove(float key);
+ method public boolean remove(float key, V value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Float,? super V,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal V? removeValueAt(int index);
+ method public operator void set(float key, V value);
+ method public int trim();
+ }
+
+ public final class MutableFloatSet extends androidx.collection.FloatSet {
+ ctor public MutableFloatSet();
+ ctor public MutableFloatSet(optional int initialCapacity);
+ method public boolean add(float element);
+ method public boolean addAll(androidx.collection.FloatSet elements);
+ method public boolean addAll(float[] elements);
+ method public void clear();
+ method public operator void minusAssign(androidx.collection.FloatSet elements);
+ method public operator void minusAssign(float element);
+ method public operator void minusAssign(float[] elements);
+ method public operator void plusAssign(androidx.collection.FloatSet elements);
+ method public operator void plusAssign(float element);
+ method public operator void plusAssign(float[] elements);
+ method public boolean remove(float element);
+ method public boolean removeAll(androidx.collection.FloatSet elements);
+ method public boolean removeAll(float[] elements);
+ method @IntRange(from=0L) public int trim();
+ }
+
+ public final class MutableIntFloatMap extends androidx.collection.IntFloatMap {
+ ctor public MutableIntFloatMap();
+ ctor public MutableIntFloatMap(optional int initialCapacity);
+ method public void clear();
+ method public inline float getOrPut(int key, kotlin.jvm.functions.Function0<java.lang.Float> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.IntList keys);
+ method public inline operator void minusAssign(androidx.collection.IntSet keys);
+ method public inline operator void minusAssign(int key);
+ method public inline operator void minusAssign(int[] keys);
+ method public inline operator void plusAssign(androidx.collection.IntFloatMap from);
+ method public void put(int key, float value);
+ method public float put(int key, float value, float default);
+ method public void putAll(androidx.collection.IntFloatMap from);
+ method public void remove(int key);
+ method public boolean remove(int key, float value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Float,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal void removeValueAt(int index);
+ method public operator void set(int key, float value);
+ method public int trim();
+ }
+
+ public final class MutableIntIntMap extends androidx.collection.IntIntMap {
+ ctor public MutableIntIntMap();
+ ctor public MutableIntIntMap(optional int initialCapacity);
+ method public void clear();
+ method public inline int getOrPut(int key, kotlin.jvm.functions.Function0<java.lang.Integer> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.IntList keys);
+ method public inline operator void minusAssign(androidx.collection.IntSet keys);
+ method public inline operator void minusAssign(int key);
+ method public inline operator void minusAssign(int[] keys);
+ method public inline operator void plusAssign(androidx.collection.IntIntMap from);
+ method public void put(int key, int value);
+ method public int put(int key, int value, int default);
+ method public void putAll(androidx.collection.IntIntMap from);
+ method public void remove(int key);
+ method public boolean remove(int key, int value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal void removeValueAt(int index);
+ method public operator void set(int key, int value);
+ method public int trim();
+ }
+
+ public final class MutableIntList extends androidx.collection.IntList {
+ ctor public MutableIntList();
+ ctor public MutableIntList(optional int initialCapacity);
+ method public boolean add(int element);
+ method public void add(@IntRange(from=0L) int index, int element);
+ method public inline boolean addAll(androidx.collection.IntList elements);
+ method public boolean addAll(@IntRange(from=0L) int index, androidx.collection.IntList elements);
+ method public boolean addAll(@IntRange(from=0L) int index, int[] elements);
+ method public inline boolean addAll(int[] elements);
+ method public void clear();
+ method public void ensureCapacity(int capacity);
+ method public inline int getCapacity();
+ method public operator void minusAssign(androidx.collection.IntList elements);
+ method public inline operator void minusAssign(int element);
+ method public operator void minusAssign(int[] elements);
+ method public inline operator void plusAssign(androidx.collection.IntList elements);
+ method public inline operator void plusAssign(int element);
+ method public inline operator void plusAssign(int[] elements);
+ method public boolean remove(int element);
+ method public boolean removeAll(androidx.collection.IntList elements);
+ method public boolean removeAll(int[] elements);
+ method public int removeAt(@IntRange(from=0L) int index);
+ method public void removeRange(@IntRange(from=0L) int start, @IntRange(from=0L) int end);
+ method public boolean retainAll(androidx.collection.IntList elements);
+ method public boolean retainAll(int[] elements);
+ method public operator int set(@IntRange(from=0L) int index, int element);
+ method public void sort();
+ method public void sortDescending();
+ method public void trim(optional int minCapacity);
+ property public final inline int capacity;
+ }
+
+ public final class MutableIntLongMap extends androidx.collection.IntLongMap {
+ ctor public MutableIntLongMap();
+ ctor public MutableIntLongMap(optional int initialCapacity);
+ method public void clear();
+ method public inline long getOrPut(int key, kotlin.jvm.functions.Function0<java.lang.Long> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.IntList keys);
+ method public inline operator void minusAssign(androidx.collection.IntSet keys);
+ method public inline operator void minusAssign(int key);
+ method public inline operator void minusAssign(int[] keys);
+ method public inline operator void plusAssign(androidx.collection.IntLongMap from);
+ method public void put(int key, long value);
+ method public long put(int key, long value, long default);
+ method public void putAll(androidx.collection.IntLongMap from);
+ method public void remove(int key);
+ method public boolean remove(int key, long value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Long,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal void removeValueAt(int index);
+ method public operator void set(int key, long value);
+ method public int trim();
+ }
+
+ public final class MutableIntObjectMap<V> extends androidx.collection.IntObjectMap<V> {
+ ctor public MutableIntObjectMap();
+ ctor public MutableIntObjectMap(optional int initialCapacity);
+ method public void clear();
+ method public inline V getOrPut(int key, kotlin.jvm.functions.Function0<? extends V> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.IntList keys);
+ method public inline operator void minusAssign(androidx.collection.IntSet keys);
+ method public inline operator void minusAssign(int key);
+ method public inline operator void minusAssign(int[] keys);
+ method public inline operator void plusAssign(androidx.collection.IntObjectMap<V> from);
+ method public V? put(int key, V value);
+ method public void putAll(androidx.collection.IntObjectMap<V> from);
+ method public V? remove(int key);
+ method public boolean remove(int key, V value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super V,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal V? removeValueAt(int index);
+ method public operator void set(int key, V value);
+ method public int trim();
+ }
+
+ public final class MutableIntSet extends androidx.collection.IntSet {
+ ctor public MutableIntSet();
+ ctor public MutableIntSet(optional int initialCapacity);
+ method public boolean add(int element);
+ method public boolean addAll(androidx.collection.IntSet elements);
+ method public boolean addAll(int[] elements);
+ method public void clear();
+ method public operator void minusAssign(androidx.collection.IntSet elements);
+ method public operator void minusAssign(int element);
+ method public operator void minusAssign(int[] elements);
+ method public operator void plusAssign(androidx.collection.IntSet elements);
+ method public operator void plusAssign(int element);
+ method public operator void plusAssign(int[] elements);
+ method public boolean remove(int element);
+ method public boolean removeAll(androidx.collection.IntSet elements);
+ method public boolean removeAll(int[] elements);
+ method @IntRange(from=0L) public int trim();
+ }
+
+ public final class MutableLongFloatMap extends androidx.collection.LongFloatMap {
+ ctor public MutableLongFloatMap();
+ ctor public MutableLongFloatMap(optional int initialCapacity);
+ method public void clear();
+ method public inline float getOrPut(long key, kotlin.jvm.functions.Function0<java.lang.Float> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.LongList keys);
+ method public inline operator void minusAssign(androidx.collection.LongSet keys);
+ method public inline operator void minusAssign(long key);
+ method public inline operator void minusAssign(long[] keys);
+ method public inline operator void plusAssign(androidx.collection.LongFloatMap from);
+ method public void put(long key, float value);
+ method public float put(long key, float value, float default);
+ method public void putAll(androidx.collection.LongFloatMap from);
+ method public void remove(long key);
+ method public boolean remove(long key, float value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Float,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal void removeValueAt(int index);
+ method public operator void set(long key, float value);
+ method public int trim();
+ }
+
+ public final class MutableLongIntMap extends androidx.collection.LongIntMap {
+ ctor public MutableLongIntMap();
+ ctor public MutableLongIntMap(optional int initialCapacity);
+ method public void clear();
+ method public inline int getOrPut(long key, kotlin.jvm.functions.Function0<java.lang.Integer> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.LongList keys);
+ method public inline operator void minusAssign(androidx.collection.LongSet keys);
+ method public inline operator void minusAssign(long key);
+ method public inline operator void minusAssign(long[] keys);
+ method public inline operator void plusAssign(androidx.collection.LongIntMap from);
+ method public void put(long key, int value);
+ method public int put(long key, int value, int default);
+ method public void putAll(androidx.collection.LongIntMap from);
+ method public void remove(long key);
+ method public boolean remove(long key, int value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal void removeValueAt(int index);
+ method public operator void set(long key, int value);
+ method public int trim();
+ }
+
+ public final class MutableLongList extends androidx.collection.LongList {
+ ctor public MutableLongList();
+ ctor public MutableLongList(optional int initialCapacity);
+ method public void add(@IntRange(from=0L) int index, long element);
+ method public boolean add(long element);
+ method public inline boolean addAll(androidx.collection.LongList elements);
+ method public boolean addAll(@IntRange(from=0L) int index, androidx.collection.LongList elements);
+ method public boolean addAll(@IntRange(from=0L) int index, long[] elements);
+ method public inline boolean addAll(long[] elements);
+ method public void clear();
+ method public void ensureCapacity(int capacity);
+ method public inline int getCapacity();
+ method public operator void minusAssign(androidx.collection.LongList elements);
+ method public inline operator void minusAssign(long element);
+ method public operator void minusAssign(long[] elements);
+ method public inline operator void plusAssign(androidx.collection.LongList elements);
+ method public inline operator void plusAssign(long element);
+ method public inline operator void plusAssign(long[] elements);
+ method public boolean remove(long element);
+ method public boolean removeAll(androidx.collection.LongList elements);
+ method public boolean removeAll(long[] elements);
+ method public long removeAt(@IntRange(from=0L) int index);
+ method public void removeRange(@IntRange(from=0L) int start, @IntRange(from=0L) int end);
+ method public boolean retainAll(androidx.collection.LongList elements);
+ method public boolean retainAll(long[] elements);
+ method public operator long set(@IntRange(from=0L) int index, long element);
+ method public void sort();
+ method public void sortDescending();
+ method public void trim(optional int minCapacity);
+ property public final inline int capacity;
+ }
+
+ public final class MutableLongLongMap extends androidx.collection.LongLongMap {
+ ctor public MutableLongLongMap();
+ ctor public MutableLongLongMap(optional int initialCapacity);
+ method public void clear();
+ method public inline long getOrPut(long key, kotlin.jvm.functions.Function0<java.lang.Long> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.LongList keys);
+ method public inline operator void minusAssign(androidx.collection.LongSet keys);
+ method public inline operator void minusAssign(long key);
+ method public inline operator void minusAssign(long[] keys);
+ method public inline operator void plusAssign(androidx.collection.LongLongMap from);
+ method public void put(long key, long value);
+ method public long put(long key, long value, long default);
+ method public void putAll(androidx.collection.LongLongMap from);
+ method public void remove(long key);
+ method public boolean remove(long key, long value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Long,? super java.lang.Long,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal void removeValueAt(int index);
+ method public operator void set(long key, long value);
+ method public int trim();
+ }
+
+ public final class MutableLongObjectMap<V> extends androidx.collection.LongObjectMap<V> {
+ ctor public MutableLongObjectMap();
+ ctor public MutableLongObjectMap(optional int initialCapacity);
+ method public void clear();
+ method public inline V getOrPut(long key, kotlin.jvm.functions.Function0<? extends V> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.LongList keys);
+ method public inline operator void minusAssign(androidx.collection.LongSet keys);
+ method public inline operator void minusAssign(long key);
+ method public inline operator void minusAssign(long[] keys);
+ method public inline operator void plusAssign(androidx.collection.LongObjectMap<V> from);
+ method public V? put(long key, V value);
+ method public void putAll(androidx.collection.LongObjectMap<V> from);
+ method public V? remove(long key);
+ method public boolean remove(long key, V value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super java.lang.Long,? super V,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal V? removeValueAt(int index);
+ method public operator void set(long key, V value);
+ method public int trim();
+ }
+
+ public final class MutableLongSet extends androidx.collection.LongSet {
+ ctor public MutableLongSet();
+ ctor public MutableLongSet(optional int initialCapacity);
+ method public boolean add(long element);
+ method public boolean addAll(androidx.collection.LongSet elements);
+ method public boolean addAll(long[] elements);
+ method public void clear();
+ method public operator void minusAssign(androidx.collection.LongSet elements);
+ method public operator void minusAssign(long element);
+ method public operator void minusAssign(long[] elements);
+ method public operator void plusAssign(androidx.collection.LongSet elements);
+ method public operator void plusAssign(long element);
+ method public operator void plusAssign(long[] elements);
+ method public boolean remove(long element);
+ method public boolean removeAll(androidx.collection.LongSet elements);
+ method public boolean removeAll(long[] elements);
+ method @IntRange(from=0L) public int trim();
+ }
+
+ public final class MutableObjectFloatMap<K> extends androidx.collection.ObjectFloatMap<K> {
+ ctor public MutableObjectFloatMap();
+ ctor public MutableObjectFloatMap(optional int initialCapacity);
+ method public void clear();
+ method public inline float getOrPut(K key, kotlin.jvm.functions.Function0<java.lang.Float> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.ScatterSet<K> keys);
+ method public inline operator void minusAssign(Iterable<? extends K> keys);
+ method public inline operator void minusAssign(K key);
+ method public inline operator void minusAssign(K[] keys);
+ method public inline operator void minusAssign(kotlin.sequences.Sequence<? extends K> keys);
+ method public inline operator void plusAssign(androidx.collection.ObjectFloatMap<K> from);
+ method public void put(K key, float value);
+ method public float put(K key, float value, float default);
+ method public void putAll(androidx.collection.ObjectFloatMap<K> from);
+ method public void remove(K key);
+ method public boolean remove(K key, float value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal void removeValueAt(int index);
+ method public operator void set(K key, float value);
+ method public int trim();
+ }
+
+ public final class MutableObjectIntMap<K> extends androidx.collection.ObjectIntMap<K> {
+ ctor public MutableObjectIntMap();
+ ctor public MutableObjectIntMap(optional int initialCapacity);
+ method public void clear();
+ method public inline int getOrPut(K key, kotlin.jvm.functions.Function0<java.lang.Integer> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.ScatterSet<K> keys);
+ method public inline operator void minusAssign(Iterable<? extends K> keys);
+ method public inline operator void minusAssign(K key);
+ method public inline operator void minusAssign(K[] keys);
+ method public inline operator void minusAssign(kotlin.sequences.Sequence<? extends K> keys);
+ method public inline operator void plusAssign(androidx.collection.ObjectIntMap<K> from);
+ method public void put(K key, int value);
+ method public int put(K key, int value, int default);
+ method public void putAll(androidx.collection.ObjectIntMap<K> from);
+ method public void remove(K key);
+ method public boolean remove(K key, int value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal void removeValueAt(int index);
+ method public operator void set(K key, int value);
+ method public int trim();
+ }
+
+ public final class MutableObjectList<E> extends androidx.collection.ObjectList<E> {
+ ctor public MutableObjectList();
+ ctor public MutableObjectList(optional int initialCapacity);
+ method public boolean add(E element);
+ method public void add(@IntRange(from=0L) int index, E element);
+ method public boolean addAll(androidx.collection.ObjectList<E> elements);
+ method public boolean addAll(androidx.collection.ScatterSet<E> elements);
+ method public boolean addAll(E[] elements);
+ method public boolean addAll(@IntRange(from=0L) int index, androidx.collection.ObjectList<E> elements);
+ method public boolean addAll(@IntRange(from=0L) int index, E[] elements);
+ method public boolean addAll(@IntRange(from=0L) int index, java.util.Collection<? extends E> elements);
+ method public boolean addAll(Iterable<? extends E> elements);
+ method public boolean addAll(java.util.List<? extends E> elements);
+ method public boolean addAll(kotlin.sequences.Sequence<? extends E> elements);
+ method public java.util.List<E> asList();
+ method public java.util.List<E> asMutableList();
+ method public void clear();
+ method public inline void ensureCapacity(int capacity);
+ method public inline int getCapacity();
+ method public operator void minusAssign(androidx.collection.ObjectList<E> elements);
+ method public operator void minusAssign(androidx.collection.ScatterSet<E> elements);
+ method public inline operator void minusAssign(E element);
+ method public operator void minusAssign(E[] elements);
+ method public operator void minusAssign(Iterable<? extends E> elements);
+ method public operator void minusAssign(java.util.List<? extends E> elements);
+ method public operator void minusAssign(kotlin.sequences.Sequence<? extends E> elements);
+ method public operator void plusAssign(androidx.collection.ObjectList<E> elements);
+ method public operator void plusAssign(androidx.collection.ScatterSet<E> elements);
+ method public inline operator void plusAssign(E element);
+ method public operator void plusAssign(E[] elements);
+ method public operator void plusAssign(Iterable<? extends E> elements);
+ method public operator void plusAssign(java.util.List<? extends E> elements);
+ method public operator void plusAssign(kotlin.sequences.Sequence<? extends E> elements);
+ method public boolean remove(E element);
+ method public boolean removeAll(androidx.collection.ObjectList<E> elements);
+ method public boolean removeAll(androidx.collection.ScatterSet<E> elements);
+ method public boolean removeAll(E[] elements);
+ method public boolean removeAll(Iterable<? extends E> elements);
+ method public boolean removeAll(java.util.List<? extends E> elements);
+ method public boolean removeAll(kotlin.sequences.Sequence<? extends E> elements);
+ method public E removeAt(@IntRange(from=0L) int index);
+ method public inline void removeIf(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public void removeRange(@IntRange(from=0L) int start, @IntRange(from=0L) int end);
+ method @kotlin.PublishedApi internal void resizeStorage(int capacity, Object?[] oldContent);
+ method public boolean retainAll(androidx.collection.ObjectList<E> elements);
+ method public boolean retainAll(E[] elements);
+ method public boolean retainAll(Iterable<? extends E> elements);
+ method public boolean retainAll(java.util.Collection<? extends E> elements);
+ method public boolean retainAll(kotlin.sequences.Sequence<? extends E> elements);
+ method public operator E set(@IntRange(from=0L) int index, E element);
+ method public void trim(optional int minCapacity);
+ property public final inline int capacity;
+ }
+
+ public final class MutableObjectLongMap<K> extends androidx.collection.ObjectLongMap<K> {
+ ctor public MutableObjectLongMap();
+ ctor public MutableObjectLongMap(optional int initialCapacity);
+ method public void clear();
+ method public inline long getOrPut(K key, kotlin.jvm.functions.Function0<java.lang.Long> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.ScatterSet<K> keys);
+ method public inline operator void minusAssign(Iterable<? extends K> keys);
+ method public inline operator void minusAssign(K key);
+ method public inline operator void minusAssign(K[] keys);
+ method public inline operator void minusAssign(kotlin.sequences.Sequence<? extends K> keys);
+ method public inline operator void plusAssign(androidx.collection.ObjectLongMap<K> from);
+ method public void put(K key, long value);
+ method public long put(K key, long value, long default);
+ method public void putAll(androidx.collection.ObjectLongMap<K> from);
+ method public void remove(K key);
+ method public boolean remove(K key, long value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal void removeValueAt(int index);
+ method public operator void set(K key, long value);
+ method public int trim();
+ }
+
+ public final class MutableOrderedScatterSet<E> extends androidx.collection.OrderedScatterSet<E> {
+ ctor public MutableOrderedScatterSet();
+ ctor public MutableOrderedScatterSet(optional int initialCapacity);
+ method public boolean add(E element);
+ method public boolean addAll(androidx.collection.ObjectList<E> elements);
+ method public boolean addAll(androidx.collection.OrderedScatterSet<E> elements);
+ method public boolean addAll(androidx.collection.ScatterSet<E> elements);
+ method public boolean addAll(E[] elements);
+ method public boolean addAll(Iterable<? extends E> elements);
+ method public boolean addAll(kotlin.sequences.Sequence<? extends E> elements);
+ method public java.util.Set<E> asMutableSet();
+ method public void clear();
+ method public operator void minusAssign(androidx.collection.ObjectList<E> elements);
+ method public operator void minusAssign(androidx.collection.OrderedScatterSet<E> elements);
+ method public operator void minusAssign(androidx.collection.ScatterSet<E> elements);
+ method public operator void minusAssign(E element);
+ method public operator void minusAssign(E[] elements);
+ method public operator void minusAssign(Iterable<? extends E> elements);
+ method public operator void minusAssign(kotlin.sequences.Sequence<? extends E> elements);
+ method public operator void plusAssign(androidx.collection.ObjectList<E> elements);
+ method public operator void plusAssign(androidx.collection.OrderedScatterSet<E> elements);
+ method public operator void plusAssign(androidx.collection.ScatterSet<E> elements);
+ method public operator void plusAssign(E element);
+ method public operator void plusAssign(E[] elements);
+ method public operator void plusAssign(Iterable<? extends E> elements);
+ method public operator void plusAssign(kotlin.sequences.Sequence<? extends E> elements);
+ method public boolean remove(E element);
+ method public boolean removeAll(androidx.collection.ObjectList<E> elements);
+ method public boolean removeAll(androidx.collection.OrderedScatterSet<E> elements);
+ method public boolean removeAll(androidx.collection.ScatterSet<E> elements);
+ method public boolean removeAll(E[] elements);
+ method public boolean removeAll(Iterable<? extends E> elements);
+ method public boolean removeAll(kotlin.sequences.Sequence<? extends E> elements);
+ method @kotlin.PublishedApi internal void removeElementAt(int index);
+ method public inline void removeIf(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public boolean retainAll(androidx.collection.OrderedScatterSet<E> elements);
+ method public boolean retainAll(androidx.collection.ScatterSet<E> elements);
+ method public boolean retainAll(java.util.Collection<? extends E> elements);
+ method public inline boolean retainAll(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method @IntRange(from=0L) public int trim();
+ method public void trimToSize(int maxSize);
+ }
+
+ public final class MutableScatterMap<K, V> extends androidx.collection.ScatterMap<K,V> {
+ ctor public MutableScatterMap();
+ ctor public MutableScatterMap(optional int initialCapacity);
+ method public java.util.Map<K,V> asMutableMap();
+ method public void clear();
+ method public inline V compute(K key, kotlin.jvm.functions.Function2<? super K,? super V?,? extends V> computeBlock);
+ method @kotlin.PublishedApi internal int findInsertIndex(K key);
+ method public inline V getOrPut(K key, kotlin.jvm.functions.Function0<? extends V> defaultValue);
+ method public inline operator void minusAssign(androidx.collection.ObjectList<K> keys);
+ method public inline operator void minusAssign(androidx.collection.ScatterSet<K> keys);
+ method public inline operator void minusAssign(Iterable<? extends K> keys);
+ method public inline operator void minusAssign(K key);
+ method public inline operator void minusAssign(K[] keys);
+ method public inline operator void minusAssign(kotlin.sequences.Sequence<? extends K> keys);
+ method public inline operator void plusAssign(androidx.collection.ScatterMap<K,V> from);
+ method public inline operator void plusAssign(Iterable<? extends kotlin.Pair<? extends K,? extends V>> pairs);
+ method public inline operator void plusAssign(java.util.Map<K,? extends V> from);
+ method public inline operator void plusAssign(kotlin.Pair<? extends K,? extends V> pair);
+ method public inline operator void plusAssign(kotlin.Pair<? extends K,? extends V>[] pairs);
+ method public inline operator void plusAssign(kotlin.sequences.Sequence<? extends kotlin.Pair<? extends K,? extends V>> pairs);
+ method public V? put(K key, V value);
+ method public void putAll(androidx.collection.ScatterMap<K,V> from);
+ method public void putAll(Iterable<? extends kotlin.Pair<? extends K,? extends V>> pairs);
+ method public void putAll(java.util.Map<K,? extends V> from);
+ method public void putAll(kotlin.Pair<? extends K,? extends V>[] pairs);
+ method public void putAll(kotlin.sequences.Sequence<? extends kotlin.Pair<? extends K,? extends V>> pairs);
+ method public V? remove(K key);
+ method public boolean remove(K key, V value);
+ method public inline void removeIf(kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal V? removeValueAt(int index);
+ method public operator void set(K key, V value);
+ method public int trim();
+ }
+
+ public final class MutableScatterSet<E> extends androidx.collection.ScatterSet<E> {
+ ctor public MutableScatterSet();
+ ctor public MutableScatterSet(optional int initialCapacity);
+ method public boolean add(E element);
+ method public boolean addAll(androidx.collection.ObjectList<E> elements);
+ method public boolean addAll(androidx.collection.OrderedScatterSet<E> elements);
+ method public boolean addAll(androidx.collection.ScatterSet<E> elements);
+ method public boolean addAll(E[] elements);
+ method public boolean addAll(Iterable<? extends E> elements);
+ method public boolean addAll(kotlin.sequences.Sequence<? extends E> elements);
+ method public java.util.Set<E> asMutableSet();
+ method public void clear();
+ method public operator void minusAssign(androidx.collection.ObjectList<E> elements);
+ method public operator void minusAssign(androidx.collection.OrderedScatterSet<E> elements);
+ method public operator void minusAssign(androidx.collection.ScatterSet<E> elements);
+ method public operator void minusAssign(E element);
+ method public operator void minusAssign(E[] elements);
+ method public operator void minusAssign(Iterable<? extends E> elements);
+ method public operator void minusAssign(kotlin.sequences.Sequence<? extends E> elements);
+ method public operator void plusAssign(androidx.collection.ObjectList<E> elements);
+ method public operator void plusAssign(androidx.collection.OrderedScatterSet<E> elements);
+ method public operator void plusAssign(androidx.collection.ScatterSet<E> elements);
+ method public operator void plusAssign(E element);
+ method public operator void plusAssign(E[] elements);
+ method public operator void plusAssign(Iterable<? extends E> elements);
+ method public operator void plusAssign(kotlin.sequences.Sequence<? extends E> elements);
+ method public boolean remove(E element);
+ method public boolean removeAll(androidx.collection.ObjectList<E> elements);
+ method public boolean removeAll(androidx.collection.OrderedScatterSet<E> elements);
+ method public boolean removeAll(androidx.collection.ScatterSet<E> elements);
+ method public boolean removeAll(E[] elements);
+ method public boolean removeAll(Iterable<? extends E> elements);
+ method public boolean removeAll(kotlin.sequences.Sequence<? extends E> elements);
+ method @kotlin.PublishedApi internal void removeElementAt(int index);
+ method public inline void removeIf(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public boolean retainAll(androidx.collection.OrderedScatterSet<E> elements);
+ method public boolean retainAll(androidx.collection.ScatterSet<E> elements);
+ method public boolean retainAll(java.util.Collection<? extends E> elements);
+ method public boolean retainAll(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method @IntRange(from=0L) public int trim();
+ }
+
+ public abstract sealed class ObjectFloatMap<K> {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(K key);
+ method public final boolean containsKey(K key);
+ method public final boolean containsValue(float value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal final int findKeyIndex(K key);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super K,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit> block);
+ method public final operator float get(K key);
+ method public final int getCapacity();
+ method public final float getOrDefault(K key, float defaultValue);
+ method public final inline float getOrElse(K key, kotlin.jvm.functions.Function0<java.lang.Float> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super K,? super java.lang.Float,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property @kotlin.PublishedApi internal final Object?[] keys;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final float[] values;
+ field @kotlin.PublishedApi internal Object?[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal float[] values;
+ }
+
+ public final class ObjectFloatMapKt {
+ method public static inline <K> androidx.collection.ObjectFloatMap<K> buildObjectFloatMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableObjectFloatMap<K>,kotlin.Unit> builderAction);
+ method public static inline <K> androidx.collection.ObjectFloatMap<K> buildObjectFloatMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableObjectFloatMap<K>,kotlin.Unit> builderAction);
+ method public static <K> androidx.collection.ObjectFloatMap<K> emptyObjectFloatMap();
+ method public static <K> androidx.collection.MutableObjectFloatMap<K> mutableObjectFloatMapOf();
+ method public static <K> androidx.collection.MutableObjectFloatMap<K> mutableObjectFloatMapOf(K key1, float value1);
+ method public static <K> androidx.collection.MutableObjectFloatMap<K> mutableObjectFloatMapOf(K key1, float value1, K key2, float value2);
+ method public static <K> androidx.collection.MutableObjectFloatMap<K> mutableObjectFloatMapOf(K key1, float value1, K key2, float value2, K key3, float value3);
+ method public static <K> androidx.collection.MutableObjectFloatMap<K> mutableObjectFloatMapOf(K key1, float value1, K key2, float value2, K key3, float value3, K key4, float value4);
+ method public static <K> androidx.collection.MutableObjectFloatMap<K> mutableObjectFloatMapOf(K key1, float value1, K key2, float value2, K key3, float value3, K key4, float value4, K key5, float value5);
+ method public static <K> androidx.collection.ObjectFloatMap<K> objectFloatMap();
+ method public static <K> androidx.collection.ObjectFloatMap<K> objectFloatMapOf(K key1, float value1);
+ method public static <K> androidx.collection.ObjectFloatMap<K> objectFloatMapOf(K key1, float value1, K key2, float value2);
+ method public static <K> androidx.collection.ObjectFloatMap<K> objectFloatMapOf(K key1, float value1, K key2, float value2, K key3, float value3);
+ method public static <K> androidx.collection.ObjectFloatMap<K> objectFloatMapOf(K key1, float value1, K key2, float value2, K key3, float value3, K key4, float value4);
+ method public static <K> androidx.collection.ObjectFloatMap<K> objectFloatMapOf(K key1, float value1, K key2, float value2, K key3, float value3, K key4, float value4, K key5, float value5);
+ }
+
+ public abstract sealed class ObjectIntMap<K> {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(K key);
+ method public final boolean containsKey(K key);
+ method public final boolean containsValue(int value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal final int findKeyIndex(K key);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super K,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final operator int get(K key);
+ method public final int getCapacity();
+ method public final int getOrDefault(K key, int defaultValue);
+ method public final inline int getOrElse(K key, kotlin.jvm.functions.Function0<java.lang.Integer> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super K,? super java.lang.Integer,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property @kotlin.PublishedApi internal final Object?[] keys;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final int[] values;
+ field @kotlin.PublishedApi internal Object?[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal int[] values;
+ }
+
+ public final class ObjectIntMapKt {
+ method public static inline <K> androidx.collection.ObjectIntMap<K> buildObjectIntMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableObjectIntMap<K>,kotlin.Unit> builderAction);
+ method public static inline <K> androidx.collection.ObjectIntMap<K> buildObjectIntMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableObjectIntMap<K>,kotlin.Unit> builderAction);
+ method public static <K> androidx.collection.ObjectIntMap<K> emptyObjectIntMap();
+ method public static <K> androidx.collection.MutableObjectIntMap<K> mutableObjectIntMapOf();
+ method public static <K> androidx.collection.MutableObjectIntMap<K> mutableObjectIntMapOf(K key1, int value1);
+ method public static <K> androidx.collection.MutableObjectIntMap<K> mutableObjectIntMapOf(K key1, int value1, K key2, int value2);
+ method public static <K> androidx.collection.MutableObjectIntMap<K> mutableObjectIntMapOf(K key1, int value1, K key2, int value2, K key3, int value3);
+ method public static <K> androidx.collection.MutableObjectIntMap<K> mutableObjectIntMapOf(K key1, int value1, K key2, int value2, K key3, int value3, K key4, int value4);
+ method public static <K> androidx.collection.MutableObjectIntMap<K> mutableObjectIntMapOf(K key1, int value1, K key2, int value2, K key3, int value3, K key4, int value4, K key5, int value5);
+ method public static <K> androidx.collection.ObjectIntMap<K> objectIntMap();
+ method public static <K> androidx.collection.ObjectIntMap<K> objectIntMapOf(K key1, int value1);
+ method public static <K> androidx.collection.ObjectIntMap<K> objectIntMapOf(K key1, int value1, K key2, int value2);
+ method public static <K> androidx.collection.ObjectIntMap<K> objectIntMapOf(K key1, int value1, K key2, int value2, K key3, int value3);
+ method public static <K> androidx.collection.ObjectIntMap<K> objectIntMapOf(K key1, int value1, K key2, int value2, K key3, int value3, K key4, int value4);
+ method public static <K> androidx.collection.ObjectIntMap<K> objectIntMapOf(K key1, int value1, K key2, int value2, K key3, int value3, K key4, int value4, K key5, int value5);
+ }
+
+ public abstract sealed class ObjectList<E> {
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public abstract java.util.List<E> asList();
+ method public final operator boolean contains(E element);
+ method public final boolean containsAll(androidx.collection.ObjectList<E> elements);
+ method public final boolean containsAll(E[] elements);
+ method public final boolean containsAll(Iterable<? extends E> elements);
+ method public final boolean containsAll(java.util.List<? extends E> elements);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final E elementAt(@IntRange(from=0L) int index);
+ method public final inline E elementAtOrElse(@IntRange(from=0L) int index, kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends E> defaultValue);
+ method public final E first();
+ method public final inline E first(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final inline E? firstOrNull();
+ method public final inline E? firstOrNull(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final inline <R> R fold(R initial, kotlin.jvm.functions.Function2<? super R,? super E,? extends R> operation);
+ method public final inline <R> R foldIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super R,? super E,? extends R> operation);
+ method public final inline <R> R foldRight(R initial, kotlin.jvm.functions.Function2<? super E,? super R,? extends R> operation);
+ method public final inline <R> R foldRightIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super E,? super R,? extends R> operation);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super E,kotlin.Unit> block);
+ method public final inline void forEachIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super E,kotlin.Unit> block);
+ method public final inline void forEachReversed(kotlin.jvm.functions.Function1<? super E,kotlin.Unit> block);
+ method public final inline void forEachReversedIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super E,kotlin.Unit> block);
+ method public final operator E get(@IntRange(from=0L) int index);
+ method public final inline kotlin.ranges.IntRange getIndices();
+ method @IntRange(from=-1L) public final inline int getLastIndex();
+ method @IntRange(from=0L) public final int getSize();
+ method public final int indexOf(E element);
+ method public final inline int indexOfFirst(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final inline int indexOfLast(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, optional kotlin.jvm.functions.Function1<? super E,? extends java.lang.CharSequence>? transform);
+ method public final E last();
+ method public final inline E last(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final int lastIndexOf(E element);
+ method public final inline E? lastOrNull();
+ method public final inline E? lastOrNull(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final boolean none();
+ method public final inline boolean reversedAny(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ property @kotlin.PublishedApi internal final int _size;
+ property @kotlin.PublishedApi internal final Object?[] content;
+ property public final inline kotlin.ranges.IntRange indices;
+ property @IntRange(from=-1L) public final inline int lastIndex;
+ property @IntRange(from=0L) public final int size;
+ field @kotlin.PublishedApi internal int _size;
+ field @kotlin.PublishedApi internal Object?[] content;
+ }
+
+ public final class ObjectListKt {
+ method public static <E> androidx.collection.ObjectList<E> emptyObjectList();
+ method public static inline <E> androidx.collection.MutableObjectList<E> mutableObjectListOf();
+ method public static <E> androidx.collection.MutableObjectList<E> mutableObjectListOf(E element1);
+ method public static <E> androidx.collection.MutableObjectList<E> mutableObjectListOf(E element1, E element2);
+ method public static <E> androidx.collection.MutableObjectList<E> mutableObjectListOf(E element1, E element2, E element3);
+ method public static inline <E> androidx.collection.MutableObjectList<E> mutableObjectListOf(E... elements);
+ method public static <E> androidx.collection.ObjectList<E> objectListOf();
+ method public static <E> androidx.collection.ObjectList<E> objectListOf(E element1);
+ method public static <E> androidx.collection.ObjectList<E> objectListOf(E element1, E element2);
+ method public static <E> androidx.collection.ObjectList<E> objectListOf(E element1, E element2, E element3);
+ method public static <E> androidx.collection.ObjectList<E> objectListOf(E... elements);
+ }
+
+ public abstract sealed class ObjectLongMap<K> {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,java.lang.Boolean> predicate);
+ method public final inline operator boolean contains(K key);
+ method public final boolean containsKey(K key);
+ method public final boolean containsValue(long value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,java.lang.Boolean> predicate);
+ method @kotlin.PublishedApi internal final int findKeyIndex(K key);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super K,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super java.lang.Long,kotlin.Unit> block);
+ method public final operator long get(K key);
+ method public final int getCapacity();
+ method public final long getOrDefault(K key, long defaultValue);
+ method public final inline long getOrElse(K key, kotlin.jvm.functions.Function0<java.lang.Long> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function2<? super K,? super java.lang.Long,? extends java.lang.CharSequence> transform);
+ method public final boolean none();
+ property public final int capacity;
+ property @kotlin.PublishedApi internal final Object?[] keys;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final long[] values;
+ field @kotlin.PublishedApi internal Object?[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal long[] values;
+ }
+
+ public final class ObjectLongMapKt {
+ method public static inline <K> androidx.collection.ObjectLongMap<K> buildObjectLongMap(int initialCapacity, kotlin.jvm.functions.Function1<? super androidx.collection.MutableObjectLongMap<K>,kotlin.Unit> builderAction);
+ method public static inline <K> androidx.collection.ObjectLongMap<K> buildObjectLongMap(kotlin.jvm.functions.Function1<? super androidx.collection.MutableObjectLongMap<K>,kotlin.Unit> builderAction);
+ method public static <K> androidx.collection.ObjectLongMap<K> emptyObjectLongMap();
+ method public static <K> androidx.collection.MutableObjectLongMap<K> mutableObjectLongMapOf();
+ method public static <K> androidx.collection.MutableObjectLongMap<K> mutableObjectLongMapOf(K key1, long value1);
+ method public static <K> androidx.collection.MutableObjectLongMap<K> mutableObjectLongMapOf(K key1, long value1, K key2, long value2);
+ method public static <K> androidx.collection.MutableObjectLongMap<K> mutableObjectLongMapOf(K key1, long value1, K key2, long value2, K key3, long value3);
+ method public static <K> androidx.collection.MutableObjectLongMap<K> mutableObjectLongMapOf(K key1, long value1, K key2, long value2, K key3, long value3, K key4, long value4);
+ method public static <K> androidx.collection.MutableObjectLongMap<K> mutableObjectLongMapOf(K key1, long value1, K key2, long value2, K key3, long value3, K key4, long value4, K key5, long value5);
+ method public static <K> androidx.collection.ObjectLongMap<K> objectLongMap();
+ method public static <K> androidx.collection.ObjectLongMap<K> objectLongMapOf(K key1, long value1);
+ method public static <K> androidx.collection.ObjectLongMap<K> objectLongMapOf(K key1, long value1, K key2, long value2);
+ method public static <K> androidx.collection.ObjectLongMap<K> objectLongMapOf(K key1, long value1, K key2, long value2, K key3, long value3);
+ method public static <K> androidx.collection.ObjectLongMap<K> objectLongMapOf(K key1, long value1, K key2, long value2, K key3, long value3, K key4, long value4);
+ method public static <K> androidx.collection.ObjectLongMap<K> objectLongMapOf(K key1, long value1, K key2, long value2, K key3, long value3, K key4, long value4, K key5, long value5);
+ }
+
+ public abstract sealed class OrderedScatterSet<E> {
+ method public final inline boolean all(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final java.util.Set<E> asSet();
+ method public final operator boolean contains(E element);
+ method @IntRange(from=0L) public final int count();
+ method @IntRange(from=0L) public final inline int count(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final E first();
+ method public final inline E first(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final inline E? firstOrNull(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super E,kotlin.Unit> block);
+ method public final inline void forEachReverse(kotlin.jvm.functions.Function1<? super E,kotlin.Unit> block);
+ method @IntRange(from=0L) public final int getCapacity();
+ method @IntRange(from=0L) public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, optional kotlin.jvm.functions.Function1<? super E,? extends java.lang.CharSequence>? transform);
+ method public final E last();
+ method public final inline E last(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final inline E? lastOrNull(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final boolean none();
+ method public final inline java.util.List<E> toList();
+ method @kotlin.PublishedApi internal final inline void unorderedForEach(kotlin.jvm.functions.Function1<? super E,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void unorderedForEachIndex(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ property @IntRange(from=0L) public final int capacity;
+ property @kotlin.PublishedApi internal final Object?[] elements;
+ property @kotlin.PublishedApi internal final int head;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property @kotlin.PublishedApi internal final long[] nodes;
+ property @IntRange(from=0L) public final int size;
+ property @kotlin.PublishedApi internal final int tail;
+ field @kotlin.PublishedApi internal Object?[] elements;
+ field @kotlin.PublishedApi internal int head;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal long[] nodes;
+ field @kotlin.PublishedApi internal int tail;
+ }
+
+ public final class OrderedScatterSetKt {
+ method public static <E> androidx.collection.OrderedScatterSet<E> emptyOrderedScatterSet();
+ method public static <E> androidx.collection.MutableOrderedScatterSet<E> mutableOrderedScatterSetOf();
+ method public static <E> androidx.collection.MutableOrderedScatterSet<E> mutableOrderedScatterSetOf(E element1);
+ method public static <E> androidx.collection.MutableOrderedScatterSet<E> mutableOrderedScatterSetOf(E element1, E element2);
+ method public static <E> androidx.collection.MutableOrderedScatterSet<E> mutableOrderedScatterSetOf(E element1, E element2, E element3);
+ method public static <E> androidx.collection.MutableOrderedScatterSet<E> mutableOrderedScatterSetOf(E... elements);
+ method public static <E> androidx.collection.OrderedScatterSet<E> orderedScatterSetOf();
+ method public static <E> androidx.collection.OrderedScatterSet<E> orderedScatterSetOf(E element1);
+ method public static <E> androidx.collection.OrderedScatterSet<E> orderedScatterSetOf(E element1, E element2);
+ method public static <E> androidx.collection.OrderedScatterSet<E> orderedScatterSetOf(E element1, E element2, E element3);
+ method public static <E> androidx.collection.OrderedScatterSet<E> orderedScatterSetOf(E... elements);
+ }
+
+ public abstract sealed class ScatterMap<K, V> {
+ method public final inline boolean all(kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Boolean> predicate);
+ method public final java.util.Map<K,V> asMap();
+ method public final operator boolean contains(K key);
+ method public final boolean containsKey(K key);
+ method public final boolean containsValue(V value);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function2<? super K,? super V,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public final inline void forEachKey(kotlin.jvm.functions.Function1<? super K,kotlin.Unit> block);
+ method public final inline void forEachValue(kotlin.jvm.functions.Function1<? super V,kotlin.Unit> block);
+ method public final operator V? get(K key);
+ method public final int getCapacity();
+ method public final V getOrDefault(K key, V defaultValue);
+ method public final inline V getOrElse(K key, kotlin.jvm.functions.Function0<? extends V> defaultValue);
+ method public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, optional kotlin.jvm.functions.Function2<? super K,? super V,? extends java.lang.CharSequence>? transform);
+ method public final boolean none();
+ property public final int capacity;
+ property @kotlin.PublishedApi internal final Object?[] keys;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final Object?[] values;
+ field @kotlin.PublishedApi internal Object?[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal Object?[] values;
+ }
+
+ public final class ScatterMapKt {
+ method public static <K, V> androidx.collection.ScatterMap<K,V> emptyScatterMap();
+ method @kotlin.PublishedApi internal static inline boolean isFull(long value);
+ method @kotlin.PublishedApi internal static inline int lowestBitSet(long);
+ method @kotlin.PublishedApi internal static inline long maskEmptyOrDeleted(long);
+ method @kotlin.PublishedApi internal static inline long match(long, int m);
+ method public static <K, V> androidx.collection.MutableScatterMap<K,V> mutableScatterMapOf();
+ method public static <K, V> androidx.collection.MutableScatterMap<K,V> mutableScatterMapOf(kotlin.Pair<? extends K,? extends V>... pairs);
+ method @kotlin.PublishedApi internal static inline long readRawMetadata(long[] data, int offset);
+ property @kotlin.PublishedApi internal static final long BitmaskLsb;
+ property @kotlin.PublishedApi internal static final long BitmaskMsb;
+ property @kotlin.PublishedApi internal static final long Sentinel;
+ field @kotlin.PublishedApi internal static final long BitmaskLsb = 72340172838076673L; // 0x101010101010101L
+ field @kotlin.PublishedApi internal static final long BitmaskMsb = -9187201950435737472L; // 0x8080808080808080L
+ field @kotlin.PublishedApi internal static final long Sentinel = 255L; // 0xffL
+ }
+
+ public abstract sealed class ScatterSet<E> {
+ method public final inline boolean all(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final java.util.Set<E> asSet();
+ method public final operator boolean contains(E element);
+ method @IntRange(from=0L) public final int count();
+ method @IntRange(from=0L) public final inline int count(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final E first();
+ method public final inline E first(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final inline E? firstOrNull(kotlin.jvm.functions.Function1<? super E,java.lang.Boolean> predicate);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super E,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal final inline void forEachIndex(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method @IntRange(from=0L) public final int getCapacity();
+ method @IntRange(from=0L) public final int getSize();
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, optional kotlin.jvm.functions.Function1<? super E,? extends java.lang.CharSequence>? transform);
+ method public final boolean none();
+ property @IntRange(from=0L) public final int capacity;
+ property @kotlin.PublishedApi internal final Object?[] elements;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property @IntRange(from=0L) public final int size;
+ field @kotlin.PublishedApi internal Object?[] elements;
+ field @kotlin.PublishedApi internal long[] metadata;
+ }
+
+ public final class ScatterSetKt {
+ method public static <E> androidx.collection.ScatterSet<E> emptyScatterSet();
+ method public static <E> androidx.collection.MutableScatterSet<E> mutableScatterSetOf();
+ method public static <E> androidx.collection.MutableScatterSet<E> mutableScatterSetOf(E element1);
+ method public static <E> androidx.collection.MutableScatterSet<E> mutableScatterSetOf(E element1, E element2);
+ method public static <E> androidx.collection.MutableScatterSet<E> mutableScatterSetOf(E element1, E element2, E element3);
+ method public static <E> androidx.collection.MutableScatterSet<E> mutableScatterSetOf(E... elements);
+ method public static <E> androidx.collection.ScatterSet<E> scatterSetOf();
+ method public static <E> androidx.collection.ScatterSet<E> scatterSetOf(E element1);
+ method public static <E> androidx.collection.ScatterSet<E> scatterSetOf(E element1, E element2);
+ method public static <E> androidx.collection.ScatterSet<E> scatterSetOf(E element1, E element2, E element3);
+ method public static <E> androidx.collection.ScatterSet<E> scatterSetOf(E... elements);
+ }
+
+ public final class SieveCache<K, V> {
+ ctor public SieveCache(@IntRange(from=1L, to=androidx.collection.SieveCacheKt.MaxSize) int maxSize, optional @IntRange(from=0L, to=androidx.collection.SieveCacheKt.MaxSize) int initialCapacity, optional kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Integer> sizeOf, optional kotlin.jvm.functions.Function1<? super K,? extends V?> createValueFromKey, optional kotlin.jvm.functions.Function4<? super K,? super V,? super V?,? super java.lang.Boolean,kotlin.Unit> onEntryRemoved);
+ method public inline boolean all(kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Boolean> predicate);
+ method public boolean any();
+ method public inline boolean any(kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Boolean> predicate);
+ method public operator boolean contains(K key);
+ method public boolean containsKey(K key);
+ method public boolean containsValue(V value);
+ method public int count();
+ method public inline int count(kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Boolean> predicate);
+ method public void evictAll();
+ method public inline void forEach(kotlin.jvm.functions.Function2<? super K,? super V,kotlin.Unit> block);
+ method @kotlin.PublishedApi internal inline void forEachIndexed(kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> block);
+ method public inline void forEachKey(kotlin.jvm.functions.Function1<? super K,kotlin.Unit> block);
+ method public inline void forEachValue(kotlin.jvm.functions.Function1<? super V,kotlin.Unit> block);
+ method public operator V? get(K key);
+ method public int getCapacity();
+ method public int getCount();
+ method public int getMaxSize();
+ method public int getSize();
+ method public boolean isEmpty();
+ method public boolean isNotEmpty();
+ method public inline operator void minusAssign(androidx.collection.ObjectList<K> keys);
+ method public inline operator void minusAssign(androidx.collection.ScatterSet<K> keys);
+ method public inline operator void minusAssign(Iterable<? extends K> keys);
+ method public inline operator void minusAssign(K key);
+ method public inline operator void minusAssign(K[] keys);
+ method public inline operator void minusAssign(kotlin.sequences.Sequence<? extends K> keys);
+ method public boolean none();
+ method public inline operator void plusAssign(androidx.collection.ScatterMap<K,V> from);
+ method public inline operator void plusAssign(androidx.collection.SieveCache<K,V> from);
+ method public inline operator void plusAssign(Iterable<? extends kotlin.Pair<? extends K,? extends V>> pairs);
+ method public inline operator void plusAssign(java.util.Map<K,? extends V> from);
+ method public inline operator void plusAssign(kotlin.Pair<? extends K,? extends V> pair);
+ method public inline operator void plusAssign(kotlin.Pair<? extends K,? extends V>[] pairs);
+ method public inline operator void plusAssign(kotlin.sequences.Sequence<? extends kotlin.Pair<? extends K,? extends V>> pairs);
+ method public V? put(K key, V value);
+ method public void putAll(androidx.collection.ScatterMap<K,V> from);
+ method public void putAll(androidx.collection.SieveCache<K,V> from);
+ method public void putAll(Iterable<? extends kotlin.Pair<? extends K,? extends V>> pairs);
+ method public void putAll(java.util.Map<K,? extends V> from);
+ method public void putAll(kotlin.Pair<? extends K,? extends V>[] pairs);
+ method public void putAll(kotlin.sequences.Sequence<? extends kotlin.Pair<? extends K,? extends V>> pairs);
+ method public V? remove(K key);
+ method public boolean remove(K key, V value);
+ method public void removeIf(kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Boolean> predicate);
+ method public void resize(@IntRange(from=1L, to=androidx.collection.SieveCacheKt.MaxSize) int maxSize);
+ method public inline operator void set(K key, V value);
+ method public void trimToSize(int maxSize);
+ property public final int capacity;
+ property public final int count;
+ property @kotlin.PublishedApi internal final Object?[] keys;
+ property public final int maxSize;
+ property @kotlin.PublishedApi internal final long[] metadata;
+ property public final int size;
+ property @kotlin.PublishedApi internal final Object?[] values;
+ field @kotlin.PublishedApi internal Object?[] keys;
+ field @kotlin.PublishedApi internal long[] metadata;
+ field @kotlin.PublishedApi internal Object?[] values;
+ }
+
+ public final class SieveCacheKt {
+ property @kotlin.PublishedApi internal static final int NodeInvalidLink;
+ property @kotlin.PublishedApi internal static final long NodeLinkMask;
+ field @kotlin.PublishedApi internal static final int NodeInvalidLink = 2147483647; // 0x7fffffff
+ field @kotlin.PublishedApi internal static final long NodeLinkMask = 2147483647L; // 0x7fffffffL
+ }
+
+ public class SimpleArrayMap<K, V> {
+ ctor public SimpleArrayMap();
+ ctor public SimpleArrayMap(androidx.collection.SimpleArrayMap<? extends K,? extends V>? map);
+ ctor public SimpleArrayMap(optional int capacity);
+ method public void clear();
+ method public boolean containsKey(K key);
+ method public boolean containsValue(V value);
+ method public void ensureCapacity(int minimumCapacity);
+ method public operator V? get(K key);
+ method public V getOrDefault(Object? key, V defaultValue);
+ method public int indexOfKey(K key);
+ method public boolean isEmpty();
+ method public K keyAt(int index);
+ method public V? put(K key, V value);
+ method public void putAll(androidx.collection.SimpleArrayMap<? extends K,? extends V> map);
+ method public V? putIfAbsent(K key, V value);
+ method public V? remove(K key);
+ method public boolean remove(K key, V value);
+ method public V removeAt(int index);
+ method public V? replace(K key, V value);
+ method public boolean replace(K key, V oldValue, V newValue);
+ method public V setValueAt(int index, V value);
+ method public int size();
+ method public V valueAt(int index);
+ }
+
+ public class SparseArrayCompat<E> implements java.lang.Cloneable {
+ ctor public SparseArrayCompat();
+ ctor public SparseArrayCompat(optional int initialCapacity);
+ method public void append(int key, E value);
+ method public void clear();
+ method public androidx.collection.SparseArrayCompat<E> clone();
+ method public boolean containsKey(int key);
+ method public boolean containsValue(E value);
+ method @Deprecated public void delete(int key);
+ method public operator E? get(int key);
+ method public E get(int key, E defaultValue);
+ method public final boolean getIsEmpty();
+ method public int indexOfKey(int key);
+ method public int indexOfValue(E value);
+ method public boolean isEmpty();
+ method public int keyAt(int index);
+ method public void put(int key, E value);
+ method public void putAll(androidx.collection.SparseArrayCompat<? extends E> other);
+ method public E? putIfAbsent(int key, E value);
+ method public void remove(int key);
+ method public boolean remove(int key, Object? value);
+ method public void removeAt(int index);
+ method public void removeAtRange(int index, int size);
+ method public E? replace(int key, E value);
+ method public boolean replace(int key, E oldValue, E newValue);
+ method public void setValueAt(int index, E value);
+ method public int size();
+ method public E valueAt(int index);
+ property public final boolean isEmpty;
+ }
+
+ public final class SparseArrayKt {
+ method public static inline operator <T> boolean contains(androidx.collection.SparseArrayCompat<T>, int key);
+ method public static inline <T> void forEach(androidx.collection.SparseArrayCompat<T>, kotlin.jvm.functions.Function2<? super java.lang.Integer,? super T,kotlin.Unit> action);
+ method public static inline <T> T getOrDefault(androidx.collection.SparseArrayCompat<T>, int key, T defaultValue);
+ method public static inline <T> T getOrElse(androidx.collection.SparseArrayCompat<T>, int key, kotlin.jvm.functions.Function0<? extends T> defaultValue);
+ method public static inline <T> int getSize(androidx.collection.SparseArrayCompat<T>);
+ method public static inline <T> boolean isNotEmpty(androidx.collection.SparseArrayCompat<T>);
+ method public static <T> kotlin.collections.IntIterator keyIterator(androidx.collection.SparseArrayCompat<T>);
+ method public static operator <T> androidx.collection.SparseArrayCompat<T> plus(androidx.collection.SparseArrayCompat<T>, androidx.collection.SparseArrayCompat<T> other);
+ method @Deprecated public static <T> boolean remove(androidx.collection.SparseArrayCompat<T>, int key, T value);
+ method public static inline operator <T> void set(androidx.collection.SparseArrayCompat<T>, int key, T value);
+ method public static <T> java.util.Iterator<T> valueIterator(androidx.collection.SparseArrayCompat<T>);
+ }
+
+}
+
+package androidx.collection.internal {
+
+ public final class PackingHelpers_jvmKt {
+ method @kotlin.PublishedApi internal static inline float floatFromBits(int bits);
+ }
+
+ public final class RuntimeHelpersKt {
+ method @kotlin.PublishedApi internal static Void throwNoSuchElementExceptionForInline(String message);
+ }
+
+}
+
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 fb9ac8c05..99d2381 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
@@ -33,6 +33,7 @@
import androidx.compose.ui.unit.Constraints
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.TextUnit
+import androidx.compose.ui.unit.isSpecified
import androidx.compose.ui.unit.isUnspecified
import kotlin.math.max
@@ -142,14 +143,14 @@
@Stable
fun Modifier.paddingFromBaseline(top: Dp = Dp.Unspecified, bottom: Dp = Dp.Unspecified) =
this.then(
- if (top != Dp.Unspecified) {
+ if (top.isSpecified) {
Modifier.paddingFrom(FirstBaseline, before = top)
} else {
Modifier
}
)
.then(
- if (bottom != Dp.Unspecified) {
+ if (bottom.isSpecified) {
Modifier.paddingFrom(LastBaseline, after = bottom)
} else {
Modifier
@@ -192,8 +193,8 @@
) : ModifierNodeElement<AlignmentLineOffsetDpNode>() {
init {
requirePrecondition(
- (before.value >= 0f || before == Dp.Unspecified) &&
- (after.value >= 0f || after == Dp.Unspecified)
+ (before.value >= 0f || before.isUnspecified) and
+ (after.value >= 0f || after.isUnspecified)
) {
"Padding from alignment line must be a non-negative number"
}
@@ -319,12 +320,12 @@
val axisMax = if (alignmentLine.horizontal) constraints.maxHeight else constraints.maxWidth
// Compute padding required to satisfy the total before and after offsets.
val paddingBefore =
- ((if (before != Dp.Unspecified) before.roundToPx() else 0) - linePosition).coerceIn(
+ ((if (before.isSpecified) before.roundToPx() else 0) - linePosition).coerceIn(
0,
axisMax - axis
)
val paddingAfter =
- ((if (after != Dp.Unspecified) after.roundToPx() else 0) - axis + linePosition).coerceIn(
+ ((if (after.isSpecified) after.roundToPx() else 0) - axis + linePosition).coerceIn(
0,
axisMax - axis - paddingBefore
)
diff --git a/compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/Padding.kt b/compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/Padding.kt
index 24ac686..c038279 100644
--- a/compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/Padding.kt
+++ b/compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/Padding.kt
@@ -33,6 +33,7 @@
import androidx.compose.ui.unit.constrainHeight
import androidx.compose.ui.unit.constrainWidth
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.isUnspecified
import androidx.compose.ui.unit.offset
/**
@@ -203,10 +204,14 @@
) : PaddingValues {
init {
- requirePrecondition(left.value >= 0) { "Left padding must be non-negative" }
- requirePrecondition(top.value >= 0) { "Top padding must be non-negative" }
- requirePrecondition(right.value >= 0) { "Right padding must be non-negative" }
- requirePrecondition(bottom.value >= 0) { "Bottom padding must be non-negative" }
+ requirePrecondition(
+ (left.value >= 0f) and
+ (top.value >= 0f) and
+ (right.value >= 0f) and
+ (bottom.value >= 0f)
+ ) {
+ "Padding must be non-negative"
+ }
}
override fun calculateLeftPadding(layoutDirection: LayoutDirection) = left
@@ -291,10 +296,11 @@
) : PaddingValues {
init {
- requirePrecondition(start.value >= 0) { "Start padding must be non-negative" }
- requirePrecondition(top.value >= 0) { "Top padding must be non-negative" }
- requirePrecondition(end.value >= 0) { "End padding must be non-negative" }
- requirePrecondition(bottom.value >= 0) { "Bottom padding must be non-negative" }
+ requirePrecondition(
+ (start.value >= 0f) and (top.value >= 0f) and (end.value >= 0f) and (bottom.value >= 0f)
+ ) {
+ "Padding must be non-negative"
+ }
}
override fun calculateLeftPadding(layoutDirection: LayoutDirection) =
@@ -332,10 +338,10 @@
init {
requirePrecondition(
- (start.value >= 0f || start == Dp.Unspecified) &&
- (top.value >= 0f || top == Dp.Unspecified) &&
- (end.value >= 0f || end == Dp.Unspecified) &&
- (bottom.value >= 0f || bottom == Dp.Unspecified)
+ (start.value >= 0f || start.isUnspecified) and
+ (top.value >= 0f || top.isUnspecified) and
+ (end.value >= 0f || end.isUnspecified) and
+ (bottom.value >= 0f || bottom.isUnspecified)
) {
"Padding must be non-negative"
}
@@ -436,30 +442,30 @@
measurable: Measurable,
constraints: Constraints
): MeasureResult {
+ val leftPadding = paddingValues.calculateLeftPadding(layoutDirection)
+ val topPadding = paddingValues.calculateTopPadding()
+ val rightPadding = paddingValues.calculateRightPadding(layoutDirection)
+ val bottomPadding = paddingValues.calculateBottomPadding()
+
requirePrecondition(
- paddingValues.calculateLeftPadding(layoutDirection) >= 0.dp &&
- paddingValues.calculateTopPadding() >= 0.dp &&
- paddingValues.calculateRightPadding(layoutDirection) >= 0.dp &&
- paddingValues.calculateBottomPadding() >= 0.dp
+ (leftPadding >= 0.dp) and
+ (topPadding >= 0.dp) and
+ (rightPadding >= 0.dp) and
+ (bottomPadding >= 0.dp)
) {
"Padding must be non-negative"
}
- val horizontal =
- paddingValues.calculateLeftPadding(layoutDirection).roundToPx() +
- paddingValues.calculateRightPadding(layoutDirection).roundToPx()
- val vertical =
- paddingValues.calculateTopPadding().roundToPx() +
- paddingValues.calculateBottomPadding().roundToPx()
+
+ val roundedLeftPadding = leftPadding.roundToPx()
+ val horizontal = roundedLeftPadding + rightPadding.roundToPx()
+
+ val roundedTopPadding = topPadding.roundToPx()
+ val vertical = roundedTopPadding + bottomPadding.roundToPx()
val placeable = measurable.measure(constraints.offset(-horizontal, -vertical))
val width = constraints.constrainWidth(placeable.width + horizontal)
val height = constraints.constrainHeight(placeable.height + vertical)
- return layout(width, height) {
- placeable.place(
- paddingValues.calculateLeftPadding(layoutDirection).roundToPx(),
- paddingValues.calculateTopPadding().roundToPx()
- )
- }
+ return layout(width, height) { placeable.place(roundedLeftPadding, roundedTopPadding) }
}
}
diff --git a/compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/Size.kt b/compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/Size.kt
index b221c8b..52e00de 100644
--- a/compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/Size.kt
+++ b/compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/Size.kt
@@ -39,6 +39,10 @@
import androidx.compose.ui.unit.constrain
import androidx.compose.ui.unit.constrainHeight
import androidx.compose.ui.unit.constrainWidth
+import androidx.compose.ui.unit.isSpecified
+import androidx.compose.ui.util.fastCoerceAtLeast
+import androidx.compose.ui.util.fastCoerceAtMost
+import androidx.compose.ui.util.fastCoerceIn
import androidx.compose.ui.util.fastRoundToInt
/**
@@ -694,7 +698,7 @@
val width =
(constraints.maxWidth * fraction)
.fastRoundToInt()
- .coerceIn(constraints.minWidth, constraints.maxWidth)
+ .fastCoerceIn(constraints.minWidth, constraints.maxWidth)
minWidth = width
maxWidth = width
} else {
@@ -707,7 +711,7 @@
val height =
(constraints.maxHeight * fraction)
.fastRoundToInt()
- .coerceIn(constraints.minHeight, constraints.maxHeight)
+ .fastCoerceIn(constraints.minHeight, constraints.maxHeight)
minHeight = height
maxHeight = height
} else {
@@ -782,28 +786,28 @@
private val Density.targetConstraints: Constraints
get() {
val maxWidth =
- if (maxWidth != Dp.Unspecified) {
- maxWidth.roundToPx().coerceAtLeast(0)
+ if (maxWidth.isSpecified) {
+ maxWidth.roundToPx().fastCoerceAtLeast(0)
} else {
Constraints.Infinity
}
val maxHeight =
- if (maxHeight != Dp.Unspecified) {
- maxHeight.roundToPx().coerceAtLeast(0)
+ if (maxHeight.isSpecified) {
+ maxHeight.roundToPx().fastCoerceAtLeast(0)
} else {
Constraints.Infinity
}
val minWidth =
- if (minWidth != Dp.Unspecified) {
- minWidth.roundToPx().coerceAtMost(maxWidth).coerceAtLeast(0).let {
+ if (minWidth.isSpecified) {
+ minWidth.roundToPx().fastCoerceIn(0, maxWidth).let {
if (it != Constraints.Infinity) it else 0
}
} else {
0
}
val minHeight =
- if (minHeight != Dp.Unspecified) {
- minHeight.roundToPx().coerceAtMost(maxHeight).coerceAtLeast(0).let {
+ if (minHeight.isSpecified) {
+ minHeight.roundToPx().fastCoerceIn(0, maxHeight).let {
if (it != Constraints.Infinity) it else 0
}
} else {
@@ -827,28 +831,28 @@
constraints.constrain(targetConstraints)
} else {
val resolvedMinWidth =
- if (minWidth != Dp.Unspecified) {
+ if (minWidth.isSpecified) {
targetConstraints.minWidth
} else {
- constraints.minWidth.coerceAtMost(targetConstraints.maxWidth)
+ constraints.minWidth.fastCoerceAtMost(targetConstraints.maxWidth)
}
val resolvedMaxWidth =
- if (maxWidth != Dp.Unspecified) {
+ if (maxWidth.isSpecified) {
targetConstraints.maxWidth
} else {
- constraints.maxWidth.coerceAtLeast(targetConstraints.minWidth)
+ constraints.maxWidth.fastCoerceAtLeast(targetConstraints.minWidth)
}
val resolvedMinHeight =
- if (minHeight != Dp.Unspecified) {
+ if (minHeight.isSpecified) {
targetConstraints.minHeight
} else {
- constraints.minHeight.coerceAtMost(targetConstraints.maxHeight)
+ constraints.minHeight.fastCoerceAtMost(targetConstraints.maxHeight)
}
val resolvedMaxHeight =
- if (maxHeight != Dp.Unspecified) {
+ if (maxHeight.isSpecified) {
targetConstraints.maxHeight
} else {
- constraints.maxHeight.coerceAtLeast(targetConstraints.minHeight)
+ constraints.maxHeight.fastCoerceAtLeast(targetConstraints.minHeight)
}
Constraints(
resolvedMinWidth,
@@ -1072,14 +1076,14 @@
): MeasureResult {
val wrappedConstraints =
Constraints(
- if (minWidth != Dp.Unspecified && constraints.minWidth == 0) {
- minWidth.roundToPx().coerceAtMost(constraints.maxWidth).coerceAtLeast(0)
+ if (minWidth.isSpecified && constraints.minWidth == 0) {
+ minWidth.roundToPx().fastCoerceIn(0, constraints.maxWidth)
} else {
constraints.minWidth
},
constraints.maxWidth,
- if (minHeight != Dp.Unspecified && constraints.minHeight == 0) {
- minHeight.roundToPx().coerceAtMost(constraints.maxHeight).coerceAtLeast(0)
+ if (minHeight.isSpecified && constraints.minHeight == 0) {
+ minHeight.roundToPx().fastCoerceIn(0, constraints.maxHeight)
} else {
constraints.minHeight
},
@@ -1095,7 +1099,7 @@
) =
measurable
.minIntrinsicWidth(height)
- .coerceAtLeast(if (minWidth != Dp.Unspecified) minWidth.roundToPx() else 0)
+ .fastCoerceAtLeast(if (minWidth.isSpecified) minWidth.roundToPx() else 0)
override fun IntrinsicMeasureScope.maxIntrinsicWidth(
measurable: IntrinsicMeasurable,
@@ -1103,7 +1107,7 @@
) =
measurable
.maxIntrinsicWidth(height)
- .coerceAtLeast(if (minWidth != Dp.Unspecified) minWidth.roundToPx() else 0)
+ .fastCoerceAtLeast(if (minWidth.isSpecified) minWidth.roundToPx() else 0)
override fun IntrinsicMeasureScope.minIntrinsicHeight(
measurable: IntrinsicMeasurable,
@@ -1111,7 +1115,7 @@
) =
measurable
.minIntrinsicHeight(width)
- .coerceAtLeast(if (minHeight != Dp.Unspecified) minHeight.roundToPx() else 0)
+ .fastCoerceAtLeast(if (minHeight.isSpecified) minHeight.roundToPx() else 0)
override fun IntrinsicMeasureScope.maxIntrinsicHeight(
measurable: IntrinsicMeasurable,
@@ -1119,7 +1123,7 @@
) =
measurable
.maxIntrinsicHeight(width)
- .coerceAtLeast(if (minHeight != Dp.Unspecified) minHeight.roundToPx() else 0)
+ .fastCoerceAtLeast(if (minHeight.isSpecified) minHeight.roundToPx() else 0)
}
internal enum class Direction {
diff --git a/compose/foundation/foundation/benchmark/src/androidTest/java/androidx/compose/foundation/benchmark/ScrollerBenchmark.kt b/compose/foundation/foundation/benchmark/src/androidTest/java/androidx/compose/foundation/benchmark/ScrollerBenchmark.kt
index e183e97..7828cd4 100644
--- a/compose/foundation/foundation/benchmark/src/androidTest/java/androidx/compose/foundation/benchmark/ScrollerBenchmark.kt
+++ b/compose/foundation/foundation/benchmark/src/androidTest/java/androidx/compose/foundation/benchmark/ScrollerBenchmark.kt
@@ -16,6 +16,8 @@
package androidx.compose.foundation.benchmark
+import androidx.compose.foundation.benchmark.lazy.doFramesUntilIdle
+import androidx.compose.testutils.ComposeExecutionControl
import androidx.compose.testutils.benchmark.ComposeBenchmarkRule
import androidx.compose.testutils.benchmark.benchmarkDrawPerf
import androidx.compose.testutils.benchmark.benchmarkFirstCompose
@@ -27,6 +29,7 @@
import androidx.compose.testutils.benchmark.toggleStateBenchmarkDraw
import androidx.compose.testutils.benchmark.toggleStateBenchmarkLayout
import androidx.compose.testutils.benchmark.toggleStateBenchmarkMeasure
+import androidx.compose.ui.platform.ViewRootForTest
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.LargeTest
import org.junit.Rule
@@ -84,6 +87,45 @@
}
@Test
+ fun mouseWheelScroll_initialScroll() {
+ with(benchmarkRule) {
+ runBenchmarkFor({ MouseWheelScrollerTestCase() }) {
+ measureRepeatedOnUiThread {
+ runWithTimingDisabled {
+ doFrame()
+ assertNoPendingRecompositionMeasureOrLayout()
+ }
+
+ performToggle(getTestCase())
+
+ runWithTimingDisabled {
+ // This benchmark only cares about initial cost of adding the scroll node
+ disposeContent()
+ }
+ }
+ }
+ }
+ }
+
+ @Test
+ fun mouseWheelScroll_successiveScrolls() {
+ with(benchmarkRule) {
+ runBenchmarkFor({ MouseWheelScrollerTestCase() }) {
+ runOnUiThread {
+ doFrame()
+ performToggle(getTestCase())
+ doFrame()
+ }
+
+ measureRepeatedOnUiThread {
+ performToggle(getTestCase())
+ runWithTimingDisabled { doFramesUntilIdle() }
+ }
+ }
+ }
+ }
+
+ @Test
fun layout() {
benchmarkRule.benchmarkLayoutPerf(scrollerCaseFactory)
}
@@ -93,3 +135,23 @@
benchmarkRule.benchmarkDrawPerf(scrollerCaseFactory)
}
}
+
+// Below are forked from LazyBenchmarkCommon
+private fun ComposeExecutionControl.performToggle(testCase: MouseWheelScrollerTestCase) {
+ testCase.toggleState()
+ if (hasPendingChanges()) {
+ recompose()
+ }
+ if (hasPendingMeasureOrLayout()) {
+ getViewRoot().measureAndLayoutForTest()
+ }
+}
+
+private fun ComposeExecutionControl.assertNoPendingRecompositionMeasureOrLayout() {
+ if (hasPendingChanges() || hasPendingMeasureOrLayout()) {
+ throw AssertionError("Expected no pending changes but there were some.")
+ }
+}
+
+private fun ComposeExecutionControl.getViewRoot(): ViewRootForTest =
+ getHostView() as ViewRootForTest
diff --git a/compose/foundation/foundation/benchmark/src/androidTest/java/androidx/compose/foundation/benchmark/ScrollerTestCase.kt b/compose/foundation/foundation/benchmark/src/androidTest/java/androidx/compose/foundation/benchmark/ScrollerTestCase.kt
index 4c202c1..275e985 100644
--- a/compose/foundation/foundation/benchmark/src/androidTest/java/androidx/compose/foundation/benchmark/ScrollerTestCase.kt
+++ b/compose/foundation/foundation/benchmark/src/androidTest/java/androidx/compose/foundation/benchmark/ScrollerTestCase.kt
@@ -16,6 +16,9 @@
package androidx.compose.foundation.benchmark
+import android.view.InputDevice
+import android.view.MotionEvent
+import android.view.View
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.ScrollState
import androidx.compose.foundation.layout.Column
@@ -28,12 +31,15 @@
import androidx.compose.testutils.ToggleableTestCase
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.platform.LocalView
import androidx.compose.ui.unit.dp
import kotlinx.coroutines.runBlocking
/**
* Test case that puts a large number of boxes in a column in a vertical scroller to force
* scrolling.
+ *
+ * [toggleState] calls [ScrollState.scrollTo] between oscillating values
*/
class ScrollerTestCase : LayeredComposeTestCase(), ToggleableTestCase {
private lateinit var scrollState: ScrollState
@@ -42,37 +48,117 @@
override fun MeasuredContent() {
scrollState = rememberScrollState()
Column(Modifier.verticalScroll(scrollState)) {
- Column(Modifier.fillMaxHeight()) {
- for (green in 0..0xFF) {
- ColorStripe(0xFF, green, 0)
- }
- for (red in 0xFF downTo 0) {
- ColorStripe(red, 0xFF, 0)
- }
- for (blue in 0..0xFF) {
- ColorStripe(0, 0xFF, blue)
- }
- for (green in 0xFF downTo 0) {
- ColorStripe(0, green, 0xFF)
- }
- for (red in 0..0xFF) {
- ColorStripe(red, 0, 0xFF)
- }
- for (blue in 0xFF downTo 0) {
- ColorStripe(0xFF, 0, blue)
- }
- }
+ ColorStripes(step = 1, Modifier.fillMaxHeight())
}
}
override fun toggleState() {
runBlocking { scrollState.scrollTo(if (scrollState.value == 0) 10 else 0) }
}
+}
+
+/**
+ * Test case that puts a large number of boxes in a column in a vertical scroller to force
+ * scrolling.
+ *
+ * [toggleState] injects mouse wheel events to scroll forward and backwards repeatedly.
+ */
+class MouseWheelScrollerTestCase() : LayeredComposeTestCase(), ToggleableTestCase {
+ private lateinit var scrollState: ScrollState
+ private var view: View? = null
+ private var currentEventTime: Long = 0
+ private var lastScrollUp: Boolean = true
@Composable
- fun ColorStripe(red: Int, green: Int, blue: Int) {
- Canvas(Modifier.size(45.dp, 5.dp)) {
- drawRect(Color(red = red, green = green, blue = blue))
+ override fun MeasuredContent() {
+ view = LocalView.current
+ scrollState = rememberScrollState()
+ Column(Modifier.verticalScroll(scrollState)) {
+ // A lower step causes benchmark issues due to the resulting size / number of nodes
+ ColorStripes(step = 5, Modifier.fillMaxHeight())
}
}
+
+ override fun toggleState() {
+ // For mouse wheel scroll, negative values scroll down
+ // Note: these aren't the actual values that will be used to scroll, depending on
+ // Android version these values will get converted into a different (larger) value.
+ // This also unfortunately includes an animation that cannot be disabled, so this
+ // is a best effort at some repeated scrolling
+ val scrollAmount =
+ if (lastScrollUp) {
+ lastScrollUp = false
+ -10
+ } else {
+ lastScrollUp = true
+ 10
+ }
+ dispatchMouseWheelScroll(scrollAmount = scrollAmount, eventTime = currentEventTime, view!!)
+ currentEventTime += 10
+ }
+}
+
+@Composable
+private fun ColorStripes(step: Int, modifier: Modifier) {
+ Column(modifier) {
+ for (green in 0..0xFF step step) {
+ ColorStripe(0xFF, green, 0)
+ }
+ for (red in 0xFF downTo 0 step step) {
+ ColorStripe(red, 0xFF, 0)
+ }
+ for (blue in 0..0xFF step step) {
+ ColorStripe(0, 0xFF, blue)
+ }
+ for (green in 0xFF downTo 0 step step) {
+ ColorStripe(0, green, 0xFF)
+ }
+ for (red in 0..0xFF step step) {
+ ColorStripe(red, 0, 0xFF)
+ }
+ for (blue in 0xFF downTo 0 step step) {
+ ColorStripe(0xFF, 0, blue)
+ }
+ }
+}
+
+@Composable
+private fun ColorStripe(red: Int, green: Int, blue: Int) {
+ Canvas(Modifier.size(45.dp, 5.dp)) { drawRect(Color(red = red, green = green, blue = blue)) }
+}
+
+private fun dispatchMouseWheelScroll(
+ scrollAmount: Int,
+ eventTime: Long,
+ view: View,
+) {
+ val properties =
+ MotionEvent.PointerProperties().apply { toolType = MotionEvent.TOOL_TYPE_MOUSE }
+
+ val coords =
+ MotionEvent.PointerCoords().apply {
+ x = view.measuredWidth / 2f
+ y = view.measuredHeight / 2f
+ setAxisValue(MotionEvent.AXIS_VSCROLL, scrollAmount.toFloat())
+ }
+
+ val event =
+ MotionEvent.obtain(
+ 0, /* downTime */
+ eventTime, /* eventTime */
+ MotionEvent.ACTION_SCROLL, /* action */
+ 1, /* pointerCount */
+ arrayOf(properties),
+ arrayOf(coords),
+ 0, /* metaState */
+ 0, /* buttonState */
+ 0f, /* xPrecision */
+ 0f, /* yPrecision */
+ 0, /* deviceId */
+ 0, /* edgeFlags */
+ InputDevice.SOURCE_MOUSE, /* source */
+ 0 /* flags */
+ )
+
+ view.dispatchGenericMotionEvent(event)
}
diff --git a/compose/foundation/foundation/build.gradle b/compose/foundation/foundation/build.gradle
index 0d84d31..91a0069 100644
--- a/compose/foundation/foundation/build.gradle
+++ b/compose/foundation/foundation/build.gradle
@@ -50,6 +50,7 @@
implementation(project(":compose:ui:ui-text"))
implementation(project(":compose:ui:ui-util"))
implementation(project(":compose:foundation:foundation-layout"))
+ implementation(project(":performance:performance-annotation"))
}
}
@@ -80,12 +81,16 @@
dependsOn(commonMain)
}
- jvmStubsMain {
+ nonAndroidStubsMain {
dependsOn(commonStubsMain)
}
+ jvmStubsMain {
+ dependsOn(nonAndroidStubsMain)
+ }
+
linuxx64StubsMain {
- dependsOn(commonStubsMain)
+ dependsOn(nonAndroidStubsMain)
}
androidInstrumentedTest {
diff --git a/compose/foundation/foundation/proguard-rules.pro b/compose/foundation/foundation/proguard-rules.pro
index 4039ea4..2d14261 100644
--- a/compose/foundation/foundation/proguard-rules.pro
+++ b/compose/foundation/foundation/proguard-rules.pro
@@ -20,3 +20,7 @@
# For methods returning Nothing
static java.lang.Void throw*Exception(...);
}
+
+-keepclassmembers class * {
+ @dalvik.annotation.optimization.NeverInline *;
+}
diff --git a/compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/gestures/AndroidScrollable.android.kt b/compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/gestures/AndroidScrollable.android.kt
index 295e75e..51b27f3 100644
--- a/compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/gestures/AndroidScrollable.android.kt
+++ b/compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/gestures/AndroidScrollable.android.kt
@@ -22,7 +22,6 @@
import androidx.compose.ui.input.pointer.PointerEvent
import androidx.compose.ui.node.CompositionLocalConsumerModifierNode
import androidx.compose.ui.node.requireView
-import androidx.compose.ui.platform.ViewConfiguration
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.IntSize
import androidx.compose.ui.unit.dp
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Scroll.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Scroll.kt
index 7a034224..7c73fa8 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Scroll.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Scroll.kt
@@ -443,44 +443,28 @@
measurable: IntrinsicMeasurable,
height: Int
): Int {
- return if (isVertical) {
- measurable.minIntrinsicWidth(Constraints.Infinity)
- } else {
- measurable.minIntrinsicWidth(height)
- }
+ return measurable.minIntrinsicWidth(if (isVertical) Constraints.Infinity else height)
}
override fun IntrinsicMeasureScope.minIntrinsicHeight(
measurable: IntrinsicMeasurable,
width: Int
): Int {
- return if (isVertical) {
- measurable.minIntrinsicHeight(width)
- } else {
- measurable.minIntrinsicHeight(Constraints.Infinity)
- }
+ return measurable.minIntrinsicHeight(if (isVertical) width else Constraints.Infinity)
}
override fun IntrinsicMeasureScope.maxIntrinsicWidth(
measurable: IntrinsicMeasurable,
height: Int
): Int {
- return if (isVertical) {
- measurable.maxIntrinsicWidth(Constraints.Infinity)
- } else {
- measurable.maxIntrinsicWidth(height)
- }
+ return measurable.maxIntrinsicWidth(if (isVertical) Constraints.Infinity else height)
}
override fun IntrinsicMeasureScope.maxIntrinsicHeight(
measurable: IntrinsicMeasurable,
width: Int
): Int {
- return if (isVertical) {
- measurable.maxIntrinsicHeight(width)
- } else {
- measurable.maxIntrinsicHeight(Constraints.Infinity)
- }
+ return measurable.maxIntrinsicHeight(if (isVertical) width else Constraints.Infinity)
}
override fun SemanticsPropertyReceiver.applySemantics() {
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/AnchoredDraggable.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/AnchoredDraggable.kt
index dd3ef0b..db0c790 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/AnchoredDraggable.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/AnchoredDraggable.kt
@@ -62,6 +62,7 @@
import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.Velocity
import androidx.compose.ui.unit.dp
+import dalvik.annotation.optimization.NeverInline
import kotlin.math.abs
import kotlin.math.max
import kotlin.math.min
@@ -632,6 +633,7 @@
positions[keys.size - 1] = position
}
+ @NeverInline
internal fun buildPositions(): FloatArray {
// We might have expanded more than we actually need, so trim the array
return positions.copyOfRange(
@@ -643,6 +645,7 @@
internal fun buildKeys(): List<T> = keys
+ @NeverInline
private fun expandPositions() {
positions = positions.copyOf(keys.size + 2)
}
@@ -1650,7 +1653,7 @@
}
}
-internal expect inline fun assertOnJvm(statement: Boolean, message: () -> String): Unit
+internal expect inline fun assertOnJvm(statement: Boolean, message: () -> String)
internal val AnchoredDraggableMinFlingVelocity = 125.dp
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/MouseWheelScrollable.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/MouseWheelScrollable.kt
index d9a21a4..94c22fb 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/MouseWheelScrollable.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/MouseWheelScrollable.kt
@@ -26,24 +26,21 @@
import androidx.compose.runtime.withFrameNanos
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.input.nestedscroll.NestedScrollSource
-import androidx.compose.ui.input.pointer.AwaitPointerEventScope
import androidx.compose.ui.input.pointer.PointerEvent
+import androidx.compose.ui.input.pointer.PointerEventPass
import androidx.compose.ui.input.pointer.PointerEventType
-import androidx.compose.ui.input.pointer.PointerInputScope
-import androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNode
import androidx.compose.ui.input.pointer.util.VelocityTracker1D
-import androidx.compose.ui.node.CompositionLocalConsumerModifierNode
-import androidx.compose.ui.node.DelegatingNode
-import androidx.compose.ui.node.currentValueOf
-import androidx.compose.ui.platform.LocalDensity
+import androidx.compose.ui.unit.Density
+import androidx.compose.ui.unit.IntSize
import androidx.compose.ui.unit.Velocity
import androidx.compose.ui.unit.dp
import androidx.compose.ui.util.fastAny
import androidx.compose.ui.util.fastForEach
-import kotlin.coroutines.coroutineContext
import kotlin.math.abs
import kotlin.math.roundToInt
import kotlin.math.sign
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Job
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.isActive
@@ -51,71 +48,27 @@
import kotlinx.coroutines.supervisorScope
import kotlinx.coroutines.withTimeoutOrNull
-internal class MouseWheelScrollNode(
+internal class MouseWheelScrollingLogic(
private val scrollingLogic: ScrollingLogic,
+ private val mouseWheelScrollConfig: ScrollConfig,
private val onScrollStopped: suspend (velocity: Velocity) -> Unit,
- private var enabled: Boolean,
-) : DelegatingNode(), CompositionLocalConsumerModifierNode {
-
- // Need to wait until onAttach to read the scroll config. Currently this is static, so we
- // don't need to worry about observation / updating this over time.
- private lateinit var mouseWheelScrollConfig: ScrollConfig
-
- override fun onAttach() {
- mouseWheelScrollConfig = platformScrollConfig()
- coroutineScope.launch { receiveMouseWheelEvents() }
+ private var density: Density,
+) {
+ fun updateDensity(density: Density) {
+ this.density = density
}
- // Note that when `MouseWheelScrollNode` is used as a delegate of `ScrollableNode`,
- // pointerInputNode does not get dispatched pointer events to in the standard manner because
- // Modifier.Node.dispatchForKind does not dispatch to child/delegate nodes of the matching type,
- // and `ScrollableNode` is already an instance of `PointerInputModifierNode`.
- // This is worked around by having `MouseWheelScrollNode` simply forward the corresponding calls
- // to pointerInputNode (hence its need to be `internal`).
- internal val pointerInputNode =
- delegate(
- SuspendingPointerInputModifierNode {
- if (enabled) {
- mouseWheelInput()
- }
- }
- )
-
- fun update(
- enabled: Boolean,
- ) {
- var resetPointerInputHandling = false
- if (this.enabled != enabled) {
- this.enabled = enabled
- resetPointerInputHandling = true
- }
- if (resetPointerInputHandling) {
- pointerInputNode.resetPointerInputHandler()
- }
- }
-
- private suspend fun PointerInputScope.mouseWheelInput() {
- awaitPointerEventScope {
- while (coroutineScope.isActive) {
- val event = awaitScrollEvent()
- if (!event.isConsumed) {
- val consumed = onMouseWheel(event)
- if (consumed) {
- event.consume()
- }
+ fun onPointerEvent(pointerEvent: PointerEvent, pass: PointerEventPass, bounds: IntSize) {
+ if (pass == PointerEventPass.Main && pointerEvent.type == PointerEventType.Scroll) {
+ if (!pointerEvent.isConsumed) {
+ val consumed = onMouseWheel(pointerEvent, bounds)
+ if (consumed) {
+ pointerEvent.consume()
}
}
}
}
- private suspend fun AwaitPointerEventScope.awaitScrollEvent(): PointerEvent {
- var event: PointerEvent
- do {
- event = awaitPointerEvent()
- } while (event.type != PointerEventType.Scroll)
- return event
- }
-
private inline val PointerEvent.isConsumed: Boolean
get() = changes.fastAny { it.isConsumed }
@@ -143,13 +96,23 @@
private val channel = Channel<MouseWheelScrollDelta>(capacity = Channel.UNLIMITED)
private var isScrolling = false
- private suspend fun receiveMouseWheelEvents() {
- while (coroutineContext.isActive) {
- val scrollDelta = channel.receive()
- val density = currentValueOf(LocalDensity)
- val threshold = with(density) { AnimationThreshold.toPx() }
- val speed = with(density) { AnimationSpeed.toPx() }
- scrollingLogic.dispatchMouseWheelScroll(scrollDelta, threshold, speed)
+ private var receivingMouseWheelEventsJob: Job? = null
+
+ fun startReceivingMouseWheelEvents(coroutineScope: CoroutineScope) {
+ if (receivingMouseWheelEventsJob == null) {
+ receivingMouseWheelEventsJob =
+ coroutineScope.launch {
+ try {
+ while (coroutineContext.isActive) {
+ val scrollDelta = channel.receive()
+ val threshold = with(density) { AnimationThreshold.toPx() }
+ val speed = with(density) { AnimationSpeed.toPx() }
+ scrollingLogic.dispatchMouseWheelScroll(scrollDelta, threshold, speed)
+ }
+ } finally {
+ receivingMouseWheelEventsJob = null
+ }
+ }
}
}
@@ -160,9 +123,11 @@
isScrolling = false
}
- private fun PointerInputScope.onMouseWheel(pointerEvent: PointerEvent): Boolean {
+ private fun onMouseWheel(pointerEvent: PointerEvent, bounds: IntSize): Boolean {
val scrollDelta =
- with(mouseWheelScrollConfig) { calculateMouseWheelScroll(pointerEvent, size) }
+ with(mouseWheelScrollConfig) {
+ with(density) { calculateMouseWheelScroll(pointerEvent, bounds) }
+ }
return if (scrollingLogic.canConsumeDelta(scrollDelta)) {
channel
.trySend(
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
index 93725b7..a7792c3 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
@@ -275,7 +275,8 @@
orientationLock = orientation
),
KeyInputModifierNode,
- SemanticsModifierNode {
+ SemanticsModifierNode,
+ CompositionLocalConsumerModifierNode {
override val shouldAutoInvalidate: Boolean = false
@@ -309,7 +310,7 @@
private var scrollByAction: ((x: Float, y: Float) -> Boolean)? = null
private var scrollByOffsetAction: (suspend (Offset) -> Offset)? = null
- private var mouseWheelScrollNode: MouseWheelScrollNode? = null
+ private var mouseWheelScrollingLogic: MouseWheelScrollingLogic? = null
init {
/** Nested scrolling */
@@ -352,15 +353,17 @@
}
private fun ensureMouseWheelScrollNodeInitialized() {
- if (mouseWheelScrollNode != null) return
- mouseWheelScrollNode =
- delegate(
- MouseWheelScrollNode(
+ if (mouseWheelScrollingLogic == null) {
+ mouseWheelScrollingLogic =
+ MouseWheelScrollingLogic(
scrollingLogic = scrollingLogic,
+ mouseWheelScrollConfig = platformScrollConfig(),
onScrollStopped = ::onWheelScrollStopped,
- enabled = enabled,
+ density = requireDensity()
)
- )
+ }
+
+ mouseWheelScrollingLogic?.startReceivingMouseWheelEvents(coroutineScope)
}
fun update(
@@ -392,7 +395,6 @@
nestedScrollDispatcher = nestedScrollDispatcher
)
contentInViewNode.update(orientation, reverseDirection, bringIntoViewSpec)
- mouseWheelScrollNode?.update(enabled = enabled)
this.overscrollEffect = overscrollEffect
this.flingBehavior = flingBehavior
@@ -414,6 +416,7 @@
override fun onAttach() {
updateDefaultFlingBehavior()
+ mouseWheelScrollingLogic?.updateDensity(requireDensity())
}
private fun updateDefaultFlingBehavior() {
@@ -425,7 +428,7 @@
override fun onDensityChange() {
onCancelPointerInput()
updateDefaultFlingBehavior()
- mouseWheelScrollNode?.pointerInputNode?.onDensityChange()
+ mouseWheelScrollingLogic?.updateDensity(requireDensity())
}
// Key handler for Page up/down scrolling behavior.
@@ -492,10 +495,12 @@
if (pointerEvent.changes.fastAny { canDrag.invoke(it) }) {
super.onPointerEvent(pointerEvent, pass, bounds)
}
- if (pass == PointerEventPass.Initial && pointerEvent.type == PointerEventType.Scroll) {
- ensureMouseWheelScrollNodeInitialized()
+ if (enabled) {
+ if (pass == PointerEventPass.Initial && pointerEvent.type == PointerEventType.Scroll) {
+ ensureMouseWheelScrollNodeInitialized()
+ }
+ mouseWheelScrollingLogic?.onPointerEvent(pointerEvent, pass, bounds)
}
- mouseWheelScrollNode?.pointerInputNode?.onPointerEvent(pointerEvent, pass, bounds)
}
override fun SemanticsPropertyReceiver.applySemantics() {
@@ -521,16 +526,6 @@
scrollByAction = null
scrollByOffsetAction = null
}
-
- override fun onCancelPointerInput() {
- super.onCancelPointerInput()
- mouseWheelScrollNode?.pointerInputNode?.onCancelPointerInput()
- }
-
- override fun onViewConfigurationChange() {
- super.onViewConfigurationChange()
- mouseWheelScrollNode?.pointerInputNode?.onViewConfigurationChange()
- }
}
/** Contains the default values used by [scrollable] */
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/internal/InlineClassHelper.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/internal/InlineClassHelper.kt
index 4af862a..686d885 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/internal/InlineClassHelper.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/internal/InlineClassHelper.kt
@@ -53,7 +53,7 @@
}
}
-@Suppress("NOTHING_TO_INLINE", "BanInlineOptIn")
+@Suppress("NOTHING_TO_INLINE", "BanInlineOptIn", "KotlinRedundantDiagnosticSuppress")
@OptIn(ExperimentalContracts::class)
internal inline fun checkPrecondition(value: Boolean) {
contract { returns() implies value }
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/input/internal/OffsetMappingCalculator.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/input/internal/OffsetMappingCalculator.kt
index b6fb607..eaa2856 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/input/internal/OffsetMappingCalculator.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/input/internal/OffsetMappingCalculator.kt
@@ -370,18 +370,18 @@
*/
@kotlin.jvm.JvmInline
private value class OpArray private constructor(private val values: IntArray) {
- constructor(size: Int) : this(IntArray(size * ElementSize))
+ constructor(size: Int) : this(IntArray(size * OpArrayElementSize))
val size: Int
- get() = values.size / ElementSize
+ get() = values.size / OpArrayElementSize
fun set(index: Int, offset: Int, srcLen: Int, destLen: Int) {
- values[index * ElementSize] = offset
- values[index * ElementSize + 1] = srcLen
- values[index * ElementSize + 2] = destLen
+ values[index * OpArrayElementSize] = offset
+ values[index * OpArrayElementSize + 1] = srcLen
+ values[index * OpArrayElementSize + 2] = destLen
}
- fun copyOf(newSize: Int) = OpArray(values.copyOf(newSize * ElementSize))
+ fun copyOf(newSize: Int) = OpArray(values.copyOf(newSize * OpArrayElementSize))
/**
* Loops through the array between 0 and [max] (exclusive). If [reversed] is false (the
@@ -399,22 +399,20 @@
// duplication here keeps the more complicated logic at the callsite more readable.
if (reversed) {
for (i in max - 1 downTo 0) {
- val offset = values[i * ElementSize]
- val srcLen = values[i * ElementSize + 1]
- val destLen = values[i * ElementSize + 2]
+ val offset = values[i * OpArrayElementSize]
+ val srcLen = values[i * OpArrayElementSize + 1]
+ val destLen = values[i * OpArrayElementSize + 2]
block(offset, srcLen, destLen)
}
} else {
for (i in 0 until max) {
- val offset = values[i * ElementSize]
- val srcLen = values[i * ElementSize + 1]
- val destLen = values[i * ElementSize + 2]
+ val offset = values[i * OpArrayElementSize]
+ val srcLen = values[i * OpArrayElementSize + 1]
+ val destLen = values[i * OpArrayElementSize + 2]
block(offset, srcLen, destLen)
}
}
}
-
- private companion object {
- const val ElementSize = 3
- }
}
+
+private const val OpArrayElementSize = 3
diff --git a/compose/lint/common/src/main/java/androidx/compose/lint/Names.kt b/compose/lint/common/src/main/java/androidx/compose/lint/Names.kt
index 81b56b6..c6894c5 100644
--- a/compose/lint/common/src/main/java/androidx/compose/lint/Names.kt
+++ b/compose/lint/common/src/main/java/androidx/compose/lint/Names.kt
@@ -68,6 +68,11 @@
val ParentDataModifier = Name(PackageName, "ParentDataModifier")
}
+ object Platform {
+ val PackageName = Package(Ui.PackageName, "platform")
+ val LocalConfiguration = Name(PackageName, "LocalConfiguration")
+ }
+
object Pointer {
val PackageName = Package(Ui.PackageName, "input.pointer")
val PointerInputScope = Name(PackageName, "PointerInputScope")
diff --git a/compose/material/material/src/commonMain/kotlin/androidx/compose/material/SnackbarHost.kt b/compose/material/material/src/commonMain/kotlin/androidx/compose/material/SnackbarHost.kt
index 36afe64..864ea49 100644
--- a/compose/material/material/src/commonMain/kotlin/androidx/compose/material/SnackbarHost.kt
+++ b/compose/material/material/src/commonMain/kotlin/androidx/compose/material/SnackbarHost.kt
@@ -298,7 +298,9 @@
alpha = opacity.value
)
.semantics {
- liveRegion = LiveRegionMode.Polite
+ if (isVisible) {
+ liveRegion = LiveRegionMode.Polite
+ }
paneTitle = a11yPaneTitle
dismiss {
key.dismiss()
diff --git a/compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/NavigationDrawer.android.kt b/compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/NavigationDrawer.android.kt
deleted file mode 100644
index d214bbd..0000000
--- a/compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/NavigationDrawer.android.kt
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2024 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package androidx.compose.material3
-
-import androidx.activity.BackEventCompat
-import androidx.activity.compose.PredictiveBackHandler
-import androidx.compose.animation.core.animate
-import androidx.compose.material3.internal.PredictiveBack
-import androidx.compose.runtime.Composable
-import androidx.compose.runtime.LaunchedEffect
-import androidx.compose.runtime.remember
-import androidx.compose.runtime.rememberCoroutineScope
-import androidx.compose.ui.platform.LocalDensity
-import androidx.compose.ui.platform.LocalLayoutDirection
-import androidx.compose.ui.unit.LayoutDirection
-import androidx.compose.ui.unit.dp
-import kotlin.coroutines.cancellation.CancellationException
-import kotlinx.coroutines.launch
-
-/**
- * Registers a [PredictiveBackHandler] and provides animation values in [DrawerPredictiveBackState]
- * based on back progress.
- *
- * @param drawerState state of the drawer
- * @param content content of the rest of the UI
- */
-@Composable
-internal actual fun DrawerPredictiveBackHandler(
- drawerState: DrawerState,
- content: @Composable (DrawerPredictiveBackState) -> Unit
-) {
- val drawerPredictiveBackState = remember { DrawerPredictiveBackState() }
- val scope = rememberCoroutineScope()
- val isRtl = LocalLayoutDirection.current == LayoutDirection.Rtl
- val maxScaleXDistanceGrow: Float
- val maxScaleXDistanceShrink: Float
- val maxScaleYDistance: Float
- with(LocalDensity.current) {
- maxScaleXDistanceGrow = PredictiveBackDrawerMaxScaleXDistanceGrow.toPx()
- maxScaleXDistanceShrink = PredictiveBackDrawerMaxScaleXDistanceShrink.toPx()
- maxScaleYDistance = PredictiveBackDrawerMaxScaleYDistance.toPx()
- }
-
- PredictiveBackHandler(enabled = drawerState.isOpen) { progress ->
- try {
- progress.collect { backEvent ->
- drawerPredictiveBackState.update(
- PredictiveBack.transform(backEvent.progress),
- backEvent.swipeEdge == BackEventCompat.EDGE_LEFT,
- isRtl,
- maxScaleXDistanceGrow,
- maxScaleXDistanceShrink,
- maxScaleYDistance
- )
- }
- } catch (e: CancellationException) {
- drawerPredictiveBackState.clear()
- } finally {
- if (drawerPredictiveBackState.swipeEdgeMatchesDrawer) {
- // If swipe edge matches drawer gravity and we've stretched the drawer horizontally,
- // un-stretch it smoothly so that it hides completely during the drawer close.
- scope.launch {
- animate(
- initialValue = drawerPredictiveBackState.scaleXDistance,
- targetValue = 0f
- ) { value, _ ->
- drawerPredictiveBackState.scaleXDistance = value
- }
- drawerPredictiveBackState.clear()
- }
- }
- drawerState.close()
- }
- }
-
- LaunchedEffect(drawerState.isClosed) {
- if (drawerState.isClosed) {
- drawerPredictiveBackState.clear()
- }
- }
-
- content(drawerPredictiveBackState)
-}
-
-internal val PredictiveBackDrawerMaxScaleXDistanceGrow = 12.dp
-internal val PredictiveBackDrawerMaxScaleXDistanceShrink = 24.dp
-internal val PredictiveBackDrawerMaxScaleYDistance = 48.dp
diff --git a/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/NavigationDrawer.kt b/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/NavigationDrawer.kt
index 09ba3d4..391938b 100644
--- a/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/NavigationDrawer.kt
+++ b/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/NavigationDrawer.kt
@@ -45,8 +45,11 @@
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.material3.internal.AnchoredDraggableState
+import androidx.compose.material3.internal.BackEventCompat
import androidx.compose.material3.internal.DraggableAnchors
import androidx.compose.material3.internal.FloatProducer
+import androidx.compose.material3.internal.PredictiveBack
+import androidx.compose.material3.internal.PredictiveBackHandler
import androidx.compose.material3.internal.Strings
import androidx.compose.material3.internal.anchoredDraggable
import androidx.compose.material3.internal.getString
@@ -58,6 +61,7 @@
import androidx.compose.material3.tokens.ScrimTokens
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
+import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.SideEffect
import androidx.compose.runtime.Stable
import androidx.compose.runtime.State
@@ -934,11 +938,70 @@
}
}
+/**
+ * Registers a [PredictiveBackHandler] and provides animation values in [DrawerPredictiveBackState]
+ * based on back progress.
+ *
+ * @param drawerState state of the drawer
+ * @param content content of the rest of the UI
+ */
@Composable
-internal expect fun DrawerPredictiveBackHandler(
+internal fun DrawerPredictiveBackHandler(
drawerState: DrawerState,
content: @Composable (DrawerPredictiveBackState) -> Unit
-)
+) {
+ val drawerPredictiveBackState = remember { DrawerPredictiveBackState() }
+ val scope = rememberCoroutineScope()
+ val isRtl = LocalLayoutDirection.current == LayoutDirection.Rtl
+ val maxScaleXDistanceGrow: Float
+ val maxScaleXDistanceShrink: Float
+ val maxScaleYDistance: Float
+ with(LocalDensity.current) {
+ maxScaleXDistanceGrow = PredictiveBackDrawerMaxScaleXDistanceGrow.toPx()
+ maxScaleXDistanceShrink = PredictiveBackDrawerMaxScaleXDistanceShrink.toPx()
+ maxScaleYDistance = PredictiveBackDrawerMaxScaleYDistance.toPx()
+ }
+
+ PredictiveBackHandler(enabled = drawerState.isOpen) { progress ->
+ try {
+ progress.collect { backEvent ->
+ drawerPredictiveBackState.update(
+ PredictiveBack.transform(backEvent.progress),
+ backEvent.swipeEdge == BackEventCompat.EDGE_LEFT,
+ isRtl,
+ maxScaleXDistanceGrow,
+ maxScaleXDistanceShrink,
+ maxScaleYDistance
+ )
+ }
+ } catch (e: kotlin.coroutines.cancellation.CancellationException) {
+ drawerPredictiveBackState.clear()
+ } finally {
+ if (drawerPredictiveBackState.swipeEdgeMatchesDrawer) {
+ // If swipe edge matches drawer gravity and we've stretched the drawer horizontally,
+ // un-stretch it smoothly so that it hides completely during the drawer close.
+ scope.launch {
+ animate(
+ initialValue = drawerPredictiveBackState.scaleXDistance,
+ targetValue = 0f
+ ) { value, _ ->
+ drawerPredictiveBackState.scaleXDistance = value
+ }
+ drawerPredictiveBackState.clear()
+ }
+ }
+ drawerState.close()
+ }
+ }
+
+ LaunchedEffect(drawerState.isClosed) {
+ if (drawerState.isClosed) {
+ drawerPredictiveBackState.clear()
+ }
+ }
+
+ content(drawerPredictiveBackState)
+}
/** Object to hold default values for [ModalNavigationDrawer] */
object DrawerDefaults {
@@ -1252,6 +1315,10 @@
private val DrawerVelocityThreshold = 400.dp
private val MinimumDrawerWidth = 240.dp
+internal val PredictiveBackDrawerMaxScaleXDistanceGrow = 12.dp
+internal val PredictiveBackDrawerMaxScaleXDistanceShrink = 24.dp
+internal val PredictiveBackDrawerMaxScaleYDistance = 48.dp
+
// TODO: b/177571613 this should be a proper decay settling
// this is taken from the DrawerLayout's DragViewHelper as a min duration.
private val AnchoredDraggableDefaultAnimationSpec = TweenSpec<Float>(durationMillis = 256)
diff --git a/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/SnackbarHost.kt b/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/SnackbarHost.kt
index 38b6762..dd8b7ad 100644
--- a/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/SnackbarHost.kt
+++ b/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/SnackbarHost.kt
@@ -363,7 +363,9 @@
alpha = opacity.value
)
.semantics {
- liveRegion = LiveRegionMode.Polite
+ if (isVisible) {
+ liveRegion = LiveRegionMode.Polite
+ }
dismiss {
key.dismiss()
true
diff --git a/compose/runtime/runtime/build.gradle b/compose/runtime/runtime/build.gradle
index bbff188..1406001 100644
--- a/compose/runtime/runtime/build.gradle
+++ b/compose/runtime/runtime/build.gradle
@@ -46,6 +46,7 @@
implementation(libs.kotlinStdlibCommon)
implementation(libs.kotlinCoroutinesCore)
implementation(project(":collection:collection"))
+ implementation(project(":performance:performance-annotation"))
}
}
diff --git a/compose/runtime/runtime/proguard-rules.pro b/compose/runtime/runtime/proguard-rules.pro
index 8e1c21e..400440d 100644
--- a/compose/runtime/runtime/proguard-rules.pro
+++ b/compose/runtime/runtime/proguard-rules.pro
@@ -31,3 +31,7 @@
static void compose*RuntimeError(...);
static java.lang.Void compose*RuntimeError(...);
}
+
+-keepclassmembers class * {
+ @dalvik.annotation.optimization.NeverInline *;
+}
diff --git a/wear/tiles/tiles-samples/src/main/java/androidx/wear/tiles/samples/tile/Helpers.kt b/compose/runtime/runtime/src/androidMain/kotlin/androidx/compose/runtime/collection/ArrayUtils.android.kt
similarity index 60%
rename from wear/tiles/tiles-samples/src/main/java/androidx/wear/tiles/samples/tile/Helpers.kt
rename to compose/runtime/runtime/src/androidMain/kotlin/androidx/compose/runtime/collection/ArrayUtils.android.kt
index bc76b6c..c487bdc 100644
--- a/wear/tiles/tiles-samples/src/main/java/androidx/wear/tiles/samples/tile/Helpers.kt
+++ b/compose/runtime/runtime/src/androidMain/kotlin/androidx/compose/runtime/collection/ArrayUtils.android.kt
@@ -14,13 +14,16 @@
* limitations under the License.
*/
-package androidx.wear.tiles.samples.tile
+@file:Suppress("NOTHING_TO_INLINE", "KotlinRedundantDiagnosticSuppress")
-import androidx.wear.protolayout.ActionBuilders.LoadAction
-import androidx.wear.protolayout.ModifiersBuilders.Clickable
-import androidx.wear.protolayout.TypeBuilders.StringProp
+package androidx.compose.runtime.collection
-internal val EMPTY_LOAD_CLICKABLE =
- Clickable.Builder().setOnClick(LoadAction.Builder().build()).build()
-
-internal fun String.prop(): StringProp = StringProp.Builder(this).build()
+internal actual inline fun <T> Array<out T>.fastCopyInto(
+ destination: Array<T>,
+ destinationOffset: Int,
+ startIndex: Int,
+ endIndex: Int
+): Array<T> {
+ System.arraycopy(this, startIndex, destination, destinationOffset, endIndex - startIndex)
+ return destination
+}
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt
index a295937..afd4db85 100644
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt
+++ b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt
@@ -23,6 +23,7 @@
import androidx.collection.MutableIntSet
import androidx.collection.MutableObjectList
import androidx.collection.mutableIntListOf
+import androidx.compose.runtime.collection.fastCopyInto
import androidx.compose.runtime.platform.makeSynchronizedObject
import androidx.compose.runtime.platform.synchronized
import androidx.compose.runtime.snapshots.fastAny
@@ -2122,7 +2123,7 @@
// 4) copy the slots to their new location
if (moveDataLen > 0) {
val slots = slots
- slots.copyInto(
+ slots.fastCopyInto(
destination = slots,
destinationOffset = destinationSlot,
startIndex = dataIndexToDataAddress(dataStart + moveDataLen),
@@ -2206,7 +2207,7 @@
)
val slots = toWriter.slots
val currentSlot = toWriter.currentSlot
- fromWriter.slots.copyInto(
+ fromWriter.slots.fastCopyInto(
destination = slots,
destinationOffset = currentSlot,
startIndex = sourceSlotsStart,
@@ -2676,7 +2677,7 @@
val slots = slots
if (index < gapStart) {
// move the gap down to index by shifting the data up.
- slots.copyInto(
+ slots.fastCopyInto(
destination = slots,
destinationOffset = index + gapLen,
startIndex = index,
@@ -2684,7 +2685,7 @@
)
} else {
// Shift the data down, leaving the gap at index
- slots.copyInto(
+ slots.fastCopyInto(
destination = slots,
destinationOffset = gapStart,
startIndex = gapStart + gapLen,
@@ -2830,13 +2831,13 @@
val newGapEndAddress = gapStart + newGapLen
// Copy the old arrays into the new arrays
- slots.copyInto(
+ slots.fastCopyInto(
destination = newData,
destinationOffset = 0,
startIndex = 0,
endIndex = gapStart
)
- slots.copyInto(
+ slots.fastCopyInto(
destination = newData,
destinationOffset = newGapEndAddress,
startIndex = oldGapEndAddress,
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Stack.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Stack.kt
index 03989dd..c2e25cd 100644
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Stack.kt
+++ b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Stack.kt
@@ -14,9 +14,13 @@
* limitations under the License.
*/
+@file:Suppress("NOTHING_TO_INLINE", "KotlinRedundantDiagnosticSuppress")
+
package androidx.compose.runtime
+import kotlin.jvm.JvmField
import kotlin.jvm.JvmInline
+import kotlin.math.min
@JvmInline
internal value class Stack<T>(private val backing: ArrayList<T> = ArrayList()) {
@@ -42,22 +46,33 @@
}
internal class IntStack {
- private var slots = IntArray(10)
- private var tos = 0
+ @JvmField internal var slots = IntArray(10)
+ @JvmField internal var tos = 0
- val size: Int
+ inline val size: Int
get() = tos
+ @dalvik.annotation.optimization.NeverInline
+ private fun resize(): IntArray {
+ val copy = slots.copyOf(slots.size * 2)
+ slots = copy
+ return copy
+ }
+
fun push(value: Int) {
+ var slots = slots
if (tos >= slots.size) {
- slots = slots.copyOf(slots.size * 2)
+ slots = resize()
}
slots[tos++] = value
}
fun pop(): Int = slots[--tos]
- fun peekOr(default: Int): Int = if (tos > 0) peek() else default
+ fun peekOr(default: Int): Int {
+ val index = tos - 1
+ return if (index >= 0) slots[index] else default
+ }
fun peek() = slots[tos - 1]
@@ -65,16 +80,20 @@
fun peek(index: Int) = slots[index]
- fun isEmpty() = tos == 0
+ inline fun isEmpty() = tos == 0
- fun isNotEmpty() = tos != 0
+ inline fun isNotEmpty() = tos != 0
fun clear() {
tos = 0
}
fun indexOf(value: Int): Int {
- for (i in 0 until tos) if (slots[i] == value) return i
+ val slots = slots
+ val end = min(slots.size, tos)
+ for (i in 0 until end) {
+ if (slots[i] == value) return i
+ }
return -1
}
}
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/changelist/Operations.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/changelist/Operations.kt
index f250bc8..6a1339b 100644
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/changelist/Operations.kt
+++ b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/changelist/Operations.kt
@@ -24,8 +24,10 @@
import androidx.compose.runtime.RememberManager
import androidx.compose.runtime.SlotWriter
import androidx.compose.runtime.changelist.Operation.ObjectParameter
+import androidx.compose.runtime.collection.fastCopyInto
import androidx.compose.runtime.debugRuntimeCheck
import androidx.compose.runtime.requirePrecondition
+import dalvik.annotation.optimization.NeverInline
import kotlin.contracts.ExperimentalContracts
import kotlin.contracts.InvocationKind.EXACTLY_ONCE
import kotlin.contracts.contract
@@ -133,11 +135,12 @@
return (currentSize + resizeAmount).coerceAtLeast(requiredSize)
}
+ @NeverInline
private fun resizeOpCodes() {
val resizeAmount = opCodesSize.coerceAtMost(OperationsMaxResizeAmount)
@Suppress("UNCHECKED_CAST")
val newOpCodes = arrayOfNulls<Operation>(opCodesSize + resizeAmount) as Array<Operation>
- opCodes = opCodes.copyInto(newOpCodes, 0, 0, opCodesSize)
+ opCodes = opCodes.fastCopyInto(newOpCodes, 0, 0, opCodesSize)
}
private inline fun ensureIntArgsSizeAtLeast(requiredSize: Int) {
@@ -147,6 +150,7 @@
}
}
+ @NeverInline
private fun resizeIntArgs(currentSize: Int, requiredSize: Int) {
val newIntArgs = IntArray(determineNewSize(currentSize, requiredSize))
intArgs.copyInto(newIntArgs, 0, 0, currentSize)
@@ -160,9 +164,10 @@
}
}
+ @NeverInline
private fun resizeObjectArgs(currentSize: Int, requiredSize: Int) {
val newObjectArgs = arrayOfNulls<Any>(determineNewSize(currentSize, requiredSize))
- objectArgs.copyInto(newObjectArgs, 0, 0, currentSize)
+ objectArgs.fastCopyInto(newObjectArgs, 0, 0, currentSize)
objectArgs = newObjectArgs
}
@@ -291,7 +296,7 @@
other.pushOp(op)
// Move the objects then null out our contents
- objectArgs.copyInto(
+ objectArgs.fastCopyInto(
destination = other.objectArgs,
destinationOffset = other.objectArgsSize - op.objects,
startIndex = objectArgsSize - op.objects,
diff --git a/compose/material3/material3/src/commonStubsMain/kotlin/androidx/compose/material3/NavigationDrawer.commonStubs.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/ArrayUtils.kt
similarity index 62%
copy from compose/material3/material3/src/commonStubsMain/kotlin/androidx/compose/material3/NavigationDrawer.commonStubs.kt
copy to compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/ArrayUtils.kt
index 39fe5a5..03c2546 100644
--- a/compose/material3/material3/src/commonStubsMain/kotlin/androidx/compose/material3/NavigationDrawer.commonStubs.kt
+++ b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/ArrayUtils.kt
@@ -14,12 +14,15 @@
* limitations under the License.
*/
-package androidx.compose.material3
+package androidx.compose.runtime.collection
-import androidx.compose.runtime.Composable
-
-@Composable
-internal actual fun DrawerPredictiveBackHandler(
- drawerState: DrawerState,
- content: @Composable (DrawerPredictiveBackState) -> Unit
-): Unit = implementedInJetBrainsFork()
+/**
+ * Equivalent of Array.copyInto() with an implementation designed to avoid unnecessary null checks
+ * and exception throws on Android after inlining.
+ */
+internal expect fun <T> Array<out T>.fastCopyInto(
+ destination: Array<T>,
+ destinationOffset: Int,
+ startIndex: Int,
+ endIndex: Int
+): Array<T>
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/MutableVector.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/MutableVector.kt
index 1315b32..8144a7b 100644
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/MutableVector.kt
+++ b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/MutableVector.kt
@@ -18,6 +18,7 @@
package androidx.compose.runtime.collection
+import dalvik.annotation.optimization.NeverInline
import kotlin.contracts.ExperimentalContracts
import kotlin.contracts.contract
import kotlin.jvm.JvmField
@@ -66,7 +67,7 @@
ensureCapacity(size + 1)
val content = content
if (index != size) {
- content.copyInto(
+ content.fastCopyInto(
destination = content,
destinationOffset = index + 1,
startIndex = index,
@@ -83,12 +84,13 @@
*/
fun addAll(index: Int, elements: List<T>): Boolean {
if (elements.isEmpty()) return false
- ensureCapacity(size + elements.size)
+ val elementsSize = elements.size
+ ensureCapacity(size + elementsSize)
val content = content
if (index != size) {
- content.copyInto(
+ content.fastCopyInto(
destination = content,
- destinationOffset = index + elements.size,
+ destinationOffset = index + elementsSize,
startIndex = index,
endIndex = size
)
@@ -96,7 +98,7 @@
for (i in elements.indices) {
content[index + i] = elements[i]
}
- size += elements.size
+ size += elementsSize
return true
}
@@ -105,24 +107,25 @@
* that are in the way.
*/
fun addAll(index: Int, elements: MutableVector<T>): Boolean {
- if (elements.isEmpty()) return false
- ensureCapacity(size + elements.size)
+ val elementsSize = elements.size
+ if (elementsSize == 0) return false
+ ensureCapacity(size + elementsSize)
val content = content
if (index != size) {
- content.copyInto(
+ content.fastCopyInto(
destination = content,
- destinationOffset = index + elements.size,
+ destinationOffset = index + elementsSize,
startIndex = index,
endIndex = size
)
}
- elements.content.copyInto(
+ elements.content.fastCopyInto(
destination = content,
destinationOffset = index,
startIndex = 0,
- endIndex = elements.size
+ endIndex = elementsSize
)
- size += elements.size
+ size += elementsSize
return true
}
@@ -147,12 +150,13 @@
* [MutableVector] was changed.
*/
fun addAll(@Suppress("ArrayReturn") elements: Array<T>): Boolean {
- if (elements.isEmpty()) {
+ val elementsSize = elements.size
+ if (elementsSize == 0) {
return false
}
- ensureCapacity(size + elements.size)
- elements.copyInto(destination = content, destinationOffset = size)
- size += elements.size
+ ensureCapacity(size + elementsSize)
+ elements.fastCopyInto(destination = content, destinationOffset = size, 0, elementsSize)
+ size += elementsSize
return true
}
@@ -162,18 +166,19 @@
*/
fun addAll(index: Int, elements: Collection<T>): Boolean {
if (elements.isEmpty()) return false
- ensureCapacity(size + elements.size)
+ val elementsSize = elements.size
+ ensureCapacity(size + elementsSize)
val content = content
if (index != size) {
- content.copyInto(
+ content.fastCopyInto(
destination = content,
- destinationOffset = index + elements.size,
+ destinationOffset = index + elementsSize,
startIndex = index,
endIndex = size
)
}
elements.forEachIndexed { i, item -> content[index + i] = item }
- size += elements.size
+ size += elementsSize
return true
}
@@ -287,13 +292,14 @@
}
}
+ @NeverInline
@PublishedApi
internal fun resizeStorage(capacity: Int) {
val oldContent = content
val oldSize = oldContent.size
val newSize = max(capacity, oldSize * 2)
val newContent = arrayOfNulls<Any?>(newSize) as Array<T?>
- oldContent.copyInto(newContent, 0, 0, oldSize)
+ oldContent.fastCopyInto(newContent, 0, 0, oldSize)
content = newContent
}
@@ -694,7 +700,7 @@
val content = content
val item = content[index] as T
if (index != lastIndex) {
- content.copyInto(
+ content.fastCopyInto(
destination = content,
destinationOffset = index,
startIndex = index + 1,
@@ -710,7 +716,7 @@
fun removeRange(start: Int, end: Int) {
if (end > start) {
if (end < size) {
- content.copyInto(
+ content.fastCopyInto(
destination = content,
destinationOffset = start,
startIndex = end,
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/snapshots/SnapshotWeakSet.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/snapshots/SnapshotWeakSet.kt
index 66075f0a..e70d6fd 100644
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/snapshots/SnapshotWeakSet.kt
+++ b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/snapshots/SnapshotWeakSet.kt
@@ -17,6 +17,7 @@
package androidx.compose.runtime.snapshots
import androidx.compose.runtime.TestOnly
+import androidx.compose.runtime.collection.fastCopyInto
import androidx.compose.runtime.internal.WeakReference
import androidx.compose.runtime.internal.identityHashCode
@@ -70,13 +71,18 @@
val newCapacity = capacity * 2
val newValues = arrayOfNulls<WeakReference<T>?>(newCapacity)
val newHashes = IntArray(newCapacity)
- values.copyInto(
+ values.fastCopyInto(
destination = newValues,
destinationOffset = insertIndex + 1,
startIndex = insertIndex,
endIndex = size
)
- values.copyInto(destination = newValues, endIndex = insertIndex)
+ values.fastCopyInto(
+ destination = newValues,
+ destinationOffset = 0,
+ startIndex = 0,
+ endIndex = insertIndex
+ )
hashes.copyInto(
destination = newHashes,
destinationOffset = insertIndex + 1,
@@ -87,7 +93,7 @@
values = newValues
hashes = newHashes
} else {
- values.copyInto(
+ values.fastCopyInto(
destination = values,
destinationOffset = insertIndex + 1,
startIndex = insertIndex,
diff --git a/compose/material3/material3/src/commonStubsMain/kotlin/androidx/compose/material3/NavigationDrawer.commonStubs.kt b/compose/runtime/runtime/src/nonAndroidMain/kotlin/androidx/compose/runtime/collection/ArrayUtils.nonAndroid.kt
similarity index 63%
rename from compose/material3/material3/src/commonStubsMain/kotlin/androidx/compose/material3/NavigationDrawer.commonStubs.kt
rename to compose/runtime/runtime/src/nonAndroidMain/kotlin/androidx/compose/runtime/collection/ArrayUtils.nonAndroid.kt
index 39fe5a5..2e2c834 100644
--- a/compose/material3/material3/src/commonStubsMain/kotlin/androidx/compose/material3/NavigationDrawer.commonStubs.kt
+++ b/compose/runtime/runtime/src/nonAndroidMain/kotlin/androidx/compose/runtime/collection/ArrayUtils.nonAndroid.kt
@@ -14,12 +14,13 @@
* limitations under the License.
*/
-package androidx.compose.material3
+@file:Suppress("NOTHING_TO_INLINE", "KotlinRedundantDiagnosticSuppress")
-import androidx.compose.runtime.Composable
+package androidx.compose.runtime.collection
-@Composable
-internal actual fun DrawerPredictiveBackHandler(
- drawerState: DrawerState,
- content: @Composable (DrawerPredictiveBackState) -> Unit
-): Unit = implementedInJetBrainsFork()
+internal actual inline fun <T> Array<out T>.fastCopyInto(
+ destination: Array<T>,
+ destinationOffset: Int,
+ startIndex: Int,
+ endIndex: Int
+): Array<T> = this.copyInto(destination, destinationOffset, startIndex, endIndex)
diff --git a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/IntervalTree.kt b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/IntervalTree.kt
index 1d3b503..8a2ff33 100644
--- a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/IntervalTree.kt
+++ b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/IntervalTree.kt
@@ -82,8 +82,7 @@
// structure beyond what can be found in various descriptions of binary search
// trees and red/black trees
- @JvmField
- internal val terminator = Node(Float.MAX_VALUE, Float.MIN_VALUE, null, TreeColor.Black)
+ @JvmField internal val terminator = Node(Float.MAX_VALUE, Float.MIN_VALUE, null, TreeColorBlack)
@JvmField internal var root = terminator
@JvmField internal val stack = ArrayList<Node>()
@@ -203,7 +202,7 @@
* @param data Data to associate with the interval
*/
fun addInterval(start: Float, end: Float, data: T?) {
- val node = Node(start, end, data, TreeColor.Red)
+ val node = Node(start, end, data, TreeColorRed)
// Update the tree without doing any balancing
var current = root
@@ -239,44 +238,44 @@
private fun rebalance(target: Node) {
var node = target
- while (node !== root && node.parent.color == TreeColor.Red) {
+ while (node !== root && node.parent.color == TreeColorRed) {
val ancestor = node.parent.parent
if (node.parent === ancestor.left) {
val right = ancestor.right
- if (right.color == TreeColor.Red) {
- right.color = TreeColor.Black
- node.parent.color = TreeColor.Black
- ancestor.color = TreeColor.Red
+ if (right.color == TreeColorRed) {
+ right.color = TreeColorBlack
+ node.parent.color = TreeColorBlack
+ ancestor.color = TreeColorRed
node = ancestor
} else {
if (node === node.parent.right) {
node = node.parent
rotateLeft(node)
}
- node.parent.color = TreeColor.Black
- ancestor.color = TreeColor.Red
+ node.parent.color = TreeColorBlack
+ ancestor.color = TreeColorRed
rotateRight(ancestor)
}
} else {
val left = ancestor.left
- if (left.color == TreeColor.Red) {
- left.color = TreeColor.Black
- node.parent.color = TreeColor.Black
- ancestor.color = TreeColor.Red
+ if (left.color == TreeColorRed) {
+ left.color = TreeColorBlack
+ node.parent.color = TreeColorBlack
+ ancestor.color = TreeColorRed
node = ancestor
} else {
if (node === node.parent.left) {
node = node.parent
rotateRight(node)
}
- node.parent.color = TreeColor.Black
- ancestor.color = TreeColor.Red
+ node.parent.color = TreeColorBlack
+ ancestor.color = TreeColorRed
rotateLeft(ancestor)
}
}
}
- root.color = TreeColor.Black
+ root.color = TreeColorBlack
}
private fun rotateLeft(node: Node) {
@@ -340,11 +339,6 @@
}
}
- internal enum class TreeColor {
- Red,
- Black
- }
-
internal inner class Node(start: Float, end: Float, data: T?, var color: TreeColor) :
Interval<T>(start, end, data) {
var min: Float = start
@@ -378,3 +372,8 @@
}
}
}
+
+private typealias TreeColor = Int
+
+private const val TreeColorRed = 0
+private const val TreeColorBlack = 1
diff --git a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/PathGeometry.kt b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/PathGeometry.kt
index 53b0d54..4c96e1e 100644
--- a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/PathGeometry.kt
+++ b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/PathGeometry.kt
@@ -58,7 +58,7 @@
// segments.
var type = iterator.next(points)
while (type != PathSegment.Type.Done) {
- @Suppress("KotlinConstantConditions")
+ @Suppress("KotlinConstantConditions", "RedundantSuppression")
when (type) {
PathSegment.Type.Move -> {
if (!first) {
@@ -175,7 +175,7 @@
var type = iterator.next(points)
while (type != PathSegment.Type.Done) {
- @Suppress("KotlinConstantConditions")
+ @Suppress("KotlinConstantConditions", "RedundantSuppression")
when (type) {
PathSegment.Type.Move -> {
if (!first && !isEmpty) {
diff --git a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/ColorSpace.kt b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/ColorSpace.kt
index 3905cff..ec0cc69 100644
--- a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/ColorSpace.kt
+++ b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/ColorSpace.kt
@@ -633,7 +633,7 @@
* @param r2: The third element of the vector
* @return The first element of the resulting multiplication.
*/
-@Suppress("NOTHING_TO_INLINE")
+@Suppress("NOTHING_TO_INLINE", "KotlinRedundantDiagnosticSuppress")
internal inline fun mul3x3Float3_0(lhs: FloatArray, r0: Float, r1: Float, r2: Float): Float {
return lhs[0] * r0 + lhs[3] * r1 + lhs[6] * r2
}
@@ -648,7 +648,7 @@
* @param r2: The third element of the vector
* @return The second element of the resulting multiplication.
*/
-@Suppress("NOTHING_TO_INLINE")
+@Suppress("NOTHING_TO_INLINE", "KotlinRedundantDiagnosticSuppress")
internal inline fun mul3x3Float3_1(lhs: FloatArray, r0: Float, r1: Float, r2: Float): Float {
return lhs[1] * r0 + lhs[4] * r1 + lhs[7] * r2
}
@@ -663,7 +663,7 @@
* @param r2: The third element of the vector
* @return The third element of the resulting multiplication.
*/
-@Suppress("NOTHING_TO_INLINE")
+@Suppress("NOTHING_TO_INLINE", "KotlinRedundantDiagnosticSuppress")
internal inline fun mul3x3Float3_2(lhs: FloatArray, r0: Float, r1: Float, r2: Float): Float {
return lhs[2] * r0 + lhs[5] * r1 + lhs[8] * r2
}
diff --git a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/Connector.kt b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/Connector.kt
index 7a47484..2a81bac 100644
--- a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/Connector.kt
+++ b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/Connector.kt
@@ -230,7 +230,7 @@
chromaticAdaptation(
Adaptation.Bradford.transform,
srcXYZ,
- Illuminant.D50Xyz.copyOf()
+ Illuminant.newD50Xyz()
)
transform = mul3x3(srcAdaptation, source.transform)
}
@@ -240,7 +240,7 @@
chromaticAdaptation(
Adaptation.Bradford.transform,
dstXYZ,
- Illuminant.D50Xyz.copyOf()
+ Illuminant.newD50Xyz()
)
inverseTransform = inverse3x3(mul3x3(dstAdaptation, destination.transform))
}
diff --git a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/Illuminant.kt b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/Illuminant.kt
index b3598c3..0bf3461 100644
--- a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/Illuminant.kt
+++ b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/Illuminant.kt
@@ -73,4 +73,6 @@
val E = WhitePoint(0.33333f, 0.33333f)
internal val D50Xyz = floatArrayOf(0.964212f, 1.0f, 0.825188f)
+
+ internal fun newD50Xyz() = floatArrayOf(0.964212f, 1.0f, 0.825188f)
}
diff --git a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/Rgb.kt b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/Rgb.kt
index 06f2891..e9d3032 100644
--- a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/Rgb.kt
+++ b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/Rgb.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-@file:Suppress("NOTHING_TO_INLINE")
+@file:Suppress("NOTHING_TO_INLINE", "KotlinRedundantDiagnosticSuppress")
package androidx.compose.ui.graphics.colorspace
@@ -853,10 +853,9 @@
var result = super.hashCode()
result = 31 * result + whitePoint.hashCode()
result = 31 * result + primaries.contentHashCode()
- result = 31 * result + (if (min != +0.0f) min.toBits() else 0)
- result = 31 * result + (if (max != +0.0f) max.toBits() else 0)
- result =
- (31 * result + if (transferParameters != null) transferParameters.hashCode() else 0)
+ result = 31 * result + (if (min != 0.0f) min.toBits() else 0)
+ result = 31 * result + (if (max != 0.0f) max.toBits() else 0)
+ result = (31 * result + (transferParameters?.hashCode() ?: 0))
if (transferParameters == null) {
result = 31 * result + oetfOrig.hashCode()
result = 31 * result + eotfOrig.hashCode()
diff --git a/compose/ui/ui-lint/src/main/java/androidx/compose/ui/lint/LocalContextConfigurationReadDetector.kt b/compose/ui/ui-lint/src/main/java/androidx/compose/ui/lint/LocalContextConfigurationReadDetector.kt
new file mode 100644
index 0000000..257cf98
--- /dev/null
+++ b/compose/ui/ui-lint/src/main/java/androidx/compose/ui/lint/LocalContextConfigurationReadDetector.kt
@@ -0,0 +1,180 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.compose.ui.lint
+
+import androidx.compose.lint.Names.Ui.Platform.LocalConfiguration
+import androidx.compose.lint.Package
+import androidx.compose.lint.isInPackageName
+import com.android.tools.lint.client.api.UElementHandler
+import com.android.tools.lint.detector.api.Category
+import com.android.tools.lint.detector.api.Detector
+import com.android.tools.lint.detector.api.Implementation
+import com.android.tools.lint.detector.api.Issue
+import com.android.tools.lint.detector.api.JavaContext
+import com.android.tools.lint.detector.api.LintFix
+import com.android.tools.lint.detector.api.Scope
+import com.android.tools.lint.detector.api.Severity
+import com.android.tools.lint.detector.api.SourceCodeScanner
+import com.android.tools.lint.detector.api.UastLintUtils.Companion.tryResolveUDeclaration
+import com.intellij.psi.PsiMethod
+import java.util.EnumSet
+import org.jetbrains.uast.UElement
+import org.jetbrains.uast.UExpression
+import org.jetbrains.uast.UQualifiedReferenceExpression
+import org.jetbrains.uast.USimpleNameReferenceExpression
+import org.jetbrains.uast.UVariable
+import org.jetbrains.uast.matchesQualified
+import org.jetbrains.uast.skipParenthesizedExprDown
+import org.jetbrains.uast.tryResolve
+
+/**
+ * Detector that warns for calls to LocalContext.current.resources.configuration - changes to the
+ * configuration object will not cause this to recompose, so callers of this API will not be
+ * notified of the new configuration. LocalConfiguration.current should be used instead.
+ */
+class LocalContextConfigurationReadDetector : Detector(), SourceCodeScanner {
+ override fun getApplicableUastTypes() = listOf(UQualifiedReferenceExpression::class.java)
+
+ override fun createUastHandler(context: JavaContext): UElementHandler =
+ object : UElementHandler() {
+ override fun visitQualifiedReferenceExpression(node: UQualifiedReferenceExpression) {
+ // Fast path for whole string - note the logic below would catch this (and variants
+ // that use method calls such as getResources() instead), but we want a fast path
+ // so we can suggest a replacement.
+ if (node.matchesQualified(LocalContextCurrentResourcesConfiguration)) {
+ context.report(
+ LocalContextConfigurationRead,
+ node,
+ context.getNameLocation(node),
+ "Reading Configuration using $LocalContextCurrentResourcesConfiguration",
+ LintFix.create()
+ .replace()
+ .name("Replace with $LocalConfigurationCurrent")
+ .all()
+ .with(LocalConfigurationCurrent)
+ .imports(LocalConfiguration.javaFqn)
+ .autoFix()
+ .build()
+ )
+ return
+ }
+ // Simple logic to try and match a few specific cases (there are many cases that
+ // this won't warn for) where the chain is split up
+ // E.g. val context = LocalContext.current, val resources = context.resources,
+ // val configuration = resources.configuration
+ // A future improvement would be to catch receiver scope cases, such as
+ // `with(LocalContext.current.resources) { configuration... }`, but this is more
+ // complicated and error prone
+
+ // See if this is a resources.configuration call
+ val selector = node.selector.skipParenthesizedExprDown()
+ if (!selector.isCallToGetConfiguration()) return
+ // Try and find out where this resources came from.
+ val resources = node.receiver.skipParenthesizedExprDown()
+ val contextExpression: UExpression? =
+ when (resources) {
+ // Still part of a qualified expression, e.g. context.resources
+ is UQualifiedReferenceExpression -> {
+ if (!resources.isCallToGetResources()) return
+ // Return the receiver, e.g. `context` in the case of
+ // `context.resources`
+ resources.receiver.skipParenthesizedExprDown()
+ }
+ // Possible reference to a variable, e.g. val resources = context.resources,
+ // and this USimpleNameReferenceExpression is `resources`
+ is USimpleNameReferenceExpression -> {
+ // If it is a property such as val resources = context.resources, find
+ // the initializer
+ val initializer =
+ (resources.tryResolveUDeclaration() as? UVariable)?.uastInitializer
+ ?: return
+ if (initializer !is UQualifiedReferenceExpression) return
+ if (!initializer.isCallToGetResources()) return
+ // Return the receiver, e.g. `context` in the case of
+ // `context.resources`
+ initializer.receiver.skipParenthesizedExprDown()
+ }
+ else -> return
+ }
+
+ // Try and find out where this context came from
+ val contextSource =
+ when (contextExpression) {
+ // Still part of a qualified expression, e.g. LocalContext.current
+ is UQualifiedReferenceExpression -> contextExpression
+ // Possible reference to a variable, e.g. val context =
+ // LocalContext.current,
+ // and this USimpleNameReferenceExpression is `context`
+ is USimpleNameReferenceExpression -> {
+ // If it is a property such as val context = LocalContext.current, find
+ // the initializer
+ val initializer =
+ (contextExpression.tryResolveUDeclaration() as? UVariable)
+ ?.uastInitializer ?: return
+ if (initializer !is UQualifiedReferenceExpression) return
+ initializer
+ }
+ else -> return
+ }
+
+ if (contextSource.matchesQualified("LocalContext.current")) {
+ context.report(
+ LocalContextConfigurationRead,
+ node,
+ context.getNameLocation(node),
+ "Reading Configuration using $LocalContextCurrentResourcesConfiguration"
+ )
+ }
+ }
+ }
+
+ private fun UElement.isCallToGetConfiguration(): Boolean {
+ val resolved = tryResolve() as? PsiMethod ?: return false
+ return resolved.name == "getConfiguration" && resolved.isInPackageName(ResPackage)
+ }
+
+ private fun UElement.isCallToGetResources(): Boolean {
+ val resolved = tryResolve() as? PsiMethod ?: return false
+ return resolved.name == "getResources" && resolved.isInPackageName(ContentPackage)
+ }
+
+ companion object {
+ private const val LocalContextCurrentResourcesConfiguration =
+ "LocalContext.current.resources.configuration"
+ private const val LocalConfigurationCurrent = "LocalConfiguration.current"
+ private val ContentPackage = Package("android.content")
+ private val ResPackage = Package("android.content.res")
+
+ val LocalContextConfigurationRead =
+ Issue.create(
+ "LocalContextConfigurationRead",
+ "Reading Configuration using $LocalContextCurrentResourcesConfiguration",
+ "Changes to the Configuration object will not cause LocalContext reads to be " +
+ "invalidated, so you may end up with stale values when the Configuration " +
+ "changes. Instead, use $LocalConfigurationCurrent to retrieve the " +
+ "Configuration - this will recompose callers when the Configuration object " +
+ "changes.",
+ Category.CORRECTNESS,
+ 3,
+ Severity.ERROR,
+ Implementation(
+ LocalContextConfigurationReadDetector::class.java,
+ EnumSet.of(Scope.JAVA_FILE, Scope.TEST_SOURCES)
+ )
+ )
+ }
+}
diff --git a/compose/ui/ui-lint/src/main/java/androidx/compose/ui/lint/UiIssueRegistry.kt b/compose/ui/ui-lint/src/main/java/androidx/compose/ui/lint/UiIssueRegistry.kt
index deb81a3..636de46 100644
--- a/compose/ui/ui-lint/src/main/java/androidx/compose/ui/lint/UiIssueRegistry.kt
+++ b/compose/ui/ui-lint/src/main/java/androidx/compose/ui/lint/UiIssueRegistry.kt
@@ -31,6 +31,7 @@
get() =
listOf(
ComposedModifierDetector.UnnecessaryComposedModifier,
+ LocalContextConfigurationReadDetector.LocalContextConfigurationRead,
ModifierDeclarationDetector.ModifierFactoryExtensionFunction,
ModifierDeclarationDetector.ModifierFactoryReturnType,
ModifierDeclarationDetector.ModifierFactoryUnreferencedReceiver,
diff --git a/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/AndroidStubs.kt b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/AndroidStubs.kt
new file mode 100644
index 0000000..ca900f9
--- /dev/null
+++ b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/AndroidStubs.kt
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.compose.ui.lint
+
+import com.android.tools.lint.checks.infrastructure.LintDetectorTest.bytecode
+import com.android.tools.lint.checks.infrastructure.LintDetectorTest.java
+
+object AndroidStubs {
+
+ val Context =
+ bytecode(
+ "libs/android.jar",
+ java(
+ """
+package android.content;
+
+import android.content.res.Resources;
+
+public class Context {
+ public Resources getResources() {
+ return null;
+ }
+}
+ """
+ ),
+ 0xc2b7484b,
+ """
+ android/content/Context.class:
+ H4sIAAAAAAAA/zv1b9c+BgYGRwZ+LgYmBmZ2BhYeBlYGNkYGgazEskT9nMS8
+ dH3/pKzU5BJGBjabzLzMEjtGBmYNzTB2Bg5GBvHEvJSi/MwU/eT8vJLUvBJ9
+ ZxBdAVTL4pyfksrIwO+TmZfqV5qblFoUkpiUAxThSU8tCUotzi8tSk4tZmRQ
+ 1ND0QTekKLVYH67EmpGBKxjMdMsE64daoQdyH4MiAzvQ2SDAxMAIcjiQ5ATy
+ ZIE0I5Bm1drOwLgRyACaAiTZwIIgkpuBB6pUCqqUiXEDmjoOIMkLNpoPAIc3
+ ZUAnAQAA
+ """
+ )
+
+ val Resources =
+ bytecode(
+ "libs/android.jar",
+ java(
+ """
+package android.content.res;
+
+public class Resources {
+ public Configuration getConfiguration() {
+ return null;
+ }
+}
+ """
+ ),
+ 0xf1ea767d,
+ """
+ android/content/res/Resources.class:
+ H4sIAAAAAAAA/22Pz0rDQBDGv0nTRGttexZ68CC0HtwHUAQpeCoWqnjfJGPY
+ Undhs/G59CR48AF8KOlsKILiHL75w8dvZr6+Pz4B3GA8QIJejnSIPjLCZKNf
+ tNpqW6tVseEyELIrY024JvRm88ccB4SptpV3plKls4FtUJ4btebGtb7khpAu
+ XMWE8dJYvmufC/YPutjKZFJzWDj7ZOrW62CcJZzN5sv/cL9sl4TBfUe/NZEz
+ +ll2Ee/FKXJ5I0YCio+IHko3lUyS++fvoDcphCOadcNU9AjDvfVkb03o9Y8v
+ 6nGHHu0AlRLTZjcBAAA=
+ """
+ )
+
+ val Configuration =
+ bytecode(
+ "libs/android.jar",
+ java(
+ """
+package android.content.res;
+
+public class Configuration {
+ public int screenWidthDp;
+ public int screenHeightDp;
+}
+
+ """
+ ),
+ 0xbb67f264,
+ """
+ android/content/res/Configuration.class:
+ H4sIAAAAAAAA/1WPTU7DQAyFn2ma0NA/se+iu8KCuQBCQkUIJAQLUFlPEpO6
+ Kh40nXAvVkgsOACHQkwCGxZ+9vssPdlf3x+fAM4xzbGHXoZkiD5SwnRjX63Z
+ Wq3NXbHhMhDSU1EJZ4Te4miVYZ8wt1p5J5UpnQbWYDzvzNLpk9SNt0GcEka7
+ 0jPro1RhffFCoGvC+JddsdTr0MJk6SomTG5E+bZ5Ltg/2GIbSX7vGl/ypbTm
+ 8F/0SXsh5sji4YhFGCCPE+Hgr1P7StRhdLPOA/3jd9Bbtx5FTTuYRB13IZMf
+ blk3qhEBAAA=
+ """
+ )
+}
diff --git a/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/LocalContextConfigurationReadDetectorTest.kt b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/LocalContextConfigurationReadDetectorTest.kt
new file mode 100644
index 0000000..9e9c017
--- /dev/null
+++ b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/LocalContextConfigurationReadDetectorTest.kt
@@ -0,0 +1,181 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+@file:Suppress("UnstableApiUsage")
+
+package androidx.compose.ui.lint
+
+import androidx.compose.lint.test.Stubs
+import androidx.compose.lint.test.bytecodeStub
+import com.android.tools.lint.checks.infrastructure.LintDetectorTest
+import com.android.tools.lint.detector.api.Detector
+import com.android.tools.lint.detector.api.Issue
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.junit.runners.JUnit4
+
+/** Test for [LocalContextConfigurationReadDetector]. */
+@RunWith(JUnit4::class)
+class LocalContextConfigurationReadDetectorTest : LintDetectorTest() {
+ override fun getDetector(): Detector = LocalContextConfigurationReadDetector()
+
+ override fun getIssues(): MutableList<Issue> =
+ mutableListOf(LocalContextConfigurationReadDetector.LocalContextConfigurationRead)
+
+ val LocalContextStub =
+ bytecodeStub(
+ "AndroidCompositionLocals.kt",
+ "androidx/compose/ui/platform",
+ 0xe66eae21,
+ """
+ package androidx.compose.ui.platform
+
+ import android.content.Context
+ import androidx.compose.runtime.staticCompositionLocalOf
+
+ val LocalContext = staticCompositionLocalOf<Context>()
+ """,
+ """
+ META-INF/main.kotlin_module:
+ H4sIAAAAAAAA/2NgYGBmYGBgAmJGBijg0uOSSMxLKcrPTKnQS87PLcgvTtUr
+ Ks0rycxNFRJyBgtklmTm5/nkJyfmeJdwWXHJYKgvzdQryEksScsvyhWScoTI
+ omstBurl42IpSS0uEWILAZLeJUoMWgwAohQbypQAAAA=
+ """,
+ """
+ androidx/compose/ui/platform/AndroidCompositionLocalsKt.class:
+ H4sIAAAAAAAA/61TW0sbQRT+ZrPqZpuamF40alsbbRspuLG0FBoRRBBCUxUt
+ vvg02d2EiZsZ2Z0NPvpb+gt6eSl9KNLH/qjSM5tIMeKLdGFnzjlzvu9c5szv
+ Pz9+AniNVYa3XAaxEsGZ56v+qUpCLxXeacR1R8V9b2t4uJ0dCS2UbCmfR8l7
+ PQXGUOrxAfciLrveXrsX+mTNMRS7oc7ctpXU4ZmmILXV1rU4cSq16IfefqwG
+ IuDtKBwP02A4uB1y4xJEGMpBam+US2OTSJdbKu56vVC3Yy5k4nEpleYGnHi7
+ Su+mkQlduFrDm1tVUEAebh4W7jA4G34kpNCbDLna6hHDyxsZx3lMv4sMS4lJ
+ 0x8/3eusBGGHpxGl2au1TpSmOF5v0Pc6qfSHde2MpHqj2Rq/tcbtbqeAGZRd
+ lHCPYf//39LMZSEfQs0DrjnZrP4gR5NrmYWZBQzshOxnwmh1koJ1hrWL82n3
+ 4ty15qzh71jV2dLF+bxTtstW3aqzX58mHfKYt51cyTaoVwyVG9NhWLjpJayd
+ UNPzh6IruU7jkDwPhnU35UAkgqre+jddDPa2Csip2BIy3E377TD+aDrD4B6q
+ NPbDHWGUyojj6BoD1mmW7KzueTNapC2bhuABVmifJLuT6RVMkJbDM9IWyWo+
+ +ysKnzPs85EvMDXCT13BO7iLaZINuoqs0XCZzb7j/jcUvlzjsPAiY6miRvs7
+ sj6k+LPHyDUx10SlSdkukIjFJh7h8TFYgidYOsZEgnwCN8HTxMiTfwE44RI/
+ mwQAAA==
+ """
+ )
+
+ @Test
+ fun error() {
+ lint()
+ .files(
+ kotlin(
+ """
+ package test
+
+ import androidx.compose.runtime.Composable
+ import androidx.compose.ui.platform.LocalContext
+
+ @Composable
+ fun Test() {
+ LocalContext.current.resources.configuration
+ LocalContext.current.getResources().getConfiguration()
+ }
+ """
+ ),
+ LocalContextStub,
+ Stubs.Composable,
+ Stubs.CompositionLocal,
+ AndroidStubs.Context,
+ AndroidStubs.Resources,
+ AndroidStubs.Configuration
+ )
+ .run()
+ .expect(
+ """
+src/test/test.kt:9: Error: Reading Configuration using LocalContext.current.resources.configuration [LocalContextConfigurationRead]
+ LocalContext.current.resources.configuration
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src/test/test.kt:10: Error: Reading Configuration using LocalContext.current.resources.configuration [LocalContextConfigurationRead]
+ LocalContext.current.getResources().getConfiguration()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+2 errors, 0 warnings
+ """
+ )
+ .expectFixDiffs(
+ """
+Autofix for src/test/test.kt line 9: Replace with LocalConfiguration.current:
+@@ -5 +5
+- import androidx.compose.ui.platform.LocalContext
++ import androidx.compose.ui.platform.LocalConfiguration
++ import androidx.compose.ui.platform.LocalContext
+@@ -9 +10
+- LocalContext.current.resources.configuration
++ LocalConfiguration.current
+ """
+ )
+ }
+
+ @Test
+ fun errors_splitReferences() {
+ lint()
+ .files(
+ kotlin(
+ """
+ package test
+
+ import androidx.compose.runtime.Composable
+ import androidx.compose.ui.platform.LocalContext
+
+ @Composable
+ fun Test1() {
+ val resources = LocalContext.current.resources
+ resources.configuration
+ }
+
+ @Composable
+ fun Test2() {
+ val context = LocalContext.current
+ context.resources.configuration
+ }
+
+ @Composable
+ fun Test3() {
+ val context = LocalContext.current
+ val res = context.resources
+ res.configuration
+ }
+ """
+ ),
+ LocalContextStub,
+ Stubs.Composable,
+ Stubs.CompositionLocal,
+ AndroidStubs.Context,
+ AndroidStubs.Resources,
+ AndroidStubs.Configuration
+ )
+ .run()
+ .expect(
+ """
+src/test/test.kt:10: Error: Reading Configuration using LocalContext.current.resources.configuration [LocalContextConfigurationRead]
+ resources.configuration
+ ~~~~~~~~~~~~~~~~~~~~~~~
+src/test/test.kt:16: Error: Reading Configuration using LocalContext.current.resources.configuration [LocalContextConfigurationRead]
+ context.resources.configuration
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src/test/test.kt:23: Error: Reading Configuration using LocalContext.current.resources.configuration [LocalContextConfigurationRead]
+ res.configuration
+ ~~~~~~~~~~~~~~~~~
+3 errors, 0 warnings
+ """
+ )
+ }
+}
diff --git a/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Constraints.kt b/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Constraints.kt
index 79ba2da..80e1938 100644
--- a/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Constraints.kt
+++ b/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Constraints.kt
@@ -368,10 +368,16 @@
private const val MinFocusBits = 16
private const val MaxAllowedForMinFocusBits = (1 shl (31 - MinFocusBits)) - 2
+/** The mask to use for the focused dimension when there is minimal focus. */
+private const val MinFocusMask = 0xFFFF // 64K (16 bits)
+
/** The number of bits used for the non-focused dimension when there is minimal focus. */
private const val MinNonFocusBits = 15
private const val MaxAllowedForMinNonFocusBits = (1 shl (31 - MinNonFocusBits)) - 2
+/** The mask to use for the non-focused dimension when there is minimal focus. */
+private const val MinNonFocusMask = 0x7FFF // 32K (15 bits)
+
/** The number of bits to use for the focused dimension when there is maximal focus. */
private const val MaxFocusBits = 18
private const val MaxAllowedForMaxFocusBits = (1 shl (31 - MaxFocusBits)) - 2
@@ -383,6 +389,9 @@
private const val MaxNonFocusBits = 13
private const val MaxAllowedForMaxNonFocusBits = (1 shl (31 - MaxNonFocusBits)) - 2
+/** The mask to use for the non-focused dimension when there is maximal focus. */
+private const val MaxNonFocusMask = 0x1FFF // 8K (13 bits)
+
// 0xFFFFFFFE_00000003UL.toLong(), written as a signed value to declare it const
@PublishedApi internal const val MaxDimensionsAndFocusMask = -0x00000001_FFFFFFFDL
@@ -443,35 +452,22 @@
}
internal fun bitsNeedForSizeUnchecked(size: Int): Int {
- // We could look at the value of size itself, for instance by doing:
- // when {
- // size < MaxNonFocusMask -> MaxNonFocusBits
- // ...
- // }
- // but the following solution saves a few instructions by avoiding
- // multiple moves to load large constants
- val bits = (size + 1).countLeadingZeroBits()
return when {
- bits >= 32 - MaxNonFocusBits -> MaxNonFocusBits
- bits >= 32 - MinNonFocusBits -> MinNonFocusBits
- bits >= 32 - MinFocusBits -> MinFocusBits
- bits >= 32 - MaxFocusBits -> MaxFocusBits
+ size < MaxNonFocusMask -> MaxNonFocusBits
+ size < MinNonFocusMask -> MinNonFocusBits
+ size < MinFocusMask -> MinFocusBits
+ size < MaxFocusMask -> MaxFocusBits
else -> 255
}
}
private inline fun maxAllowedForSize(size: Int): Int {
- // See comment in bitsNeedForSizeUnchecked()
- // Note: the return value in every case is `1 shl (31 - bits) - 2`
- // However, computing the value instead of using constants uses more
- // instructions, so not worth it
- val bits = (size + 1).countLeadingZeroBits()
- if (bits <= 13) throwInvalidConstraintsSizeException(size)
return when {
- bits >= 32 - MaxNonFocusBits -> MaxAllowedForMaxNonFocusBits
- bits >= 32 - MinNonFocusBits -> MaxAllowedForMinNonFocusBits
- bits >= 32 - MinFocusBits -> MaxAllowedForMinFocusBits
- else -> MaxAllowedForMaxFocusBits
+ size < MaxNonFocusMask -> MaxAllowedForMaxNonFocusBits
+ size < MinNonFocusMask -> MaxAllowedForMinNonFocusBits
+ size < MinFocusMask -> MaxAllowedForMinFocusBits
+ size < MaxFocusMask -> MaxAllowedForMaxFocusBits
+ else -> throwInvalidConstraintsSizeException(size)
}
}
diff --git a/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Density.kt b/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Density.kt
index 5b3e3c5..cbefe8a 100644
--- a/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Density.kt
+++ b/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Density.kt
@@ -65,7 +65,7 @@
*/
@Stable
fun TextUnit.toPx(): Float {
- check(type == TextUnitType.Sp) { "Only Sp can convert to Px" }
+ checkPrecondition(type == TextUnitType.Sp) { "Only Sp can convert to Px" }
return toDp().toPx()
}
diff --git a/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Dp.kt b/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Dp.kt
index a88b3c0..e5cac56 100644
--- a/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Dp.kt
+++ b/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Dp.kt
@@ -83,7 +83,10 @@
/** Infinite dp dimension. */
@Stable val Infinity = Dp(Float.POSITIVE_INFINITY)
- /** Constant that means unspecified Dp */
+ /**
+ * Constant that means unspecified Dp. Instead of comparing a [Dp] value to this constant,
+ * consider using [isSpecified] and [isUnspecified] instead.
+ */
@Stable val Unspecified = Dp(Float.NaN)
}
}
diff --git a/compose/ui/ui/build.gradle b/compose/ui/ui/build.gradle
index 73d3551..3a1ada1 100644
--- a/compose/ui/ui/build.gradle
+++ b/compose/ui/ui/build.gradle
@@ -24,7 +24,6 @@
import androidx.build.KotlinTarget
import androidx.build.LibraryType
-import androidx.build.KmpPlatformsKt
import androidx.build.PlatformIdentifier
import static androidx.inspection.gradle.InspectionPluginKt.packageInspector
@@ -60,6 +59,8 @@
api(project(":compose:ui:ui-util"))
api("androidx.lifecycle:lifecycle-runtime-compose:2.8.7")
+
+ implementation(project(":performance:performance-annotation"))
}
}
diff --git a/compose/ui/ui/proguard-rules.pro b/compose/ui/ui/proguard-rules.pro
index d6f21c4..1f592ff3 100644
--- a/compose/ui/ui/proguard-rules.pro
+++ b/compose/ui/ui/proguard-rules.pro
@@ -52,3 +52,7 @@
-keepnames class androidx.compose.ui.input.pointer.PointerInputEventHandler {
*;
}
+
+-keepclassmembers class * {
+ @dalvik.annotation.optimization.NeverInline *;
+}
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/util/PointerIdArray.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/util/PointerIdArray.kt
index d96d294..f295af3 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/util/PointerIdArray.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/util/PointerIdArray.kt
@@ -19,6 +19,7 @@
package androidx.compose.ui.input.pointer.util
import androidx.compose.ui.input.pointer.PointerId
+import dalvik.annotation.optimization.NeverInline
/**
* This collection is specifically for dealing with [PointerId] values. We know that they contain
@@ -144,6 +145,7 @@
if (index >= size) size = index + 1
}
+ @NeverInline
private fun resizeStorage(minSize: Int): LongArray {
return internalArray.copyOf(maxOf(minSize, internalArray.size * 2)).apply {
internalArray = this
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/MyersDiff.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/MyersDiff.kt
index acc7620..1d84d69 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/MyersDiff.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/MyersDiff.kt
@@ -18,6 +18,7 @@
package androidx.compose.ui.node
import androidx.compose.ui.internal.checkPrecondition
+import dalvik.annotation.optimization.NeverInline
import kotlin.jvm.JvmInline
import kotlin.math.abs
import kotlin.math.min
@@ -417,6 +418,7 @@
val size: Int
get() = lastIndex
+ @NeverInline
private fun resizeStack(stack: IntArray): IntArray {
val copy = stack.copyOf(stack.size * 2)
this.stack = copy
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/spatial/RectList.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/spatial/RectList.kt
index 259ae65..ab2eb07 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/spatial/RectList.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/spatial/RectList.kt
@@ -14,10 +14,11 @@
* limitations under the License.
*/
-@file:Suppress("NOTHING_TO_INLINE")
+@file:Suppress("NOTHING_TO_INLINE", "KotlinRedundantDiagnosticSuppress")
package androidx.compose.ui.spatial
+import dalvik.annotation.optimization.NeverInline
import kotlin.jvm.JvmField
import kotlin.math.max
import kotlin.math.min
@@ -98,19 +99,24 @@
* keep this in mind if you call this method and have cached any of those values in a local
* variable, you may need to refresh them.
*/
- internal fun allocateItemsIndex(): Int {
+ private inline fun allocateItemsIndex(): Int {
val currentItems = items
val currentSize = itemsSize
itemsSize = currentSize + LongsPerItem
val actualSize = currentItems.size
if (actualSize <= currentSize + LongsPerItem) {
- val newSize = max(actualSize * 2, currentSize + LongsPerItem)
- items = currentItems.copyOf(newSize)
- stack = stack.copyOf(newSize)
+ resizeStorage(actualSize, currentSize, currentItems)
}
return currentSize
}
+ @NeverInline
+ private fun resizeStorage(actualSize: Int, currentSize: Int, currentItems: LongArray) {
+ val newSize = max(actualSize * 2, currentSize + LongsPerItem)
+ items = currentItems.copyOf(newSize)
+ stack = stack.copyOf(newSize)
+ }
+
/**
* Insert a value and corresponding bounding rectangle into the RectList. This method does not
* check to see that [value] doesn't already exist somewhere in the list.
diff --git a/core/core-telecom/src/androidTest/AndroidManifest.xml b/core/core-telecom/src/androidTest/AndroidManifest.xml
index 897f4cb..8e9ed4d 100644
--- a/core/core-telecom/src/androidTest/AndroidManifest.xml
+++ b/core/core-telecom/src/androidTest/AndroidManifest.xml
@@ -18,6 +18,7 @@
<uses-permission android:name="android.permission.MANAGE_OWN_CALLS" />
<uses-permission android:name="android.permission.READ_PHONE_NUMBERS"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
+ <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<application>
<service
diff --git a/core/core-telecom/src/androidTest/java/androidx/core/telecom/test/PreCallEndpointsTest.kt b/core/core-telecom/src/androidTest/java/androidx/core/telecom/test/PreCallEndpointsTest.kt
index 8b65769..f1bcaff 100644
--- a/core/core-telecom/src/androidTest/java/androidx/core/telecom/test/PreCallEndpointsTest.kt
+++ b/core/core-telecom/src/androidTest/java/androidx/core/telecom/test/PreCallEndpointsTest.kt
@@ -24,7 +24,7 @@
import androidx.core.telecom.CallEndpointCompat.Companion.TYPE_EARPIECE
import androidx.core.telecom.CallEndpointCompat.Companion.TYPE_SPEAKER
import androidx.core.telecom.internal.CallEndpointUuidTracker
-import androidx.core.telecom.internal.PreCallEndpoints
+import androidx.core.telecom.internal.PreCallEndpointsUpdater
import androidx.test.filters.SdkSuppress
import androidx.test.filters.SmallTest
import kotlinx.coroutines.channels.Channel
@@ -52,7 +52,7 @@
@Test
fun testInitialValues() {
val initEndpoints = mutableListOf(defaultEarpiece, defaultSpeaker, defaultBluetooth)
- val currentPreCallEndpoints = PreCallEndpoints(initEndpoints, Channel())
+ val currentPreCallEndpoints = PreCallEndpointsUpdater(initEndpoints, Channel())
assertTrue(currentPreCallEndpoints.isCallEndpointBeingTracked(defaultEarpiece))
assertTrue(currentPreCallEndpoints.isCallEndpointBeingTracked(defaultSpeaker))
assertTrue(currentPreCallEndpoints.isCallEndpointBeingTracked(defaultBluetooth))
@@ -65,51 +65,51 @@
@Test
fun testEndpointsAddedWithNewEndpoint() {
val initEndpoints = mutableListOf(defaultEarpiece)
- val currentPreCallEndpoints = PreCallEndpoints(initEndpoints, Channel())
+ val currentPreCallEndpoints = PreCallEndpointsUpdater(initEndpoints, Channel())
assertTrue(currentPreCallEndpoints.isCallEndpointBeingTracked(defaultEarpiece))
assertFalse(currentPreCallEndpoints.isCallEndpointBeingTracked(defaultSpeaker))
val res = currentPreCallEndpoints.maybeAddCallEndpoint(defaultSpeaker)
- assertEquals(PreCallEndpoints.START_TRACKING_NEW_ENDPOINT, res)
+ assertEquals(PreCallEndpointsUpdater.START_TRACKING_NEW_ENDPOINT, res)
}
@SmallTest
@Test
fun testEndpointsAddedWithNoNewEndpoints() {
val initEndpoints = mutableListOf(defaultEarpiece, defaultSpeaker)
- val currentPreCallEndpoints = PreCallEndpoints(initEndpoints, Channel())
+ val currentPreCallEndpoints = PreCallEndpointsUpdater(initEndpoints, Channel())
assertTrue(currentPreCallEndpoints.isCallEndpointBeingTracked(defaultEarpiece))
assertTrue(currentPreCallEndpoints.isCallEndpointBeingTracked(defaultSpeaker))
val res = currentPreCallEndpoints.maybeAddCallEndpoint(defaultSpeaker)
- assertEquals(PreCallEndpoints.ALREADY_TRACKING_ENDPOINT, res)
+ assertEquals(PreCallEndpointsUpdater.ALREADY_TRACKING_ENDPOINT, res)
}
@SmallTest
@Test
fun testEndpointsRemovedWithUntrackedEndpoint() {
val initEndpoints = mutableListOf(defaultEarpiece)
- val currentPreCallEndpoints = PreCallEndpoints(initEndpoints, Channel())
+ val currentPreCallEndpoints = PreCallEndpointsUpdater(initEndpoints, Channel())
assertTrue(currentPreCallEndpoints.isCallEndpointBeingTracked(defaultEarpiece))
assertFalse(currentPreCallEndpoints.isCallEndpointBeingTracked(defaultSpeaker))
val res = currentPreCallEndpoints.maybeRemoveCallEndpoint(defaultSpeaker)
- assertEquals(PreCallEndpoints.NOT_TRACKING_REMOVED_ENDPOINT, res)
+ assertEquals(PreCallEndpointsUpdater.NOT_TRACKING_REMOVED_ENDPOINT, res)
}
@SmallTest
@Test
fun testEndpointsRemovedWithTrackedEndpoint() {
val initEndpoints = mutableListOf(defaultEarpiece, defaultSpeaker)
- val currentPreCallEndpoints = PreCallEndpoints(initEndpoints, Channel())
+ val currentPreCallEndpoints = PreCallEndpointsUpdater(initEndpoints, Channel())
assertTrue(currentPreCallEndpoints.isCallEndpointBeingTracked(defaultEarpiece))
assertTrue(currentPreCallEndpoints.isCallEndpointBeingTracked(defaultSpeaker))
val res = currentPreCallEndpoints.maybeRemoveCallEndpoint(defaultSpeaker)
- assertEquals(PreCallEndpoints.STOP_TRACKING_REMOVED_ENDPOINT, res)
+ assertEquals(PreCallEndpointsUpdater.STOP_TRACKING_REMOVED_ENDPOINT, res)
}
}
diff --git a/core/core-telecom/src/main/java/androidx/core/telecom/CallsManager.kt b/core/core-telecom/src/main/java/androidx/core/telecom/CallsManager.kt
index 94ecba9..f84b88d 100644
--- a/core/core-telecom/src/main/java/androidx/core/telecom/CallsManager.kt
+++ b/core/core-telecom/src/main/java/androidx/core/telecom/CallsManager.kt
@@ -18,9 +18,6 @@
import android.content.ComponentName
import android.content.Context
-import android.media.AudioDeviceCallback
-import android.media.AudioDeviceInfo
-import android.media.AudioManager
import android.os.Build.VERSION_CODES
import android.os.Bundle
import android.os.OutcomeReceiver
@@ -44,15 +41,15 @@
import androidx.core.telecom.extensions.ExtensionInitializationScope
import androidx.core.telecom.extensions.ExtensionInitializationScopeImpl
import androidx.core.telecom.internal.AddCallResult
+import androidx.core.telecom.internal.AudioDeviceListener
+import androidx.core.telecom.internal.BluetoothProfileListener
import androidx.core.telecom.internal.CallChannels
import androidx.core.telecom.internal.CallEndpointUuidTracker
import androidx.core.telecom.internal.CallSession
import androidx.core.telecom.internal.CallSessionLegacy
import androidx.core.telecom.internal.CallStateEvent
import androidx.core.telecom.internal.JetpackConnectionService
-import androidx.core.telecom.internal.PreCallEndpoints
-import androidx.core.telecom.internal.utils.AudioManagerUtil.Companion.getAvailableAudioDevices
-import androidx.core.telecom.internal.utils.EndpointUtils.Companion.getEndpointsFromAudioDeviceInfo
+import androidx.core.telecom.internal.PreCallEndpointsUpdater
import androidx.core.telecom.internal.utils.Utils
import androidx.core.telecom.internal.utils.Utils.Companion.remapJetpackCapsToPlatformCaps
import androidx.core.telecom.util.ExperimentalAppActions
@@ -356,56 +353,38 @@
}
/**
- * Continuously stream the available call audio endpoints that can be used for a new call
- * session. The [callbackFlow] should be cleaned up client-side by calling cancel() from the
- * same [kotlinx.coroutines.CoroutineScope] the [callbackFlow] is collecting in.
+ * Continuously streams available call audio endpoints that can be used for a new call session.
+ * This API leverages [callbackFlow] to emit updates as the available audio endpoints change.
*
- * Note: The endpoints emitted will be sorted by the [CallEndpointCompat.type] . See
- * [CallEndpointCompat.compareTo] for the ordering. The first element in the list will be the
- * recommended call endpoint to default to for the user.
+ * **Bluetooth Permissions:** The [android.Manifest.permission.BLUETOOTH_CONNECT] runtime
+ * permission is essential when multiple bluetooth devices are connected. Granting this
+ * permission allows the API to display the names of multiple connected Bluetooth devices.
+ * Without this permission, only the active Bluetooth device will be surfaced.
*
- * @return a flow of [CallEndpointCompat]s that can be used for a new call session
+ * **Coroutine Usage and Cleanup:** The returned [Flow] from this [callbackFlow] should be
+ * collected within a [kotlinx.coroutines.CoroutineScope]. To properly manage resources and
+ * prevent leaks, ensure that the [Flow] is cancelled when it's no longer needed. This can be
+ * achieved by calling `cancel()` on the [kotlinx.coroutines.Job] of the collecting
+ * [kotlinx.coroutines.CoroutineScope]. Ideally, this cleanup should occur within the same scope
+ * where the [Flow] is being collected.
+ *
+ * @return A [Flow] that continuously emits a list of available [CallEndpointCompat]s.
*/
public fun getAvailableStartingCallEndpoints(): Flow<List<CallEndpointCompat>> = callbackFlow {
val id: Int = CallEndpointUuidTracker.startSession()
- val audioManager = mContext.getSystemService(Context.AUDIO_SERVICE) as AudioManager
- // [AudioDeviceInfo] <-- AudioManager / platform
- val initialAudioDevices = getAvailableAudioDevices(audioManager)
- // [CallEndpoints] <-- [AudioDeviceInfo]
- val initialEndpoints = getEndpointsFromAudioDeviceInfo(mContext, id, initialAudioDevices)
// The emitted endpoints need to be tracked so that when the device list changes,
// the added or removed endpoints can be re-emitted as a whole list. Otherwise, only
// the added or removed endpoints will be emitted.
- val preCallEndpoints = PreCallEndpoints(initialEndpoints.toMutableList(), this.channel)
+ val callEndpointsUpdater = PreCallEndpointsUpdater(mSendChannel = this.channel)
// register an audio callback that will listen for updates
- val audioDeviceCallback =
- object : AudioDeviceCallback() {
- override fun onAudioDevicesAdded(addedDevices: Array<out AudioDeviceInfo>?) {
- if (addedDevices != null) {
- preCallEndpoints.endpointsAddedUpdate(
- getEndpointsFromAudioDeviceInfo(mContext, id, addedDevices.toList())
- )
- }
- }
-
- override fun onAudioDevicesRemoved(removedDevices: Array<out AudioDeviceInfo>?) {
- if (removedDevices != null) {
- preCallEndpoints.endpointsRemovedUpdate(
- getEndpointsFromAudioDeviceInfo(mContext, id, removedDevices.toList())
- )
- }
- }
- }
- // The following callback is needed in the event the user connects or disconnects
- // and audio device after this API is called.
- audioManager.registerAudioDeviceCallback(audioDeviceCallback, null /*handler*/)
- // Send the initial list of pre-call [CallEndpointCompat]s out to the client. They
- // will be emitted and cached in the Flow & only consumed once the client has
- // collected it.
- trySend(initialEndpoints)
+ val audioDeviceListener = AudioDeviceListener(mContext, callEndpointsUpdater, id)
+ // register a bluetooth listener to surface connected bluetooth devices instead of just
+ // the active bluetooth device
+ val bluetoothProfileListener = BluetoothProfileListener(mContext, callEndpointsUpdater, id)
awaitClose {
Log.i(TAG, "getAvailableStartingCallEndpoints: awaitClose")
- audioManager.unregisterAudioDeviceCallback(audioDeviceCallback)
+ bluetoothProfileListener.close()
+ audioDeviceListener.close()
CallEndpointUuidTracker.endSession(id)
}
}
diff --git a/core/core-telecom/src/main/java/androidx/core/telecom/internal/AudioDeviceListener.kt b/core/core-telecom/src/main/java/androidx/core/telecom/internal/AudioDeviceListener.kt
new file mode 100644
index 0000000..aab87a6
--- /dev/null
+++ b/core/core-telecom/src/main/java/androidx/core/telecom/internal/AudioDeviceListener.kt
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.core.telecom.internal
+
+import android.content.Context
+import android.media.AudioDeviceCallback
+import android.media.AudioDeviceInfo
+import android.media.AudioManager
+import android.os.Build
+import androidx.annotation.RequiresApi
+import androidx.core.telecom.internal.utils.AudioManagerUtil.Companion.getAvailableAudioDevices
+import androidx.core.telecom.internal.utils.EndpointUtils.Companion.getEndpointsFromAudioDeviceInfo
+
+/**
+ * This class is responsible for getting [AudioDeviceInfo]s from the [AudioManager] pre-call and
+ * emitting them to the [PreCallEndpointsUpdater] as [androidx.core.telecom.CallEndpointCompat]s
+ */
+@RequiresApi(Build.VERSION_CODES.O)
+internal class AudioDeviceListener(
+ val mContext: Context,
+ val mPreCallEndpoints: PreCallEndpointsUpdater,
+ private val mUuidSessionId: Int
+) : AutoCloseable, AudioDeviceCallback() {
+ val mAudioManager = mContext.getSystemService(Context.AUDIO_SERVICE) as AudioManager
+
+ init {
+ // [AudioDeviceInfo] <-- AudioManager / platform
+ val initialAudioDevices = getAvailableAudioDevices(mAudioManager)
+ // [CallEndpoints] <-- [AudioDeviceInfo]
+ val initialEndpoints =
+ getEndpointsFromAudioDeviceInfo(mContext, mUuidSessionId, initialAudioDevices)
+ mAudioManager.registerAudioDeviceCallback(this, null /*handler*/)
+ // Send the initial list of pre-call [CallEndpointCompat]s out to the client. They
+ // will be emitted and cached in the Flow & only consumed once the client has
+ // collected it.
+ mPreCallEndpoints.endpointsAddedUpdate(initialEndpoints)
+ }
+
+ override fun close() {
+ mAudioManager.unregisterAudioDeviceCallback(this)
+ }
+
+ override fun onAudioDevicesAdded(addedDevices: Array<out AudioDeviceInfo>?) {
+ if (addedDevices != null) {
+ mPreCallEndpoints.endpointsAddedUpdate(
+ getEndpointsFromAudioDeviceInfo(mContext, mUuidSessionId, addedDevices.toList())
+ )
+ }
+ }
+
+ override fun onAudioDevicesRemoved(removedDevices: Array<out AudioDeviceInfo>?) {
+ if (removedDevices != null) {
+ mPreCallEndpoints.endpointsRemovedUpdate(
+ getEndpointsFromAudioDeviceInfo(mContext, mUuidSessionId, removedDevices.toList())
+ )
+ }
+ }
+}
diff --git a/core/core-telecom/src/main/java/androidx/core/telecom/internal/BluetoothProfileListener.kt b/core/core-telecom/src/main/java/androidx/core/telecom/internal/BluetoothProfileListener.kt
new file mode 100644
index 0000000..529d205
--- /dev/null
+++ b/core/core-telecom/src/main/java/androidx/core/telecom/internal/BluetoothProfileListener.kt
@@ -0,0 +1,170 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package androidx.core.telecom.internal
+
+import android.bluetooth.BluetoothAdapter
+import android.bluetooth.BluetoothDevice
+import android.bluetooth.BluetoothManager
+import android.bluetooth.BluetoothProfile
+import android.content.Context
+import android.os.Build
+import android.util.Log
+import androidx.annotation.RequiresApi
+import androidx.core.telecom.CallEndpointCompat
+import androidx.core.telecom.internal.utils.EndpointUtils
+
+/**
+ * This class is responsible for getting [BluetoothProfile]s from the [BluetoothManager] pre-call
+ * and emitting them to the [PreCallEndpointsUpdater] as [androidx.core.telecom.CallEndpointCompat]s
+ */
+@RequiresApi(Build.VERSION_CODES.O)
+internal class BluetoothProfileListener(
+ context: Context,
+ private val mPreCallEndpointsUpdater: PreCallEndpointsUpdater,
+ private val mUuidSessionId: Int,
+) : BluetoothProfile.ServiceListener, AutoCloseable {
+ /** Constants used for this class */
+ companion object {
+ private val TAG: String = BluetoothProfileListener::class.java.simpleName
+ private val BLUETOOTH_PROFILES =
+ listOf(
+ BluetoothProfile.HEADSET,
+ BluetoothProfile.LE_AUDIO,
+ BluetoothProfile.HEARING_AID
+ )
+ }
+
+ /** Managers used for this class */
+ private val mBluetoothManager: BluetoothManager? =
+ context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager
+ private val mBluetoothAdapter: BluetoothAdapter? = mBluetoothManager?.adapter
+
+ /**
+ * Internal class tracking. Need to track the endpoints so that when a profile is disconnected,
+ * the client can be informed. Also, for cleanup purposes, the proxy should be tracked to close
+ * when the pre-call endpoints API job is cancelled.
+ */
+ private data class ProfileData(
+ val endpoints: MutableList<CallEndpointCompat>?,
+ val proxy: BluetoothProfile?
+ )
+
+ private val mProfileToData: HashMap<Int, ProfileData> = HashMap()
+
+ /** On class init, get the proxies in order for the profile service connection to establish */
+ init {
+ getBluetoothProfileProxies(context)
+ }
+
+ /** When the listener is destroyed, close the proxies that were connected */
+ override fun close() {
+ Log.i(TAG, "close: uuidSessionId=[$mUuidSessionId]")
+ closeBluetoothProfileProxies()
+ }
+
+ private fun getBluetoothProfileProxies(context: Context) {
+ BLUETOOTH_PROFILES.forEach { profile ->
+ runCatching {
+ val hasProxy = mBluetoothAdapter?.getProfileProxy(context, this, profile)
+ Log.d(TAG, "gBPP: btProfile=[$profile] isConnect=[$hasProxy]")
+ }
+ .onFailure { e ->
+ Log.e(TAG, "gBPP: hit exception while getting bluetooth profile=[$profile]", e)
+ }
+ }
+ }
+
+ private fun closeBluetoothProfileProxies() {
+ mProfileToData.entries
+ .filter { (_, profileData) -> profileData.proxy != null }
+ .forEach { (profile, profileData) ->
+ runCatching { mBluetoothAdapter?.closeProfileProxy(profile, profileData.proxy) }
+ .onFailure { e ->
+ Log.e(
+ TAG,
+ "cBPP: hit exception when closing proxy for profile=[$profile]",
+ e
+ )
+ }
+ }
+ }
+
+ override fun onServiceConnected(profile: Int, proxy: BluetoothProfile?) {
+ Log.i(TAG, "onServiceConnected: profile=[$profile], proxy=[$proxy]")
+ val endpoints: MutableList<CallEndpointCompat> = ArrayList()
+ if (proxy != null) {
+ for (device in proxy.connectedDevices) {
+ endpoints.add(makeEndpoint(device))
+ }
+ }
+ // populate internal map for profile
+ mProfileToData[profile] = ProfileData(endpoints.toMutableList(), proxy)
+ // update client
+ mPreCallEndpointsUpdater.endpointsAddedUpdate(endpoints)
+ }
+
+ override fun onServiceDisconnected(profile: Int) {
+ Log.i(TAG, "onServiceDisconnected: profile=[$profile]")
+ val endpointsToRemove = mProfileToData[profile]?.endpoints ?: mutableListOf()
+ // clear internal map for profile
+ mProfileToData[profile] = ProfileData(mutableListOf(), null)
+ // update the client
+ mPreCallEndpointsUpdater.endpointsRemovedUpdate(endpointsToRemove.toList())
+ }
+
+ /**
+ * ============================================================================================
+ * Helpers
+ * ============================================================================================
+ */
+ private fun getBluetoothDeviceName(device: BluetoothDevice): String {
+ var name: String = EndpointUtils.BLUETOOTH_DEVICE_DEFAULT_NAME
+ try {
+ name = device.name
+ } catch (e: SecurityException) {
+ Log.e(TAG, "getBluetoothDeviceName: hit SecurityException while getting device name", e)
+ }
+ return name
+ }
+
+ private fun getBluetoothDeviceAddress(device: BluetoothDevice): String {
+ var address: String = CallEndpointCompat.UNKNOWN_MAC_ADDRESS
+ try {
+ address = device.address
+ } catch (e: Exception) {
+ Log.e(TAG, "getBluetoothDeviceAddress: hit exception while getting device address", e)
+ }
+ return address
+ }
+
+ private fun makeEndpoint(device: BluetoothDevice): CallEndpointCompat {
+ val bluetoothDeviceName = getBluetoothDeviceName(device)
+ val uuidForBluetoothDevice =
+ CallEndpointUuidTracker.getUuid(
+ mUuidSessionId,
+ CallEndpointCompat.TYPE_BLUETOOTH,
+ bluetoothDeviceName
+ )
+ val callEndpoint =
+ CallEndpointCompat(
+ bluetoothDeviceName,
+ CallEndpointCompat.TYPE_BLUETOOTH,
+ uuidForBluetoothDevice
+ )
+ callEndpoint.mMackAddress = getBluetoothDeviceAddress(device)
+ return callEndpoint
+ }
+}
diff --git a/core/core-telecom/src/main/java/androidx/core/telecom/internal/CallSession.kt b/core/core-telecom/src/main/java/androidx/core/telecom/internal/CallSession.kt
index a96b470..9bbd6eb 100644
--- a/core/core-telecom/src/main/java/androidx/core/telecom/internal/CallSession.kt
+++ b/core/core-telecom/src/main/java/androidx/core/telecom/internal/CallSession.kt
@@ -134,7 +134,7 @@
platformEndpoint.endpointType,
jetpackUuid
)
- Log.d(TAG, " n=[${platformEndpoint.endpointName}] plat=[${platformEndpoint}] --> jet=[$j]")
+ Log.i(TAG, " n=[${platformEndpoint.endpointName}] plat=[${platformEndpoint}] --> jet=[$j]")
return j
}
diff --git a/core/core-telecom/src/main/java/androidx/core/telecom/internal/PreCallEndpoints.kt b/core/core-telecom/src/main/java/androidx/core/telecom/internal/PreCallEndpointsUpdater.kt
similarity index 95%
rename from core/core-telecom/src/main/java/androidx/core/telecom/internal/PreCallEndpoints.kt
rename to core/core-telecom/src/main/java/androidx/core/telecom/internal/PreCallEndpointsUpdater.kt
index d04b339..837d51c 100644
--- a/core/core-telecom/src/main/java/androidx/core/telecom/internal/PreCallEndpoints.kt
+++ b/core/core-telecom/src/main/java/androidx/core/telecom/internal/PreCallEndpointsUpdater.kt
@@ -24,18 +24,17 @@
import kotlinx.coroutines.channels.SendChannel
@RequiresApi(Build.VERSION_CODES.O)
-internal class PreCallEndpoints(
- var mCurrentDevices: MutableList<CallEndpointCompat>,
+internal class PreCallEndpointsUpdater(
+ var mCurrentDevices: MutableList<CallEndpointCompat> = mutableListOf(),
var mSendChannel: SendChannel<List<CallEndpointCompat>>
) {
// earpiece, speaker, unknown, wired_headset
val mNonBluetoothEndpoints: HashMap<Int, CallEndpointCompat> = HashMap()
-
// all bt endpoints
val mBluetoothEndpoints: HashMap<String, CallEndpointCompat> = HashMap()
companion object {
- private val TAG: String = PreCallEndpoints::class.java.simpleName.toString()
+ private val TAG: String = PreCallEndpointsUpdater::class.java.simpleName.toString()
// endpoints added constants
const val ALREADY_TRACKING_ENDPOINT: Int = 0
diff --git a/development/plot-benchmarks/.nvmrc b/development/plot-benchmarks/.nvmrc
index 238155b..2f68077 100644
--- a/development/plot-benchmarks/.nvmrc
+++ b/development/plot-benchmarks/.nvmrc
@@ -1 +1 @@
-v20.12.2
\ No newline at end of file
+v22.12.0
\ No newline at end of file
diff --git a/development/plot-benchmarks/index.html b/development/plot-benchmarks/index.html
index 0e19900..ca577dc 100644
--- a/development/plot-benchmarks/index.html
+++ b/development/plot-benchmarks/index.html
@@ -5,7 +5,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Plot Benchmarks</title>
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css">
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
</head>
<body>
diff --git a/development/plot-benchmarks/package-lock.json b/development/plot-benchmarks/package-lock.json
index c6f8262..2f5a92f 100644
--- a/development/plot-benchmarks/package-lock.json
+++ b/development/plot-benchmarks/package-lock.json
@@ -8,16 +8,16 @@
"name": "plot-benchmarks",
"version": "0.2.0",
"dependencies": {
- "chart.js": "^4.4.6",
+ "chart.js": "^4.4.7",
"comlink": "4.4.2"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^4.0.0-next.6",
"@tsconfig/svelte": "^5.0.4",
- "svelte": "^5.1.12",
- "svelte-check": "^4.0.5",
+ "svelte": "^5.16.1",
+ "svelte-check": "^4.1.1",
"tslib": "^2.8.1",
- "typescript": "^5.6.3",
+ "typescript": "^5.7.2",
"vite": "^5.4.10"
}
},
@@ -758,7 +758,7 @@
"vite": "^5.0.0"
}
},
- "node_modules/@sveltejs/vite-plugin-svelte-inspector": {
+ "node_modules/@sveltejs/vite-plugin-svelte/node_modules/@sveltejs/vite-plugin-svelte-inspector": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-3.0.1.tgz",
"integrity": "sha512-2CKypmj1sM4GE7HjllT7UKmo4Q6L5xFRd7VMGEWhYnZ+wc6AUVU01IBd7yUi6WnFndEwWoMNOd6e8UjoN0nbvQ==",
@@ -834,9 +834,9 @@
}
},
"node_modules/chart.js": {
- "version": "4.4.6",
- "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.6.tgz",
- "integrity": "sha512-8Y406zevUPbbIBA/HRk33khEmQPk5+cxeflWE/2rx1NJsjVWMPw/9mSP9rxHP5eqi6LNoPBVMfZHxbwLSgldYA==",
+ "version": "4.4.7",
+ "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.7.tgz",
+ "integrity": "sha512-pwkcKfdzTMAU/+jNosKhNL2bHtJc/sSmYgVbuGTEDhzkrhmyihmP7vUc/5ZK9WopidMDHNe3Wm7jOd/WhuHWuw==",
"license": "MIT",
"dependencies": {
"@kurkle/color": "^0.3.0"
@@ -861,6 +861,16 @@
"url": "https://paulmillr.com/funding/"
}
},
+ "node_modules/clsx": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",
+ "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/comlink": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/comlink/-/comlink-4.4.2.tgz",
@@ -935,21 +945,20 @@
}
},
"node_modules/esm-env": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.1.4.tgz",
- "integrity": "sha512-oO82nKPHKkzIj/hbtuDYy/JHqBHFlMIW36SDiPCVsj87ntDLcWN+sJ1erdVryd4NxODacFTsdrIE3b7IamqbOg==",
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.2.1.tgz",
+ "integrity": "sha512-U9JedYYjCnadUlXk7e1Kr+aENQhtUaoaV9+gZm1T8LC/YBAPJx3NSPIAurFOC0U5vrdSevnUJS2/wUVxGwPhng==",
"dev": true,
"license": "MIT"
},
"node_modules/esrap": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/esrap/-/esrap-1.2.2.tgz",
- "integrity": "sha512-F2pSJklxx1BlQIQgooczXCPHmcWpn6EsP5oo73LQfonG9fIlIENQ8vMmfGXeojP9MrkzUNAfyU5vdFlR9shHAw==",
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/esrap/-/esrap-1.3.2.tgz",
+ "integrity": "sha512-C4PXusxYhFT98GjLSmb20k9PREuUdporer50dhzGuJu9IJXktbMddVCMLAERl5dAHyAi73GWWCE4FVHGP1794g==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@jridgewell/sourcemap-codec": "^1.4.15",
- "@types/estree": "^1.0.1"
+ "@jridgewell/sourcemap-codec": "^1.4.15"
}
},
"node_modules/fdir": {
@@ -983,13 +992,13 @@
}
},
"node_modules/is-reference": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz",
- "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==",
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz",
+ "integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@types/estree": "*"
+ "@types/estree": "^1.0.6"
}
},
"node_modules/kleur": {
@@ -1035,9 +1044,9 @@
"license": "MIT"
},
"node_modules/nanoid": {
- "version": "3.3.7",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
- "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
+ "version": "3.3.8",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
+ "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
"dev": true,
"funding": [
{
@@ -1061,9 +1070,9 @@
"license": "ISC"
},
"node_modules/postcss": {
- "version": "8.4.47",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz",
- "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==",
+ "version": "8.4.49",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz",
+ "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==",
"dev": true,
"funding": [
{
@@ -1082,7 +1091,7 @@
"license": "MIT",
"dependencies": {
"nanoid": "^3.3.7",
- "picocolors": "^1.1.0",
+ "picocolors": "^1.1.1",
"source-map-js": "^1.2.1"
},
"engines": {
@@ -1164,9 +1173,9 @@
}
},
"node_modules/svelte": {
- "version": "5.1.12",
- "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.1.12.tgz",
- "integrity": "sha512-U9BwbSybb9QAKAHg4hl61hVBk97U2QjUKmZa5++QEGoi6Nml6x6cC9KmNT1XObGawToN3DdLpdCs/Z5Yl5IXjQ==",
+ "version": "5.16.1",
+ "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.16.1.tgz",
+ "integrity": "sha512-FsA1OjAKMAFSDob6j/Tv2ZV9rY4SeqPd1WXQlQkFkePAozSHLp6tbkU9qa1xJ+uTRzMSM2Vx3USdsYZBXd3H3g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1177,9 +1186,10 @@
"acorn-typescript": "^1.4.13",
"aria-query": "^5.3.1",
"axobject-query": "^4.1.0",
- "esm-env": "^1.0.0",
- "esrap": "^1.2.2",
- "is-reference": "^3.0.2",
+ "clsx": "^2.1.1",
+ "esm-env": "^1.2.1",
+ "esrap": "^1.3.2",
+ "is-reference": "^3.0.3",
"locate-character": "^3.0.0",
"magic-string": "^0.30.11",
"zimmerframe": "^1.1.2"
@@ -1189,9 +1199,9 @@
}
},
"node_modules/svelte-check": {
- "version": "4.0.5",
- "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.0.5.tgz",
- "integrity": "sha512-icBTBZ3ibBaywbXUat3cK6hB5Du+Kq9Z8CRuyLmm64XIe2/r+lQcbuBx/IQgsbrC+kT2jQ0weVpZSSRIPwB6jQ==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.1.1.tgz",
+ "integrity": "sha512-NfaX+6Qtc8W/CyVGS/F7/XdiSSyXz+WGYA9ZWV3z8tso14V2vzjfXviKaTFEzB7g8TqfgO2FOzP6XT4ApSTUTw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1220,9 +1230,9 @@
"license": "0BSD"
},
"node_modules/typescript": {
- "version": "5.6.3",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz",
- "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==",
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz",
+ "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==",
"dev": true,
"license": "Apache-2.0",
"bin": {
@@ -1234,9 +1244,9 @@
}
},
"node_modules/vite": {
- "version": "5.4.10",
- "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.10.tgz",
- "integrity": "sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==",
+ "version": "5.4.11",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz",
+ "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1674,15 +1684,17 @@
"kleur": "^4.1.5",
"magic-string": "^0.30.12",
"vitefu": "^1.0.3"
- }
- },
- "@sveltejs/vite-plugin-svelte-inspector": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-3.0.1.tgz",
- "integrity": "sha512-2CKypmj1sM4GE7HjllT7UKmo4Q6L5xFRd7VMGEWhYnZ+wc6AUVU01IBd7yUi6WnFndEwWoMNOd6e8UjoN0nbvQ==",
- "dev": true,
- "requires": {
- "debug": "^4.3.7"
+ },
+ "dependencies": {
+ "@sveltejs/vite-plugin-svelte-inspector": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-3.0.1.tgz",
+ "integrity": "sha512-2CKypmj1sM4GE7HjllT7UKmo4Q6L5xFRd7VMGEWhYnZ+wc6AUVU01IBd7yUi6WnFndEwWoMNOd6e8UjoN0nbvQ==",
+ "dev": true,
+ "requires": {
+ "debug": "^4.3.7"
+ }
+ }
}
},
"@tsconfig/svelte": {
@@ -1723,9 +1735,9 @@
"dev": true
},
"chart.js": {
- "version": "4.4.6",
- "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.6.tgz",
- "integrity": "sha512-8Y406zevUPbbIBA/HRk33khEmQPk5+cxeflWE/2rx1NJsjVWMPw/9mSP9rxHP5eqi6LNoPBVMfZHxbwLSgldYA==",
+ "version": "4.4.7",
+ "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.7.tgz",
+ "integrity": "sha512-pwkcKfdzTMAU/+jNosKhNL2bHtJc/sSmYgVbuGTEDhzkrhmyihmP7vUc/5ZK9WopidMDHNe3Wm7jOd/WhuHWuw==",
"requires": {
"@kurkle/color": "^0.3.0"
}
@@ -1739,6 +1751,12 @@
"readdirp": "^4.0.1"
}
},
+ "clsx": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",
+ "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
+ "dev": true
+ },
"comlink": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/comlink/-/comlink-4.4.2.tgz",
@@ -1791,19 +1809,18 @@
}
},
"esm-env": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.1.4.tgz",
- "integrity": "sha512-oO82nKPHKkzIj/hbtuDYy/JHqBHFlMIW36SDiPCVsj87ntDLcWN+sJ1erdVryd4NxODacFTsdrIE3b7IamqbOg==",
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.2.1.tgz",
+ "integrity": "sha512-U9JedYYjCnadUlXk7e1Kr+aENQhtUaoaV9+gZm1T8LC/YBAPJx3NSPIAurFOC0U5vrdSevnUJS2/wUVxGwPhng==",
"dev": true
},
"esrap": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/esrap/-/esrap-1.2.2.tgz",
- "integrity": "sha512-F2pSJklxx1BlQIQgooczXCPHmcWpn6EsP5oo73LQfonG9fIlIENQ8vMmfGXeojP9MrkzUNAfyU5vdFlR9shHAw==",
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/esrap/-/esrap-1.3.2.tgz",
+ "integrity": "sha512-C4PXusxYhFT98GjLSmb20k9PREuUdporer50dhzGuJu9IJXktbMddVCMLAERl5dAHyAi73GWWCE4FVHGP1794g==",
"dev": true,
"requires": {
- "@jridgewell/sourcemap-codec": "^1.4.15",
- "@types/estree": "^1.0.1"
+ "@jridgewell/sourcemap-codec": "^1.4.15"
}
},
"fdir": {
@@ -1821,12 +1838,12 @@
"optional": true
},
"is-reference": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz",
- "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==",
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz",
+ "integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==",
"dev": true,
"requires": {
- "@types/estree": "*"
+ "@types/estree": "^1.0.6"
}
},
"kleur": {
@@ -1863,9 +1880,9 @@
"dev": true
},
"nanoid": {
- "version": "3.3.7",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
- "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
+ "version": "3.3.8",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
+ "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
"dev": true
},
"picocolors": {
@@ -1875,13 +1892,13 @@
"dev": true
},
"postcss": {
- "version": "8.4.47",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz",
- "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==",
+ "version": "8.4.49",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz",
+ "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==",
"dev": true,
"requires": {
"nanoid": "^3.3.7",
- "picocolors": "^1.1.0",
+ "picocolors": "^1.1.1",
"source-map-js": "^1.2.1"
}
},
@@ -1935,9 +1952,9 @@
"dev": true
},
"svelte": {
- "version": "5.1.12",
- "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.1.12.tgz",
- "integrity": "sha512-U9BwbSybb9QAKAHg4hl61hVBk97U2QjUKmZa5++QEGoi6Nml6x6cC9KmNT1XObGawToN3DdLpdCs/Z5Yl5IXjQ==",
+ "version": "5.16.1",
+ "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.16.1.tgz",
+ "integrity": "sha512-FsA1OjAKMAFSDob6j/Tv2ZV9rY4SeqPd1WXQlQkFkePAozSHLp6tbkU9qa1xJ+uTRzMSM2Vx3USdsYZBXd3H3g==",
"dev": true,
"requires": {
"@ampproject/remapping": "^2.3.0",
@@ -1947,18 +1964,19 @@
"acorn-typescript": "^1.4.13",
"aria-query": "^5.3.1",
"axobject-query": "^4.1.0",
- "esm-env": "^1.0.0",
- "esrap": "^1.2.2",
- "is-reference": "^3.0.2",
+ "clsx": "^2.1.1",
+ "esm-env": "^1.2.1",
+ "esrap": "^1.3.2",
+ "is-reference": "^3.0.3",
"locate-character": "^3.0.0",
"magic-string": "^0.30.11",
"zimmerframe": "^1.1.2"
}
},
"svelte-check": {
- "version": "4.0.5",
- "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.0.5.tgz",
- "integrity": "sha512-icBTBZ3ibBaywbXUat3cK6hB5Du+Kq9Z8CRuyLmm64XIe2/r+lQcbuBx/IQgsbrC+kT2jQ0weVpZSSRIPwB6jQ==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.1.1.tgz",
+ "integrity": "sha512-NfaX+6Qtc8W/CyVGS/F7/XdiSSyXz+WGYA9ZWV3z8tso14V2vzjfXviKaTFEzB7g8TqfgO2FOzP6XT4ApSTUTw==",
"dev": true,
"requires": {
"@jridgewell/trace-mapping": "^0.3.25",
@@ -1975,15 +1993,15 @@
"dev": true
},
"typescript": {
- "version": "5.6.3",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz",
- "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==",
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz",
+ "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==",
"dev": true
},
"vite": {
- "version": "5.4.10",
- "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.10.tgz",
- "integrity": "sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==",
+ "version": "5.4.11",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz",
+ "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==",
"dev": true,
"requires": {
"esbuild": "^0.21.3",
diff --git a/development/plot-benchmarks/package.json b/development/plot-benchmarks/package.json
index 0a30e86..73bf40c 100644
--- a/development/plot-benchmarks/package.json
+++ b/development/plot-benchmarks/package.json
@@ -12,14 +12,14 @@
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^4.0.0-next.6",
"@tsconfig/svelte": "^5.0.4",
- "svelte": "^5.1.12",
- "svelte-check": "^4.0.5",
+ "svelte": "^5.16.1",
+ "svelte-check": "^4.1.1",
"tslib": "^2.8.1",
- "typescript": "^5.6.3",
+ "typescript": "^5.7.2",
"vite": "^5.4.10"
},
"dependencies": {
- "chart.js": "^4.4.6",
+ "chart.js": "^4.4.7",
"comlink": "4.4.2"
}
}
\ No newline at end of file
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 39c4edc..7012d9e 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -61,6 +61,9 @@
kotlinToolingCore = "1.9.24"
ksp = "2.1.0-1.0.29"
ktfmt = "0.50"
+# Version format is: 1.KOTLIN_MAJOR_VERSION.0.KTFMT_VERSION
+# When updated, the id and checksum in StudioTask needs to be updated too
+ktfmtIdeaPlugin = "1.1.0.50"
leakcanary = "2.13"
media3 = "1.4.1"
metalava = "1.0.0-alpha12"
diff --git a/libraryversions.toml b/libraryversions.toml
index 0b26c3d..e58d6dc 100644
--- a/libraryversions.toml
+++ b/libraryversions.toml
@@ -20,7 +20,7 @@
CAMERA_VIEWFINDER = "1.4.0-alpha12"
CARDVIEW = "1.1.0-alpha01"
CAR_APP = "1.7.0-beta03"
-COLLECTION = "1.5.0-beta01"
+COLLECTION = "1.5.0-beta02"
COMPOSE = "1.8.0-alpha08"
COMPOSE_MATERIAL3 = "1.4.0-alpha05"
COMPOSE_MATERIAL3_ADAPTIVE = "1.1.0-alpha08"
diff --git a/performance/performance-annotation/README.md b/performance/performance-annotation/README.md
index 2ab0c3d..b37c607 100644
--- a/performance/performance-annotation/README.md
+++ b/performance/performance-annotation/README.md
@@ -1 +1 @@
-This library is a **compile-time** only dependency.
+The annotation defined in this library only affects Android.
diff --git a/performance/performance-annotation/src/androidMain/kotlin/dalvik/annotation/optimization/NeverInline.android.kt b/performance/performance-annotation/src/androidMain/kotlin/dalvik/annotation/optimization/NeverInline.android.kt
index 50e22dc..a44f0ff 100644
--- a/performance/performance-annotation/src/androidMain/kotlin/dalvik/annotation/optimization/NeverInline.android.kt
+++ b/performance/performance-annotation/src/androidMain/kotlin/dalvik/annotation/optimization/NeverInline.android.kt
@@ -14,8 +14,10 @@
* limitations under the License.
*/
+@file:Suppress("RedundantVisibilityModifier")
+
package dalvik.annotation.optimization
@Retention(AnnotationRetention.BINARY)
@Target(AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION)
-public actual annotation class NeverInline()
+public actual annotation class NeverInline
diff --git a/performance/performance-annotation/src/commonMain/kotlin/dalvik/annotation/optimization/NeverInline.kt b/performance/performance-annotation/src/commonMain/kotlin/dalvik/annotation/optimization/NeverInline.kt
index 89cbfe3..99f736b 100644
--- a/performance/performance-annotation/src/commonMain/kotlin/dalvik/annotation/optimization/NeverInline.kt
+++ b/performance/performance-annotation/src/commonMain/kotlin/dalvik/annotation/optimization/NeverInline.kt
@@ -15,6 +15,7 @@
*/
@file:OptIn(ExperimentalMultiplatform::class)
+@file:Suppress("RedundantVisibilityModifier")
package dalvik.annotation.optimization
diff --git a/performance/performance-unsafe/README.md b/performance/performance-unsafe/README.md
index 6a22e41..b69d197 100644
--- a/performance/performance-unsafe/README.md
+++ b/performance/performance-unsafe/README.md
@@ -1,2 +1,2 @@
-This library is a **compile-time** only dependency for Android.
+This library is a dependency for Android only.
It is not to be used for other targets.
diff --git a/performance/performance-unsafe/src/main/resources/META-INF/proguard/unsafe.pro b/performance/performance-unsafe/src/main/resources/META-INF/proguard/unsafe.pro
new file mode 100644
index 0000000..d908c40
--- /dev/null
+++ b/performance/performance-unsafe/src/main/resources/META-INF/proguard/unsafe.pro
@@ -0,0 +1,3 @@
+-keep class sun.misc.Unsafe {
+ *;
+}
diff --git a/room/benchmark/build.gradle b/room/benchmark/build.gradle
index 19362ae..d027d93 100644
--- a/room/benchmark/build.gradle
+++ b/room/benchmark/build.gradle
@@ -21,6 +21,8 @@
* Please use that script when creating a new project, rather than copying an existing project and
* modifying its settings.
*/
+
+import androidx.build.KotlinTarget
import androidx.build.LibraryType
plugins {
@@ -54,4 +56,9 @@
androidx {
type = LibraryType.BENCHMARK
+ kotlinTarget = KotlinTarget.KOTLIN_2_0
+}
+
+ksp {
+ useKsp2 = true
}
diff --git a/room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XClassName.kt b/room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XClassName.kt
new file mode 100644
index 0000000..914b990
--- /dev/null
+++ b/room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XClassName.kt
@@ -0,0 +1,183 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.room.compiler.codegen
+
+import androidx.room.compiler.processing.XNullability
+import com.squareup.kotlinpoet.MUTABLE_COLLECTION
+import com.squareup.kotlinpoet.MUTABLE_ITERABLE
+import com.squareup.kotlinpoet.MUTABLE_LIST
+import com.squareup.kotlinpoet.MUTABLE_MAP
+import com.squareup.kotlinpoet.MUTABLE_MAP_ENTRY
+import com.squareup.kotlinpoet.MUTABLE_SET
+import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy
+import com.squareup.kotlinpoet.asClassName as asKClassName
+import com.squareup.kotlinpoet.javapoet.JClassName
+import com.squareup.kotlinpoet.javapoet.JParameterizedTypeName
+import com.squareup.kotlinpoet.javapoet.JTypeName
+import com.squareup.kotlinpoet.javapoet.KClassName
+import kotlin.reflect.KClass
+
+/**
+ * Represents a fully-qualified class name.
+ *
+ * It simply contains a [com.squareup.javapoet.ClassName] and a [com.squareup.kotlinpoet.ClassName].
+ *
+ * @see [androidx.room.compiler.processing.XTypeElement.asClassName]
+ */
+class XClassName
+internal constructor(
+ override val java: JClassName,
+ override val kotlin: KClassName,
+ nullability: XNullability
+) : XTypeName(java, kotlin, nullability) {
+
+ // TODO(b/248000692): Using the JClassName as source of truth. This is wrong since we need to
+ // handle Kotlin interop types for KotlinPoet, i.e. java.lang.String to kotlin.String.
+ // But a decision has to be made...
+ val packageName: String = java.packageName()
+ val simpleNames: List<String> = java.simpleNames()
+ val canonicalName: String = java.canonicalName()
+ val reflectionName: String = java.reflectionName()
+
+ /**
+ * Returns a parameterized type, applying the `typeArguments` to `this`.
+ *
+ * @see [XTypeName.rawTypeName]
+ */
+ fun parametrizedBy(
+ vararg typeArguments: XTypeName,
+ ): XTypeName {
+ return XTypeName(
+ java = JParameterizedTypeName.get(java, *typeArguments.map { it.java }.toTypedArray()),
+ kotlin =
+ if (
+ kotlin != UNAVAILABLE_KTYPE_NAME &&
+ typeArguments.none { it.kotlin == UNAVAILABLE_KTYPE_NAME }
+ ) {
+ kotlin.parameterizedBy(typeArguments.map { it.kotlin })
+ } else {
+ UNAVAILABLE_KTYPE_NAME
+ }
+ )
+ }
+
+ fun nestedClass(name: String) =
+ XClassName(
+ java = java.nestedClass(name),
+ kotlin = kotlin.nestedClass(name),
+ nullability = XNullability.NONNULL
+ )
+
+ override fun copy(nullable: Boolean): XClassName {
+ return XClassName(
+ java = java,
+ kotlin =
+ if (kotlin != UNAVAILABLE_KTYPE_NAME) {
+ kotlin.copy(nullable = nullable) as KClassName
+ } else {
+ UNAVAILABLE_KTYPE_NAME
+ },
+ nullability = if (nullable) XNullability.NULLABLE else XNullability.NONNULL
+ )
+ }
+
+ companion object {
+ // TODO(b/248633751): Handle interop types.
+ @JvmStatic
+ fun get(packageName: String, vararg names: String): XClassName {
+ return XClassName(
+ java = JClassName.get(packageName, names.first(), *names.drop(1).toTypedArray()),
+ kotlin = KClassName(packageName, *names),
+ nullability = XNullability.NONNULL
+ )
+ }
+ }
+}
+
+/**
+ * Creates a [XClassName] from the receiver [KClass]
+ *
+ * When the receiver [KClass] is a Kotlin interop primitive, such as [kotlin.Int] then the returned
+ * [XClassName] contains the boxed JavaPoet class name.
+ *
+ * When the receiver [KClass] is a Kotlin interop collection, such as [kotlin.collections.List] then
+ * the returned [XClassName] contains the corresponding JavaPoet class name. See:
+ * https://kotlinlang.org/docs/reference/java-interop.html#mapped-types.
+ *
+ * When the receiver [KClass] is a Kotlin mutable collection, such as
+ * [kotlin.collections.MutableList] then the non-mutable [XClassName] is returned due to the mutable
+ * interfaces only existing at compile-time, see: https://youtrack.jetbrains.com/issue/KT-11754.
+ *
+ * If the mutable [XClassName] is needed, use [asMutableClassName].
+ */
+fun KClass<*>.asClassName(): XClassName {
+ val jClassName =
+ if (this.java.isPrimitive) {
+ getBoxedJClassName(this.java)
+ } else {
+ JClassName.get(this.java)
+ }
+ val kClassName = this.asKClassName()
+ return XClassName(java = jClassName, kotlin = kClassName, nullability = XNullability.NONNULL)
+}
+
+/**
+ * Creates a mutable [XClassName] from the receiver [KClass]
+ *
+ * This is a workaround for: https://github.com/square/kotlinpoet/issues/279
+ * https://youtrack.jetbrains.com/issue/KT-11754
+ *
+ * When the receiver [KClass] is a Kotlin interop collection, such as [kotlin.collections.List] then
+ * the returned [XClassName] contains the corresponding JavaPoet class name. See:
+ * https://kotlinlang.org/docs/reference/java-interop.html#mapped-types.
+ *
+ * When the receiver [KClass] is a Kotlin mutable collection, such as
+ * [kotlin.collections.MutableList] then the returned [XClassName] contains the corresponding
+ * KotlinPoet class name.
+ *
+ * If an equivalent interop [XClassName] mapping for a Kotlin mutable Kotlin collection receiver
+ * [KClass] is not found, the method will error out.
+ */
+fun KClass<*>.asMutableClassName(): XClassName {
+ val java = JClassName.get(this.java)
+ val kotlin =
+ when (this) {
+ Iterable::class -> MUTABLE_ITERABLE
+ Collection::class -> MUTABLE_COLLECTION
+ List::class -> MUTABLE_LIST
+ Set::class -> MUTABLE_SET
+ Map::class -> MUTABLE_MAP
+ Map.Entry::class -> MUTABLE_MAP_ENTRY
+ else -> error("No equivalent mutable Kotlin interop found for `$this`.")
+ }
+ return XClassName(java, kotlin, XNullability.NONNULL)
+}
+
+private fun getBoxedJClassName(klass: Class<*>): JClassName =
+ when (klass) {
+ java.lang.Void.TYPE -> JTypeName.VOID.box()
+ java.lang.Boolean.TYPE -> JTypeName.BOOLEAN.box()
+ java.lang.Byte.TYPE -> JTypeName.BYTE.box()
+ java.lang.Short.TYPE -> JTypeName.SHORT.box()
+ java.lang.Integer.TYPE -> JTypeName.INT.box()
+ java.lang.Long.TYPE -> JTypeName.LONG.box()
+ java.lang.Character.TYPE -> JTypeName.CHAR.box()
+ java.lang.Float.TYPE -> JTypeName.FLOAT.box()
+ java.lang.Double.TYPE -> JTypeName.DOUBLE.box()
+ else -> error("Can't get JTypeName from java.lang.Class: $klass")
+ }
+ as JClassName
diff --git a/room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt b/room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
index fd426fc..5680e41 100644
--- a/room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
+++ b/room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
@@ -25,15 +25,8 @@
import com.squareup.kotlinpoet.FLOAT_ARRAY
import com.squareup.kotlinpoet.INT_ARRAY
import com.squareup.kotlinpoet.LONG_ARRAY
-import com.squareup.kotlinpoet.MUTABLE_COLLECTION
-import com.squareup.kotlinpoet.MUTABLE_ITERABLE
-import com.squareup.kotlinpoet.MUTABLE_LIST
-import com.squareup.kotlinpoet.MUTABLE_MAP
-import com.squareup.kotlinpoet.MUTABLE_MAP_ENTRY
-import com.squareup.kotlinpoet.MUTABLE_SET
import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy
import com.squareup.kotlinpoet.SHORT_ARRAY
-import com.squareup.kotlinpoet.asClassName as asKClassName
import com.squareup.kotlinpoet.asTypeName as asKTypeName
import com.squareup.kotlinpoet.javapoet.JClassName
import com.squareup.kotlinpoet.javapoet.JParameterizedTypeName
@@ -290,157 +283,6 @@
}
/**
- * Represents a fully-qualified class name.
- *
- * It simply contains a [com.squareup.javapoet.ClassName] and a [com.squareup.kotlinpoet.ClassName].
- *
- * @see [androidx.room.compiler.processing.XTypeElement.asClassName]
- */
-class XClassName
-internal constructor(
- override val java: JClassName,
- override val kotlin: KClassName,
- nullability: XNullability
-) : XTypeName(java, kotlin, nullability) {
-
- // TODO(b/248000692): Using the JClassName as source of truth. This is wrong since we need to
- // handle Kotlin interop types for KotlinPoet, i.e. java.lang.String to kotlin.String.
- // But a decision has to be made...
- val packageName: String = java.packageName()
- val simpleNames: List<String> = java.simpleNames()
- val canonicalName: String = java.canonicalName()
- val reflectionName: String = java.reflectionName()
-
- /**
- * Returns a parameterized type, applying the `typeArguments` to `this`.
- *
- * @see [XTypeName.rawTypeName]
- */
- fun parametrizedBy(
- vararg typeArguments: XTypeName,
- ): XTypeName {
- return XTypeName(
- java = JParameterizedTypeName.get(java, *typeArguments.map { it.java }.toTypedArray()),
- kotlin =
- if (
- kotlin != UNAVAILABLE_KTYPE_NAME &&
- typeArguments.none { it.kotlin == UNAVAILABLE_KTYPE_NAME }
- ) {
- kotlin.parameterizedBy(typeArguments.map { it.kotlin })
- } else {
- UNAVAILABLE_KTYPE_NAME
- }
- )
- }
-
- fun nestedClass(name: String) =
- XClassName(
- java = java.nestedClass(name),
- kotlin = kotlin.nestedClass(name),
- nullability = XNullability.NONNULL
- )
-
- override fun copy(nullable: Boolean): XClassName {
- return XClassName(
- java = java,
- kotlin =
- if (kotlin != UNAVAILABLE_KTYPE_NAME) {
- kotlin.copy(nullable = nullable) as KClassName
- } else {
- UNAVAILABLE_KTYPE_NAME
- },
- nullability = if (nullable) XNullability.NULLABLE else XNullability.NONNULL
- )
- }
-
- companion object {
- // TODO(b/248633751): Handle interop types.
- @JvmStatic
- fun get(packageName: String, vararg names: String): XClassName {
- return XClassName(
- java = JClassName.get(packageName, names.first(), *names.drop(1).toTypedArray()),
- kotlin = KClassName(packageName, *names),
- nullability = XNullability.NONNULL
- )
- }
- }
-}
-
-/**
- * Creates a [XClassName] from the receiver [KClass]
- *
- * When the receiver [KClass] is a Kotlin interop primitive, such as [kotlin.Int] then the returned
- * [XClassName] contains the boxed JavaPoet class name.
- *
- * When the receiver [KClass] is a Kotlin interop collection, such as [kotlin.collections.List] then
- * the returned [XClassName] contains the corresponding JavaPoet class name. See:
- * https://kotlinlang.org/docs/reference/java-interop.html#mapped-types.
- *
- * When the receiver [KClass] is a Kotlin mutable collection, such as
- * [kotlin.collections.MutableList] then the non-mutable [XClassName] is returned due to the mutable
- * interfaces only existing at compile-time, see: https://youtrack.jetbrains.com/issue/KT-11754.
- *
- * If the mutable [XClassName] is needed, use [asMutableClassName].
- */
-fun KClass<*>.asClassName(): XClassName {
- val jClassName =
- if (this.java.isPrimitive) {
- getBoxedJClassName(this.java)
- } else {
- JClassName.get(this.java)
- }
- val kClassName = this.asKClassName()
- return XClassName(java = jClassName, kotlin = kClassName, nullability = XNullability.NONNULL)
-}
-
-/**
- * Creates a mutable [XClassName] from the receiver [KClass]
- *
- * This is a workaround for: https://github.com/square/kotlinpoet/issues/279
- * https://youtrack.jetbrains.com/issue/KT-11754
- *
- * When the receiver [KClass] is a Kotlin interop collection, such as [kotlin.collections.List] then
- * the returned [XClassName] contains the corresponding JavaPoet class name. See:
- * https://kotlinlang.org/docs/reference/java-interop.html#mapped-types.
- *
- * When the receiver [KClass] is a Kotlin mutable collection, such as
- * [kotlin.collections.MutableList] then the returned [XClassName] contains the corresponding
- * KotlinPoet class name.
- *
- * If an equivalent interop [XClassName] mapping for a Kotlin mutable Kotlin collection receiver
- * [KClass] is not found, the method will error out.
- */
-fun KClass<*>.asMutableClassName(): XClassName {
- val java = JClassName.get(this.java)
- val kotlin =
- when (this) {
- Iterable::class -> MUTABLE_ITERABLE
- Collection::class -> MUTABLE_COLLECTION
- List::class -> MUTABLE_LIST
- Set::class -> MUTABLE_SET
- Map::class -> MUTABLE_MAP
- Map.Entry::class -> MUTABLE_MAP_ENTRY
- else -> error("No equivalent mutable Kotlin interop found for `$this`.")
- }
- return XClassName(java, kotlin, XNullability.NONNULL)
-}
-
-private fun getBoxedJClassName(klass: Class<*>): JClassName =
- when (klass) {
- java.lang.Void.TYPE -> JTypeName.VOID.box()
- java.lang.Boolean.TYPE -> JTypeName.BOOLEAN.box()
- java.lang.Byte.TYPE -> JTypeName.BYTE.box()
- java.lang.Short.TYPE -> JTypeName.SHORT.box()
- java.lang.Integer.TYPE -> JTypeName.INT.box()
- java.lang.Long.TYPE -> JTypeName.LONG.box()
- java.lang.Character.TYPE -> JTypeName.CHAR.box()
- java.lang.Float.TYPE -> JTypeName.FLOAT.box()
- java.lang.Double.TYPE -> JTypeName.DOUBLE.box()
- else -> error("Can't get JTypeName from java.lang.Class: $klass")
- }
- as JClassName
-
-/**
* Creates a [XTypeName] whose JavaPoet name is a primitive name and KotlinPoet is the interop type.
*
* This function is useful since [asClassName] only supports creating class names and specifically
diff --git a/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/Resources.kt b/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/Resources.kt
index f4933a4..441f0c2 100644
--- a/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/Resources.kt
+++ b/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/Resources.kt
@@ -78,6 +78,6 @@
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@Composable
public fun isSmallScreen(): Boolean =
- LocalContext.current.resources.configuration.screenWidthDp <= SMALL_SCREEN_WIDTH_DP
+ LocalConfiguration.current.screenWidthDp <= SMALL_SCREEN_WIDTH_DP
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public const val SMALL_SCREEN_WIDTH_DP: Int = 225
diff --git a/wear/compose/integration-tests/demos/src/main/java/androidx/wear/compose/integration/demos/ScalingLazyColumnDemo.kt b/wear/compose/integration-tests/demos/src/main/java/androidx/wear/compose/integration/demos/ScalingLazyColumnDemo.kt
index 16c8bdc..6d20742 100644
--- a/wear/compose/integration-tests/demos/src/main/java/androidx/wear/compose/integration/demos/ScalingLazyColumnDemo.kt
+++ b/wear/compose/integration-tests/demos/src/main/java/androidx/wear/compose/integration/demos/ScalingLazyColumnDemo.kt
@@ -24,10 +24,10 @@
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Color
-import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.text.style.TextAlign
-import androidx.compose.ui.unit.Dp
+import androidx.compose.ui.unit.dp
import androidx.wear.compose.foundation.lazy.ScalingLazyColumn
import androidx.wear.compose.foundation.lazy.rememberScalingLazyListState
import androidx.wear.compose.material.AppCard
@@ -58,11 +58,8 @@
@Composable
fun ScalingLazyColumnDetail() {
val state = rememberScalingLazyListState()
- val applicationContext = LocalContext.current
val screenHeightPx =
- with(LocalDensity.current) {
- Dp(applicationContext.resources.configuration.screenHeightDp.toFloat()).roundToPx()
- }
+ with(LocalDensity.current) { LocalConfiguration.current.screenHeightDp.dp.roundToPx() }
val halfScreenHeightPx = screenHeightPx / 2f
ScalingLazyColumn(modifier = Modifier.fillMaxWidth(), state = state) {
item {
diff --git a/wear/protolayout/protolayout-material3/api/current.txt b/wear/protolayout/protolayout-material3/api/current.txt
index 3ffc8fd..07fd4fb 100644
--- a/wear/protolayout/protolayout-material3/api/current.txt
+++ b/wear/protolayout/protolayout-material3/api/current.txt
@@ -46,9 +46,9 @@
}
public final class ButtonKt {
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement button(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.types.LayoutColor? backgroundColor, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? background, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement iconButton(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> iconContent, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.ButtonColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? background, optional androidx.wear.protolayout.material3.IconButtonStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement textButton(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> labelContent, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.ButtonColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? background, optional androidx.wear.protolayout.material3.TextButtonStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement button(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? backgroundContent, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement iconButton(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> iconContent, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.ButtonColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? backgroundContent, optional androidx.wear.protolayout.material3.IconButtonStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement textButton(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> labelContent, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.ButtonColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? backgroundContent, optional androidx.wear.protolayout.material3.TextButtonStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
}
public final class CardColors {
@@ -78,12 +78,12 @@
}
public final class CardKt {
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement appCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? avatar, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? label, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? time, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? background, optional androidx.wear.protolayout.material3.AppCardStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement card(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.types.LayoutColor? backgroundColor, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? background, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> content);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement appCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? avatar, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? label, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? time, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? backgroundContent, optional androidx.wear.protolayout.material3.AppCardStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement card(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? backgroundContent, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> content);
method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement graphicDataCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> graphic, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional androidx.wear.protolayout.material3.GraphicDataCardStyle style, optional int horizontalAlignment, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement iconDataCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? secondaryIcon, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? background, optional androidx.wear.protolayout.material3.DataCardStyle style, optional int titleContentPlacement, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement textDataCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? secondaryText, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? background, optional androidx.wear.protolayout.material3.DataCardStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement titleCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? time, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? background, optional androidx.wear.protolayout.material3.TitleCardStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding, optional int horizontalAlignment);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement iconDataCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? secondaryIcon, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? backgroundContent, optional androidx.wear.protolayout.material3.DataCardStyle style, optional int titleContentPlacement, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement textDataCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? secondaryText, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? backgroundContent, optional androidx.wear.protolayout.material3.DataCardStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement titleCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? time, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? backgroundContent, optional androidx.wear.protolayout.material3.TitleCardStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding, optional int horizontalAlignment);
}
public final class ColorScheme {
@@ -209,8 +209,8 @@
}
public final class ImageKt {
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement avatarImage(androidx.wear.protolayout.material3.MaterialScope, String protoLayoutResourceId, optional androidx.wear.protolayout.DimensionBuilders.ImageDimension width, optional androidx.wear.protolayout.DimensionBuilders.ImageDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional int contentScaleMode);
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement backgroundImage(androidx.wear.protolayout.material3.MaterialScope, String protoLayoutResourceId, optional androidx.wear.protolayout.DimensionBuilders.ImageDimension width, optional androidx.wear.protolayout.DimensionBuilders.ImageDimension height, optional androidx.wear.protolayout.types.LayoutColor overlayColor, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension overlayWidth, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension overlayHeight, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional int contentScaleMode);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement avatarImage(androidx.wear.protolayout.material3.MaterialScope, String protoLayoutResourceId, optional androidx.wear.protolayout.DimensionBuilders.ImageDimension width, optional androidx.wear.protolayout.DimensionBuilders.ImageDimension height, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional int contentScaleMode);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement backgroundImage(androidx.wear.protolayout.material3.MaterialScope, String protoLayoutResourceId, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional androidx.wear.protolayout.DimensionBuilders.ImageDimension width, optional androidx.wear.protolayout.DimensionBuilders.ImageDimension height, optional androidx.wear.protolayout.types.LayoutColor overlayColor, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension overlayWidth, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension overlayHeight, optional int contentScaleMode);
}
@androidx.wear.protolayout.material3.MaterialScopeMarker public class MaterialScope {
diff --git a/wear/protolayout/protolayout-material3/api/restricted_current.txt b/wear/protolayout/protolayout-material3/api/restricted_current.txt
index 3ffc8fd..07fd4fb 100644
--- a/wear/protolayout/protolayout-material3/api/restricted_current.txt
+++ b/wear/protolayout/protolayout-material3/api/restricted_current.txt
@@ -46,9 +46,9 @@
}
public final class ButtonKt {
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement button(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.types.LayoutColor? backgroundColor, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? background, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement iconButton(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> iconContent, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.ButtonColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? background, optional androidx.wear.protolayout.material3.IconButtonStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement textButton(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> labelContent, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.ButtonColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? background, optional androidx.wear.protolayout.material3.TextButtonStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement button(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? backgroundContent, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement iconButton(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> iconContent, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.ButtonColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? backgroundContent, optional androidx.wear.protolayout.material3.IconButtonStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement textButton(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> labelContent, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.ButtonColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? backgroundContent, optional androidx.wear.protolayout.material3.TextButtonStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
}
public final class CardColors {
@@ -78,12 +78,12 @@
}
public final class CardKt {
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement appCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? avatar, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? label, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? time, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? background, optional androidx.wear.protolayout.material3.AppCardStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement card(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.types.LayoutColor? backgroundColor, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? background, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> content);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement appCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? avatar, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? label, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? time, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? backgroundContent, optional androidx.wear.protolayout.material3.AppCardStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement card(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? backgroundContent, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> content);
method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement graphicDataCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> graphic, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional androidx.wear.protolayout.material3.GraphicDataCardStyle style, optional int horizontalAlignment, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement iconDataCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? secondaryIcon, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? background, optional androidx.wear.protolayout.material3.DataCardStyle style, optional int titleContentPlacement, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement textDataCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? secondaryText, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? background, optional androidx.wear.protolayout.material3.DataCardStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement titleCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? time, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? background, optional androidx.wear.protolayout.material3.TitleCardStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding, optional int horizontalAlignment);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement iconDataCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? secondaryIcon, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? backgroundContent, optional androidx.wear.protolayout.material3.DataCardStyle style, optional int titleContentPlacement, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement textDataCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? secondaryText, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension width, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? backgroundContent, optional androidx.wear.protolayout.material3.DataCardStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement titleCard(androidx.wear.protolayout.material3.MaterialScope, androidx.wear.protolayout.ModifiersBuilders.Clickable onClick, kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement> title, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? content, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? time, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional androidx.wear.protolayout.material3.CardColors colors, optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.material3.MaterialScope,? extends androidx.wear.protolayout.LayoutElementBuilders.LayoutElement>? backgroundContent, optional androidx.wear.protolayout.material3.TitleCardStyle style, optional androidx.wear.protolayout.ModifiersBuilders.Padding contentPadding, optional int horizontalAlignment);
}
public final class ColorScheme {
@@ -209,8 +209,8 @@
}
public final class ImageKt {
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement avatarImage(androidx.wear.protolayout.material3.MaterialScope, String protoLayoutResourceId, optional androidx.wear.protolayout.DimensionBuilders.ImageDimension width, optional androidx.wear.protolayout.DimensionBuilders.ImageDimension height, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional int contentScaleMode);
- method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement backgroundImage(androidx.wear.protolayout.material3.MaterialScope, String protoLayoutResourceId, optional androidx.wear.protolayout.DimensionBuilders.ImageDimension width, optional androidx.wear.protolayout.DimensionBuilders.ImageDimension height, optional androidx.wear.protolayout.types.LayoutColor overlayColor, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension overlayWidth, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension overlayHeight, optional androidx.wear.protolayout.ModifiersBuilders.Corner shape, optional int contentScaleMode);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement avatarImage(androidx.wear.protolayout.material3.MaterialScope, String protoLayoutResourceId, optional androidx.wear.protolayout.DimensionBuilders.ImageDimension width, optional androidx.wear.protolayout.DimensionBuilders.ImageDimension height, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional int contentScaleMode);
+ method public static androidx.wear.protolayout.LayoutElementBuilders.LayoutElement backgroundImage(androidx.wear.protolayout.material3.MaterialScope, String protoLayoutResourceId, optional androidx.wear.protolayout.modifiers.LayoutModifier modifier, optional androidx.wear.protolayout.DimensionBuilders.ImageDimension width, optional androidx.wear.protolayout.DimensionBuilders.ImageDimension height, optional androidx.wear.protolayout.types.LayoutColor overlayColor, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension overlayWidth, optional androidx.wear.protolayout.DimensionBuilders.ContainerDimension overlayHeight, optional int contentScaleMode);
}
@androidx.wear.protolayout.material3.MaterialScopeMarker public class MaterialScope {
diff --git a/wear/protolayout/protolayout-material3/samples/src/main/java/androidx/wear/protolayout/material3/samples/Material3ComponentsSample.kt b/wear/protolayout/protolayout-material3/samples/src/main/java/androidx/wear/protolayout/material3/samples/Material3ComponentsSample.kt
index 36283be..618b67c 100644
--- a/wear/protolayout/protolayout-material3/samples/src/main/java/androidx/wear/protolayout/material3/samples/Material3ComponentsSample.kt
+++ b/wear/protolayout/protolayout-material3/samples/src/main/java/androidx/wear/protolayout/material3/samples/Material3ComponentsSample.kt
@@ -52,6 +52,8 @@
import androidx.wear.protolayout.material3.textEdgeButton
import androidx.wear.protolayout.material3.titleCard
import androidx.wear.protolayout.modifiers.LayoutModifier
+import androidx.wear.protolayout.modifiers.backgroundColor
+import androidx.wear.protolayout.modifiers.clickable
import androidx.wear.protolayout.modifiers.contentDescription
import androidx.wear.protolayout.types.LayoutString
import androidx.wear.protolayout.types.asLayoutConstraint
@@ -116,7 +118,7 @@
}
@Sampled
-fun topLeveLayout(
+fun topLevelLayout(
context: Context,
deviceConfiguration: DeviceParameters,
clickable: Clickable
@@ -144,7 +146,7 @@
},
bottomSlot = {
iconEdgeButton(
- clickable,
+ onClick = clickable,
modifier = LayoutModifier.contentDescription("Description")
) {
icon("id")
@@ -164,10 +166,12 @@
mainSlot = {
card(
onClick = clickable,
- modifier = LayoutModifier.contentDescription("Card with image background"),
+ modifier =
+ LayoutModifier.contentDescription("Card with image background")
+ .clickable(id = "card"),
width = expand(),
height = expand(),
- background = { backgroundImage(protoLayoutResourceId = "id") }
+ backgroundContent = { backgroundImage(protoLayoutResourceId = "id") }
) {
text("Content of the Card!".layoutString)
}
@@ -314,10 +318,10 @@
button(
onClick = clickable,
modifier =
- LayoutModifier.contentDescription("Big button with image background"),
+ LayoutModifier.contentDescription("Big button with image background")
+ .backgroundColor(colorScheme.primary),
width = expand(),
height = expand(),
- backgroundColor = colorScheme.primary,
content = { text("Button!".layoutString) }
)
}
@@ -392,7 +396,7 @@
LayoutModifier.contentDescription("Big button with image background"),
width = expand(),
height = expand(),
- background = { backgroundImage(protoLayoutResourceId = "id") }
+ backgroundContent = { backgroundImage(protoLayoutResourceId = "id") }
)
}
)
diff --git a/wear/protolayout/protolayout-material3/src/androidTest/java/androidx/wear/protolayout/material3/TestCasesGenerator.kt b/wear/protolayout/protolayout-material3/src/androidTest/java/androidx/wear/protolayout/material3/TestCasesGenerator.kt
index b7c09ff..fd7ae36 100644
--- a/wear/protolayout/protolayout-material3/src/androidTest/java/androidx/wear/protolayout/material3/TestCasesGenerator.kt
+++ b/wear/protolayout/protolayout-material3/src/androidTest/java/androidx/wear/protolayout/material3/TestCasesGenerator.kt
@@ -18,12 +18,10 @@
import androidx.test.core.app.ApplicationProvider
import androidx.test.platform.app.InstrumentationRegistry
-import androidx.wear.protolayout.ActionBuilders
import androidx.wear.protolayout.DeviceParametersBuilders
import androidx.wear.protolayout.DimensionBuilders.expand
import androidx.wear.protolayout.LayoutElementBuilders
import androidx.wear.protolayout.LayoutElementBuilders.Box
-import androidx.wear.protolayout.ModifiersBuilders
import androidx.wear.protolayout.ModifiersBuilders.Background
import androidx.wear.protolayout.ModifiersBuilders.Corner
import androidx.wear.protolayout.ModifiersBuilders.Modifiers
@@ -36,6 +34,7 @@
import androidx.wear.protolayout.material3.MaterialGoldenTest.Companion.pxToDp
import androidx.wear.protolayout.material3.TitleContentPlacementInDataCard.Companion.Bottom
import androidx.wear.protolayout.modifiers.LayoutModifier
+import androidx.wear.protolayout.modifiers.clickable
import androidx.wear.protolayout.modifiers.contentDescription
import androidx.wear.protolayout.types.LayoutColor
import androidx.wear.protolayout.types.layoutString
@@ -69,11 +68,7 @@
.setFontScale(1f)
.setScreenShape(DeviceParametersBuilders.SCREEN_SHAPE_RECT)
.build()
- val clickable: ModifiersBuilders.Clickable =
- ModifiersBuilders.Clickable.Builder()
- .setOnClick(ActionBuilders.LaunchAction.Builder().build())
- .setId("action_id")
- .build()
+ val clickable = clickable(id = "action_id")
val testCases: HashMap<String, LayoutElementBuilders.LayoutElement> = HashMap()
testCases["primarylayout_edgebuttonfilled_buttongroup_iconoverride_golden$goldenSuffix"] =
@@ -217,7 +212,9 @@
modifier = LayoutModifier.contentDescription("Card"),
width = expand(),
height = expand(),
- background = { backgroundImage(protoLayoutResourceId = IMAGE_ID) }
+ backgroundContent = {
+ backgroundImage(protoLayoutResourceId = IMAGE_ID)
+ }
) {
text(
"Card with image background".layoutString,
diff --git a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/Button.kt b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/Button.kt
index ac3e2cf..8fd28cf 100644
--- a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/Button.kt
+++ b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/Button.kt
@@ -23,15 +23,16 @@
import androidx.wear.protolayout.ModifiersBuilders.Clickable
import androidx.wear.protolayout.ModifiersBuilders.Corner
import androidx.wear.protolayout.ModifiersBuilders.Padding
-import androidx.wear.protolayout.material3.ButtonDefaults.DEFAULT_CONTENT_PADDING_DP
+import androidx.wear.protolayout.material3.ButtonDefaults.DEFAULT_CONTENT_PADDING
import androidx.wear.protolayout.material3.ButtonDefaults.IMAGE_BUTTON_DEFAULT_SIZE_DP
import androidx.wear.protolayout.material3.ButtonDefaults.METADATA_TAG_BUTTON
import androidx.wear.protolayout.material3.ButtonDefaults.filledButtonColors
import androidx.wear.protolayout.material3.IconButtonStyle.Companion.defaultIconButtonStyle
import androidx.wear.protolayout.material3.TextButtonStyle.Companion.defaultTextButtonStyle
import androidx.wear.protolayout.modifiers.LayoutModifier
+import androidx.wear.protolayout.modifiers.background
+import androidx.wear.protolayout.modifiers.clip
import androidx.wear.protolayout.modifiers.contentDescription
-import androidx.wear.protolayout.types.LayoutColor
/**
* Opinionated ProtoLayout Material3 icon button that offers a single slot to take content
@@ -55,7 +56,7 @@
* [ButtonDefaults.filledTonalButtonColors] and [ButtonDefaults.filledVariantButtonColors]. If
* using custom colors, it is important to choose a color pair from same role to ensure
* accessibility with sufficient color contrast.
- * @param background The background object to be used behind the content in the button. It is
+ * @param backgroundContent The background object to be used behind the content in the button. It is
* recommended to use the default styling that is automatically provided by only calling
* [backgroundImage] with the content. It can be combined with the specified
* [ButtonColors.container] behind it.
@@ -78,18 +79,16 @@
height: ContainerDimension = wrapWithMinTapTargetDimension(),
shape: Corner = shapes.full,
colors: ButtonColors = filledButtonColors(),
- background: (MaterialScope.() -> LayoutElement)? = null,
+ backgroundContent: (MaterialScope.() -> LayoutElement)? = null,
style: IconButtonStyle = defaultIconButtonStyle(),
- contentPadding: Padding = Padding.Builder().setAll(DEFAULT_CONTENT_PADDING_DP.toDp()).build()
+ contentPadding: Padding = DEFAULT_CONTENT_PADDING
): LayoutElement =
button(
onClick = onClick,
- modifier = modifier,
+ modifier = modifier.background(color = colors.container, corner = shape),
width = width,
height = height,
- shape = shape,
- backgroundColor = colors.container,
- background = background,
+ backgroundContent = backgroundContent,
contentPadding = contentPadding,
content = {
withStyle(
@@ -122,7 +121,7 @@
* [ButtonDefaults.filledTonalButtonColors] and [ButtonDefaults.filledVariantButtonColors]. If
* using custom colors, it is important to choose a color pair from same role to ensure
* accessibility with sufficient color contrast.
- * @param background The background object to be used behind the content in the button. It is
+ * @param backgroundContent The background object to be used behind the content in the button. It is
* recommended to use the default styling that is automatically provided by only calling
* [backgroundImage] with the content. It can be combined with the specified
* [ButtonColors.container] behind it.
@@ -146,18 +145,16 @@
height: ContainerDimension = wrapWithMinTapTargetDimension(),
shape: Corner = shapes.full,
colors: ButtonColors = filledButtonColors(),
- background: (MaterialScope.() -> LayoutElement)? = null,
+ backgroundContent: (MaterialScope.() -> LayoutElement)? = null,
style: TextButtonStyle = defaultTextButtonStyle(),
- contentPadding: Padding = Padding.Builder().setAll(DEFAULT_CONTENT_PADDING_DP.toDp()).build()
+ contentPadding: Padding = DEFAULT_CONTENT_PADDING
): LayoutElement =
button(
onClick = onClick,
- modifier = modifier,
+ modifier = modifier.background(color = colors.container, corner = shape),
width = width,
height = height,
- shape = shape,
- backgroundColor = colors.container,
- background = background,
+ backgroundContent = backgroundContent,
contentPadding = contentPadding,
content = {
withStyle(
@@ -184,15 +181,13 @@
* @param onClick Associated [Clickable] for click events. When the button is clicked it will fire
* the associated action.
* @param modifier Modifiers to set to this element. It's highly recommended to set a content
- * description using [contentDescription].
- * @param shape Defines the button's shape, in other words the corner radius for this button.
- * @param backgroundColor The color to be used as a background of this button. If the background
- * image is also specified, the image will be laid out on top of this color. In case of the fully
- * opaque background image, then this background color will not be shown.
- * @param background The background object to be used behind the content in the button. It is
+ * description using [contentDescription]. If [LayoutModifier.background] modifier is used and the
+ * the background image is also specified, the image will be laid out on top of this color. In
+ * case of the fully opaque background image, then the background color will not be shown.
+ * @param backgroundContent The background object to be used behind the content in the button. It is
* recommended to use the default styling that is automatically provided by only calling
- * [backgroundImage] with the content. It can be combined with the specified [backgroundColor]
- * behind it.
+ * [backgroundImage] with the content. It can be combined with the specified
+ * [LayoutModifier.background] behind it.
* @param width The width of this button. It's highly recommended to set this to [expand] or
* [weight]
* @param height The height of this button. It's highly recommended to set this to [expand] or
@@ -215,19 +210,15 @@
height: ContainerDimension =
if (content == null) IMAGE_BUTTON_DEFAULT_SIZE_DP.toDp()
else wrapWithMinTapTargetDimension(),
- shape: Corner = shapes.full,
- backgroundColor: LayoutColor? = null,
- background: (MaterialScope.() -> LayoutElement)? = null,
- contentPadding: Padding = Padding.Builder().setAll(DEFAULT_CONTENT_PADDING_DP.toDp()).build()
+ backgroundContent: (MaterialScope.() -> LayoutElement)? = null,
+ contentPadding: Padding = DEFAULT_CONTENT_PADDING
): LayoutElement =
componentContainer(
onClick = onClick,
- modifier = modifier,
+ modifier = LayoutModifier.clip(shapes.full) then modifier,
width = width,
height = height,
- shape = shape,
- backgroundColor = backgroundColor,
- background = background,
+ backgroundContent = backgroundContent,
contentPadding = contentPadding,
metadataTag = METADATA_TAG_BUTTON,
content = content
diff --git a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/ButtonDefaults.kt b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/ButtonDefaults.kt
index eff0392..f105a4b 100644
--- a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/ButtonDefaults.kt
+++ b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/ButtonDefaults.kt
@@ -19,10 +19,10 @@
import android.graphics.Color
import androidx.annotation.Dimension
import androidx.annotation.Dimension.Companion.DP
-import androidx.wear.protolayout.ColorBuilders.argb
import androidx.wear.protolayout.ModifiersBuilders.Padding
-import androidx.wear.protolayout.material3.ButtonDefaults.DEFAULT_CONTENT_PADDING_DP
+import androidx.wear.protolayout.material3.ButtonDefaults.DEFAULT_CONTENT_PADDING
import androidx.wear.protolayout.material3.Typography.TypographyToken
+import androidx.wear.protolayout.modifiers.padding
import androidx.wear.protolayout.types.LayoutColor
import androidx.wear.protolayout.types.argb
@@ -81,7 +81,7 @@
)
internal const val METADATA_TAG_BUTTON: String = "BTN"
- @Dimension(DP) internal const val DEFAULT_CONTENT_PADDING_DP: Int = 8
+ internal val DEFAULT_CONTENT_PADDING = padding(8f)
@Dimension(DP) internal const val IMAGE_BUTTON_DEFAULT_SIZE_DP = 52
}
@@ -89,7 +89,7 @@
public class IconButtonStyle
internal constructor(
@Dimension(unit = DP) internal val iconSize: Int,
- internal val innerPadding: Padding = DEFAULT_CONTENT_PADDING_DP.toPadding()
+ internal val innerPadding: Padding = DEFAULT_CONTENT_PADDING
) {
public companion object {
/**
@@ -110,7 +110,7 @@
public class TextButtonStyle
internal constructor(
@TypographyToken internal val labelTypography: Int,
- internal val innerPadding: Padding = DEFAULT_CONTENT_PADDING_DP.toPadding()
+ internal val innerPadding: Padding = DEFAULT_CONTENT_PADDING
) {
public companion object {
/**
diff --git a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/Card.kt b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/Card.kt
index 318cc46..8a2d807 100644
--- a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/Card.kt
+++ b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/Card.kt
@@ -41,8 +41,10 @@
import androidx.wear.protolayout.material3.TitleCardDefaults.buildContentForTitleCard
import androidx.wear.protolayout.material3.TitleCardStyle.Companion.defaultTitleCardStyle
import androidx.wear.protolayout.modifiers.LayoutModifier
+import androidx.wear.protolayout.modifiers.background
+import androidx.wear.protolayout.modifiers.clip
import androidx.wear.protolayout.modifiers.contentDescription
-import androidx.wear.protolayout.types.LayoutColor
+import androidx.wear.protolayout.modifiers.padding
/**
* Opinionated ProtoLayout Material3 title card that offers 1 to 3 slots, usually text based.
@@ -69,7 +71,7 @@
* [CardDefaults.filledTonalCardColors] for low/medium emphasis card,
* [CardDefaults.imageBackgroundCardColors] for card with image as a background or custom built
* [CardColors].
- * @param background The background object to be used behind the content in the card. It is
+ * @param backgroundContent The background object to be used behind the content in the card. It is
* recommended to use the default styling that is automatically provided by only calling
* [backgroundImage] with the content. It can be combined with the specified [colors]'s background
* color behind it.
@@ -95,7 +97,7 @@
shape: Corner =
if (deviceConfiguration.screenWidthDp.isBreakpoint()) shapes.extraLarge else shapes.large,
colors: CardColors = filledCardColors(),
- background: (MaterialScope.() -> LayoutElement)? = null,
+ backgroundContent: (MaterialScope.() -> LayoutElement)? = null,
style: TitleCardStyle = defaultTitleCardStyle(),
contentPadding: Padding = style.innerPadding,
@HorizontalAlignment
@@ -103,12 +105,10 @@
): LayoutElement =
card(
onClick = onClick,
- modifier = modifier,
+ modifier = modifier.background(colors.background).clip(shape),
width = expand(),
height = height,
- shape = shape,
- backgroundColor = colors.background,
- background = background,
+ backgroundContent = backgroundContent,
contentPadding = contentPadding
) {
buildContentForTitleCard(
@@ -193,7 +193,7 @@
* [CardDefaults.filledTonalCardColors] for low/medium emphasis card,
* [CardDefaults.imageBackgroundCardColors] for card with image as a background or custom built
* [CardColors].
- * @param background The background object to be used behind the content in the card. It is
+ * @param backgroundContent The background object to be used behind the content in the card. It is
* recommended to use the default styling that is automatically provided by only calling
* [backgroundImage] with the content. It can be combined with the specified [colors]'s background
* color behind it.
@@ -218,18 +218,16 @@
shape: Corner =
if (deviceConfiguration.screenWidthDp.isBreakpoint()) shapes.extraLarge else shapes.large,
colors: CardColors = filledCardColors(),
- background: (MaterialScope.() -> LayoutElement)? = null,
+ backgroundContent: (MaterialScope.() -> LayoutElement)? = null,
style: AppCardStyle = defaultAppCardStyle(),
contentPadding: Padding = style.innerPadding,
): LayoutElement =
card(
onClick = onClick,
- modifier = modifier,
+ modifier = modifier.background(colors.background).clip(shape),
width = expand(),
height = height,
- shape = shape,
- backgroundColor = colors.background,
- background = background,
+ backgroundContent = backgroundContent,
contentPadding = contentPadding
) {
buildContentForAppCard(
@@ -321,7 +319,7 @@
* [CardDefaults.filledTonalCardColors] for low/medium emphasis card,
* [CardDefaults.imageBackgroundCardColors] for card with image as a background or custom built
* [CardColors].
- * @param background The background object to be used behind the content in the card. It is
+ * @param backgroundContent The background object to be used behind the content in the card. It is
* recommended to use the default styling that is automatically provided by only calling
* [backgroundImage] with the content. It can be combined with the specified [colors]'s background
* color behind it.
@@ -349,19 +347,17 @@
height: ContainerDimension = wrapWithMinTapTargetDimension(),
shape: Corner = shapes.large,
colors: CardColors = filledCardColors(),
- background: (MaterialScope.() -> LayoutElement)? = null,
+ backgroundContent: (MaterialScope.() -> LayoutElement)? = null,
style: DataCardStyle =
if (secondaryText == null) defaultCompactDataCardStyle() else defaultDataCardStyle(),
contentPadding: Padding = style.innerPadding,
): LayoutElement =
card(
onClick = onClick,
- modifier = modifier,
+ modifier = modifier.background(colors.background).clip(shape),
width = width,
height = height,
- shape = shape,
- backgroundColor = colors.background,
- background = background,
+ backgroundContent = backgroundContent,
contentPadding = contentPadding
) {
buildContentForDataCard(
@@ -435,7 +431,7 @@
* [CardDefaults.filledTonalCardColors] for low/medium emphasis card,
* [CardDefaults.imageBackgroundCardColors] for card with image as a background or custom built
* [CardColors].
- * @param background The background object to be used behind the content in the card. It is
+ * @param backgroundContent The background object to be used behind the content in the card. It is
* recommended to use the default styling that is automatically provided by only calling
* [backgroundImage] with the content. It can be combined with the specified [colors]'s background
* color behind it.
@@ -465,7 +461,7 @@
height: ContainerDimension = wrapWithMinTapTargetDimension(),
shape: Corner = shapes.large,
colors: CardColors = filledCardColors(),
- background: (MaterialScope.() -> LayoutElement)? = null,
+ backgroundContent: (MaterialScope.() -> LayoutElement)? = null,
style: DataCardStyle =
if (secondaryIcon == null) defaultCompactDataCardStyle() else defaultDataCardStyle(),
titleContentPlacement: TitleContentPlacementInDataCard = TitleContentPlacementInDataCard.Bottom,
@@ -473,12 +469,10 @@
): LayoutElement =
card(
onClick = onClick,
- modifier = modifier,
+ modifier = modifier.background(colors.background).clip(shape),
width = width,
height = height,
- shape = shape,
- backgroundColor = colors.background,
- background = background,
+ backgroundContent = backgroundContent,
contentPadding = contentPadding
) {
buildContentForDataCard(
@@ -570,11 +564,9 @@
): LayoutElement =
card(
onClick = onClick,
- modifier = modifier,
+ modifier = modifier.background(colors.background).clip(shape),
width = expand(),
height = height,
- shape = shape,
- backgroundColor = colors.background,
contentPadding = contentPadding
) {
buildContentForGraphicDataCard(
@@ -628,15 +620,13 @@
* @param onClick Associated [Clickable] for click events. When the card is clicked it will fire the
* associated action.
* @param modifier Modifiers to set to this element. It's highly recommended to set a content
- * description using [contentDescription].
- * @param shape Defines the card's shape, in other words the corner radius for this card.
- * @param backgroundColor The color to be used as a background of this card. If the background image
- * is also specified, the image will be laid out on top of this color. In case of the fully opaque
- * background image, then this background color will not be shown.
- * @param background The background object to be used behind the content in the card. It is
+ * description using [contentDescription]. If [LayoutModifier.background] modifier is used and the
+ * the background image is also specified, the image will be laid out on top of this color. In
+ * case of the fully opaque background image, then the background color will not be shown.
+ * @param backgroundContent The background object to be used behind the content in the card. It is
* recommended to use the default styling that is automatically provided by only calling
- * [backgroundImage] with the content. It can be combined with the specified [backgroundColor]
- * behind it.
+ * [backgroundImage] with the content. It can be combined with the specified
+ * [LayoutModifier.background] behind it.
* @param width The width of this card. It's highly recommended to set this to [expand] or [weight]
* @param height The height of this card. It's highly recommended to set this to [expand] or
* [weight]
@@ -652,20 +642,16 @@
modifier: LayoutModifier = LayoutModifier,
width: ContainerDimension = wrapWithMinTapTargetDimension(),
height: ContainerDimension = wrapWithMinTapTargetDimension(),
- shape: Corner = shapes.large,
- backgroundColor: LayoutColor? = null,
- background: (MaterialScope.() -> LayoutElement)? = null,
- contentPadding: Padding = Padding.Builder().setAll(DEFAULT_CONTENT_PADDING.toDp()).build(),
+ backgroundContent: (MaterialScope.() -> LayoutElement)? = null,
+ contentPadding: Padding = padding(DEFAULT_CONTENT_PADDING),
content: (MaterialScope.() -> LayoutElement)
): LayoutElement =
componentContainer(
onClick = onClick,
- modifier = modifier,
+ modifier = LayoutModifier.clip(shapes.large) then modifier,
width = width,
height = height,
- shape = shape,
- backgroundColor = backgroundColor,
- background = background,
+ backgroundContent = backgroundContent,
contentPadding = contentPadding,
metadataTag = METADATA_TAG,
content = content
diff --git a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/CardDefaults.kt b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/CardDefaults.kt
index 77bdda2..ad91cc6 100644
--- a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/CardDefaults.kt
+++ b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/CardDefaults.kt
@@ -94,5 +94,5 @@
)
internal const val METADATA_TAG: String = "CR"
- internal const val DEFAULT_CONTENT_PADDING: Int = 4
+ internal const val DEFAULT_CONTENT_PADDING = 4f
}
diff --git a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/DataCardDefaults.kt b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/DataCardDefaults.kt
index f6c083b..d6552a3 100644
--- a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/DataCardDefaults.kt
+++ b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/DataCardDefaults.kt
@@ -24,6 +24,7 @@
import androidx.wear.protolayout.material3.TitleContentPlacementInDataCard.Companion.Bottom
import androidx.wear.protolayout.material3.TitleContentPlacementInDataCard.Companion.Top
import androidx.wear.protolayout.material3.Typography.TypographyToken
+import androidx.wear.protolayout.modifiers.padding
internal object DataCardDefaults {
/**
@@ -127,13 +128,13 @@
@Dimension(unit = DP) private const val ICON_SIZE_LARGE_DP: Int = 32
- @Dimension(unit = DP) private const val PADDING_SMALL_DP: Int = 8
+ @Dimension(unit = DP) private const val PADDING_SMALL_DP = 8f
- @Dimension(unit = DP) private const val PADDING_DEFAULT_DP: Int = 10
+ @Dimension(unit = DP) private const val PADDING_DEFAULT_DP = 10f
- @Dimension(unit = DP) private const val PADDING_LARGE_DP: Int = 14
+ @Dimension(unit = DP) private const val PADDING_LARGE_DP = 14f
- @Dimension(unit = DP) private const val PADDING_EXTRA_LARGE_DP: Int = 16
+ @Dimension(unit = DP) private const val PADDING_EXTRA_LARGE_DP = 16f
/**
* Default style variation for the [iconDataCard] or [textDataCard] where all opinionated
@@ -141,7 +142,7 @@
*/
public fun smallDataCardStyle(): DataCardStyle =
DataCardStyle(
- innerPadding = PADDING_SMALL_DP.toPadding(),
+ innerPadding = padding(PADDING_SMALL_DP),
titleToContentSpaceDp = SMALL_SPACE_DP,
titleTypography = Typography.LABEL_MEDIUM,
contentTypography = Typography.BODY_SMALL,
@@ -155,7 +156,7 @@
*/
public fun defaultDataCardStyle(): DataCardStyle =
DataCardStyle(
- innerPadding = PADDING_DEFAULT_DP.toPadding(),
+ innerPadding = padding(PADDING_DEFAULT_DP),
titleToContentSpaceDp = SMALL_SPACE_DP,
titleTypography = Typography.LABEL_LARGE,
contentTypography = Typography.BODY_SMALL,
@@ -169,7 +170,7 @@
*/
public fun largeDataCardStyle(): DataCardStyle =
DataCardStyle(
- innerPadding = PADDING_DEFAULT_DP.toPadding(),
+ innerPadding = padding(PADDING_DEFAULT_DP),
titleToContentSpaceDp = EMPTY_SPACE_DP,
titleTypography = Typography.DISPLAY_SMALL,
contentTypography = Typography.BODY_SMALL,
@@ -184,12 +185,7 @@
public fun extraLargeDataCardStyle(): DataCardStyle =
DataCardStyle(
innerPadding =
- Padding.Builder()
- .setStart(PADDING_DEFAULT_DP.toDp())
- .setEnd(PADDING_DEFAULT_DP.toDp())
- .setTop(PADDING_EXTRA_LARGE_DP.toDp())
- .setBottom(PADDING_EXTRA_LARGE_DP.toDp())
- .build(),
+ padding(horizontal = PADDING_DEFAULT_DP, vertical = PADDING_EXTRA_LARGE_DP),
titleToContentSpaceDp = EMPTY_SPACE_DP,
titleTypography = Typography.DISPLAY_MEDIUM,
contentTypography = Typography.BODY_SMALL,
@@ -204,13 +200,7 @@
*/
public fun smallCompactDataCardStyle(): DataCardStyle =
DataCardStyle(
- innerPadding =
- Padding.Builder()
- .setTop(PADDING_SMALL_DP.toDp())
- .setBottom(PADDING_SMALL_DP.toDp())
- .setStart(PADDING_LARGE_DP.toDp())
- .setEnd(PADDING_LARGE_DP.toDp())
- .build(),
+ innerPadding = padding(horizontal = PADDING_LARGE_DP, vertical = PADDING_SMALL_DP),
titleToContentSpaceDp = DEFAULT_SPACE_DP,
titleTypography = Typography.NUMERAL_MEDIUM,
contentTypography = Typography.LABEL_MEDIUM,
@@ -225,13 +215,7 @@
*/
public fun defaultCompactDataCardStyle(): DataCardStyle =
DataCardStyle(
- innerPadding =
- Padding.Builder()
- .setTop(PADDING_SMALL_DP.toDp())
- .setBottom(PADDING_SMALL_DP.toDp())
- .setStart(PADDING_LARGE_DP.toDp())
- .setEnd(PADDING_LARGE_DP.toDp())
- .build(),
+ innerPadding = padding(horizontal = PADDING_LARGE_DP, vertical = PADDING_SMALL_DP),
titleToContentSpaceDp = EMPTY_SPACE_DP,
titleTypography = Typography.NUMERAL_LARGE,
contentTypography = Typography.LABEL_LARGE,
@@ -246,13 +230,7 @@
*/
public fun largeCompactDataCardStyle(): DataCardStyle =
DataCardStyle(
- innerPadding =
- Padding.Builder()
- .setTop(PADDING_SMALL_DP.toDp())
- .setBottom(PADDING_SMALL_DP.toDp())
- .setStart(PADDING_LARGE_DP.toDp())
- .setEnd(PADDING_LARGE_DP.toDp())
- .build(),
+ innerPadding = padding(horizontal = PADDING_LARGE_DP, vertical = PADDING_SMALL_DP),
titleToContentSpaceDp = EMPTY_SPACE_DP,
titleTypography = Typography.NUMERAL_EXTRA_LARGE,
contentTypography = Typography.LABEL_LARGE,
diff --git a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/EdgeButton.kt b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/EdgeButton.kt
index 227f92c..cf093bc 100644
--- a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/EdgeButton.kt
+++ b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/EdgeButton.kt
@@ -16,17 +16,16 @@
package androidx.wear.protolayout.material3
-import androidx.wear.protolayout.DimensionBuilders.DpProp
+import android.R.attr.clickable
+import androidx.annotation.Dimension
+import androidx.annotation.Dimension.Companion.DP
import androidx.wear.protolayout.DimensionBuilders.dp
import androidx.wear.protolayout.LayoutElementBuilders
import androidx.wear.protolayout.LayoutElementBuilders.Box
import androidx.wear.protolayout.LayoutElementBuilders.LayoutElement
import androidx.wear.protolayout.LayoutElementBuilders.VERTICAL_ALIGN_CENTER
import androidx.wear.protolayout.LayoutElementBuilders.VerticalAlignment
-import androidx.wear.protolayout.ModifiersBuilders.Background
import androidx.wear.protolayout.ModifiersBuilders.Clickable
-import androidx.wear.protolayout.ModifiersBuilders.Corner
-import androidx.wear.protolayout.ModifiersBuilders.Modifiers
import androidx.wear.protolayout.ModifiersBuilders.Padding
import androidx.wear.protolayout.ModifiersBuilders.SEMANTICS_ROLE_BUTTON
import androidx.wear.protolayout.material3.ButtonDefaults.filledButtonColors
@@ -42,9 +41,16 @@
import androidx.wear.protolayout.material3.EdgeButtonStyle.Companion.DEFAULT
import androidx.wear.protolayout.material3.EdgeButtonStyle.Companion.TOP_ALIGN
import androidx.wear.protolayout.modifiers.LayoutModifier
+import androidx.wear.protolayout.modifiers.background
+import androidx.wear.protolayout.modifiers.clickable
+import androidx.wear.protolayout.modifiers.clip
+import androidx.wear.protolayout.modifiers.clipBottomLeft
+import androidx.wear.protolayout.modifiers.clipBottomRight
import androidx.wear.protolayout.modifiers.contentDescription
+import androidx.wear.protolayout.modifiers.padding
import androidx.wear.protolayout.modifiers.semanticsRole
-import androidx.wear.protolayout.modifiers.toProtoLayoutModifiersBuilder
+import androidx.wear.protolayout.modifiers.tag
+import androidx.wear.protolayout.modifiers.toProtoLayoutModifiers
/**
* ProtoLayout Material3 component edge button that offers a single slot to take an icon or similar
@@ -167,26 +173,18 @@
else HORIZONTAL_MARGIN_PERCENT_SMALL
val edgeButtonWidth: Float =
(100f - 2f * horizontalMarginPercent) * deviceConfiguration.screenWidthDp / 100f
- val bottomCornerRadiusX = dp(edgeButtonWidth / 2f)
- val bottomCornerRadiusY = dp(EDGE_BUTTON_HEIGHT_DP - TOP_CORNER_RADIUS.value)
+ val bottomCornerRadiusX = edgeButtonWidth / 2f
+ val bottomCornerRadiusY = EDGE_BUTTON_HEIGHT_DP - TOP_CORNER_RADIUS
- val defaultModifier = LayoutModifier.semanticsRole(SEMANTICS_ROLE_BUTTON) then modifier
- val modifiers =
- defaultModifier
- .toProtoLayoutModifiersBuilder()
- .setClickable(onClick)
- .setBackground(
- Background.Builder()
- .setColor(colors.container.prop)
- .setCorner(
- Corner.Builder()
- .setRadius(TOP_CORNER_RADIUS)
- .setBottomLeftRadius(bottomCornerRadiusX, bottomCornerRadiusY)
- .setBottomRightRadius(bottomCornerRadiusX, bottomCornerRadiusY)
- .build()
- )
- .build()
- )
+ var mod =
+ (LayoutModifier.semanticsRole(SEMANTICS_ROLE_BUTTON) then modifier)
+ .clickable(onClick)
+ .background(colors.container)
+ .clip(TOP_CORNER_RADIUS)
+ .clipBottomLeft(bottomCornerRadiusX, bottomCornerRadiusY)
+ .clipBottomRight(bottomCornerRadiusX, bottomCornerRadiusY)
+
+ style.padding?.let { mod = mod.padding(it) }
val button = Box.Builder().setHeight(EDGE_BUTTON_HEIGHT_DP.toDp()).setWidth(dp(edgeButtonWidth))
button
@@ -194,15 +192,13 @@
.setHorizontalAlignment(LayoutElementBuilders.HORIZONTAL_ALIGN_CENTER)
.addContent(content())
- style.padding?.let { modifiers.setPadding(it) }
-
return Box.Builder()
.setHeight((EDGE_BUTTON_HEIGHT_DP + BOTTOM_MARGIN_DP).toDp())
.setWidth(containerWidth)
.setVerticalAlignment(LayoutElementBuilders.VERTICAL_ALIGN_TOP)
.setHorizontalAlignment(LayoutElementBuilders.HORIZONTAL_ALIGN_CENTER)
- .addContent(button.setModifiers(modifiers.build()).build())
- .setModifiers(Modifiers.Builder().setMetadata(METADATA_TAG.toElementMetadata()).build())
+ .addContent(button.setModifiers(mod.toProtoLayoutModifiers()).build())
+ .setModifiers(LayoutModifier.tag(METADATA_TAG).toProtoLayoutModifiers())
.build()
}
@@ -224,11 +220,11 @@
EdgeButtonStyle(
verticalAlignment = LayoutElementBuilders.VERTICAL_ALIGN_TOP,
padding =
- Padding.Builder()
- .setTop(TEXT_TOP_PADDING_DP.toDp())
- .setStart(TEXT_SIDE_PADDING_DP.toDp())
- .setEnd(TEXT_SIDE_PADDING_DP.toDp())
- .build()
+ padding(
+ start = TEXT_SIDE_PADDING_DP,
+ top = TEXT_TOP_PADDING_DP,
+ end = TEXT_SIDE_PADDING_DP
+ )
)
/**
@@ -242,7 +238,7 @@
}
internal object EdgeButtonDefaults {
- @JvmField internal val TOP_CORNER_RADIUS: DpProp = dp(17f)
+ @Dimension(DP) internal const val TOP_CORNER_RADIUS: Float = 17f
/** The horizontal margin used for width of the EdgeButton, below the 225dp breakpoint. */
internal const val HORIZONTAL_MARGIN_PERCENT_SMALL: Float = 24f
/** The horizontal margin used for width of the EdgeButton, above the 225dp breakpoint. */
@@ -251,8 +247,8 @@
internal const val EDGE_BUTTON_HEIGHT_DP: Int = 46
internal const val METADATA_TAG: String = "EB"
internal const val ICON_SIZE_DP = 24
- internal const val TEXT_TOP_PADDING_DP = 12
- internal const val TEXT_SIDE_PADDING_DP = 8
+ internal const val TEXT_TOP_PADDING_DP = 12f
+ internal const val TEXT_SIDE_PADDING_DP = 8f
}
internal fun LayoutElement.isSlotEdgeButton(): Boolean =
diff --git a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/GraphicDataCardDefaults.kt b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/GraphicDataCardDefaults.kt
index dc256d7..c931cb6 100644
--- a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/GraphicDataCardDefaults.kt
+++ b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/GraphicDataCardDefaults.kt
@@ -31,6 +31,7 @@
import androidx.wear.protolayout.LayoutElementBuilders.Row
import androidx.wear.protolayout.ModifiersBuilders.Padding
import androidx.wear.protolayout.material3.Typography.TypographyToken
+import androidx.wear.protolayout.modifiers.padding
internal object GraphicDataCardDefaults {
@FloatRange(from = 0.0, to = 100.0) private const val GRAPHIC_SPACE_PERCENTAGE: Float = 40f
@@ -135,7 +136,7 @@
/** The default smaller spacer width or height that should be between different elements. */
@Dimension(unit = DP) private const val SMALL_SPACE_DP: Int = 2
- private const val DEFAULT_VERTICAL_PADDING_DP = 8
+ private const val DEFAULT_VERTICAL_PADDING_DP = 8f
/**
* Default style variation for the [graphicDataCard] where all opinionated inner content is
@@ -144,10 +145,10 @@
public fun defaultGraphicDataCardStyle(): GraphicDataCardStyle =
GraphicDataCardStyle(
innerPadding =
- Padding.Builder()
- .setTop(DEFAULT_VERTICAL_PADDING_DP.toDp())
- .setBottom(DEFAULT_VERTICAL_PADDING_DP.toDp())
- .build(),
+ padding(
+ top = DEFAULT_VERTICAL_PADDING_DP,
+ bottom = DEFAULT_VERTICAL_PADDING_DP
+ ),
titleToContentSpaceDp = SMALL_SPACE_DP,
titleTypography = Typography.DISPLAY_SMALL,
contentTypography = Typography.LABEL_SMALL,
@@ -162,10 +163,10 @@
public fun largeGraphicDataCardStyle(): GraphicDataCardStyle =
GraphicDataCardStyle(
innerPadding =
- Padding.Builder()
- .setTop(DEFAULT_VERTICAL_PADDING_DP.toDp())
- .setBottom(DEFAULT_VERTICAL_PADDING_DP.toDp())
- .build(),
+ padding(
+ top = DEFAULT_VERTICAL_PADDING_DP,
+ bottom = DEFAULT_VERTICAL_PADDING_DP
+ ),
titleToContentSpaceDp = 0,
titleTypography = Typography.DISPLAY_MEDIUM,
contentTypography = Typography.LABEL_MEDIUM,
diff --git a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/Helpers.kt b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/Helpers.kt
index 09b8979..ed51c87 100644
--- a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/Helpers.kt
+++ b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/Helpers.kt
@@ -40,17 +40,17 @@
import androidx.wear.protolayout.LayoutElementBuilders.LayoutElement
import androidx.wear.protolayout.LayoutElementBuilders.Spacer
import androidx.wear.protolayout.LayoutElementBuilders.TextAlignment
-import androidx.wear.protolayout.ModifiersBuilders.Background
import androidx.wear.protolayout.ModifiersBuilders.Clickable
-import androidx.wear.protolayout.ModifiersBuilders.Corner
import androidx.wear.protolayout.ModifiersBuilders.ElementMetadata
-import androidx.wear.protolayout.ModifiersBuilders.Modifiers
import androidx.wear.protolayout.ModifiersBuilders.Padding
import androidx.wear.protolayout.ModifiersBuilders.SEMANTICS_ROLE_BUTTON
import androidx.wear.protolayout.materialcore.fontscaling.FontScaleConverterFactory
import androidx.wear.protolayout.modifiers.LayoutModifier
+import androidx.wear.protolayout.modifiers.clickable
+import androidx.wear.protolayout.modifiers.padding
import androidx.wear.protolayout.modifiers.semanticsRole
-import androidx.wear.protolayout.modifiers.toProtoLayoutModifiersBuilder
+import androidx.wear.protolayout.modifiers.tag
+import androidx.wear.protolayout.modifiers.toProtoLayoutModifiers
import androidx.wear.protolayout.types.LayoutColor
import androidx.wear.protolayout.types.argb
import java.nio.charset.StandardCharsets
@@ -91,8 +91,6 @@
internal fun Int.toDp() = dp(this.toFloat())
-internal fun String.toElementMetadata() = ElementMetadata.Builder().setTagData(toTagBytes()).build()
-
/** Builds a horizontal Spacer, with width set to expand and height set to the given value. */
internal fun horizontalSpacer(@Dimension(unit = DP) heightDp: Int): Spacer =
Spacer.Builder().setWidth(expand()).setHeight(heightDp.toDp()).build()
@@ -112,15 +110,6 @@
internal fun wrapWithMinTapTargetDimension(): WrappedDimensionProp =
WrappedDimensionProp.Builder().setMinimumSize(MINIMUM_TAP_TARGET_SIZE).build()
-/** Returns the [Modifiers] object containing this padding and nothing else. */
-internal fun Padding.toModifiers(): Modifiers = Modifiers.Builder().setPadding(this).build()
-
-/** Returns the [Background] object containing this color and nothing else. */
-internal fun LayoutColor.toBackground(): Background = Background.Builder().setColor(prop).build()
-
-/** Returns the [Background] object containing this corner and nothing else. */
-internal fun Corner.toBackground(): Background = Background.Builder().setCorner(this).build()
-
/**
* Changes the opacity/transparency of the given color.
*
@@ -156,8 +145,6 @@
*/
internal fun Int.isBreakpoint() = this >= SCREEN_SIZE_BREAKPOINT_DP
-internal fun Int.toPadding(): Padding = Padding.Builder().setAll(this.toDp()).build()
-
/**
* Builds [Box] that represents a clickable container with the given [content] inside, and
* [SEMANTICS_ROLE_BUTTON], that can be used to create container or more opinionated card or button
@@ -168,37 +155,29 @@
modifier: LayoutModifier,
width: ContainerDimension,
height: ContainerDimension,
- shape: Corner,
- backgroundColor: LayoutColor?,
- background: (MaterialScope.() -> LayoutElement)?,
+ backgroundContent: (MaterialScope.() -> LayoutElement)?,
contentPadding: Padding,
metadataTag: String,
content: (MaterialScope.() -> LayoutElement)?
): LayoutElement {
- val backgroundBuilder = Background.Builder().setCorner(shape)
- backgroundColor?.let { backgroundBuilder.setColor(it.prop) }
- val defaultModifier = LayoutModifier.semanticsRole(SEMANTICS_ROLE_BUTTON) then modifier
- val modifiers =
- defaultModifier
- .toProtoLayoutModifiersBuilder()
- .setClickable(onClick)
- .setMetadata(metadataTag.toElementMetadata())
- .setBackground(backgroundBuilder.build())
+ val mod =
+ LayoutModifier.semanticsRole(SEMANTICS_ROLE_BUTTON) then
+ modifier.clickable(onClick).tag(metadataTag)
val container =
Box.Builder().setHeight(height).setWidth(width).apply {
content?.let { addContent(content()) }
}
- if (background == null) {
- modifiers.setPadding(contentPadding)
- container.setModifiers(modifiers.build())
+ if (backgroundContent == null) {
+ container.setModifiers(mod.padding(contentPadding).toProtoLayoutModifiers())
return container.build()
}
+ val protoLayoutModifiers = mod.toProtoLayoutModifiers()
return Box.Builder()
- .setModifiers(modifiers.build())
+ .setModifiers(protoLayoutModifiers)
.addContent(
withStyle(
defaultBackgroundImageStyle =
@@ -208,18 +187,18 @@
overlayColor = colorScheme.primary.withOpacity(0.6f),
overlayWidth = width,
overlayHeight = height,
- shape = shape,
+ shape = protoLayoutModifiers.background?.corner ?: shapes.large,
contentScaleMode = LayoutElementBuilders.CONTENT_SCALE_MODE_FILL_BOUNDS
)
)
- .background()
+ .backgroundContent()
)
.setWidth(width)
.setHeight(height)
.addContent(
container
// Padding in this case is needed on the inner content, not the whole card.
- .setModifiers(contentPadding.toModifiers())
+ .setModifiers(LayoutModifier.padding(contentPadding).toProtoLayoutModifiers())
.build()
)
.build()
diff --git a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/Image.kt b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/Image.kt
index ab3a3aa..b14da86 100644
--- a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/Image.kt
+++ b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/Image.kt
@@ -22,8 +22,10 @@
import androidx.wear.protolayout.LayoutElementBuilders.ContentScaleMode
import androidx.wear.protolayout.LayoutElementBuilders.Image
import androidx.wear.protolayout.LayoutElementBuilders.LayoutElement
-import androidx.wear.protolayout.ModifiersBuilders.Corner
-import androidx.wear.protolayout.ModifiersBuilders.Modifiers
+import androidx.wear.protolayout.modifiers.LayoutModifier
+import androidx.wear.protolayout.modifiers.background
+import androidx.wear.protolayout.modifiers.clip
+import androidx.wear.protolayout.modifiers.toProtoLayoutModifiers
import androidx.wear.protolayout.types.LayoutColor
/**
@@ -34,6 +36,7 @@
*
* @param protoLayoutResourceId The protolayout resource id of the image. Node that, this is not an
* Android resource id.
+ * @param modifier Modifiers to set to this element.
* @param width The width of an image. Usually, this matches the width of the parent component this
* is used in.
* @param height The height of an image. Usually, this matches the height of the parent component
@@ -42,18 +45,17 @@
* It's recommended to use [ColorScheme.background] color with 60% opacity.
* @param overlayWidth The width of the overlay on top of the image background
* @param overlayHeight The height of the overlay on top of the image background
- * @param shape The shape of the corners for the image
* @param contentScaleMode The content scale mode for the image to define how image will adapt to
* the given size
*/
public fun MaterialScope.backgroundImage(
protoLayoutResourceId: String,
+ modifier: LayoutModifier = LayoutModifier,
width: ImageDimension = defaultBackgroundImageStyle.width,
height: ImageDimension = defaultBackgroundImageStyle.height,
overlayColor: LayoutColor = defaultBackgroundImageStyle.overlayColor,
overlayWidth: ContainerDimension = defaultBackgroundImageStyle.overlayWidth,
overlayHeight: ContainerDimension = defaultBackgroundImageStyle.overlayHeight,
- shape: Corner = defaultBackgroundImageStyle.shape,
@ContentScaleMode contentScaleMode: Int = defaultBackgroundImageStyle.contentScaleMode,
): LayoutElement =
Box.Builder()
@@ -64,7 +66,10 @@
Image.Builder()
.setWidth(width)
.setHeight(height)
- .setModifiers(Modifiers.Builder().setBackground(shape.toBackground()).build())
+ .setModifiers(
+ (LayoutModifier.clip(defaultBackgroundImageStyle.shape) then modifier)
+ .toProtoLayoutModifiers()
+ )
.setResourceId(protoLayoutResourceId)
.setContentScaleMode(contentScaleMode)
.build()
@@ -74,9 +79,7 @@
Box.Builder()
.setWidth(overlayWidth)
.setHeight(overlayHeight)
- .setModifiers(
- Modifiers.Builder().setBackground(overlayColor.toBackground()).build()
- )
+ .setModifiers(LayoutModifier.background(overlayColor).toProtoLayoutModifiers())
.build()
)
.build()
@@ -90,9 +93,9 @@
*
* @param protoLayoutResourceId The protolayout resource id of the image. Node that, this is not an
* Android resource id.
+ * @param modifier Modifiers to set to this element.
* @param width The width of an image. Usually, a small image that fit into the component's slot.
* @param height The height of an image. Usually, a small image that fit into the component's slot.
- * @param shape The shape of the corners for the image. Usually it's circular image.
* @param contentScaleMode The content scale mode for the image to define how image will adapt to
* the given size
*/
@@ -100,13 +103,16 @@
protoLayoutResourceId: String,
width: ImageDimension = defaultAvatarImageStyle.width,
height: ImageDimension = defaultAvatarImageStyle.height,
- shape: Corner = defaultAvatarImageStyle.shape,
+ modifier: LayoutModifier = LayoutModifier,
@ContentScaleMode contentScaleMode: Int = defaultAvatarImageStyle.contentScaleMode,
): LayoutElement =
Image.Builder()
.setWidth(width)
.setHeight(height)
- .setModifiers(Modifiers.Builder().setBackground(shape.toBackground()).build())
+ .setModifiers(
+ (LayoutModifier.clip(defaultAvatarImageStyle.shape) then modifier)
+ .toProtoLayoutModifiers()
+ )
.setResourceId(protoLayoutResourceId)
.setContentScaleMode(contentScaleMode)
.build()
diff --git a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/PrimaryLayout.kt b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/PrimaryLayout.kt
index eb361c5..0bd6491 100644
--- a/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/PrimaryLayout.kt
+++ b/wear/protolayout/protolayout-material3/src/main/java/androidx/wear/protolayout/material3/PrimaryLayout.kt
@@ -99,7 +99,7 @@
* it an edge button, the given label will be ignored.
* @param onClick The clickable action for whole layout. If any area (outside of other added
* tappable components) is clicked, it will fire the associated action.
- * @sample androidx.wear.protolayout.material3.samples.topLeveLayout
+ * @sample androidx.wear.protolayout.material3.samples.topLevelLayout
*/
// TODO: b/356568440 - Add sample above and put it in a proper samples file and link with @sample
// TODO: b/346958146 - Link visuals once they are available.
diff --git a/wear/protolayout/protolayout-material3/src/test/java/androidx/wear/protolayout/material3/ButtonTest.kt b/wear/protolayout/protolayout-material3/src/test/java/androidx/wear/protolayout/material3/ButtonTest.kt
index ba6ab99..e56e836 100644
--- a/wear/protolayout/protolayout-material3/src/test/java/androidx/wear/protolayout/material3/ButtonTest.kt
+++ b/wear/protolayout/protolayout-material3/src/test/java/androidx/wear/protolayout/material3/ButtonTest.kt
@@ -23,6 +23,8 @@
import androidx.wear.protolayout.DeviceParametersBuilders
import androidx.wear.protolayout.DimensionBuilders.expand
import androidx.wear.protolayout.modifiers.LayoutModifier
+import androidx.wear.protolayout.modifiers.backgroundColor
+import androidx.wear.protolayout.modifiers.clickable
import androidx.wear.protolayout.modifiers.contentDescription
import androidx.wear.protolayout.testing.LayoutElementAssertionsProvider
import androidx.wear.protolayout.testing.hasClickable
@@ -96,7 +98,7 @@
fun containerButton_hasClickable() {
LayoutElementAssertionsProvider(DEFAULT_CONTAINER_BUTTON_WITH_TEXT)
.onRoot()
- .assert(hasClickable(CLICKABLE))
+ .assert(hasClickable(id = CLICKABLE.id))
.assert(hasTag(ButtonDefaults.METADATA_TAG_BUTTON))
}
@@ -126,7 +128,7 @@
button(
onClick = CLICKABLE,
modifier = LayoutModifier.contentDescription(CONTENT_DESCRIPTION),
- background = { backgroundImage(IMAGE_ID) }
+ backgroundContent = { backgroundImage(IMAGE_ID) }
)
}
@@ -143,8 +145,9 @@
materialScope(CONTEXT, DEVICE_CONFIGURATION) {
button(
onClick = CLICKABLE,
- modifier = LayoutModifier.contentDescription(CONTENT_DESCRIPTION),
- backgroundColor = color.argb,
+ modifier =
+ LayoutModifier.contentDescription(CONTENT_DESCRIPTION)
+ .backgroundColor(color.argb),
content = { text(TEXT.layoutString) }
)
}
@@ -187,7 +190,7 @@
.setScreenHeightDp(192)
.build()
- private val CLICKABLE = clickable("id")
+ private val CLICKABLE = clickable(id = "id")
private const val CONTENT_DESCRIPTION = "This is a button"
diff --git a/wear/protolayout/protolayout-material3/src/test/java/androidx/wear/protolayout/material3/CardTest.kt b/wear/protolayout/protolayout-material3/src/test/java/androidx/wear/protolayout/material3/CardTest.kt
index 01c2a3c..d2d2a81 100644
--- a/wear/protolayout/protolayout-material3/src/test/java/androidx/wear/protolayout/material3/CardTest.kt
+++ b/wear/protolayout/protolayout-material3/src/test/java/androidx/wear/protolayout/material3/CardTest.kt
@@ -23,6 +23,8 @@
import androidx.wear.protolayout.DeviceParametersBuilders
import androidx.wear.protolayout.DimensionBuilders.expand
import androidx.wear.protolayout.modifiers.LayoutModifier
+import androidx.wear.protolayout.modifiers.background
+import androidx.wear.protolayout.modifiers.clickable
import androidx.wear.protolayout.modifiers.contentDescription
import androidx.wear.protolayout.testing.LayoutElementAssertionsProvider
import androidx.wear.protolayout.testing.hasClickable
@@ -99,7 +101,7 @@
fun containerCard_hasClickable() {
LayoutElementAssertionsProvider(DEFAULT_CONTAINER_CARD_WITH_TEXT)
.onRoot()
- .assert(hasClickable(CLICKABLE))
+ .assert(hasClickable(id = CLICKABLE.id))
.assert(hasTag(CardDefaults.METADATA_TAG))
}
@@ -222,7 +224,7 @@
card(
onClick = CLICKABLE,
modifier = LayoutModifier.contentDescription(CONTENT_DESCRIPTION),
- background = { backgroundImage(IMAGE_ID) }
+ backgroundContent = { backgroundImage(IMAGE_ID) }
) {
text(TEXT.layoutString)
}
@@ -239,8 +241,10 @@
materialScope(CONTEXT, DEVICE_CONFIGURATION) {
card(
onClick = CLICKABLE,
- modifier = LayoutModifier.contentDescription(CONTENT_DESCRIPTION),
- backgroundColor = color.argb
+ modifier =
+ LayoutModifier.contentDescription(CONTENT_DESCRIPTION)
+ .background(color.argb)
+ .clickable(id = "id")
) {
text(TEXT.layoutString)
}
@@ -458,7 +462,7 @@
.setScreenHeightDp(192)
.build()
- private val CLICKABLE = clickable("id")
+ private val CLICKABLE = clickable(id = "id")
private const val CONTENT_DESCRIPTION = "This is a card"
diff --git a/wear/protolayout/protolayout-material3/src/test/java/androidx/wear/protolayout/material3/EdgeButtonTest.kt b/wear/protolayout/protolayout-material3/src/test/java/androidx/wear/protolayout/material3/EdgeButtonTest.kt
index bea992cf..ec85a48 100644
--- a/wear/protolayout/protolayout-material3/src/test/java/androidx/wear/protolayout/material3/EdgeButtonTest.kt
+++ b/wear/protolayout/protolayout-material3/src/test/java/androidx/wear/protolayout/material3/EdgeButtonTest.kt
@@ -16,18 +16,19 @@
package androidx.wear.protolayout.material3
+import android.content.ComponentName
import android.content.Context
import androidx.test.core.app.ApplicationProvider.getApplicationContext
import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.wear.protolayout.ActionBuilders.LaunchAction
+import androidx.wear.protolayout.ActionBuilders.launchAction
import androidx.wear.protolayout.DeviceParametersBuilders
import androidx.wear.protolayout.LayoutElementBuilders.Image
-import androidx.wear.protolayout.ModifiersBuilders.Clickable
import androidx.wear.protolayout.expression.AppDataKey
import androidx.wear.protolayout.expression.DynamicBuilders.DynamicInt32
import androidx.wear.protolayout.material3.EdgeButtonDefaults.BOTTOM_MARGIN_DP
import androidx.wear.protolayout.material3.EdgeButtonDefaults.EDGE_BUTTON_HEIGHT_DP
import androidx.wear.protolayout.modifiers.LayoutModifier
+import androidx.wear.protolayout.modifiers.clickable
import androidx.wear.protolayout.modifiers.contentDescription
import androidx.wear.protolayout.testing.LayoutElementAssertionsProvider
import androidx.wear.protolayout.testing.LayoutElementMatcher
@@ -173,10 +174,7 @@
.build()
private val CLICKABLE =
- Clickable.Builder()
- .setOnClick(LaunchAction.Builder().build())
- .setId("action_id")
- .build()
+ clickable(action = launchAction(ComponentName("pkg", "cls")), id = "action_id")
private const val CONTENT_DESCRIPTION = "it is an edge button"
diff --git a/wear/protolayout/protolayout-material3/src/test/java/androidx/wear/protolayout/material3/Utils.kt b/wear/protolayout/protolayout-material3/src/test/java/androidx/wear/protolayout/material3/Utils.kt
index b671a70..7d765cc 100644
--- a/wear/protolayout/protolayout-material3/src/test/java/androidx/wear/protolayout/material3/Utils.kt
+++ b/wear/protolayout/protolayout-material3/src/test/java/androidx/wear/protolayout/material3/Utils.kt
@@ -19,8 +19,6 @@
import android.content.Context
import android.provider.Settings
import androidx.test.core.app.ApplicationProvider
-import androidx.wear.protolayout.ActionBuilders.LaunchAction
-import androidx.wear.protolayout.ModifiersBuilders.Clickable
// TODO: b/373336064 - Move this to protolayout-material3-testing
internal fun enableDynamicTheme() {
@@ -30,6 +28,3 @@
/* dynamic theming is enabled */ 1
)
}
-
-internal fun clickable(id: String) =
- Clickable.Builder().setOnClick(LaunchAction.Builder().build()).setId(id).build()
diff --git a/wear/protolayout/protolayout-testing/api/current.txt b/wear/protolayout/protolayout-testing/api/current.txt
index 1503d9d1..544da65 100644
--- a/wear/protolayout/protolayout-testing/api/current.txt
+++ b/wear/protolayout/protolayout-testing/api/current.txt
@@ -1,10 +1,14 @@
// Signature format: 4.0
package androidx.wear.protolayout.testing {
- public final class FiltersKt {
+ public final class Filters {
method public static androidx.wear.protolayout.testing.LayoutElementMatcher containsTag(String value);
method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasChild(androidx.wear.protolayout.testing.LayoutElementMatcher matcher);
- method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasClickable(androidx.wear.protolayout.ModifiersBuilders.Clickable clickable);
+ method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasClickable();
+ method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasClickable(optional androidx.wear.protolayout.ActionBuilders.Action action);
+ method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasClickable(optional androidx.wear.protolayout.ActionBuilders.Action action, optional String? id);
+ method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasClickable(optional androidx.wear.protolayout.ActionBuilders.Action action, optional String? id, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float minClickableWidth);
+ method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasClickable(optional androidx.wear.protolayout.ActionBuilders.Action action, optional String? id, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float minClickableWidth, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float minClickableHeight);
method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasColor(@ColorInt int argb);
method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasContentDescription(String value);
method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasContentDescription(kotlin.text.Regex pattern);
diff --git a/wear/protolayout/protolayout-testing/api/restricted_current.txt b/wear/protolayout/protolayout-testing/api/restricted_current.txt
index 1503d9d1..544da65 100644
--- a/wear/protolayout/protolayout-testing/api/restricted_current.txt
+++ b/wear/protolayout/protolayout-testing/api/restricted_current.txt
@@ -1,10 +1,14 @@
// Signature format: 4.0
package androidx.wear.protolayout.testing {
- public final class FiltersKt {
+ public final class Filters {
method public static androidx.wear.protolayout.testing.LayoutElementMatcher containsTag(String value);
method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasChild(androidx.wear.protolayout.testing.LayoutElementMatcher matcher);
- method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasClickable(androidx.wear.protolayout.ModifiersBuilders.Clickable clickable);
+ method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasClickable();
+ method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasClickable(optional androidx.wear.protolayout.ActionBuilders.Action action);
+ method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasClickable(optional androidx.wear.protolayout.ActionBuilders.Action action, optional String? id);
+ method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasClickable(optional androidx.wear.protolayout.ActionBuilders.Action action, optional String? id, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float minClickableWidth);
+ method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasClickable(optional androidx.wear.protolayout.ActionBuilders.Action action, optional String? id, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float minClickableWidth, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float minClickableHeight);
method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasColor(@ColorInt int argb);
method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasContentDescription(String value);
method public static androidx.wear.protolayout.testing.LayoutElementMatcher hasContentDescription(kotlin.text.Regex pattern);
diff --git a/wear/protolayout/protolayout-testing/src/main/java/androidx/wear/protolayout/testing/filters.kt b/wear/protolayout/protolayout-testing/src/main/java/androidx/wear/protolayout/testing/filters.kt
index 8a8a141..13ded25 100644
--- a/wear/protolayout/protolayout-testing/src/main/java/androidx/wear/protolayout/testing/filters.kt
+++ b/wear/protolayout/protolayout-testing/src/main/java/androidx/wear/protolayout/testing/filters.kt
@@ -13,11 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+@file:JvmName("Filters")
package androidx.wear.protolayout.testing
import androidx.annotation.ColorInt
+import androidx.annotation.Dimension
+import androidx.annotation.Dimension.Companion.DP
import androidx.annotation.RestrictTo
+import androidx.wear.protolayout.ActionBuilders.Action
import androidx.wear.protolayout.DimensionBuilders.ContainerDimension
import androidx.wear.protolayout.DimensionBuilders.DpProp
import androidx.wear.protolayout.DimensionBuilders.ExpandedDimensionProp
@@ -33,6 +37,7 @@
import androidx.wear.protolayout.LayoutElementBuilders.Spannable
import androidx.wear.protolayout.LayoutElementBuilders.Text
import androidx.wear.protolayout.ModifiersBuilders.Clickable
+import androidx.wear.protolayout.modifiers.loadAction
import androidx.wear.protolayout.proto.DimensionProto
import androidx.wear.protolayout.types.LayoutString
@@ -44,9 +49,22 @@
* Returns a [LayoutElementMatcher] which checks whether the element has the specific [Clickable]
* attached.
*/
-public fun hasClickable(clickable: Clickable): LayoutElementMatcher =
- LayoutElementMatcher("has $clickable") {
- it.modifiers?.clickable?.toProto() == clickable.toProto()
+@JvmOverloads
+public fun hasClickable(
+ action: Action = loadAction(),
+ id: String? = null,
+ @Dimension(DP) minClickableWidth: Float = Float.NaN,
+ @Dimension(DP) minClickableHeight: Float = Float.NaN
+): LayoutElementMatcher =
+ LayoutElementMatcher("has clickable($action, $id, $minClickableWidth, $minClickableHeight)") {
+ val clk = it.modifiers?.clickable ?: return@LayoutElementMatcher false
+ if (!minClickableWidth.isNaN() && clk.minimumClickableWidth.value != minClickableWidth) {
+ return@LayoutElementMatcher false
+ }
+ if (!minClickableHeight.isNaN() && clk.minimumClickableHeight.value != minClickableHeight) {
+ return@LayoutElementMatcher false
+ }
+ clk.onClick?.toActionProto() == action.toActionProto() && id?.let { clk.id == it } != false
}
/**
diff --git a/wear/protolayout/protolayout-testing/src/test/java/androidx/wear/protolayout/testing/FiltersTest.kt b/wear/protolayout/protolayout-testing/src/test/java/androidx/wear/protolayout/testing/FiltersTest.kt
index ba732a8..84b7810 100644
--- a/wear/protolayout/protolayout-testing/src/test/java/androidx/wear/protolayout/testing/FiltersTest.kt
+++ b/wear/protolayout/protolayout-testing/src/test/java/androidx/wear/protolayout/testing/FiltersTest.kt
@@ -18,7 +18,6 @@
import android.graphics.Color
import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.wear.protolayout.ActionBuilders.LoadAction
import androidx.wear.protolayout.ColorBuilders.ColorProp
import androidx.wear.protolayout.DimensionBuilders.ProportionalDimensionProp
import androidx.wear.protolayout.DimensionBuilders.dp
@@ -36,10 +35,10 @@
import androidx.wear.protolayout.ModifiersBuilders.ElementMetadata
import androidx.wear.protolayout.ModifiersBuilders.Modifiers
import androidx.wear.protolayout.ModifiersBuilders.Semantics
-import androidx.wear.protolayout.StateBuilders
import androidx.wear.protolayout.TypeBuilders.StringProp
import androidx.wear.protolayout.expression.DynamicBuilders
import androidx.wear.protolayout.layout.basicText
+import androidx.wear.protolayout.modifiers.loadAction
import androidx.wear.protolayout.types.LayoutString
import androidx.wear.protolayout.types.asLayoutConstraint
import androidx.wear.protolayout.types.layoutString
@@ -70,32 +69,25 @@
@Test
fun hasClickable_matches() {
- val clickable = Clickable.Builder().setOnClick(LoadAction.Builder().build()).build()
+ val clickable = Clickable.Builder().setOnClick(loadAction()).build()
val testElement =
Column.Builder()
.setModifiers(Modifiers.Builder().setClickable(clickable).build())
.build()
- assertThat(hasClickable(clickable).matches(testElement)).isTrue()
+ assertThat(hasClickable().matches(testElement)).isTrue()
}
@Test
fun hasClickable_doesNotMatch() {
- val clickable = Clickable.Builder().setOnClick(LoadAction.Builder().build()).build()
- val otherClickable =
- Clickable.Builder()
- .setOnClick(
- LoadAction.Builder()
- .setRequestState(StateBuilders.State.Builder().build())
- .build()
- )
- .build()
+ val clickable = Clickable.Builder().setOnClick(loadAction()).build()
+ val action = loadAction {}
val testElement =
Column.Builder()
.setModifiers(Modifiers.Builder().setClickable(clickable).build())
.build()
- assertThat(hasClickable(otherClickable).matches(testElement)).isFalse()
+ assertThat(hasClickable(action = action).matches(testElement)).isFalse()
}
@Test
diff --git a/wear/protolayout/protolayout/api/current.txt b/wear/protolayout/protolayout/api/current.txt
index 73620fa..b58a040 100644
--- a/wear/protolayout/protolayout/api/current.txt
+++ b/wear/protolayout/protolayout/api/current.txt
@@ -1492,6 +1492,30 @@
package androidx.wear.protolayout.modifiers {
+ public final class BackgroundKt {
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier background(androidx.wear.protolayout.modifiers.LayoutModifier, androidx.wear.protolayout.types.LayoutColor color, optional androidx.wear.protolayout.ModifiersBuilders.Corner? corner);
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier backgroundColor(androidx.wear.protolayout.modifiers.LayoutModifier, androidx.wear.protolayout.types.LayoutColor color);
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier clip(androidx.wear.protolayout.modifiers.LayoutModifier, androidx.wear.protolayout.ModifiersBuilders.Corner corner);
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier clip(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float cornerRadius);
+ method @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=400) public static androidx.wear.protolayout.modifiers.LayoutModifier clip(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float x, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float y);
+ method @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=400) public static androidx.wear.protolayout.modifiers.LayoutModifier clipBottomLeft(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float x, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float y);
+ method @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=400) public static androidx.wear.protolayout.modifiers.LayoutModifier clipBottomRight(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float x, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float y);
+ method @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=400) public static androidx.wear.protolayout.modifiers.LayoutModifier clipTopLeft(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float x, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float y);
+ method @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=400) public static androidx.wear.protolayout.modifiers.LayoutModifier clipTopRight(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float x, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float y);
+ }
+
+ public final class ClickableKt {
+ method public static androidx.wear.protolayout.ModifiersBuilders.Clickable clickable();
+ method public static androidx.wear.protolayout.ModifiersBuilders.Clickable clickable(optional androidx.wear.protolayout.ActionBuilders.Action action);
+ method public static androidx.wear.protolayout.ModifiersBuilders.Clickable clickable(optional androidx.wear.protolayout.ActionBuilders.Action action, optional String? id);
+ method public static androidx.wear.protolayout.ModifiersBuilders.Clickable clickable(optional androidx.wear.protolayout.ActionBuilders.Action action, optional String? id, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=300) float minClickableWidth);
+ method public static androidx.wear.protolayout.ModifiersBuilders.Clickable clickable(optional androidx.wear.protolayout.ActionBuilders.Action action, optional String? id, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=300) float minClickableWidth, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=300) float minClickableHeight);
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier clickable(androidx.wear.protolayout.modifiers.LayoutModifier, optional androidx.wear.protolayout.ActionBuilders.Action action, optional String? id);
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier clickable(androidx.wear.protolayout.modifiers.LayoutModifier, androidx.wear.protolayout.ModifiersBuilders.Clickable clickable);
+ method public static androidx.wear.protolayout.ActionBuilders.LoadAction loadAction(optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.StateBuilders.State.Builder,kotlin.Unit>? requestedState);
+ method @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=300) public static androidx.wear.protolayout.modifiers.LayoutModifier minimumTouchTargetSize(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float minWidth, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float minHeight);
+ }
+
public interface LayoutModifier {
method public <R> R foldIn(R initial, kotlin.jvm.functions.Function2<? super R,? super androidx.wear.protolayout.modifiers.LayoutModifier.Element,? extends R> operation);
method public default infix androidx.wear.protolayout.modifiers.LayoutModifier then(androidx.wear.protolayout.modifiers.LayoutModifier other);
@@ -1510,6 +1534,16 @@
method public static androidx.wear.protolayout.ModifiersBuilders.Modifiers toProtoLayoutModifiers(androidx.wear.protolayout.modifiers.LayoutModifier);
}
+ public final class PaddingKt {
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier padding(androidx.wear.protolayout.modifiers.LayoutModifier, androidx.wear.protolayout.ModifiersBuilders.Padding padding);
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier padding(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float all);
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier padding(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float horizontal, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float vertical);
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier padding(androidx.wear.protolayout.modifiers.LayoutModifier, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float start, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float top, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float end, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float bottom, optional boolean rtlAware);
+ method public static androidx.wear.protolayout.ModifiersBuilders.Padding padding(@Dimension(unit=androidx.annotation.Dimension.Companion.DP) float all);
+ method public static androidx.wear.protolayout.ModifiersBuilders.Padding padding(@Dimension(unit=androidx.annotation.Dimension.Companion.DP) float horizontal, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float vertical);
+ method public static androidx.wear.protolayout.ModifiersBuilders.Padding padding(optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float start, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float top, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float end, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float bottom, optional boolean rtlAware);
+ }
+
public final class SemanticsKt {
method public static androidx.wear.protolayout.modifiers.LayoutModifier contentDescription(androidx.wear.protolayout.modifiers.LayoutModifier, String staticValue, optional @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=200) androidx.wear.protolayout.expression.DynamicBuilders.DynamicString? dynamicValue);
method public static androidx.wear.protolayout.modifiers.LayoutModifier semanticsRole(androidx.wear.protolayout.modifiers.LayoutModifier, int semanticsRole);
diff --git a/wear/protolayout/protolayout/api/restricted_current.txt b/wear/protolayout/protolayout/api/restricted_current.txt
index 73620fa..b58a040 100644
--- a/wear/protolayout/protolayout/api/restricted_current.txt
+++ b/wear/protolayout/protolayout/api/restricted_current.txt
@@ -1492,6 +1492,30 @@
package androidx.wear.protolayout.modifiers {
+ public final class BackgroundKt {
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier background(androidx.wear.protolayout.modifiers.LayoutModifier, androidx.wear.protolayout.types.LayoutColor color, optional androidx.wear.protolayout.ModifiersBuilders.Corner? corner);
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier backgroundColor(androidx.wear.protolayout.modifiers.LayoutModifier, androidx.wear.protolayout.types.LayoutColor color);
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier clip(androidx.wear.protolayout.modifiers.LayoutModifier, androidx.wear.protolayout.ModifiersBuilders.Corner corner);
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier clip(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float cornerRadius);
+ method @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=400) public static androidx.wear.protolayout.modifiers.LayoutModifier clip(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float x, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float y);
+ method @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=400) public static androidx.wear.protolayout.modifiers.LayoutModifier clipBottomLeft(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float x, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float y);
+ method @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=400) public static androidx.wear.protolayout.modifiers.LayoutModifier clipBottomRight(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float x, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float y);
+ method @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=400) public static androidx.wear.protolayout.modifiers.LayoutModifier clipTopLeft(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float x, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float y);
+ method @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=400) public static androidx.wear.protolayout.modifiers.LayoutModifier clipTopRight(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float x, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float y);
+ }
+
+ public final class ClickableKt {
+ method public static androidx.wear.protolayout.ModifiersBuilders.Clickable clickable();
+ method public static androidx.wear.protolayout.ModifiersBuilders.Clickable clickable(optional androidx.wear.protolayout.ActionBuilders.Action action);
+ method public static androidx.wear.protolayout.ModifiersBuilders.Clickable clickable(optional androidx.wear.protolayout.ActionBuilders.Action action, optional String? id);
+ method public static androidx.wear.protolayout.ModifiersBuilders.Clickable clickable(optional androidx.wear.protolayout.ActionBuilders.Action action, optional String? id, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=300) float minClickableWidth);
+ method public static androidx.wear.protolayout.ModifiersBuilders.Clickable clickable(optional androidx.wear.protolayout.ActionBuilders.Action action, optional String? id, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=300) float minClickableWidth, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=300) float minClickableHeight);
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier clickable(androidx.wear.protolayout.modifiers.LayoutModifier, optional androidx.wear.protolayout.ActionBuilders.Action action, optional String? id);
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier clickable(androidx.wear.protolayout.modifiers.LayoutModifier, androidx.wear.protolayout.ModifiersBuilders.Clickable clickable);
+ method public static androidx.wear.protolayout.ActionBuilders.LoadAction loadAction(optional kotlin.jvm.functions.Function1<? super androidx.wear.protolayout.StateBuilders.State.Builder,kotlin.Unit>? requestedState);
+ method @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=300) public static androidx.wear.protolayout.modifiers.LayoutModifier minimumTouchTargetSize(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float minWidth, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float minHeight);
+ }
+
public interface LayoutModifier {
method public <R> R foldIn(R initial, kotlin.jvm.functions.Function2<? super R,? super androidx.wear.protolayout.modifiers.LayoutModifier.Element,? extends R> operation);
method public default infix androidx.wear.protolayout.modifiers.LayoutModifier then(androidx.wear.protolayout.modifiers.LayoutModifier other);
@@ -1510,6 +1534,16 @@
method public static androidx.wear.protolayout.ModifiersBuilders.Modifiers toProtoLayoutModifiers(androidx.wear.protolayout.modifiers.LayoutModifier);
}
+ public final class PaddingKt {
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier padding(androidx.wear.protolayout.modifiers.LayoutModifier, androidx.wear.protolayout.ModifiersBuilders.Padding padding);
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier padding(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float all);
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier padding(androidx.wear.protolayout.modifiers.LayoutModifier, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float horizontal, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float vertical);
+ method public static androidx.wear.protolayout.modifiers.LayoutModifier padding(androidx.wear.protolayout.modifiers.LayoutModifier, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float start, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float top, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float end, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float bottom, optional boolean rtlAware);
+ method public static androidx.wear.protolayout.ModifiersBuilders.Padding padding(@Dimension(unit=androidx.annotation.Dimension.Companion.DP) float all);
+ method public static androidx.wear.protolayout.ModifiersBuilders.Padding padding(@Dimension(unit=androidx.annotation.Dimension.Companion.DP) float horizontal, @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float vertical);
+ method public static androidx.wear.protolayout.ModifiersBuilders.Padding padding(optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float start, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float top, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float end, optional @Dimension(unit=androidx.annotation.Dimension.Companion.DP) float bottom, optional boolean rtlAware);
+ }
+
public final class SemanticsKt {
method public static androidx.wear.protolayout.modifiers.LayoutModifier contentDescription(androidx.wear.protolayout.modifiers.LayoutModifier, String staticValue, optional @androidx.wear.protolayout.expression.RequiresSchemaVersion(major=1, minor=200) androidx.wear.protolayout.expression.DynamicBuilders.DynamicString? dynamicValue);
method public static androidx.wear.protolayout.modifiers.LayoutModifier semanticsRole(androidx.wear.protolayout.modifiers.LayoutModifier, int semanticsRole);
diff --git a/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/Background.kt b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/Background.kt
new file mode 100644
index 0000000..045a971
--- /dev/null
+++ b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/Background.kt
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package androidx.wear.protolayout.modifiers
+
+import android.annotation.SuppressLint
+import androidx.annotation.Dimension
+import androidx.annotation.Dimension.Companion.DP
+import androidx.wear.protolayout.ModifiersBuilders.Background
+import androidx.wear.protolayout.ModifiersBuilders.Corner
+import androidx.wear.protolayout.ModifiersBuilders.CornerRadius
+import androidx.wear.protolayout.expression.RequiresSchemaVersion
+import androidx.wear.protolayout.types.LayoutColor
+import androidx.wear.protolayout.types.cornerRadius
+import androidx.wear.protolayout.types.dp
+
+/** Sets the background color to [color]. */
+fun LayoutModifier.backgroundColor(color: LayoutColor): LayoutModifier =
+ this then BaseBackgroundElement(color)
+
+/**
+ * Sets the background color and clipping.
+ *
+ * @param color for the background
+ * @param corner to use for clipping the background
+ */
+fun LayoutModifier.background(color: LayoutColor, corner: Corner? = null): LayoutModifier =
+ this then BaseBackgroundElement(color).apply { corner?.let { clip(it) } }
+
+/** Clips the element to a rounded rectangle with four corners with [cornerRadius] radius. */
+fun LayoutModifier.clip(@Dimension(DP) cornerRadius: Float): LayoutModifier =
+ this then BaseCornerElement(cornerRadius)
+
+/**
+ * Clips the element to a rounded shape with [x] as the radius on the horizontal axis and [y] as the
+ * radius on the vertical axis for the four corners.
+ */
+@RequiresSchemaVersion(major = 1, minor = 400)
+fun LayoutModifier.clip(@Dimension(DP) x: Float, @Dimension(DP) y: Float): LayoutModifier {
+ val r = cornerRadius(x, y)
+ return this then
+ BaseCornerElement(
+ topLeftRadius = r,
+ topRightRadius = r,
+ bottomLeftRadius = r,
+ bottomRightRadius = r
+ )
+}
+
+/** Clips the element to a rounded rectangle with corners specified in [corner]. */
+fun LayoutModifier.clip(corner: Corner): LayoutModifier =
+ this then
+ BaseCornerElement(
+ cornerRadiusDp = corner.radius?.value,
+ topLeftRadius = corner.topLeftRadius,
+ topRightRadius = corner.topRightRadius,
+ bottomLeftRadius = corner.bottomLeftRadius,
+ bottomRightRadius = corner.bottomRightRadius
+ )
+
+/**
+ * Clips the top left corner of the element with [x] as the radius on the horizontal axis and [y] as
+ * the radius on the vertical axis.
+ */
+@RequiresSchemaVersion(major = 1, minor = 400)
+fun LayoutModifier.clipTopLeft(
+ @Dimension(DP) x: Float,
+ @Dimension(DP) y: Float = x
+): LayoutModifier = this then BaseCornerElement(topLeftRadius = cornerRadius(x, y))
+
+/**
+ * Clips the top right corner of the element with [x] as the radius on the horizontal axis and [y]
+ * as the radius on the vertical axis.
+ */
+@RequiresSchemaVersion(major = 1, minor = 400)
+fun LayoutModifier.clipTopRight(
+ @Dimension(DP) x: Float,
+ @Dimension(DP) y: Float = x
+): LayoutModifier = this then BaseCornerElement(topRightRadius = cornerRadius(x, y))
+
+/**
+ * Clips the bottom left corner of the element with [x] as the radius on the horizontal axis and [y]
+ * as the radius on the vertical axis.
+ */
+@RequiresSchemaVersion(major = 1, minor = 400)
+fun LayoutModifier.clipBottomLeft(
+ @Dimension(DP) x: Float,
+ @Dimension(DP) y: Float = x
+): LayoutModifier = this then BaseCornerElement(bottomLeftRadius = cornerRadius(x, y))
+
+/**
+ * Clips the bottom right corner of the element with [x] as the radius on the horizontal axis and
+ * [y] as the radius on the vertical axis.
+ */
+@RequiresSchemaVersion(major = 1, minor = 400)
+fun LayoutModifier.clipBottomRight(
+ @Dimension(DP) x: Float,
+ @Dimension(DP) y: Float = x
+): LayoutModifier = this then BaseCornerElement(bottomRightRadius = cornerRadius(x, y))
+
+internal class BaseBackgroundElement(val color: LayoutColor) : LayoutModifier.Element {
+ fun foldIn(initial: Background.Builder?): Background.Builder =
+ (initial ?: Background.Builder()).setColor(color.prop)
+}
+
+internal class BaseCornerElement(
+ val cornerRadiusDp: Float? = null,
+ @RequiresSchemaVersion(major = 1, minor = 400) val topLeftRadius: CornerRadius? = null,
+ @RequiresSchemaVersion(major = 1, minor = 400) val topRightRadius: CornerRadius? = null,
+ @RequiresSchemaVersion(major = 1, minor = 400) val bottomLeftRadius: CornerRadius? = null,
+ @RequiresSchemaVersion(major = 1, minor = 400) val bottomRightRadius: CornerRadius? = null
+) : LayoutModifier.Element {
+ @SuppressLint("ProtoLayoutMinSchema")
+ fun foldIn(initial: Corner.Builder?): Corner.Builder =
+ (initial ?: Corner.Builder()).apply {
+ cornerRadiusDp?.let { setRadius(cornerRadiusDp.dp) }
+ topLeftRadius?.let { setTopLeftRadius(cornerRadius(it.x.value, it.y.value)) }
+ topRightRadius?.let { setTopRightRadius(cornerRadius(it.x.value, it.y.value)) }
+ bottomLeftRadius?.let { setBottomLeftRadius(cornerRadius(it.x.value, it.y.value)) }
+ bottomRightRadius?.let { setBottomRightRadius(cornerRadius(it.x.value, it.y.value)) }
+ }
+}
diff --git a/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/Clickable.kt b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/Clickable.kt
new file mode 100644
index 0000000..da4d74f
--- /dev/null
+++ b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/Clickable.kt
@@ -0,0 +1,132 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.wear.protolayout.modifiers
+
+import android.annotation.SuppressLint
+import androidx.annotation.Dimension
+import androidx.annotation.Dimension.Companion.DP
+import androidx.wear.protolayout.ActionBuilders.Action
+import androidx.wear.protolayout.ActionBuilders.LoadAction
+import androidx.wear.protolayout.ActionBuilders.actionFromProto
+import androidx.wear.protolayout.ModifiersBuilders.Clickable
+import androidx.wear.protolayout.StateBuilders.State
+import androidx.wear.protolayout.expression.RequiresSchemaVersion
+import androidx.wear.protolayout.types.dp
+
+/**
+ * Adds the clickable property of the modified element. It allows the modified element to have
+ * actions associated with it, which will be executed when the element is tapped.
+ *
+ * @param action is triggered whenever the element is tapped. By default adds an empty [LoadAction].
+ * @param id is the associated identifier for this clickable. This will be passed to the action
+ * handler.
+ */
+fun LayoutModifier.clickable(action: Action = loadAction(), id: String? = null): LayoutModifier =
+ this then BaseClickableElement(action = action, id = id)
+
+/**
+ * Creates a [Clickable] that allows the modified element to have actions associated with it, which
+ * will be executed when the element is tapped.
+ *
+ * @param action is triggered whenever the element is tapped. By default adds an empty [LoadAction].
+ * @param id is the associated identifier for this clickable. This will be passed to the action
+ * handler.
+ * @param minClickableWidth of the clickable area. The default value is 48dp, following the Material
+ * design accessibility guideline. Note that this value does not affect the layout, so the minimum
+ * clickable width is not guaranteed unless there is enough space around the element within its
+ * parent bounds.
+ * @param minClickableHeight of the clickable area. The default value is 48dp, following the
+ * Material design accessibility guideline. Note that this value does not affect the layout, so
+ * the minimum clickable height is not guaranteed unless there is enough space around the element
+ * within its parent bounds.
+ */
+@SuppressLint("ProtoLayoutMinSchema")
+@JvmOverloads
+fun clickable(
+ action: Action = loadAction(),
+ id: String? = null,
+ @RequiresSchemaVersion(major = 1, minor = 300)
+ @Dimension(DP)
+ minClickableWidth: Float = Float.NaN,
+ @RequiresSchemaVersion(major = 1, minor = 300)
+ @Dimension(DP)
+ minClickableHeight: Float = Float.NaN
+): Clickable =
+ Clickable.Builder()
+ .setOnClick(action)
+ .apply {
+ id?.let { setId(it) }
+ if (!minClickableWidth.isNaN()) setMinimumClickableWidth(minClickableWidth.dp)
+ if (!minClickableHeight.isNaN()) setMinimumClickableHeight(minClickableHeight.dp)
+ }
+ .build()
+
+/**
+ * Adds the clickable property of the modified element. It allows the modified element to have
+ * actions associated with it, which will be executed when the element is tapped.
+ */
+fun LayoutModifier.clickable(clickable: Clickable): LayoutModifier =
+ this then
+ BaseClickableElement(
+ action =
+ clickable.onClick?.let {
+ actionFromProto(it.toActionProto(), checkNotNull(clickable.fingerprint))
+ },
+ id = clickable.id,
+ minClickableWidth = clickable.minimumClickableWidth.value,
+ minClickableHeight = clickable.minimumClickableHeight.value
+ )
+
+/**
+ * Creates an action used to load (or reload) the layout contents.
+ *
+ * @param requestedState is the [State] associated with this action. This state will be passed to
+ * the action handler.
+ */
+fun loadAction(requestedState: (State.Builder.() -> Unit)? = null): LoadAction =
+ LoadAction.Builder()
+ .apply { requestedState?.let { this.setRequestState(State.Builder().apply(it).build()) } }
+ .build()
+
+/**
+ * Sets the minimum width and height of the clickable area. The default value is 48dp, following the
+ * Material design accessibility guideline. Note that this value does not affect the layout, so the
+ * minimum clickable width/height is not guaranteed unless there is enough space around the element
+ * within its parent bounds.
+ */
+@RequiresSchemaVersion(major = 1, minor = 300)
+fun LayoutModifier.minimumTouchTargetSize(
+ @Dimension(DP) minWidth: Float,
+ @Dimension(DP) minHeight: Float
+): LayoutModifier =
+ this then BaseClickableElement(minClickableWidth = minWidth, minClickableHeight = minHeight)
+
+internal class BaseClickableElement(
+ val action: Action? = null,
+ val id: String? = null,
+ @Dimension(DP) val minClickableWidth: Float = Float.NaN,
+ @Dimension(DP) val minClickableHeight: Float = Float.NaN,
+) : LayoutModifier.Element {
+ @SuppressLint("ProtoLayoutMinSchema")
+ fun foldIn(initial: Clickable.Builder?): Clickable.Builder =
+ (initial ?: Clickable.Builder()).apply {
+ if (!id.isNullOrEmpty()) setId(id)
+ action?.let { setOnClick(it) }
+ if (!minClickableWidth.isNaN()) setMinimumClickableWidth(minClickableWidth.dp)
+ if (!minClickableHeight.isNaN()) setMinimumClickableHeight(minClickableHeight.dp)
+ }
+}
diff --git a/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/Metadata.kt b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/Metadata.kt
new file mode 100644
index 0000000..9c0f8ca
--- /dev/null
+++ b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/Metadata.kt
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+@file:RestrictTo(Scope.LIBRARY_GROUP)
+
+package androidx.wear.protolayout.modifiers
+
+import androidx.annotation.RestrictTo
+import androidx.annotation.RestrictTo.Scope
+import androidx.wear.protolayout.ModifiersBuilders.ElementMetadata
+
+/**
+ * Applies additional metadata about an element. This is meant to be used by libraries building
+ * higher-level components. This can be used to track component metadata.
+ */
+fun LayoutModifier.tag(tagData: ByteArray): LayoutModifier =
+ this then BaseMetadataElement(tagData = tagData)
+
+/**
+ * Applies additional metadata about an element. This is meant to be used by libraries building
+ * higher-level components. This can be used to track component metadata.
+ */
+fun LayoutModifier.tag(tag: String): LayoutModifier = tag(tag.toByteArray())
+
+internal class BaseMetadataElement(val tagData: ByteArray) : LayoutModifier.Element {
+ fun foldIn(initial: ElementMetadata.Builder?): ElementMetadata.Builder =
+ (initial ?: ElementMetadata.Builder()).setTagData(tagData)
+}
diff --git a/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/ModifierAppliers.kt b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/ModifierAppliers.kt
index 194809c..0b5531a 100644
--- a/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/ModifierAppliers.kt
+++ b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/ModifierAppliers.kt
@@ -16,29 +16,43 @@
package androidx.wear.protolayout.modifiers
-import androidx.annotation.RestrictTo
import androidx.wear.protolayout.ModifiersBuilders
+import androidx.wear.protolayout.ModifiersBuilders.Background
+import androidx.wear.protolayout.ModifiersBuilders.Clickable
+import androidx.wear.protolayout.ModifiersBuilders.Corner
+import androidx.wear.protolayout.ModifiersBuilders.ElementMetadata
+import androidx.wear.protolayout.ModifiersBuilders.Padding
import androidx.wear.protolayout.ModifiersBuilders.Semantics
/** Creates a [ModifiersBuilders.Modifiers] from a [LayoutModifier]. */
-fun LayoutModifier.toProtoLayoutModifiers(): ModifiersBuilders.Modifiers =
- toProtoLayoutModifiersBuilder().build()
+fun LayoutModifier.toProtoLayoutModifiers(): ModifiersBuilders.Modifiers {
+ var semantics: Semantics.Builder? = null
+ var background: Background.Builder? = null
+ var corners: Corner.Builder? = null
+ var clickable: Clickable.Builder? = null
+ var padding: Padding.Builder? = null
+ var metadata: ElementMetadata.Builder? = null
-// TODO: b/384921198 - Remove when M3 elements can use LayoutModifier chain for everything.
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
-/** Creates a [ModifiersBuilders.Modifiers.Builder] from a [LayoutModifier]. */
-fun LayoutModifier.toProtoLayoutModifiersBuilder(): ModifiersBuilders.Modifiers.Builder {
- data class AccumulatingModifier(val semantics: Semantics.Builder? = null)
-
- val accumulatingModifier =
- this.foldIn(AccumulatingModifier()) { acc, e ->
- when (e) {
- is BaseSemanticElement -> AccumulatingModifier(semantics = e.foldIn(acc.semantics))
- else -> acc
- }
+ this.foldIn(Unit) { _, e ->
+ when (e) {
+ is BaseSemanticElement -> semantics = e.foldIn(semantics)
+ is BaseBackgroundElement -> background = e.foldIn(background)
+ is BaseCornerElement -> corners = e.foldIn(corners)
+ is BaseClickableElement -> clickable = e.foldIn(clickable)
+ is BasePaddingElement -> padding = e.foldIn(padding)
+ is BaseMetadataElement -> metadata = e.foldIn(metadata)
}
-
- return ModifiersBuilders.Modifiers.Builder().apply {
- accumulatingModifier.semantics?.let { setSemantics(it.build()) }
}
+
+ corners?.let { background = (background ?: Background.Builder()).setCorner(it.build()) }
+
+ return ModifiersBuilders.Modifiers.Builder()
+ .apply {
+ semantics?.let { setSemantics(it.build()) }
+ background?.let { setBackground(it.build()) }
+ clickable?.let { setClickable(it.build()) }
+ padding?.let { setPadding(it.build()) }
+ metadata?.let { setMetadata(it.build()) }
+ }
+ .build()
}
diff --git a/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/Padding.kt b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/Padding.kt
new file mode 100644
index 0000000..050b8ce
--- /dev/null
+++ b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/Padding.kt
@@ -0,0 +1,158 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.wear.protolayout.modifiers
+
+import androidx.annotation.Dimension
+import androidx.annotation.Dimension.Companion.DP
+import androidx.wear.protolayout.ModifiersBuilders.Padding
+import androidx.wear.protolayout.types.dp
+
+/**
+ * Applies [all] dp of additional space along each edge of the content, left, top, right and bottom.
+ */
+fun LayoutModifier.padding(@Dimension(DP) all: Float): LayoutModifier =
+ this then BasePaddingElement(start = all, top = all, end = all, bottom = all, rtlAware = false)
+
+/**
+ * Creates a [Padding] that applies [all] dp of additional space along each edge of the content,
+ * left, top, right and bottom.
+ */
+fun padding(@Dimension(DP) all: Float): Padding = Padding.Builder().setAll(all.dp).build()
+
+/**
+ * Applies [horizontal] dp of additional space along the left and right edges of the content and
+ * [vertical] dp of additional space along the top and bottom edges of the content.
+ */
+fun LayoutModifier.padding(
+ @Dimension(DP) horizontal: Float,
+ @Dimension(DP) vertical: Float
+): LayoutModifier = padding(horizontal, vertical, horizontal, vertical, rtlAware = false)
+
+/**
+ * Creates a [Padding] that applies [horizontal] dp of additional space along the left and right
+ * edges of the content and [vertical] dp of additional space along the top and bottom edges of the
+ * content.
+ */
+fun padding(@Dimension(DP) horizontal: Float, @Dimension(DP) vertical: Float): Padding =
+ padding(horizontal, vertical, horizontal, vertical)
+
+/**
+ * Applies additional space along each edge of the content in [DP]: [start], [top], [end] and
+ * [bottom]
+ *
+ * @param start The padding on the start of the content, depending on the layout direction, in [DP]
+ * and the value of [rtlAware].
+ * @param top The padding at the top, in [DP].
+ * @param end The padding on the end of the content, depending on the layout direction, in [DP] and
+ * the value of [rtlAware].
+ * @param bottom The padding at the bottom, in [DP].
+ * @param rtlAware specifies whether the [start]/[end] padding is aware of RTL support. If `true`,
+ * the values for [start]/[end] will follow the layout direction (i.e. [start] will refer to the
+ * right hand side of the container if the device is using an RTL locale). If `false`,
+ * [start]/[end] will always map to left/right, accordingly.
+ */
+fun LayoutModifier.padding(
+ @Dimension(DP) start: Float = Float.NaN,
+ @Dimension(DP) top: Float = Float.NaN,
+ @Dimension(DP) end: Float = Float.NaN,
+ @Dimension(DP) bottom: Float = Float.NaN,
+ rtlAware: Boolean = true
+): LayoutModifier =
+ this then
+ BasePaddingElement(
+ start = start,
+ top = top,
+ end = end,
+ bottom = bottom,
+ rtlAware = rtlAware
+ )
+
+/** Applies additional space along each edge of the content. */
+fun LayoutModifier.padding(padding: Padding): LayoutModifier =
+ padding(
+ start = padding.start?.value ?: Float.NaN,
+ top = padding.top?.value ?: Float.NaN,
+ end = padding.end?.value ?: Float.NaN,
+ bottom = padding.bottom?.value ?: Float.NaN
+ )
+
+/**
+ * Creates a [Padding] that applies additional space along each edge of the content in [DP]:
+ * [start], [top], [end] and [bottom]
+ *
+ * @param start The padding on the start of the content, depending on the layout direction, in [DP]
+ * and the value of [rtlAware].
+ * @param top The padding at the top, in [DP].
+ * @param end The padding on the end of the content, depending on the layout direction, in [DP] and
+ * the value of [rtlAware].
+ * @param bottom The padding at the bottom, in [DP].
+ * @param rtlAware specifies whether the [start]/[end] padding is aware of RTL support. If `true`,
+ * the values for [start]/[end] will follow the layout direction (i.e. [start] will refer to the
+ * right hand side of the container if the device is using an RTL locale). If `false`,
+ * [start]/[end] will always map to left/right, accordingly.
+ */
+@Suppress("MissingJvmstatic") // Conflicts with the other overloads
+fun padding(
+ @Dimension(DP) start: Float = Float.NaN,
+ @Dimension(DP) top: Float = Float.NaN,
+ @Dimension(DP) end: Float = Float.NaN,
+ @Dimension(DP) bottom: Float = Float.NaN,
+ rtlAware: Boolean = true
+): Padding =
+ Padding.Builder()
+ .apply {
+ if (!start.isNaN()) {
+ setStart(start.dp)
+ }
+ if (!top.isNaN()) {
+ setTop(top.dp)
+ }
+ if (!end.isNaN()) {
+ setEnd(end.dp)
+ }
+ if (!bottom.isNaN()) {
+ setBottom(bottom.dp)
+ }
+ }
+ .setRtlAware(rtlAware)
+ .build()
+
+internal class BasePaddingElement(
+ val start: Float = Float.NaN,
+ val top: Float = Float.NaN,
+ val end: Float = Float.NaN,
+ val bottom: Float = Float.NaN,
+ val rtlAware: Boolean = true
+) : LayoutModifier.Element {
+
+ fun foldIn(initial: Padding.Builder?): Padding.Builder =
+ (initial ?: Padding.Builder()).apply {
+ if (!start.isNaN()) {
+ setStart(start.dp)
+ }
+ if (!top.isNaN()) {
+ setTop(top.dp)
+ }
+ if (!end.isNaN()) {
+ setEnd(end.dp)
+ }
+ if (!bottom.isNaN()) {
+ setBottom(bottom.dp)
+ }
+ setRtlAware(rtlAware)
+ }
+}
diff --git a/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/Semantics.kt b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/Semantics.kt
index 3bf0caf..d35b071 100644
--- a/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/Semantics.kt
+++ b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/modifiers/Semantics.kt
@@ -25,30 +25,6 @@
import androidx.wear.protolayout.expression.RequiresSchemaVersion
import java.util.Objects
-internal class BaseSemanticElement(
- val contentDescription: StringProp? = null,
- @SemanticsRole val semanticsRole: Int = SEMANTICS_ROLE_NONE
-) : LayoutModifier.Element {
- @SuppressLint("ProtoLayoutMinSchema")
- fun foldIn(initial: Semantics.Builder?): Semantics.Builder =
- (initial ?: Semantics.Builder()).apply {
- contentDescription?.let { setContentDescription(it) }
- if (semanticsRole != SEMANTICS_ROLE_NONE) {
- setRole(semanticsRole)
- }
- }
-
- override fun equals(other: Any?): Boolean =
- other is BaseSemanticElement &&
- contentDescription == other.contentDescription &&
- semanticsRole == other.semanticsRole
-
- override fun hashCode(): Int = Objects.hash(contentDescription, semanticsRole)
-
- override fun toString(): String =
- "BaseSemanticElement[contentDescription=$contentDescription, semanticRole=$semanticsRole"
-}
-
/**
* Adds content description to be read by Talkback.
*
@@ -76,3 +52,27 @@
*/
fun LayoutModifier.semanticsRole(@SemanticsRole semanticsRole: Int): LayoutModifier =
this then BaseSemanticElement(semanticsRole = semanticsRole)
+
+internal class BaseSemanticElement(
+ val contentDescription: StringProp? = null,
+ @SemanticsRole val semanticsRole: Int = SEMANTICS_ROLE_NONE
+) : LayoutModifier.Element {
+ @SuppressLint("ProtoLayoutMinSchema")
+ fun foldIn(initial: Semantics.Builder?): Semantics.Builder =
+ (initial ?: Semantics.Builder()).apply {
+ contentDescription?.let { setContentDescription(it) }
+ if (semanticsRole != SEMANTICS_ROLE_NONE) {
+ setRole(semanticsRole)
+ }
+ }
+
+ override fun equals(other: Any?): Boolean =
+ other is BaseSemanticElement &&
+ contentDescription == other.contentDescription &&
+ semanticsRole == other.semanticsRole
+
+ override fun hashCode(): Int = Objects.hash(contentDescription, semanticsRole)
+
+ override fun toString(): String =
+ "BaseSemanticElement[contentDescription=$contentDescription, semanticRole=$semanticsRole"
+}
diff --git a/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/types/Helpers.kt b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/types/Helpers.kt
index 2f4295e..ef30cd7 100644
--- a/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/types/Helpers.kt
+++ b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/types/Helpers.kt
@@ -16,9 +16,12 @@
package androidx.wear.protolayout.types
+import androidx.wear.protolayout.DimensionBuilders.DpProp
import androidx.wear.protolayout.DimensionBuilders.EmProp
import androidx.wear.protolayout.DimensionBuilders.SpProp
+import androidx.wear.protolayout.ModifiersBuilders
import androidx.wear.protolayout.TypeBuilders.BoolProp
+import androidx.wear.protolayout.expression.RequiresSchemaVersion
internal val Float.sp: SpProp
get() = SpProp.Builder().setValue(this).build()
@@ -28,3 +31,10 @@
internal val Boolean.prop: BoolProp
get() = BoolProp.Builder(this).build()
+
+internal val Float.dp: DpProp
+ get() = DpProp.Builder(this).build()
+
+@RequiresSchemaVersion(major = 1, minor = 400)
+internal fun cornerRadius(x: Float, y: Float) =
+ ModifiersBuilders.CornerRadius.Builder(x.dp, y.dp).build()
diff --git a/wear/protolayout/protolayout/src/test/java/androidx/wear/protolayout/modifiers/ModifiersTest.kt b/wear/protolayout/protolayout/src/test/java/androidx/wear/protolayout/modifiers/ModifiersTest.kt
index f91621c..fdc7f7f 100644
--- a/wear/protolayout/protolayout/src/test/java/androidx/wear/protolayout/modifiers/ModifiersTest.kt
+++ b/wear/protolayout/protolayout/src/test/java/androidx/wear/protolayout/modifiers/ModifiersTest.kt
@@ -16,10 +16,16 @@
package androidx.wear.protolayout.modifiers
+import android.graphics.Color
import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.wear.protolayout.ActionBuilders.LoadAction
import androidx.wear.protolayout.ModifiersBuilders.SEMANTICS_ROLE_BUTTON
import androidx.wear.protolayout.ModifiersBuilders.SEMANTICS_ROLE_NONE
-import androidx.wear.protolayout.expression.DynamicBuilders
+import androidx.wear.protolayout.expression.AppDataKey
+import androidx.wear.protolayout.expression.DynamicBuilders.DynamicInt32
+import androidx.wear.protolayout.expression.DynamicBuilders.DynamicString
+import androidx.wear.protolayout.expression.DynamicDataBuilders.DynamicDataValue
+import androidx.wear.protolayout.types.LayoutColor
import com.google.common.truth.Truth.assertThat
import org.junit.Test
import org.junit.runner.RunWith
@@ -68,8 +74,174 @@
assertThat(modifiers.semantics?.role).isEqualTo(SEMANTICS_ROLE_BUTTON)
}
+ @Test
+ fun background_clip_toModifier() {
+ val modifiers =
+ LayoutModifier.background(COLOR)
+ .clip(CORNER_RADIUS)
+ .clip(CORNER_RADIUS_X, CORNER_RADIUS_Y)
+ .clipTopRight(0f, 0f)
+ .toProtoLayoutModifiers()
+
+ assertThat(modifiers.background?.color?.argb).isEqualTo(COLOR.prop.argb)
+ assertThat(modifiers.background?.corner?.radius?.value).isEqualTo(CORNER_RADIUS)
+ assertThat(modifiers.background?.corner?.topLeftRadius?.x?.value).isEqualTo(CORNER_RADIUS_X)
+ assertThat(modifiers.background?.corner?.topLeftRadius?.y?.value).isEqualTo(CORNER_RADIUS_Y)
+ assertThat(modifiers.background?.corner?.topRightRadius?.x?.value).isEqualTo(0f)
+ assertThat(modifiers.background?.corner?.topRightRadius?.y?.value).isEqualTo(0f)
+ assertThat(modifiers.background?.corner?.bottomLeftRadius?.x?.value)
+ .isEqualTo(CORNER_RADIUS_X)
+ assertThat(modifiers.background?.corner?.bottomLeftRadius?.y?.value)
+ .isEqualTo(CORNER_RADIUS_Y)
+ assertThat(modifiers.background?.corner?.bottomRightRadius?.x?.value)
+ .isEqualTo(CORNER_RADIUS_X)
+ assertThat(modifiers.background?.corner?.bottomRightRadius?.y?.value)
+ .isEqualTo(CORNER_RADIUS_Y)
+ }
+
+ @Test
+ fun perCornerClip_clip_overwritesAllCorners() {
+ val modifiers =
+ LayoutModifier.clipTopLeft(0f, 1f)
+ .clipTopRight(2f, 3f)
+ .clipBottomLeft(4f, 5f)
+ .clipBottomRight(6f, 7f)
+ .clip(CORNER_RADIUS_X, CORNER_RADIUS_Y)
+ .toProtoLayoutModifiers()
+
+ assertThat(modifiers.background?.color).isNull()
+ assertThat(modifiers.background?.corner?.radius?.value).isEqualTo(null)
+ assertThat(modifiers.background?.corner?.topLeftRadius?.x?.value).isEqualTo(CORNER_RADIUS_X)
+ assertThat(modifiers.background?.corner?.topLeftRadius?.y?.value).isEqualTo(CORNER_RADIUS_Y)
+ assertThat(modifiers.background?.corner?.topRightRadius?.x?.value)
+ .isEqualTo(CORNER_RADIUS_X)
+ assertThat(modifiers.background?.corner?.topRightRadius?.y?.value)
+ .isEqualTo(CORNER_RADIUS_Y)
+ assertThat(modifiers.background?.corner?.bottomLeftRadius?.x?.value)
+ .isEqualTo(CORNER_RADIUS_X)
+ assertThat(modifiers.background?.corner?.bottomLeftRadius?.y?.value)
+ .isEqualTo(CORNER_RADIUS_Y)
+ assertThat(modifiers.background?.corner?.bottomRightRadius?.x?.value)
+ .isEqualTo(CORNER_RADIUS_X)
+ assertThat(modifiers.background?.corner?.bottomRightRadius?.y?.value)
+ .isEqualTo(CORNER_RADIUS_Y)
+ }
+
+ @Test
+ fun clickable_toModifier() {
+ val id = "ID"
+ val minTouchWidth = 51f
+ val minTouchHeight = 52f
+ val statePair1 = Pair(AppDataKey<DynamicInt32>("Int"), DynamicDataValue.fromInt(42))
+ val statePair2 =
+ Pair(AppDataKey<DynamicString>("String"), DynamicDataValue.fromString("42"))
+
+ val modifiers =
+ LayoutModifier.clickable(
+ loadAction {
+ addKeyToValueMapping(statePair1.first, statePair1.second)
+ addKeyToValueMapping(statePair2.first, statePair2.second)
+ },
+ id
+ )
+ .minimumTouchTargetSize(minTouchWidth, minTouchHeight)
+ .toProtoLayoutModifiers()
+
+ assertThat(modifiers.clickable?.id).isEqualTo(id)
+ assertThat(modifiers.clickable?.minimumClickableWidth?.value).isEqualTo(minTouchWidth)
+ assertThat(modifiers.clickable?.minimumClickableHeight?.value).isEqualTo(minTouchHeight)
+ assertThat(modifiers.clickable?.onClick).isInstanceOf(LoadAction::class.java)
+ val action = modifiers.clickable?.onClick as LoadAction
+ assertThat(action.requestState?.keyToValueMapping)
+ .containsExactlyEntriesIn(mapOf(statePair1, statePair2))
+ }
+
+ @Test
+ fun clickable_fromProto_toModifier() {
+ val id = "ID"
+ val minTouchWidth = 51f
+ val minTouchHeight = 52f
+ val statePair1 = Pair(AppDataKey<DynamicInt32>("Int"), DynamicDataValue.fromInt(42))
+ val statePair2 =
+ Pair(AppDataKey<DynamicString>("String"), DynamicDataValue.fromString("42"))
+
+ val modifiers =
+ LayoutModifier.clickable(
+ clickable(
+ loadAction {
+ addKeyToValueMapping(statePair1.first, statePair1.second)
+ addKeyToValueMapping(statePair2.first, statePair2.second)
+ },
+ id = id,
+ minClickableWidth = minTouchWidth,
+ minClickableHeight = minTouchHeight
+ )
+ )
+ .toProtoLayoutModifiers()
+
+ assertThat(modifiers.clickable?.id).isEqualTo(id)
+ assertThat(modifiers.clickable?.minimumClickableWidth?.value).isEqualTo(minTouchWidth)
+ assertThat(modifiers.clickable?.minimumClickableHeight?.value).isEqualTo(minTouchHeight)
+ assertThat(modifiers.clickable?.onClick).isInstanceOf(LoadAction::class.java)
+ val action = modifiers.clickable?.onClick as LoadAction
+ assertThat(action.requestState?.keyToValueMapping)
+ .containsExactlyEntriesIn(mapOf(statePair1, statePair2))
+ }
+
+ @Test
+ fun padding_toModifier() {
+ val modifiers =
+ LayoutModifier.padding(PADDING_ALL)
+ .padding(bottom = BOTTOM_PADDING, rtlAware = false)
+ .toProtoLayoutModifiers()
+
+ assertThat(modifiers.padding?.start?.value).isEqualTo(PADDING_ALL)
+ assertThat(modifiers.padding?.top?.value).isEqualTo(PADDING_ALL)
+ assertThat(modifiers.padding?.end?.value).isEqualTo(PADDING_ALL)
+ assertThat(modifiers.padding?.bottom?.value).isEqualTo(BOTTOM_PADDING)
+ assertThat(modifiers.padding?.rtlAware?.value).isFalse()
+ }
+
+ @Test
+ fun perSidePadding_padding_overwritesAllSides() {
+ val modifiers =
+ LayoutModifier.padding(
+ start = START_PADDING,
+ top = TOP_PADDING,
+ end = END_PADDING,
+ bottom = BOTTOM_PADDING,
+ rtlAware = true
+ )
+ .padding(PADDING_ALL)
+ .toProtoLayoutModifiers()
+
+ assertThat(modifiers.padding?.start?.value).isEqualTo(PADDING_ALL)
+ assertThat(modifiers.padding?.top?.value).isEqualTo(PADDING_ALL)
+ assertThat(modifiers.padding?.end?.value).isEqualTo(PADDING_ALL)
+ assertThat(modifiers.padding?.bottom?.value).isEqualTo(PADDING_ALL)
+ assertThat(modifiers.padding?.rtlAware?.value).isFalse()
+ }
+
+ @Test
+ fun metadata_toModifier() {
+ val modifiers = LayoutModifier.tag(METADATA).toProtoLayoutModifiers()
+
+ assertThat(modifiers.metadata?.tagData).isEqualTo(METADATA_BYTE_ARRAY)
+ }
+
companion object {
const val STATIC_CONTENT_DESCRIPTION = "content desc"
- val DYNAMIC_CONTENT_DESCRIPTION = DynamicBuilders.DynamicString.constant("dynamic content")
+ val DYNAMIC_CONTENT_DESCRIPTION = DynamicString.constant("dynamic content")
+ val COLOR = LayoutColor(Color.RED)
+ const val CORNER_RADIUS_X = 1.2f
+ const val CORNER_RADIUS_Y = 3.4f
+ const val CORNER_RADIUS = 5.6f
+ const val START_PADDING = 1f
+ const val TOP_PADDING = 2f
+ const val END_PADDING = 3f
+ const val BOTTOM_PADDING = 4f
+ const val PADDING_ALL = 5f
+ const val METADATA = "metadata"
+ val METADATA_BYTE_ARRAY = METADATA.toByteArray()
}
}
diff --git a/wear/tiles/tiles-samples/src/main/java/androidx/wear/tiles/samples/tile/PlaygroundTileService.kt b/wear/tiles/tiles-samples/src/main/java/androidx/wear/tiles/samples/tile/PlaygroundTileService.kt
index 1b5e62c..f7704fa 100644
--- a/wear/tiles/tiles-samples/src/main/java/androidx/wear/tiles/samples/tile/PlaygroundTileService.kt
+++ b/wear/tiles/tiles-samples/src/main/java/androidx/wear/tiles/samples/tile/PlaygroundTileService.kt
@@ -48,6 +48,7 @@
import androidx.wear.protolayout.material3.textDataCard
import androidx.wear.protolayout.material3.textEdgeButton
import androidx.wear.protolayout.modifiers.LayoutModifier
+import androidx.wear.protolayout.modifiers.clickable
import androidx.wear.protolayout.modifiers.contentDescription
import androidx.wear.protolayout.types.layoutString
import androidx.wear.tiles.RequestBuilders
@@ -122,7 +123,7 @@
mainSlot = { oneSlotButtons() },
bottomSlot = {
textEdgeButton(
- onClick = EMPTY_LOAD_CLICKABLE,
+ onClick = clickable(),
modifier = LayoutModifier.contentDescription("EdgeButton"),
) {
text("Edge".layoutString)
@@ -134,7 +135,7 @@
private fun MaterialScope.oneSlotButtons() = buttonGroup {
buttonGroupItem {
iconButton(
- onClick = EMPTY_LOAD_CLICKABLE,
+ onClick = clickable(),
modifier = LayoutModifier.contentDescription("Icon button"),
width = expand(),
iconContent = { icon(ICON_ID) }
@@ -142,7 +143,7 @@
}
buttonGroupItem {
iconButton(
- onClick = EMPTY_LOAD_CLICKABLE,
+ onClick = clickable(),
modifier = LayoutModifier.contentDescription("Icon button"),
width = expand(),
shape = shapes.large,
@@ -151,7 +152,7 @@
}
buttonGroupItem {
textButton(
- onClick = EMPTY_LOAD_CLICKABLE,
+ onClick = clickable(),
modifier = LayoutModifier.contentDescription("Text button"),
width = expand(),
style = smallTextButtonStyle(),
@@ -163,7 +164,7 @@
private fun MaterialScope.appCardSample() =
appCard(
- onClick = EMPTY_LOAD_CLICKABLE,
+ onClick = clickable(),
modifier = LayoutModifier.contentDescription("Sample Card"),
colors =
CardColors(
@@ -199,7 +200,7 @@
private fun MaterialScope.graphicDataCardSample() =
graphicDataCard(
- onClick = EMPTY_LOAD_CLICKABLE,
+ onClick = clickable(),
modifier = LayoutModifier.contentDescription("Graphic Data Card"),
height = expand(),
horizontalAlignment = LayoutElementBuilders.HORIZONTAL_ALIGN_END,
@@ -234,7 +235,7 @@
private fun MaterialScope.dataCards() = buttonGroup {
buttonGroupItem {
textDataCard(
- onClick = EMPTY_LOAD_CLICKABLE,
+ onClick = clickable(),
modifier = LayoutModifier.contentDescription("Data Card with icon"),
width = weight(1f),
height = expand(),
@@ -247,7 +248,7 @@
}
buttonGroupItem {
iconDataCard(
- onClick = EMPTY_LOAD_CLICKABLE,
+ onClick = clickable(),
modifier =
LayoutModifier.contentDescription(
"Compact Data Card without icon or secondary label"