Merge "[Jetpack] Add a public filter for config id." into androidx-main
diff --git a/activity/activity-compose-lint/build.gradle b/activity/activity-compose-lint/build.gradle
index 327ee7a..7ace495 100644
--- a/activity/activity-compose-lint/build.gradle
+++ b/activity/activity-compose-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
diff --git a/activity/activity-compose/build.gradle b/activity/activity-compose/build.gradle
index 314f1a6..257bb1c 100644
--- a/activity/activity-compose/build.gradle
+++ b/activity/activity-compose/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/activity/activity-compose/integration-tests/activity-demos/build.gradle b/activity/activity-compose/integration-tests/activity-demos/build.gradle
index 5b17987..bfcfdbe 100644
--- a/activity/activity-compose/integration-tests/activity-demos/build.gradle
+++ b/activity/activity-compose/integration-tests/activity-demos/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/activity/activity-compose/samples/build.gradle b/activity/activity-compose/samples/build.gradle
index 27bc33d..9f5fa5b 100644
--- a/activity/activity-compose/samples/build.gradle
+++ b/activity/activity-compose/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/activity/activity-ktx/build.gradle b/activity/activity-ktx/build.gradle
index 0e25e28..730d9b9 100644
--- a/activity/activity-ktx/build.gradle
+++ b/activity/activity-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/activity/activity-lint/build.gradle b/activity/activity-lint/build.gradle
index 554da78..857884f 100644
--- a/activity/activity-lint/build.gradle
+++ b/activity/activity-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/activity/activity/build.gradle b/activity/activity/build.gradle
index 3e23e77..0dd4fe8 100644
--- a/activity/activity/build.gradle
+++ b/activity/activity/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/activity/integration-tests/baselineprofile/build.gradle b/activity/integration-tests/baselineprofile/build.gradle
index 51e930b..b340454 100644
--- a/activity/integration-tests/baselineprofile/build.gradle
+++ b/activity/integration-tests/baselineprofile/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import com.android.build.api.dsl.ManagedVirtualDevice
plugins {
diff --git a/activity/integration-tests/testapp/build.gradle b/activity/integration-tests/testapp/build.gradle
index 04af69d..c2e0a80 100644
--- a/activity/integration-tests/testapp/build.gradle
+++ b/activity/integration-tests/testapp/build.gradle
@@ -33,6 +33,10 @@
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
implementation("androidx.appcompat:appcompat:1.6.0")
implementation("androidx.core:core-splashscreen:1.0.0")
+
+ // Manually align dependencies across debugRuntime and debugAndroidTestRuntime.
+ androidTestImplementation(project(":annotation:annotation-experimental"))
+
androidTestImplementation(libs.kotlinStdlib)
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
diff --git a/annotation/annotation-experimental-lint/build.gradle b/annotation/annotation-experimental-lint/build.gradle
index 23fa122..4deb784 100644
--- a/annotation/annotation-experimental-lint/build.gradle
+++ b/annotation/annotation-experimental-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/annotation/annotation-experimental-lint/integration-tests/build.gradle b/annotation/annotation-experimental-lint/integration-tests/build.gradle
index d81eeec..a617bfa 100644
--- a/annotation/annotation-experimental-lint/integration-tests/build.gradle
+++ b/annotation/annotation-experimental-lint/integration-tests/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/annotation/annotation-experimental/build.gradle b/annotation/annotation-experimental/build.gradle
index a196d54..d703028 100644
--- a/annotation/annotation-experimental/build.gradle
+++ b/annotation/annotation-experimental/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * 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.Publish
diff --git a/annotation/annotation/build.gradle b/annotation/annotation/build.gradle
index ef71109..4ac4d65 100644
--- a/annotation/annotation/build.gradle
+++ b/annotation/annotation/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import androidx.build.KotlinTarget
import androidx.build.LibraryType
diff --git a/appactions/builtintypes/builtintypes/api/current.txt b/appactions/builtintypes/builtintypes/api/current.txt
index c47c313..ca92db8 100644
--- a/appactions/builtintypes/builtintypes/api/current.txt
+++ b/appactions/builtintypes/builtintypes/api/current.txt
@@ -3,19 +3,19 @@
@androidx.appsearch.annotation.Document(name="bitprop:ByDay") public final class ByDay {
ctor public ByDay(androidx.appactions.builtintypes.types.DayOfWeek dayOfWeek);
- method @androidx.appsearch.annotation.Document.StringProperty(serializer=DayOfWeekAsCanonicalUrlSerializer::class) public androidx.appactions.builtintypes.types.DayOfWeek? getAsDayOfWeek();
+ method @androidx.appsearch.annotation.Document.StringProperty(serializer=DayOfWeekAsCanonicalUrlSerializer::class) public androidx.appactions.builtintypes.types.DayOfWeek? asDayOfWeek();
property @androidx.appsearch.annotation.Document.StringProperty(serializer=DayOfWeekAsCanonicalUrlSerializer::class) public final androidx.appactions.builtintypes.types.DayOfWeek? asDayOfWeek;
}
@androidx.appsearch.annotation.Document(name="bitprop:EndDate") public final class EndDate {
ctor public EndDate(java.time.LocalDate date);
- method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public java.time.LocalDate? getAsDate();
+ method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public java.time.LocalDate? asDate();
property @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public final java.time.LocalDate? asDate;
}
@androidx.appsearch.annotation.Document(name="bitprop:EndTime") public final class EndTime {
ctor public EndTime(java.time.LocalTime time);
- method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalTimeAsNanoOfDaySerializer::class) public java.time.LocalTime? getAsTime();
+ method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalTimeAsNanoOfDaySerializer::class) public java.time.LocalTime? asTime();
property @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalTimeAsNanoOfDaySerializer::class) public final java.time.LocalTime? asTime;
}
@@ -23,9 +23,9 @@
ctor public ExceptDate(java.time.Instant instant);
ctor public ExceptDate(java.time.LocalDate date);
ctor public ExceptDate(java.time.LocalDateTime localDateTime);
- method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public java.time.LocalDate? getAsDate();
- method @androidx.appsearch.annotation.Document.LongProperty(serializer=InstantAsEpochMilliSerializer::class) public java.time.Instant? getAsInstant();
- method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateTimeAsUtcEpochSecondSerializer::class) public java.time.LocalDateTime? getAsLocalDateTime();
+ method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public java.time.LocalDate? asDate();
+ method @androidx.appsearch.annotation.Document.LongProperty(serializer=InstantAsEpochMilliSerializer::class) public java.time.Instant? asInstant();
+ method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateTimeAsUtcEpochSecondSerializer::class) public java.time.LocalDateTime? asLocalDateTime();
method public <R> R mapWhen(androidx.appactions.builtintypes.properties.ExceptDate.Mapper<R> mapper);
property @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public final java.time.LocalDate? asDate;
property @androidx.appsearch.annotation.Document.LongProperty(serializer=InstantAsEpochMilliSerializer::class) public final java.time.Instant? asInstant;
@@ -41,25 +41,25 @@
@androidx.appsearch.annotation.Document(name="bitprop:Name") public final class Name {
ctor public Name(String text);
- method @androidx.appsearch.annotation.Document.StringProperty public String? getAsText();
+ method @androidx.appsearch.annotation.Document.StringProperty public String? asText();
property @androidx.appsearch.annotation.Document.StringProperty public final String? asText;
}
@androidx.appsearch.annotation.Document(name="bitprop:RepeatFrequency") public final class RepeatFrequency {
ctor public RepeatFrequency(java.time.Duration duration);
- method @androidx.appsearch.annotation.Document.LongProperty(serializer=DurationAsNanosSerializer::class) public java.time.Duration? getAsDuration();
+ method @androidx.appsearch.annotation.Document.LongProperty(serializer=DurationAsNanosSerializer::class) public java.time.Duration? asDuration();
property @androidx.appsearch.annotation.Document.LongProperty(serializer=DurationAsNanosSerializer::class) public final java.time.Duration? asDuration;
}
@androidx.appsearch.annotation.Document(name="bitprop:StartDate") public final class StartDate {
ctor public StartDate(java.time.LocalDate date);
- method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public java.time.LocalDate? getAsDate();
+ method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public java.time.LocalDate? asDate();
property @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public final java.time.LocalDate? asDate;
}
@androidx.appsearch.annotation.Document(name="bitprop:StartTime") public final class StartTime {
ctor public StartTime(java.time.LocalTime time);
- method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalTimeAsNanoOfDaySerializer::class) public java.time.LocalTime? getAsTime();
+ method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalTimeAsNanoOfDaySerializer::class) public java.time.LocalTime? asTime();
property @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalTimeAsNanoOfDaySerializer::class) public final java.time.LocalTime? asTime;
}
diff --git a/appactions/builtintypes/builtintypes/api/restricted_current.txt b/appactions/builtintypes/builtintypes/api/restricted_current.txt
index c47c313..ca92db8 100644
--- a/appactions/builtintypes/builtintypes/api/restricted_current.txt
+++ b/appactions/builtintypes/builtintypes/api/restricted_current.txt
@@ -3,19 +3,19 @@
@androidx.appsearch.annotation.Document(name="bitprop:ByDay") public final class ByDay {
ctor public ByDay(androidx.appactions.builtintypes.types.DayOfWeek dayOfWeek);
- method @androidx.appsearch.annotation.Document.StringProperty(serializer=DayOfWeekAsCanonicalUrlSerializer::class) public androidx.appactions.builtintypes.types.DayOfWeek? getAsDayOfWeek();
+ method @androidx.appsearch.annotation.Document.StringProperty(serializer=DayOfWeekAsCanonicalUrlSerializer::class) public androidx.appactions.builtintypes.types.DayOfWeek? asDayOfWeek();
property @androidx.appsearch.annotation.Document.StringProperty(serializer=DayOfWeekAsCanonicalUrlSerializer::class) public final androidx.appactions.builtintypes.types.DayOfWeek? asDayOfWeek;
}
@androidx.appsearch.annotation.Document(name="bitprop:EndDate") public final class EndDate {
ctor public EndDate(java.time.LocalDate date);
- method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public java.time.LocalDate? getAsDate();
+ method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public java.time.LocalDate? asDate();
property @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public final java.time.LocalDate? asDate;
}
@androidx.appsearch.annotation.Document(name="bitprop:EndTime") public final class EndTime {
ctor public EndTime(java.time.LocalTime time);
- method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalTimeAsNanoOfDaySerializer::class) public java.time.LocalTime? getAsTime();
+ method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalTimeAsNanoOfDaySerializer::class) public java.time.LocalTime? asTime();
property @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalTimeAsNanoOfDaySerializer::class) public final java.time.LocalTime? asTime;
}
@@ -23,9 +23,9 @@
ctor public ExceptDate(java.time.Instant instant);
ctor public ExceptDate(java.time.LocalDate date);
ctor public ExceptDate(java.time.LocalDateTime localDateTime);
- method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public java.time.LocalDate? getAsDate();
- method @androidx.appsearch.annotation.Document.LongProperty(serializer=InstantAsEpochMilliSerializer::class) public java.time.Instant? getAsInstant();
- method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateTimeAsUtcEpochSecondSerializer::class) public java.time.LocalDateTime? getAsLocalDateTime();
+ method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public java.time.LocalDate? asDate();
+ method @androidx.appsearch.annotation.Document.LongProperty(serializer=InstantAsEpochMilliSerializer::class) public java.time.Instant? asInstant();
+ method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateTimeAsUtcEpochSecondSerializer::class) public java.time.LocalDateTime? asLocalDateTime();
method public <R> R mapWhen(androidx.appactions.builtintypes.properties.ExceptDate.Mapper<R> mapper);
property @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public final java.time.LocalDate? asDate;
property @androidx.appsearch.annotation.Document.LongProperty(serializer=InstantAsEpochMilliSerializer::class) public final java.time.Instant? asInstant;
@@ -41,25 +41,25 @@
@androidx.appsearch.annotation.Document(name="bitprop:Name") public final class Name {
ctor public Name(String text);
- method @androidx.appsearch.annotation.Document.StringProperty public String? getAsText();
+ method @androidx.appsearch.annotation.Document.StringProperty public String? asText();
property @androidx.appsearch.annotation.Document.StringProperty public final String? asText;
}
@androidx.appsearch.annotation.Document(name="bitprop:RepeatFrequency") public final class RepeatFrequency {
ctor public RepeatFrequency(java.time.Duration duration);
- method @androidx.appsearch.annotation.Document.LongProperty(serializer=DurationAsNanosSerializer::class) public java.time.Duration? getAsDuration();
+ method @androidx.appsearch.annotation.Document.LongProperty(serializer=DurationAsNanosSerializer::class) public java.time.Duration? asDuration();
property @androidx.appsearch.annotation.Document.LongProperty(serializer=DurationAsNanosSerializer::class) public final java.time.Duration? asDuration;
}
@androidx.appsearch.annotation.Document(name="bitprop:StartDate") public final class StartDate {
ctor public StartDate(java.time.LocalDate date);
- method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public java.time.LocalDate? getAsDate();
+ method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public java.time.LocalDate? asDate();
property @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalDateAsEpochDaySerializer::class) public final java.time.LocalDate? asDate;
}
@androidx.appsearch.annotation.Document(name="bitprop:StartTime") public final class StartTime {
ctor public StartTime(java.time.LocalTime time);
- method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalTimeAsNanoOfDaySerializer::class) public java.time.LocalTime? getAsTime();
+ method @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalTimeAsNanoOfDaySerializer::class) public java.time.LocalTime? asTime();
property @androidx.appsearch.annotation.Document.LongProperty(serializer=LocalTimeAsNanoOfDaySerializer::class) public final java.time.LocalTime? asTime;
}
diff --git a/appactions/builtintypes/builtintypes/build.gradle b/appactions/builtintypes/builtintypes/build.gradle
index 2811542..22a77b0 100644
--- a/appactions/builtintypes/builtintypes/build.gradle
+++ b/appactions/builtintypes/builtintypes/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@@ -60,4 +67,5 @@
type = LibraryType.PUBLISHED_LIBRARY
inceptionYear = "2023"
description = "This library exposes a core set of data types based on schema.org definitions."
+ metalavaK2UastEnabled = true
}
diff --git a/appactions/builtintypes/builtintypes/samples/build.gradle b/appactions/builtintypes/builtintypes/samples/build.gradle
index 151b129..561d5cb 100644
--- a/appactions/builtintypes/builtintypes/samples/build.gradle
+++ b/appactions/builtintypes/builtintypes/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/appactions/interaction/interaction-capabilities-communication/build.gradle b/appactions/interaction/interaction-capabilities-communication/build.gradle
index 338a653..7822365 100644
--- a/appactions/interaction/interaction-capabilities-communication/build.gradle
+++ b/appactions/interaction/interaction-capabilities-communication/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/appactions/interaction/interaction-capabilities-fitness/build.gradle b/appactions/interaction/interaction-capabilities-fitness/build.gradle
index faf8c7d..3017f07 100644
--- a/appactions/interaction/interaction-capabilities-fitness/build.gradle
+++ b/appactions/interaction/interaction-capabilities-fitness/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/appactions/interaction/interaction-capabilities-productivity/build.gradle b/appactions/interaction/interaction-capabilities-productivity/build.gradle
index b1b2483..3f83e65 100644
--- a/appactions/interaction/interaction-capabilities-productivity/build.gradle
+++ b/appactions/interaction/interaction-capabilities-productivity/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/appactions/interaction/interaction-capabilities-safety/build.gradle b/appactions/interaction/interaction-capabilities-safety/build.gradle
index 4e96499..a8a0230 100644
--- a/appactions/interaction/interaction-capabilities-safety/build.gradle
+++ b/appactions/interaction/interaction-capabilities-safety/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/appactions/interaction/interaction-capabilities-testing/build.gradle b/appactions/interaction/interaction-capabilities-testing/build.gradle
index a78f672..6185156 100644
--- a/appactions/interaction/interaction-capabilities-testing/build.gradle
+++ b/appactions/interaction/interaction-capabilities-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/appactions/interaction/interaction-service-proto/build.gradle b/appactions/interaction/interaction-service-proto/build.gradle
index 7662e1a..ca8bcc1 100644
--- a/appactions/interaction/interaction-service-proto/build.gradle
+++ b/appactions/interaction/interaction-service-proto/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/appactions/interaction/interaction-service-testing/build.gradle b/appactions/interaction/interaction-service-testing/build.gradle
index dfd09e1..e024c97 100644
--- a/appactions/interaction/interaction-service-testing/build.gradle
+++ b/appactions/interaction/interaction-service-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/appactions/interaction/interaction-service-wear/build.gradle b/appactions/interaction/interaction-service-wear/build.gradle
index 7ac6afc..4865eda 100644
--- a/appactions/interaction/interaction-service-wear/build.gradle
+++ b/appactions/interaction/interaction-service-wear/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/appactions/interaction/interaction-service/build.gradle b/appactions/interaction/interaction-service/build.gradle
index dc3aa0a..6659821 100644
--- a/appactions/interaction/interaction-service/build.gradle
+++ b/appactions/interaction/interaction-service/build.gradle
@@ -51,7 +51,7 @@
implementation(libs.jsr250)
// Force upgrade since 1.2.0 is not compatible with latest lint.
- implementation("androidx.annotation:annotation-experimental:1.3.0")
+ implementation(project(":annotation:annotation-experimental"))
testImplementation(project(":appactions:interaction:interaction-capabilities-core"))
testImplementation(project(":appactions:interaction:interaction-capabilities-testing"))
diff --git a/appcompat/appcompat-lint/build.gradle b/appcompat/appcompat-lint/build.gradle
index 57b7f23..642f89a 100644
--- a/appcompat/appcompat-lint/build.gradle
+++ b/appcompat/appcompat-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/appcompat/appcompat-lint/integration-tests/build.gradle b/appcompat/appcompat-lint/integration-tests/build.gradle
index 13246f8..cd7691f 100644
--- a/appcompat/appcompat-lint/integration-tests/build.gradle
+++ b/appcompat/appcompat-lint/integration-tests/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
plugins {
id("AndroidXPlugin")
id("com.android.application")
diff --git a/appcompat/appcompat-resources/build.gradle b/appcompat/appcompat-resources/build.gradle
index 03df72e..04d4729 100644
--- a/appcompat/appcompat-resources/build.gradle
+++ b/appcompat/appcompat-resources/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/appcompat/appcompat/build.gradle b/appcompat/appcompat/build.gradle
index e4378aad..e423942 100644
--- a/appcompat/appcompat/build.gradle
+++ b/appcompat/appcompat/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/appcompat/integration-tests/receive-content-testapp/build.gradle b/appcompat/integration-tests/receive-content-testapp/build.gradle
index 8d74ce9..cdacff2 100644
--- a/appcompat/integration-tests/receive-content-testapp/build.gradle
+++ b/appcompat/integration-tests/receive-content-testapp/build.gradle
@@ -34,6 +34,9 @@
implementation(projectOrArtifact(":recyclerview:recyclerview"))
implementation(libs.material)
+ // Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath.
+ androidTestImplementation(project(":annotation:annotation-experimental"))
+
androidTestImplementation("androidx.lifecycle:lifecycle-common:2.6.1")
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testExtJunit)
diff --git a/appsearch/appsearch-builtin-types/build.gradle b/appsearch/appsearch-builtin-types/build.gradle
index 3f6fb05..582d931 100644
--- a/appsearch/appsearch-builtin-types/build.gradle
+++ b/appsearch/appsearch-builtin-types/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/appsearch/appsearch-debug-view/build.gradle b/appsearch/appsearch-debug-view/build.gradle
index 75a6f89..50a0025 100644
--- a/appsearch/appsearch-debug-view/build.gradle
+++ b/appsearch/appsearch-debug-view/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/appsearch/appsearch-debug-view/samples/build.gradle b/appsearch/appsearch-debug-view/samples/build.gradle
index 23cf51f..9b9f3f5 100644
--- a/appsearch/appsearch-debug-view/samples/build.gradle
+++ b/appsearch/appsearch-debug-view/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/appsearch/appsearch-ktx/build.gradle b/appsearch/appsearch-ktx/build.gradle
index e22de42..afd8740 100644
--- a/appsearch/appsearch-ktx/build.gradle
+++ b/appsearch/appsearch-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/appsearch/appsearch-local-storage/build.gradle b/appsearch/appsearch-local-storage/build.gradle
index df4e5b0..0679c7c 100644
--- a/appsearch/appsearch-local-storage/build.gradle
+++ b/appsearch/appsearch-local-storage/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.Publish
diff --git a/appsearch/appsearch-platform-storage/build.gradle b/appsearch/appsearch-platform-storage/build.gradle
index 88032db..8ccc5bc 100644
--- a/appsearch/appsearch-platform-storage/build.gradle
+++ b/appsearch/appsearch-platform-storage/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/appsearch/appsearch-play-services-storage/build.gradle b/appsearch/appsearch-play-services-storage/build.gradle
index 4fbcd2fa..ec30664 100644
--- a/appsearch/appsearch-play-services-storage/build.gradle
+++ b/appsearch/appsearch-play-services-storage/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/appsearch/appsearch/build.gradle b/appsearch/appsearch/build.gradle
index a940b11..81408d5 100644
--- a/appsearch/appsearch/build.gradle
+++ b/appsearch/appsearch/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/appsearch/compiler/build.gradle b/appsearch/compiler/build.gradle
index 8892047..798bc48 100644
--- a/appsearch/compiler/build.gradle
+++ b/appsearch/compiler/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/arch/core/core-common/build.gradle b/arch/core/core-common/build.gradle
index c4489ba..e49834a 100644
--- a/arch/core/core-common/build.gradle
+++ b/arch/core/core-common/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/arch/core/core-runtime/build.gradle b/arch/core/core-runtime/build.gradle
index a2fb328..55a29bc 100644
--- a/arch/core/core-runtime/build.gradle
+++ b/arch/core/core-runtime/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/arch/core/core-testing/build.gradle b/arch/core/core-testing/build.gradle
index f34646a..6e2aee9 100644
--- a/arch/core/core-testing/build.gradle
+++ b/arch/core/core-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/asynclayoutinflater/asynclayoutinflater-appcompat/build.gradle b/asynclayoutinflater/asynclayoutinflater-appcompat/build.gradle
index d02eed2..2746e50 100644
--- a/asynclayoutinflater/asynclayoutinflater-appcompat/build.gradle
+++ b/asynclayoutinflater/asynclayoutinflater-appcompat/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/asynclayoutinflater/asynclayoutinflater/build.gradle b/asynclayoutinflater/asynclayoutinflater/build.gradle
index 350aaf2..272efec 100644
--- a/asynclayoutinflater/asynclayoutinflater/build.gradle
+++ b/asynclayoutinflater/asynclayoutinflater/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/autofill/autofill/build.gradle b/autofill/autofill/build.gradle
index 84473c97..ff30870 100644
--- a/autofill/autofill/build.gradle
+++ b/autofill/autofill/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/benchmark/baseline-profile-gradle-plugin/build.gradle b/benchmark/baseline-profile-gradle-plugin/build.gradle
index 0d84e52..39d5872 100644
--- a/benchmark/baseline-profile-gradle-plugin/build.gradle
+++ b/benchmark/baseline-profile-gradle-plugin/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.*
plugins {
diff --git a/benchmark/baseline-profile-gradle-plugin/src/test/test-data/dependency/build.gradle b/benchmark/baseline-profile-gradle-plugin/src/test/test-data/dependency/build.gradle
index b600092..37b84ed 100644
--- a/benchmark/baseline-profile-gradle-plugin/src/test/test-data/dependency/build.gradle
+++ b/benchmark/baseline-profile-gradle-plugin/src/test/test-data/dependency/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
plugins {
id("java-library")
}
diff --git a/benchmark/benchmark-common/build.gradle b/benchmark/benchmark-common/build.gradle
index 77c89bc..c472c6d 100644
--- a/benchmark/benchmark-common/build.gradle
+++ b/benchmark/benchmark-common/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.AndroidXConfig
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@@ -67,7 +74,7 @@
dependencies {
implementation(libs.kotlinStdlib)
api("androidx.annotation:annotation:1.1.0")
- api("androidx.annotation:annotation-experimental:1.0.0")
+ api(project(":annotation:annotation-experimental"))
implementation("androidx.tracing:tracing-ktx:1.0.0")
implementation(project(":tracing:tracing-perfetto-handshake"))
implementation("androidx.test:monitor:1.6.1")
diff --git a/benchmark/benchmark-darwin-core/build.gradle b/benchmark/benchmark-darwin-core/build.gradle
index 01d3143..2ac5989f 100644
--- a/benchmark/benchmark-darwin-core/build.gradle
+++ b/benchmark/benchmark-darwin-core/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import androidx.build.PlatformIdentifier
import androidx.build.Publish
diff --git a/benchmark/benchmark-darwin-gradle-plugin/build.gradle b/benchmark/benchmark-darwin-gradle-plugin/build.gradle
index 5c3aa31..83b5677 100644
--- a/benchmark/benchmark-darwin-gradle-plugin/build.gradle
+++ b/benchmark/benchmark-darwin-gradle-plugin/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.*
plugins {
diff --git a/benchmark/benchmark-darwin-samples/build.gradle b/benchmark/benchmark-darwin-samples/build.gradle
index 31e75b7..2ce2d6d 100644
--- a/benchmark/benchmark-darwin-samples/build.gradle
+++ b/benchmark/benchmark-darwin-samples/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BuildOnServerKt
import androidx.build.KmpPlatformsKt
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
diff --git a/benchmark/benchmark-darwin/build.gradle b/benchmark/benchmark-darwin/build.gradle
index 61649a55..483c0bb 100644
--- a/benchmark/benchmark-darwin/build.gradle
+++ b/benchmark/benchmark-darwin/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import androidx.build.PlatformIdentifier
import androidx.build.Publish
diff --git a/benchmark/benchmark-junit4/build.gradle b/benchmark/benchmark-junit4/build.gradle
index d1a1347..3e1de92 100644
--- a/benchmark/benchmark-junit4/build.gradle
+++ b/benchmark/benchmark-junit4/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/benchmark/benchmark-macro-junit4/build.gradle b/benchmark/benchmark-macro-junit4/build.gradle
index 1e1dcaf4..0e64ea3 100644
--- a/benchmark/benchmark-macro-junit4/build.gradle
+++ b/benchmark/benchmark-macro-junit4/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/benchmark/benchmark-macro/build.gradle b/benchmark/benchmark-macro/build.gradle
index a582de4..b7e428e 100644
--- a/benchmark/benchmark-macro/build.gradle
+++ b/benchmark/benchmark-macro/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.AndroidXConfig
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/benchmark/benchmark/build.gradle b/benchmark/benchmark/build.gradle
index 87c1d07..1c74f20 100644
--- a/benchmark/benchmark/build.gradle
+++ b/benchmark/benchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/benchmark/gradle-plugin/build.gradle b/benchmark/gradle-plugin/build.gradle
index 30b1ddb..bc72805 100644
--- a/benchmark/gradle-plugin/build.gradle
+++ b/benchmark/gradle-plugin/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.*
plugins {
diff --git a/benchmark/integration-tests/baselineprofile-consumer/build.gradle b/benchmark/integration-tests/baselineprofile-consumer/build.gradle
index 10ed16a..c98970f 100644
--- a/benchmark/integration-tests/baselineprofile-consumer/build.gradle
+++ b/benchmark/integration-tests/baselineprofile-consumer/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import com.android.build.api.artifact.SingleArtifact
/*
diff --git a/benchmark/integration-tests/baselineprofile-flavors-producer/build.gradle b/benchmark/integration-tests/baselineprofile-flavors-producer/build.gradle
index dcec54e..25b403d 100644
--- a/benchmark/integration-tests/baselineprofile-flavors-producer/build.gradle
+++ b/benchmark/integration-tests/baselineprofile-flavors-producer/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import com.android.build.api.dsl.ManagedVirtualDevice
/*
diff --git a/benchmark/integration-tests/baselineprofile-library-producer/build.gradle b/benchmark/integration-tests/baselineprofile-library-producer/build.gradle
index 44b3bda..45e81a0 100644
--- a/benchmark/integration-tests/baselineprofile-library-producer/build.gradle
+++ b/benchmark/integration-tests/baselineprofile-library-producer/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import com.android.build.api.dsl.ManagedVirtualDevice
/*
diff --git a/benchmark/integration-tests/baselineprofile-producer/build.gradle b/benchmark/integration-tests/baselineprofile-producer/build.gradle
index e04a270..0f1243c 100644
--- a/benchmark/integration-tests/baselineprofile-producer/build.gradle
+++ b/benchmark/integration-tests/baselineprofile-producer/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import com.android.build.api.dsl.ManagedVirtualDevice
/*
diff --git a/benchmark/integration-tests/macrobenchmark/build.gradle b/benchmark/integration-tests/macrobenchmark/build.gradle
index be53848..07b8c7f 100644
--- a/benchmark/integration-tests/macrobenchmark/build.gradle
+++ b/benchmark/integration-tests/macrobenchmark/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.AndroidXConfig
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/biometric/biometric-ktx/build.gradle b/biometric/biometric-ktx/build.gradle
index 447aa92..809c1ba 100644
--- a/biometric/biometric-ktx/build.gradle
+++ b/biometric/biometric-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/biometric/biometric-ktx/samples/build.gradle b/biometric/biometric-ktx/samples/build.gradle
index 5d20e55..0e63ec0 100644
--- a/biometric/biometric-ktx/samples/build.gradle
+++ b/biometric/biometric-ktx/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/biometric/biometric/build.gradle b/biometric/biometric/build.gradle
index c87757db..99d096d 100644
--- a/biometric/biometric/build.gradle
+++ b/biometric/biometric/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/bluetooth/bluetooth-testing/build.gradle b/bluetooth/bluetooth-testing/build.gradle
index ca6faa2..1e803b5 100644
--- a/bluetooth/bluetooth-testing/build.gradle
+++ b/bluetooth/bluetooth-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/bluetooth/bluetooth/build.gradle b/bluetooth/bluetooth/build.gradle
index d8b3651e..ef5e849 100644
--- a/bluetooth/bluetooth/build.gradle
+++ b/bluetooth/bluetooth/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/bluetooth/integration-tests/testapp/build.gradle b/bluetooth/integration-tests/testapp/build.gradle
index c760ce7..54965f0 100644
--- a/bluetooth/integration-tests/testapp/build.gradle
+++ b/bluetooth/integration-tests/testapp/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
/*
diff --git a/browser/browser/build.gradle b/browser/browser/build.gradle
index c7922f9..b06a225 100644
--- a/browser/browser/build.gradle
+++ b/browser/browser/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
@@ -22,7 +29,7 @@
dependencies {
api("androidx.core:core:1.1.0")
api("androidx.annotation:annotation:1.2.0")
- api("androidx.annotation:annotation-experimental:1.3.1")
+ api(project(":annotation:annotation-experimental"))
api(libs.guavaListenableFuture)
implementation("androidx.collection:collection:1.1.0")
diff --git a/build.gradle b/build.gradle
index fc4788f..111387a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.AndroidXRootPlugin
import androidx.build.SdkHelperKt
diff --git a/buildSrc-tests/max-dep-versions/buildSrc-tests-max-dep-versions-dep/build.gradle b/buildSrc-tests/max-dep-versions/buildSrc-tests-max-dep-versions-dep/build.gradle
index eae2213..a3aead5 100644
--- a/buildSrc-tests/max-dep-versions/buildSrc-tests-max-dep-versions-dep/build.gradle
+++ b/buildSrc-tests/max-dep-versions/buildSrc-tests-max-dep-versions-dep/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/buildSrc-tests/max-dep-versions/buildSrc-tests-max-dep-versions-main/build.gradle b/buildSrc-tests/max-dep-versions/buildSrc-tests-max-dep-versions-main/build.gradle
index cfbfab5..e013879 100644
--- a/buildSrc-tests/max-dep-versions/buildSrc-tests-max-dep-versions-main/build.gradle
+++ b/buildSrc-tests/max-dep-versions/buildSrc-tests-max-dep-versions-main/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt
index 007b8ec..722d2b3 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt
@@ -20,6 +20,7 @@
import androidx.build.AndroidXImplPlugin.Companion.TASK_TIMEOUT_MINUTES
import androidx.build.Release.DEFAULT_PUBLISH_CONFIG
import androidx.build.buildInfo.addCreateLibraryBuildInfoFileTasks
+import androidx.build.checkapi.AndroidMultiplatformApiTaskConfig
import androidx.build.checkapi.JavaApiTaskConfig
import androidx.build.checkapi.KmpApiTaskConfig
import androidx.build.checkapi.LibraryApiTaskConfig
@@ -36,6 +37,7 @@
import androidx.build.testConfiguration.configureTestConfigGeneration
import androidx.build.uptodatedness.TaskUpToDateValidator
import com.android.build.api.artifact.SingleArtifact
+import com.android.build.api.dsl.KotlinMultiplatformAndroidTarget
import com.android.build.api.variant.AndroidComponentsExtension
import com.android.build.api.variant.ApplicationAndroidComponentsExtension
import com.android.build.api.variant.HasAndroidTest
@@ -50,6 +52,7 @@
import com.android.build.gradle.TestExtension
import com.android.build.gradle.TestPlugin
import com.android.build.gradle.TestedExtension
+import com.android.build.gradle.api.KotlinMultiplatformAndroidPlugin
import java.io.File
import java.time.Duration
import java.util.Locale
@@ -130,7 +133,18 @@
is LibraryPlugin -> configureWithLibraryPlugin(project, extension)
is AppPlugin -> configureWithAppPlugin(project, extension)
is TestPlugin -> configureWithTestPlugin(project, extension)
- is KotlinBasePluginWrapper -> configureWithKotlinPlugin(project, extension, plugin)
+ is KotlinMultiplatformAndroidPlugin ->
+ configureWithKotlinMultiplatformAndroidPlugin(
+ project,
+ kmpExtension.agpKmpExtension,
+ extension
+ )
+ is KotlinBasePluginWrapper -> configureWithKotlinPlugin(
+ project,
+ extension,
+ plugin,
+ kmpExtension
+ )
}
}
@@ -150,13 +164,14 @@
project.tasks.withType(Test::class.java) { task -> configureJvmTestTask(project, task) }
project.configureTaskTimeouts()
- project.configureMavenArtifactUpload(extension, kmpExtension, componentFactory)
+ project.configureMavenArtifactUpload(extension, kmpExtension, componentFactory) {
+ project.addCreateLibraryBuildInfoFileTasks(extension)
+ }
project.publishInspectionArtifacts()
project.configureExternalDependencyLicenseCheck()
project.configureProjectStructureValidation(extension)
project.configureProjectVersionValidation(extension)
project.registerProjectOrArtifact()
- project.addCreateLibraryBuildInfoFileTasks(extension)
project.configurations.create("samples") { samples ->
samples.isCanBeResolved = false
@@ -404,7 +419,8 @@
private fun configureWithKotlinPlugin(
project: Project,
extension: AndroidXExtension,
- plugin: KotlinBasePluginWrapper
+ plugin: KotlinBasePluginWrapper,
+ androidXMultiplatformExtension: AndroidXMultiplatformExtension
) {
project.configureKtfmt()
@@ -464,16 +480,17 @@
if (plugin is KotlinMultiplatformPluginWrapper) {
KonanPrebuiltsSetup.configureKonanDirectory(project)
KmpLinkTaskWorkaround.serializeLinkTasks(project)
-
- val libraryExtension = project.extensions.findByType<LibraryExtension>()
- if (libraryExtension != null) {
- libraryExtension.configureAndroidLibraryWithMultiplatformPluginOptions()
- } else {
- // Kotlin MPP does not apply java plugin anymore, but we still want to configure
- // all java-related tasks.
- // We only need to do this when project does not have Android plugin, which already
- // configures Java tasks.
- configureWithJavaPlugin(project, extension)
+ project.afterEvaluate {
+ val libraryExtension = project.extensions.findByType<LibraryExtension>()
+ if (libraryExtension != null) {
+ libraryExtension.configureAndroidLibraryWithMultiplatformPluginOptions()
+ } else if (!androidXMultiplatformExtension.hasAndroidMultiplatform()) {
+ // Kotlin MPP does not apply java plugin anymore, but we still want to configure
+ // all java-related tasks.
+ // We only need to do this when project does not have Android plugin, which already
+ // configures Java tasks.
+ configureWithJavaPlugin(project, extension)
+ }
}
project.configureKmp()
project.configureSourceJarForMultiplatform()
@@ -530,6 +547,17 @@
project.addToProjectMap(androidXExtension)
}
+ private fun configureWithKotlinMultiplatformAndroidPlugin(
+ project: Project,
+ @Suppress("UNUSED_PARAMETER") multiplatformAndroidTarget: KotlinMultiplatformAndroidTarget,
+ androidXExtension: AndroidXExtension
+ ) {
+ project.configureProjectForApiTasks(
+ AndroidMultiplatformApiTaskConfig,
+ androidXExtension
+ )
+ }
+
/**
* Excludes files telling which versions of androidx libraries were used in test apks, to avoid
* invalidating caches as often
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/MavenUploadHelper.kt b/buildSrc/private/src/main/kotlin/androidx/build/MavenUploadHelper.kt
index 55441d96..dd9648d 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/MavenUploadHelper.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/MavenUploadHelper.kt
@@ -55,13 +55,20 @@
fun Project.configureMavenArtifactUpload(
extension: AndroidXExtension,
kmpExtension: AndroidXMultiplatformExtension,
- componentFactory: SoftwareComponentFactory
+ componentFactory: SoftwareComponentFactory,
+ afterConfigure: () -> Unit
) {
apply(mapOf("plugin" to "maven-publish"))
var registered = false
fun registerOnFirstPublishableArtifact(component: SoftwareComponent) {
if (!registered) {
- configureComponentPublishing(extension, kmpExtension, component, componentFactory)
+ configureComponentPublishing(
+ extension,
+ kmpExtension,
+ component,
+ componentFactory,
+ afterConfigure
+ )
Release.register(this, extension)
registered = true
}
@@ -104,7 +111,8 @@
extension: AndroidXExtension,
kmpExtension: AndroidXMultiplatformExtension,
component: SoftwareComponent,
- componentFactory: SoftwareComponentFactory
+ componentFactory: SoftwareComponentFactory,
+ afterConfigure: () -> Unit
) {
val androidxGroup = validateCoordinatesAndGetGroup(extension)
val projectArchiveDir =
@@ -145,12 +153,13 @@
}
} else {
if (project.isMultiplatformPublicationEnabled()) {
- configureMultiplatformPublication(componentFactory)
+ configureMultiplatformPublication(componentFactory, afterConfigure)
} else {
it.create<MavenPublication>("maven") { from(component) }
tasks.getByName("publishMavenPublicationToMavenRepository").doFirst {
removePreviouslyUploadedArchives(projectArchiveDir)
}
+ afterConfigure()
}
}
}
@@ -292,7 +301,10 @@
return extensions.findByType<KotlinMultiplatformExtension>() != null
}
-private fun Project.configureMultiplatformPublication(componentFactory: SoftwareComponentFactory) {
+private fun Project.configureMultiplatformPublication(
+ componentFactory: SoftwareComponentFactory,
+ afterConfigure: () -> Unit
+) {
val multiplatformExtension = extensions.findByType<KotlinMultiplatformExtension>()!!
multiplatformExtension.targets.all { target ->
@@ -301,16 +313,17 @@
}
}
- replaceBaseMultiplatformPublication(componentFactory)
+ replaceBaseMultiplatformPublication(componentFactory, afterConfigure)
}
/**
- * KMP does not include a sources configuration (b/235486368), so we replace it with our own
- * publication that includes it. This uses internal API as a workaround while waiting for a fix on
- * the original bug.
+ * This was added because KMP did not include a sources configuration (b/235486368), so we replaced
+ * it with our own publication that includes it. This can be cleaned up now that the bug is fixed
+ * which is tracked here b/309641019
*/
private fun Project.replaceBaseMultiplatformPublication(
- componentFactory: SoftwareComponentFactory
+ componentFactory: SoftwareComponentFactory,
+ afterConfigure: () -> Unit
) {
val kotlinComponent = components.findByName("kotlin") as SoftwareComponentInternal
withSourcesComponents(
@@ -356,6 +369,7 @@
}
disableBaseKmpPublications()
+ afterConfigure()
}
}
}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/buildInfo/CreateLibraryBuildInfoFileTask.kt b/buildSrc/private/src/main/kotlin/androidx/build/buildInfo/CreateLibraryBuildInfoFileTask.kt
index 94757ef..98819d0 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/buildInfo/CreateLibraryBuildInfoFileTask.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/buildInfo/CreateLibraryBuildInfoFileTask.kt
@@ -248,15 +248,10 @@
// Unfortunately, dependency information is only available through internal API
// (See https://github.com/gradle/gradle/issues/21345).
publications.withType(MavenPublicationInternal::class.java).configureEach { mavenPub ->
- // Ideally we would be able to inspect each publication after initial configuration
- // without using afterEvaluate, but there is not a clean gradle API for doing
- // that (see https://github.com/gradle/gradle/issues/21424)
- afterEvaluate {
- // java-gradle-plugin creates marker publications that are aliases of the
- // main publication. We do not track these aliases.
- if (!mavenPub.isAlias) {
- createTaskForComponent(mavenPub, extension.mavenGroup, mavenPub.artifactId)
- }
+ // java-gradle-plugin creates marker publications that are aliases of the
+ // main publication. We do not track these aliases.
+ if (!mavenPub.isAlias) {
+ createTaskForComponent(mavenPub, extension.mavenGroup, mavenPub.artifactId)
}
}
}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/checkapi/ApiTasks.kt b/buildSrc/private/src/main/kotlin/androidx/build/checkapi/ApiTasks.kt
index 3e8cdbe..f84fbe7 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/checkapi/ApiTasks.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/checkapi/ApiTasks.kt
@@ -41,6 +41,8 @@
object KmpApiTaskConfig : ApiTaskConfig()
+object AndroidMultiplatformApiTaskConfig : ApiTaskConfig()
+
fun AndroidXExtension.shouldConfigureApiTasks(): Boolean {
if (!project.state.executed) {
throw GradleException(
@@ -173,6 +175,10 @@
.processManifestProvider
.get() as ProcessLibraryManifest
}
+ is AndroidMultiplatformApiTaskConfig -> {
+ javaInputs = JavaCompileInputs.fromKmpAndroidTarget(project)
+ processManifest = null
+ }
is KmpApiTaskConfig -> {
javaInputs = JavaCompileInputs.fromKmpJvmTarget(project)
processManifest = null
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/java/JavaCompileInputs.kt b/buildSrc/private/src/main/kotlin/androidx/build/java/JavaCompileInputs.kt
index 760d0b8..fb1f4d0 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/java/JavaCompileInputs.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/java/JavaCompileInputs.kt
@@ -18,6 +18,7 @@
import androidx.build.getAndroidJar
import androidx.build.multiplatformExtension
+import com.android.build.api.dsl.KotlinMultiplatformAndroidTarget
import java.io.File
import org.gradle.api.Project
import org.gradle.api.file.FileCollection
@@ -87,6 +88,41 @@
)
}
+ /**
+ * Returns the JavaCompileInputs for the `android` target of a KMP project.
+ *
+ * @param project The project whose main android target inputs will be returned.
+ */
+ fun fromKmpAndroidTarget(project: Project): JavaCompileInputs {
+ val kmpExtension =
+ checkNotNull(project.multiplatformExtension) {
+ """
+ ${project.path} needs to have Kotlin Multiplatform Plugin applied to obtain its
+ android source sets.
+ """
+ .trimIndent()
+ }
+ val target = kmpExtension.targets.withType(
+ KotlinMultiplatformAndroidTarget::class.java
+ ).single()
+ val sourceCollection =
+ project.files(
+ project.provider {
+ target.sourceFiles(
+ compilationName = KotlinCompilation.MAIN_COMPILATION_NAME
+ )
+ }
+ )
+
+ return JavaCompileInputs(
+ sourcePaths = sourceCollection,
+ dependencyClasspath =
+ target.compilations[KotlinCompilation.MAIN_COMPILATION_NAME]
+ .compileDependencyFiles,
+ bootClasspath = project.getAndroidJar()
+ )
+ }
+
// Constructs a JavaCompileInputs from a sourceset
fun fromSourceSet(sourceSet: SourceSet, project: Project): JavaCompileInputs {
val sourcePaths: FileCollection =
diff --git a/camera/camera-camera2-pipe-integration/build.gradle b/camera/camera-camera2-pipe-integration/build.gradle
index 30f020c..1818b1c 100644
--- a/camera/camera-camera2-pipe-integration/build.gradle
+++ b/camera/camera-camera2-pipe-integration/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/camera/camera-camera2-pipe-testing/build.gradle b/camera/camera-camera2-pipe-testing/build.gradle
index cf171ed..fbba598 100644
--- a/camera/camera-camera2-pipe-testing/build.gradle
+++ b/camera/camera-camera2-pipe-testing/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/camera/camera-camera2-pipe/build.gradle b/camera/camera-camera2-pipe/build.gradle
index 0aaed9a..3c3ebc4 100644
--- a/camera/camera-camera2-pipe/build.gradle
+++ b/camera/camera-camera2-pipe/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/graph/StreamGraphImpl.kt b/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/graph/StreamGraphImpl.kt
index 0194989..a2aced6 100644
--- a/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/graph/StreamGraphImpl.kt
+++ b/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/graph/StreamGraphImpl.kt
@@ -42,33 +42,10 @@
import javax.inject.Inject
import kotlinx.atomicfu.atomic
-private val streamIds = atomic(0)
-
-internal fun nextStreamId(): StreamId = StreamId(streamIds.incrementAndGet())
-
-private val outputIds = atomic(0)
-
-internal fun nextOutputId(): OutputId = OutputId(outputIds.incrementAndGet())
-
-private val configIds = atomic(0)
-
-internal fun nextConfigId(): OutputConfigId = OutputConfigId(configIds.incrementAndGet())
-
-private val groupIds = atomic(0)
-
-internal fun nextGroupId(): Int = groupIds.incrementAndGet()
-
-private val previewOutputTypes = listOf(
- OutputStream.OutputType.SURFACE_VIEW,
- OutputStream.OutputType.SURFACE_TEXTURE
-)
-
-private val previewFormats = listOf(StreamFormat.UNKNOWN, StreamFormat.PRIVATE)
-
/**
- * This object keeps track of which surfaces have been configured for each stream. In addition, it
- * will keep track of which surfaces have changed or replaced so that the CaptureSession can be
- * reconfigured if the configured surfaces change.
+ * This object builds an internal graph of inputs and outputs from a graphConfig. It is responsible
+ * for defining the identifiers for each input and output stream, and for building an abstract
+ * representation of the internal camera output configuration(s).
*/
@CameraGraphScope
internal class StreamGraphImpl
@@ -136,8 +113,7 @@
dynamicRangeProfile = output.dynamicRangeProfile,
streamUseCase = output.streamUseCase,
streamUseHint = output.streamUseHint,
- externalOutputConfig =
- (output as? OutputStream.Config.ExternalOutputConfig)?.output
+ externalOutputConfig = getOutputConfigurationOrNull(output)
)
outputConfigMap[output] = outputConfig
outputConfigListBuilder.add(outputConfig)
@@ -179,14 +155,16 @@
}
}
- streams = streamListBuilder
+ val streamSortedByPreview = sortOutputsByPreviewStream(streamListBuilder)
+ val streamSortedByVideo = sortOutputsByVideoStream(streamSortedByPreview)
+
+ streams = streamSortedByVideo
streamIds = streams.map { it.id }.toSet()
_streamMap = streamMapBuilder
- outputConfigs = outputConfigListBuilder
-
- val unsortedOutputs = streams.flatMap { it.outputs }
- val outputsSortedByPreview = sortOutputsByPreviewStream(unsortedOutputs)
- outputs = sortOutputsByVideoStream(outputsSortedByPreview)
+ outputConfigs = outputConfigListBuilder.sortedBy {
+ it.streams.minOf { stream -> streams.indexOf(stream) }
+ }
+ outputs = streams.flatMap { it.outputs }
}
class OutputConfig(
@@ -232,6 +210,15 @@
fun onSurfaceMapUpdated(surfaces: Map<StreamId, Surface>)
}
+ private fun getOutputConfigurationOrNull(
+ outputConfig: OutputStream.Config
+ ): OutputConfiguration? {
+ if (Build.VERSION.SDK_INT >= 33) {
+ return (outputConfig as? OutputStream.Config.ExternalOutputConfig)?.output
+ }
+ return null
+ }
+
private fun computeNextSurfaceGroupId(graphConfig: CameraGraph.Config): Int {
// If there are any existing surfaceGroups, make sure the groups we define do not overlap
// with any existing values.
@@ -292,48 +279,59 @@
* original order.
*/
private fun sortOutputsByPreviewStream(
- unsortedOutputs: List<OutputStream>
- ): List<OutputStream> {
+ unsortedStreams: List<CameraStream>
+ ): List<CameraStream> {
- // Check if any streams have PREVIEW StreamUseCase set
- val (previewStreamPartition, nonPreviewStreamPartition) = unsortedOutputs.partition {
- it.streamUseCase == OutputStream.StreamUseCase.PREVIEW
+ // If any stream explicitly specifies "PREVIEW" for its use case, prioritize those streams
+ val (previewStreamPartition, nonPreviewStreamPartition) = unsortedStreams.partition {
+ it.outputs.any { output -> output.streamUseCase == OutputStream.StreamUseCase.PREVIEW }
}
- // Move streams with PREVIEW StreamUseCase to head of list
if (previewStreamPartition.isNotEmpty()) {
return previewStreamPartition + nonPreviewStreamPartition
}
- // Check if any streams have SURFACE_VIEW and SURFACE_TEXTURE OutputTypes
- val (previewOutputTypePartition, nonPreviewOutputTypePartition) =
- unsortedOutputs.partition { it.outputType in previewOutputTypes }
- // Move streams with SURFACE_VIEW and SURFACE_TEXTURE OutputTypes to head of list
- if (previewOutputTypePartition.isNotEmpty()) {
- val comparator = compareBy<OutputStream> { previewOutputTypes.indexOf(it.outputType) }
- return previewOutputTypePartition.sortedWith(comparator) + nonPreviewOutputTypePartition
+ // If no streams explicitly specify the PREVIEW UseCase, fall back to ordering by
+ // SURFACE_VIEW / SURFACE_TEXTURE output types.
+ val (previewTypePartition, nonPreviewTypePartition) = unsortedStreams.partition {
+ it.outputs.any { output -> output.outputType in previewOutputTypes }
+ }
+ if (previewTypePartition.isNotEmpty()) {
+ return previewTypePartition.sortedWith(previewOutputTypesComparator) +
+ nonPreviewTypePartition
}
// Check if any streams have UNKNOWN and PRIVATE StreamFormats
- val (previewFormatPartition, nonPreviewFormatPartition) = unsortedOutputs.partition {
- it.format in previewFormats
+ val (previewFormatPartition, nonPreviewFormatPartition) = unsortedStreams.partition {
+ it.outputs.any { output -> output.format in previewFormats }
}
// Move streams with UNKNOWN and PRIVATE StreamFormats to head of list
if (previewFormatPartition.isNotEmpty()) {
- val comparator = compareBy<OutputStream> { previewFormats.indexOf(it.format) }
- return previewFormatPartition.sortedWith(comparator) + nonPreviewFormatPartition
+ return previewFormatPartition.sortedWith(previewFormatComparator) +
+ nonPreviewFormatPartition
}
// Return outputs in original order if no preview streams found
- return unsortedOutputs
+ return unsortedStreams
}
+ /**
+ * Sort the output streams to move video streams to the bottom of the list.
+ * The order of the outputs is determined by the following:
+ *
+ * 1. StreamUseCase: Check if any streams have StreamUseCase.VIDEO_RECORD and move these to the
+ * bottom of the list. Otherwise, go to step 2.
+ * 2. StreamUseHint: Check if any streams have StreamUseHint.VIDEO_RECORD and move these to the
+ * bottom of the list.
+ */
private fun sortOutputsByVideoStream(
- unsortedOutputs: List<OutputStream>
- ): List<OutputStream> {
+ unsortedOutputs: List<CameraStream>
+ ): List<CameraStream> {
// Check if any streams have VIDEO StreamUseCase set
val (videoStreamPartition, nonVideoStreamPartition) = unsortedOutputs.partition {
- it.streamUseCase == OutputStream.StreamUseCase.VIDEO_RECORD
+ it.outputs.any { output ->
+ output.streamUseCase == OutputStream.StreamUseCase.VIDEO_RECORD
+ }
}
// Move streams with VIDEO StreamUseCase to end of list
if (videoStreamPartition.isNotEmpty()) {
@@ -342,7 +340,9 @@
// Check if any streams have VIDEO StreamUseCaseHint set
val (videoStreamHintPartition, nonVideoStreamHintPartition) = unsortedOutputs.partition {
- it.streamUseHint == OutputStream.StreamUseHint.VIDEO_RECORD
+ it.outputs.any { output ->
+ output.streamUseHint == OutputStream.StreamUseHint.VIDEO_RECORD
+ }
}
// Move streams with VIDEO StreamUseCaseHint to end of list
@@ -353,6 +353,39 @@
// Return outputs in original order if no video streams found
return unsortedOutputs
}
+
+ companion object {
+ private val streamIds = atomic(0)
+
+ internal fun nextStreamId(): StreamId = StreamId(streamIds.incrementAndGet())
+
+ private val outputIds = atomic(0)
+
+ internal fun nextOutputId(): OutputId = OutputId(outputIds.incrementAndGet())
+
+ private val configIds = atomic(0)
+
+ internal fun nextConfigId(): OutputConfigId = OutputConfigId(configIds.incrementAndGet())
+
+ private val groupIds = atomic(0)
+
+ internal fun nextGroupId(): Int = groupIds.incrementAndGet()
+
+ private val previewOutputTypes = listOf(
+ OutputStream.OutputType.SURFACE_VIEW,
+ OutputStream.OutputType.SURFACE_TEXTURE
+ )
+
+ private val previewOutputTypesComparator = compareBy<CameraStream> {
+ it.outputs.maxOf { output -> previewOutputTypes.indexOf(output.outputType) }
+ }
+
+ private val previewFormats = listOf(StreamFormat.UNKNOWN, StreamFormat.PRIVATE)
+
+ private val previewFormatComparator = compareBy<CameraStream> {
+ it.outputs.maxOf { output -> previewFormats.indexOf(output.format) }
+ }
+ }
}
@JvmInline
diff --git a/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/graph/StreamGraphImplTest.kt b/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/graph/StreamGraphImplTest.kt
index 46e44df..cd22cf5 100644
--- a/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/graph/StreamGraphImplTest.kt
+++ b/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/graph/StreamGraphImplTest.kt
@@ -81,7 +81,6 @@
@Test
fun testStreamWithMultipleOutputs() {
-
val streamConfig =
CameraStream.Config.create(
listOf(
@@ -104,313 +103,335 @@
@Test
fun testOutputSortingWithStreamUseCase() {
-
- val streamConfig =
- CameraStream.Config.create(
- listOf(
- OutputStream.Config.create(
- Size(800, 600), StreamFormat.UNKNOWN,
- streamUseCase = OutputStream.StreamUseCase.VIDEO_RECORD
- ),
- OutputStream.Config.create(
- Size(1600, 1200), StreamFormat.UNKNOWN,
- streamUseCase = OutputStream.StreamUseCase.PREVIEW
- ),
- OutputStream.Config.create(
- Size(800, 600), StreamFormat.UNKNOWN,
- streamUseCase = OutputStream.StreamUseCase.DEFAULT
- ),
- )
- )
+ val streamConfigA = CameraStream.Config.create(
+ Size(800, 600),
+ StreamFormat.UNKNOWN,
+ streamUseCase = OutputStream.StreamUseCase.VIDEO_RECORD
+ )
+ val streamConfigB = CameraStream.Config.create(
+ Size(1600, 1200),
+ StreamFormat.UNKNOWN,
+ streamUseCase = OutputStream.StreamUseCase.PREVIEW
+ )
+ val streamConfigC = CameraStream.Config.create(
+ Size(800, 600),
+ StreamFormat.UNKNOWN,
+ streamUseCase = OutputStream.StreamUseCase.DEFAULT
+ )
val graphConfig =
CameraGraph.Config(
camera = CameraId("0"),
- streams = listOf(streamConfig),
+ streams = listOf(
+ streamConfigA,
+ streamConfigB,
+ streamConfigC
+ ),
)
+
val streamGraph = StreamGraphImpl(config.fakeMetadata, graphConfig)
- val stream1 = streamGraph.outputs[0]
- assertThat(stream1.streamUseCase).isEqualTo(OutputStream.StreamUseCase.PREVIEW)
+ // Get the stream for each streamConfig
+ val streamA = streamGraph[streamConfigA]
+ val streamB = streamGraph[streamConfigB]
+ val streamC = streamGraph[streamConfigC]
- val stream2 = streamGraph.outputs[1]
- assertThat(stream2.streamUseCase).isEqualTo(OutputStream.StreamUseCase.DEFAULT)
+ // Read the list of outputConfigs (in order)
+ val outputConfigAt0 = streamGraph.outputConfigs[0]
+ val outputConfigAt1 = streamGraph.outputConfigs[1]
+ val outputConfigAt2 = streamGraph.outputConfigs[2]
- val stream3 = streamGraph.outputs[2]
- assertThat(stream3.streamUseCase).isEqualTo(OutputStream.StreamUseCase.VIDEO_RECORD)
+ // Assert that the outputConfig order is B, C, A because:
+ // B is moved to the front of the list, because it is a PREVIEW stream.
+ // A is moved to the end of the list, because it is a VIDEO_RECORD output stream
+ assertThat(outputConfigAt0.streams).containsExactly(streamB)
+ assertThat(outputConfigAt1.streams).containsExactly(streamC)
+ assertThat(outputConfigAt2.streams).containsExactly(streamA)
}
@Test
fun testOutputSortingWithOutputType() {
-
- val streamConfig =
- CameraStream.Config.create(
- listOf(
- OutputStream.Config.create(
- Size(800, 600), StreamFormat.UNKNOWN,
- outputType = OutputStream.OutputType.SURFACE
- ),
- OutputStream.Config.create(
- Size(1600, 1200), StreamFormat.UNKNOWN,
- outputType = OutputStream.OutputType.SURFACE_TEXTURE
- ),
- OutputStream.Config.create(
- Size(800, 600), StreamFormat.UNKNOWN,
- outputType = OutputStream.OutputType.SURFACE_VIEW
- ),
- )
- )
+ val streamConfigA = CameraStream.Config.create(
+ Size(800, 600),
+ StreamFormat.UNKNOWN,
+ outputType = OutputStream.OutputType.SURFACE
+ )
+ val streamConfigB = CameraStream.Config.create(
+ Size(1600, 1200),
+ StreamFormat.UNKNOWN,
+ outputType = OutputStream.OutputType.SURFACE_TEXTURE
+ )
+ val streamConfigC = CameraStream.Config.create(
+ Size(800, 600),
+ StreamFormat.UNKNOWN,
+ outputType = OutputStream.OutputType.SURFACE_VIEW
+ )
val graphConfig =
CameraGraph.Config(
camera = CameraId("0"),
- streams = listOf(streamConfig),
+ streams = listOf(
+ streamConfigA,
+ streamConfigB,
+ streamConfigC
+ ),
)
+
val streamGraph = StreamGraphImpl(config.fakeMetadata, graphConfig)
- val stream1 = streamGraph.outputs[0]
- val stream2 = streamGraph.outputs[1]
- val stream3 = streamGraph.outputs[2]
+ // Get the stream for each streamConfig
+ val streamA = streamGraph[streamConfigA]
+ val streamB = streamGraph[streamConfigB]
+ val streamC = streamGraph[streamConfigC]
+
+ // Read the list of outputConfigs (in order)
+ val outputConfigAt0 = streamGraph.outputConfigs[0]
+ val outputConfigAt1 = streamGraph.outputConfigs[1]
+ val outputConfigAt2 = streamGraph.outputConfigs[2]
if (deferredStreamsAreSupported(config.fakeMetadata, graphConfig)) {
- assertThat(stream1.outputType).isEqualTo(OutputStream.OutputType.SURFACE_VIEW)
- assertThat(stream2.outputType).isEqualTo(OutputStream.OutputType.SURFACE_TEXTURE)
- assertThat(stream3.outputType).isNull()
+ // Assert that the outputConfig order is C, B, A because:
+ // B and C are moved to the front of the list because they are SURFACE_VIEW/SURFACE_TEXTURE
+ // C is sorted before B because SURFACE_VIEW has higher precedence than SURFACE_TEXTURE
+ assertThat(outputConfigAt0.streams).containsExactly(streamC)
+ assertThat(outputConfigAt1.streams).containsExactly(streamB)
+ assertThat(outputConfigAt2.streams).containsExactly(streamA)
} else {
- assertThat(stream1.outputType).isNull()
- assertThat(stream2.outputType).isNull()
- assertThat(stream3.outputType).isNull()
+ // If deferred streams are not supported, the difference between
+ // SURFACE_VIEW/SURFACE_TEXTURE do not matter, and the order is preserved.
+ assertThat(outputConfigAt0.streams).containsExactly(streamA)
+ assertThat(outputConfigAt1.streams).containsExactly(streamB)
+ assertThat(outputConfigAt2.streams).containsExactly(streamC)
}
}
@Test
fun testOutputSortingWithStreamFormat() {
-
- val streamConfig =
- CameraStream.Config.create(
- listOf(
- OutputStream.Config.create(
- Size(800, 600), StreamFormat.PRIVATE
- ),
- OutputStream.Config.create(
- Size(1600, 1200), StreamFormat.UNKNOWN
- ),
- OutputStream.Config.create(
- Size(800, 600), StreamFormat.DEPTH_POINT_CLOUD
- ),
- )
- )
+ val streamConfigA = CameraStream.Config.create(
+ Size(800, 600),
+ StreamFormat.DEPTH_POINT_CLOUD
+ )
+ val streamConfigB = CameraStream.Config.create(
+ Size(1600, 1200),
+ StreamFormat.PRIVATE
+ )
+ val streamConfigC = CameraStream.Config.create(
+ Size(800, 600),
+ StreamFormat.UNKNOWN
+ )
val graphConfig =
CameraGraph.Config(
camera = CameraId("0"),
- streams = listOf(streamConfig),
+ streams = listOf(
+ streamConfigA,
+ streamConfigB,
+ streamConfigC
+ ),
)
+
val streamGraph = StreamGraphImpl(config.fakeMetadata, graphConfig)
- val stream1 = streamGraph.outputs[0]
- assertThat(stream1.format).isEqualTo(StreamFormat.UNKNOWN)
+ // Get the stream for each streamConfig
+ val streamA = streamGraph[streamConfigA]
+ val streamB = streamGraph[streamConfigB]
+ val streamC = streamGraph[streamConfigC]
- val stream2 = streamGraph.outputs[1]
- assertThat(stream2.format).isEqualTo(StreamFormat.PRIVATE)
+ // Read the list of outputConfigs (in order)
+ val outputConfigAt0 = streamGraph.outputConfigs[0]
+ val outputConfigAt1 = streamGraph.outputConfigs[1]
+ val outputConfigAt2 = streamGraph.outputConfigs[2]
- val stream3 = streamGraph.outputs[2]
- assertThat(stream3.format).isEqualTo(StreamFormat.DEPTH_POINT_CLOUD)
+ // Assert that the outputConfig order is C, B, A because:
+ // B and C are moved to the front of the list because they are UNKNOWN/PRIVATE
+ // C is sorted before B because UNKNOWN has higher precedence than PRIVATE
+ assertThat(outputConfigAt0.streams).containsExactly(streamC)
+ assertThat(outputConfigAt1.streams).containsExactly(streamB)
+ assertThat(outputConfigAt2.streams).containsExactly(streamA)
}
@Test
fun testOutputSortingWithNoConditionsMet() {
-
- val streamConfig =
- CameraStream.Config.create(
- listOf(
- OutputStream.Config.create(
- Size(800, 600), StreamFormat.YUV_420_888,
- streamUseCase = OutputStream.StreamUseCase.DEFAULT,
- outputType = OutputStream.OutputType.SURFACE
- ),
- OutputStream.Config.create(
- Size(1600, 1200), StreamFormat.DEPTH16,
- streamUseCase = OutputStream.StreamUseCase.DEFAULT,
- outputType = OutputStream.OutputType.SURFACE
- ),
- OutputStream.Config.create(
- Size(800, 600), StreamFormat.JPEG,
- streamUseCase = OutputStream.StreamUseCase.VIDEO_CALL,
- outputType = OutputStream.OutputType.SURFACE
- ),
- )
- )
+ val streamConfigA = CameraStream.Config.create(
+ Size(800, 600),
+ StreamFormat.YUV_420_888
+ )
+ val streamConfigB = CameraStream.Config.create(
+ Size(1600, 1200),
+ StreamFormat.YUV_420_888
+ )
+ val streamConfigC = CameraStream.Config.create(
+ Size(800, 600),
+ StreamFormat.YUV_420_888
+ )
val graphConfig =
CameraGraph.Config(
camera = CameraId("0"),
- streams = listOf(streamConfig),
+ streams = listOf(
+ streamConfigA,
+ streamConfigB,
+ streamConfigC
+ ),
)
+
val streamGraph = StreamGraphImpl(config.fakeMetadata, graphConfig)
- val stream1 = streamGraph.outputs[0]
- assertThat(stream1.format).isEqualTo(StreamFormat.YUV_420_888)
+ // Get the stream for each streamConfig
+ val streamA = streamGraph[streamConfigA]
+ val streamB = streamGraph[streamConfigB]
+ val streamC = streamGraph[streamConfigC]
- val stream2 = streamGraph.outputs[1]
- assertThat(stream2.format).isEqualTo(StreamFormat.DEPTH16)
+ // Read the list of outputConfigs (in order)
+ val outputConfigAt0 = streamGraph.outputConfigs[0]
+ val outputConfigAt1 = streamGraph.outputConfigs[1]
+ val outputConfigAt2 = streamGraph.outputConfigs[2]
- val stream3 = streamGraph.outputs[2]
- assertThat(stream3.format).isEqualTo(StreamFormat.JPEG)
+ // Assert that the outputConfig order is A, B, C.
+ assertThat(outputConfigAt0.streams).containsExactly(streamA)
+ assertThat(outputConfigAt1.streams).containsExactly(streamB)
+ assertThat(outputConfigAt2.streams).containsExactly(streamC)
}
@Test
fun testOutputSortingWithSameStreamUseCase() {
-
- val streamConfig =
- CameraStream.Config.create(
- listOf(
- OutputStream.Config.create(
- Size(800, 600), StreamFormat.PRIVATE,
- streamUseCase = OutputStream.StreamUseCase.PREVIEW,
- outputType = OutputStream.OutputType.SURFACE_TEXTURE
- ),
- OutputStream.Config.create(
- Size(1600, 1200), StreamFormat.UNKNOWN,
- streamUseCase = OutputStream.StreamUseCase.PREVIEW,
- outputType = OutputStream.OutputType.SURFACE_VIEW
- ),
- OutputStream.Config.create(
- Size(800, 600), StreamFormat.RAW12,
- streamUseCase = OutputStream.StreamUseCase.PREVIEW,
- outputType = OutputStream.OutputType.SURFACE
- ),
- )
- )
+ val streamConfigA = CameraStream.Config.create(
+ Size(800, 600),
+ StreamFormat.RAW12,
+ streamUseCase = OutputStream.StreamUseCase.PREVIEW,
+ outputType = OutputStream.OutputType.SURFACE
+ )
+ val streamConfigB = CameraStream.Config.create(
+ Size(1600, 1200),
+ StreamFormat.UNKNOWN,
+ streamUseCase = OutputStream.StreamUseCase.PREVIEW,
+ outputType = OutputStream.OutputType.SURFACE_VIEW
+ )
+ val streamConfigC = CameraStream.Config.create(
+ Size(800, 600),
+ StreamFormat.PRIVATE,
+ streamUseCase = OutputStream.StreamUseCase.PREVIEW,
+ outputType = OutputStream.OutputType.SURFACE_TEXTURE
+ )
val graphConfig =
CameraGraph.Config(
camera = CameraId("0"),
- streams = listOf(streamConfig),
+ streams = listOf(
+ streamConfigA,
+ streamConfigB,
+ streamConfigC
+ ),
)
+
val streamGraph = StreamGraphImpl(config.fakeMetadata, graphConfig)
- val stream1 = streamGraph.outputs[0]
- assertThat(stream1.format).isEqualTo(StreamFormat.PRIVATE)
+ // Get the stream for each streamConfig
+ val streamA = streamGraph[streamConfigA]
+ val streamB = streamGraph[streamConfigB]
+ val streamC = streamGraph[streamConfigC]
- val stream2 = streamGraph.outputs[1]
- assertThat(stream2.format).isEqualTo(StreamFormat.UNKNOWN)
+ // Read the list of outputConfigs (in order)
+ val outputConfigAt0 = streamGraph.outputConfigs[0]
+ val outputConfigAt1 = streamGraph.outputConfigs[1]
+ val outputConfigAt2 = streamGraph.outputConfigs[2]
- val stream3 = streamGraph.outputs[2]
- assertThat(stream3.format).isEqualTo(StreamFormat.RAW12)
+ // Assert that the outputConfig order is A, B, C:
+ // All outputs specify StreamUseCase.PREVIEW, and any additional ordering is preserved.
+ assertThat(outputConfigAt0.streams).containsExactly(streamA)
+ assertThat(outputConfigAt1.streams).containsExactly(streamB)
+ assertThat(outputConfigAt2.streams).containsExactly(streamC)
}
@Test
fun testOutputSortingWithSameOutputType() {
-
- val streamConfig =
- CameraStream.Config.create(
- listOf(
- OutputStream.Config.create(
- Size(800, 600), StreamFormat.UNKNOWN,
- streamUseCase = OutputStream.StreamUseCase.DEFAULT,
- outputType = OutputStream.OutputType.SURFACE_TEXTURE
- ),
- OutputStream.Config.create(
- Size(1600, 1200), StreamFormat.UNKNOWN,
- streamUseCase = OutputStream.StreamUseCase.VIDEO_CALL,
- outputType = OutputStream.OutputType.SURFACE_TEXTURE
- ),
- OutputStream.Config.create(
- Size(800, 600), StreamFormat.UNKNOWN,
- streamUseCase = OutputStream.StreamUseCase.STILL_CAPTURE,
- outputType = OutputStream.OutputType.SURFACE_TEXTURE
- ),
- )
- )
+ val streamConfigA = CameraStream.Config.create(
+ Size(800, 600),
+ StreamFormat.UNKNOWN,
+ streamUseCase = OutputStream.StreamUseCase.DEFAULT,
+ outputType = OutputStream.OutputType.SURFACE_TEXTURE
+ )
+ val streamConfigB = CameraStream.Config.create(
+ Size(1600, 1200),
+ StreamFormat.UNKNOWN,
+ streamUseCase = OutputStream.StreamUseCase.VIDEO_CALL,
+ outputType = OutputStream.OutputType.SURFACE_TEXTURE
+ )
+ val streamConfigC = CameraStream.Config.create(
+ Size(800, 600),
+ StreamFormat.UNKNOWN,
+ streamUseCase = OutputStream.StreamUseCase.STILL_CAPTURE,
+ outputType = OutputStream.OutputType.SURFACE_TEXTURE
+ )
val graphConfig =
CameraGraph.Config(
camera = CameraId("0"),
- streams = listOf(streamConfig),
+ streams = listOf(
+ streamConfigA,
+ streamConfigB,
+ streamConfigC
+ ),
)
+
val streamGraph = StreamGraphImpl(config.fakeMetadata, graphConfig)
- val stream1 = streamGraph.outputs[0]
- assertThat(stream1.streamUseCase).isEqualTo(OutputStream.StreamUseCase.DEFAULT)
+ // Get the stream for each streamConfig
+ val streamA = streamGraph[streamConfigA]
+ val streamB = streamGraph[streamConfigB]
+ val streamC = streamGraph[streamConfigC]
- val stream2 = streamGraph.outputs[1]
- assertThat(stream2.streamUseCase).isEqualTo(OutputStream.StreamUseCase.VIDEO_CALL)
+ // Read the list of outputConfigs (in order)
+ val outputConfigAt0 = streamGraph.outputConfigs[0]
+ val outputConfigAt1 = streamGraph.outputConfigs[1]
+ val outputConfigAt2 = streamGraph.outputConfigs[2]
- val stream3 = streamGraph.outputs[2]
- assertThat(stream3.streamUseCase).isEqualTo(OutputStream.StreamUseCase.STILL_CAPTURE)
- }
-
- @Test
- fun testOutputSortingWithSameImageFormat() {
-
- val streamConfig =
- CameraStream.Config.create(
- listOf(
- OutputStream.Config.create(
- Size(800, 600), StreamFormat.UNKNOWN,
- streamUseCase = OutputStream.StreamUseCase.VIDEO_RECORD,
- outputType = OutputStream.OutputType.SURFACE
- ),
- OutputStream.Config.create(
- Size(1600, 1200), StreamFormat.UNKNOWN,
- streamUseCase = OutputStream.StreamUseCase.VIDEO_CALL,
- outputType = OutputStream.OutputType.SURFACE
- ),
- OutputStream.Config.create(
- Size(800, 600), StreamFormat.UNKNOWN,
- streamUseCase = OutputStream.StreamUseCase.STILL_CAPTURE,
- outputType = OutputStream.OutputType.SURFACE
- ),
- )
- )
- val graphConfig =
- CameraGraph.Config(
- camera = CameraId("0"),
- streams = listOf(streamConfig),
- )
- val streamGraph = StreamGraphImpl(config.fakeMetadata, graphConfig)
-
- val stream1 = streamGraph.outputs[0]
- assertThat(stream1.streamUseCase).isEqualTo(OutputStream.StreamUseCase.VIDEO_CALL)
-
- val stream2 = streamGraph.outputs[1]
- assertThat(stream2.streamUseCase).isEqualTo(OutputStream.StreamUseCase.STILL_CAPTURE)
-
- val stream3 = streamGraph.outputs[2]
- assertThat(stream3.streamUseCase).isEqualTo(OutputStream.StreamUseCase.VIDEO_RECORD)
+ // Assert that the outputConfig order is A, B, C because all outputType are SURFACE_TEXTURE,
+ // and order should be preserved since there are no other conditions.
+ assertThat(outputConfigAt0.streams).containsExactly(streamA)
+ assertThat(outputConfigAt1.streams).containsExactly(streamB)
+ assertThat(outputConfigAt2.streams).containsExactly(streamC)
}
@Test
fun testOutputSortingWithStreamUseHint() {
-
- val streamConfig =
- CameraStream.Config.create(
- listOf(
- OutputStream.Config.create(
- Size(800, 600), StreamFormat.UNKNOWN,
- streamUseCase = OutputStream.StreamUseCase.DEFAULT,
- streamUseHint = OutputStream.StreamUseHint.VIDEO_RECORD
- ),
- OutputStream.Config.create(
- Size(1600, 1200), StreamFormat.UNKNOWN,
- streamUseCase = OutputStream.StreamUseCase.PREVIEW
- ),
- OutputStream.Config.create(
- Size(800, 600), StreamFormat.UNKNOWN,
- streamUseCase = OutputStream.StreamUseCase.STILL_CAPTURE
- ),
- )
- )
+ val streamConfigA = CameraStream.Config.create(
+ Size(800, 600),
+ StreamFormat.UNKNOWN,
+ streamUseCase = OutputStream.StreamUseCase.DEFAULT,
+ streamUseHint = OutputStream.StreamUseHint.VIDEO_RECORD
+ )
+ val streamConfigB = CameraStream.Config.create(
+ Size(1600, 1200),
+ StreamFormat.UNKNOWN,
+ streamUseCase = OutputStream.StreamUseCase.VIDEO_CALL
+ )
+ val streamConfigC = CameraStream.Config.create(
+ Size(800, 600),
+ StreamFormat.UNKNOWN,
+ streamUseCase = OutputStream.StreamUseCase.STILL_CAPTURE
+ )
val graphConfig =
CameraGraph.Config(
camera = CameraId("0"),
- streams = listOf(streamConfig),
+ streams = listOf(
+ streamConfigA,
+ streamConfigB,
+ streamConfigC
+ ),
)
+
val streamGraph = StreamGraphImpl(config.fakeMetadata, graphConfig)
- val stream1 = streamGraph.outputs[0]
- assertThat(stream1.streamUseCase).isEqualTo(OutputStream.StreamUseCase.PREVIEW)
+ // Get the stream for each streamConfig
+ val streamA = streamGraph[streamConfigA]
+ val streamB = streamGraph[streamConfigB]
+ val streamC = streamGraph[streamConfigC]
- val stream2 = streamGraph.outputs[1]
- assertThat(stream2.streamUseCase).isEqualTo(OutputStream.StreamUseCase.STILL_CAPTURE)
+ // Read the list of outputConfigs (in order)
+ val outputConfigAt0 = streamGraph.outputConfigs[0]
+ val outputConfigAt1 = streamGraph.outputConfigs[1]
+ val outputConfigAt2 = streamGraph.outputConfigs[2]
- val stream3 = streamGraph.outputs[2]
- assertThat(stream3.streamUseCase).isEqualTo(OutputStream.StreamUseCase.DEFAULT)
+ // Assert that the outputConfig order is B, C, A because A is moved to the bottom of the
+ // list due to StreamUseHint.VIDEO_RECORD
+ assertThat(outputConfigAt0.streams).containsExactly(streamB)
+ assertThat(outputConfigAt1.streams).containsExactly(streamC)
+ assertThat(outputConfigAt2.streams).containsExactly(streamA)
}
@Test
diff --git a/camera/camera-camera2/build.gradle b/camera/camera-camera2/build.gradle
index af17665..44b0f84 100644
--- a/camera/camera-camera2/build.gradle
+++ b/camera/camera-camera2/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
@@ -40,7 +46,7 @@
testImplementation(libs.robolectric)
testImplementation(libs.mockitoCore4)
testImplementation(libs.kotlinCoroutinesTest)
- testImplementation("androidx.annotation:annotation-experimental:1.1.0")
+ testImplementation(project(":annotation:annotation-experimental"))
testImplementation("androidx.concurrent:concurrent-futures-ktx:1.1.0")
testImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.3.1")
testImplementation(project(":camera:camera-video"))
@@ -65,7 +71,7 @@
}
androidTestImplementation(libs.kotlinStdlib)
androidTestImplementation(libs.kotlinCoroutinesAndroid)
- androidTestImplementation("androidx.annotation:annotation-experimental:1.1.0")
+ androidTestImplementation(project(":annotation:annotation-experimental"))
androidTestImplementation(project(":internal-testutils-truth"))
androidTestImplementation("org.jetbrains.kotlinx:atomicfu:0.13.1")
androidTestImplementation("androidx.exifinterface:exifinterface:1.0.0")
diff --git a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraInfoImpl.java b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraInfoImpl.java
index 877cdca..cb9ccd9 100644
--- a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraInfoImpl.java
+++ b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraInfoImpl.java
@@ -391,6 +391,7 @@
}
}
+ @OptIn(markerClass = androidx.camera.core.ExperimentalZeroShutterLag.class)
@Override
public boolean isZslSupported() {
return Build.VERSION.SDK_INT >= 23 && isPrivateReprocessingSupported()
diff --git a/camera/camera-core/build.gradle b/camera/camera-core/build.gradle
index 1e017ca..bc1c4d8 100644
--- a/camera/camera-core/build.gradle
+++ b/camera/camera-core/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
@@ -27,7 +33,7 @@
api("androidx.annotation:annotation:1.2.0")
api("androidx.lifecycle:lifecycle-livedata:2.1.0")
api(libs.guavaListenableFuture)
- api("androidx.annotation:annotation-experimental:1.1.0")
+ api(project(":annotation:annotation-experimental"))
api(libs.kotlinStdlib) // Added for annotation-experimental
api("androidx.core:core:1.1.0")
implementation("androidx.exifinterface:exifinterface:1.3.2")
diff --git a/camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java b/camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java
index 37e1ec8..e06e4e1 100644
--- a/camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java
+++ b/camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java
@@ -1007,6 +1007,7 @@
*
* @return Compression quality of the captured JPEG image.
*/
+ @OptIn(markerClass = ExperimentalZeroShutterLag.class)
@IntRange(from = 1, to = 100)
private int getJpegQualityInternal() {
ImageCaptureConfig imageCaptureConfig = (ImageCaptureConfig) getCurrentConfig();
@@ -1468,6 +1469,7 @@
* Capture mode options for ImageCapture. A picture will always be taken regardless of
* mode, and the mode will be used on devices that support it.
*/
+ @OptIn(markerClass = androidx.camera.core.ExperimentalZeroShutterLag.class)
@IntDef({CAPTURE_MODE_MAXIMIZE_QUALITY, CAPTURE_MODE_MINIMIZE_LATENCY,
CAPTURE_MODE_ZERO_SHUTTER_LAG})
@Retention(RetentionPolicy.SOURCE)
diff --git a/camera/camera-core/src/main/java/androidx/camera/core/streamsharing/ResolutionsMerger.java b/camera/camera-core/src/main/java/androidx/camera/core/streamsharing/ResolutionsMerger.java
index 3ce389e..5165c31 100644
--- a/camera/camera-core/src/main/java/androidx/camera/core/streamsharing/ResolutionsMerger.java
+++ b/camera/camera-core/src/main/java/androidx/camera/core/streamsharing/ResolutionsMerger.java
@@ -50,6 +50,7 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
+import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -68,6 +69,8 @@
private static final double SAME_AREA_WIDTH_HEIGHT_RATIO = sqrt(4.0 / 3.0 * 16.0 / 9.0);
@NonNull
+ private final Size mSensorSize;
+ @NonNull
private final Rational mSensorAspectRatio;
@NonNull
private final Rational mFallbackAspectRatio;
@@ -96,6 +99,7 @@
ResolutionsMerger(@NonNull Size sensorSize, @NonNull Set<UseCaseConfig<?>> childrenConfigs,
@NonNull SupportedOutputSizesSorter supportedOutputSizesSorter,
@NonNull List<Size> cameraSupportedResolutions) {
+ mSensorSize = sensorSize;
mSensorAspectRatio = getSensorAspectRatio(sensorSize);
mFallbackAspectRatio = getFallbackAspectRatio(mSensorAspectRatio);
mChildrenConfigs = childrenConfigs;
@@ -121,7 +125,7 @@
candidateSizes = getSupportedPrivResolutions(parentSupportedSizesMap);
}
- return mergeChildrenResolutions(candidateSizes);
+ return selectParentResolutions(candidateSizes);
}
/**
@@ -192,8 +196,9 @@
* Returns the preferred child size with considering parent size and child's configuration.
*
* <p>Returns the first size in the child's ordered size list that can be cropped from {@code
- * parentSize} without upscaling it and causing double-cropping, or {@code parentSize} if no
- * matching is found.
+ * parentSize} without upscaling it, or {@code parentSize} if no matching is found.
+ *
+ * <p>The child size not causing double-cropping will be selected in priority.
*
* <p>Notes that the input {@code childConfig} is expected to be one of the values that use to
* construct the {@link ResolutionsMerger}, if not an IllegalArgumentException will be thrown.
@@ -201,17 +206,11 @@
@VisibleForTesting
@NonNull
Size getPreferredChildSize(@NonNull Size parentSize, @NonNull UseCaseConfig<?> childConfig) {
- boolean isSourceCropped = !isSensorAspectRatio(parentSize);
-
+ // Select the first child resolution that does not result in double-cropping and upscaling.
List<Size> candidateChildSizes = getSortedChildSizes(childConfig);
for (Size childSize : candidateChildSizes) {
- // Skip child sizes that need another cropping when source is already cropped.
- if (isSourceCropped) {
- boolean needAnotherCropping = !(isFallbackAspectRatio(parentSize)
- && isFallbackAspectRatio(childSize));
- if (needAnotherCropping) {
- continue;
- }
+ if (isDoubleCropping(parentSize, childSize)) {
+ continue;
}
if (!hasUpscaling(childSize, parentSize)) {
@@ -219,6 +218,16 @@
}
}
+ // Select the first child resolution that does not result in upscaling (might have
+ // smaller FOV due to double-cropping). This may occur when selecting parent resolutions
+ // that are expected to result in double-clipping in order to reduce binding failures in
+ // edge cases.
+ for (Size childSize : candidateChildSizes) {
+ if (!hasUpscaling(childSize, parentSize)) {
+ return childSize;
+ }
+ }
+
return parentSize;
}
@@ -251,40 +260,52 @@
}
@NonNull
- private List<Size> mergeChildrenResolutions(@NonNull List<Size> candidateParentResolutions) {
+ private List<Size> selectParentResolutions(@NonNull List<Size> candidateParentResolutions) {
// The following sequence of parent resolution selection is used to prevent double-cropping
// from happening:
- // 1. Add sensor aspect-ratio resolutions, which will not cause double-cropping when the
- // child resolution is in any aspect-ratio. This is to provide parent resolution that can
- // be accepted by children in general cases.
- // 2. Add fallback aspect-ratio resolutions, which will not cause double-cropping only when
- // the child resolution is in fallback aspect-ratio.
+ // 1. Add sensor aspect-ratio resolutions, which do not result in double-cropping with any
+ // aspect-ratio of child resolution. This is to provide parent resolution that can be
+ // accepted by children in general cases.
+ // 2. Add fallback aspect-ratio (the one between 4:3 and 16:9 that is not sensor
+ // aspect-ratio) resolutions, that can crop/downscale to at least one child size for
+ // each child.
+ // 3. Add other aspect-ratio resolutions, that can crop/downscale to at least one child
+ // size for each child.
+ // The parent sizes added in step 2 and step 3 will only be used to crop to child sizes
+ // that do not result in double-cropping. For example, if childRatio < parentRatio <
+ // sensorRatio or childRatio > parentRatio > sensorRatio, then there is no double-cropping.
List<Size> result = new ArrayList<>();
// Add resolutions for sensor aspect-ratio.
if (needToAddSensorResolutions()) {
- result.addAll(mergeChildrenResolutionsByAspectRatio(mSensorAspectRatio,
- candidateParentResolutions));
+ result.addAll(selectParentResolutionsByAspectRatio(mSensorAspectRatio,
+ candidateParentResolutions, false));
}
- // Add resolutions for fallback aspect-ratio if needed.
- if (needToAddFallbackResolutions()) {
- result.addAll(mergeChildrenResolutionsByAspectRatio(mFallbackAspectRatio,
- candidateParentResolutions));
- }
+ // Add resolutions for fallback aspect-ratio.
+ result.addAll(selectParentResolutionsByAspectRatio(mFallbackAspectRatio,
+ candidateParentResolutions, false));
- // TODO(b/315098647): When the resulting parent resolution list is empty, consider adding
- // resolutions that are neither 4:3 nor 16:9, but have a high overlap area (e.g. 80%)
- // compared to the sensor size, which do not cause severe reduction of FOV, to prevent
- // binding failures in some edge cases.
+ // Add other aspect-ratio resolutions. Resolutions with larger FOV will be added first.
+ result.addAll(selectOtherAspectRatioParentResolutionsWithFovPriority(
+ candidateParentResolutions, false));
+
+ if (result.isEmpty()) {
+ // When the resulting parent resolution list is empty (this may be due to the camera
+ // not supporting 4:3 and 16:9 resolutions or a strict ResolutionSelector settings),
+ // add resolutions that are neither 4:3 nor 16:9 to prevent binding failures.
+ // Resolutions with larger FOV will be added first.
+ result.addAll(selectOtherAspectRatioParentResolutionsWithFovPriority(
+ candidateParentResolutions, true));
+ }
Logger.d(TAG, "Parent resolutions: " + result);
return result;
}
- private List<Size> mergeChildrenResolutionsByAspectRatio(@NonNull Rational aspectRatio,
- @NonNull List<Size> candidateParentResolutions) {
+ private List<Size> selectParentResolutionsByAspectRatio(@NonNull Rational aspectRatio,
+ @NonNull List<Size> candidateParentResolutions, boolean allowDoubleCropping) {
List<Size> candidates = filterResolutionsByAspectRatio(aspectRatio,
candidateParentResolutions);
sortInDescendingOrder(candidates);
@@ -293,9 +314,12 @@
Set<Size> sizesTooLarge = new HashSet<>(candidates);
for (UseCaseConfig<?> childConfig : mChildrenConfigs) {
List<Size> childSizes = getSortedChildSizes(childConfig);
+ if (!allowDoubleCropping) {
+ childSizes = filterOutChildSizesCausingDoubleCropping(aspectRatio, childSizes);
+ }
if (childSizes.isEmpty()) {
- // When the list is empty, which means no child required resolutions are supported,
- // make the parent list to be empty to reflect this.
+ // When the list is empty, which means no child sizes match requirement, make the
+ // parent list to be empty to reflect this.
return new ArrayList<>();
}
@@ -313,6 +337,66 @@
return result;
}
+ @NonNull
+ private List<Size> selectOtherAspectRatioParentResolutionsWithFovPriority(
+ @NonNull List<Size> candidates, boolean allowDoubleCropping) {
+ Map<Rational, List<Size>> ratioToSizesMap = groupSizesByAspectRatio(candidates);
+
+ // Get aspect-ratio of candidate parent sizes and sort by overlapping area (FOV) in
+ // descending order.
+ List<Rational> ratios = new ArrayList<>(ratioToSizesMap.keySet());
+ sortByFov(ratios);
+
+ // Add resolutions that are neither 4:3 nor 16:9. Resolutions with larger FOV will be
+ // added first.
+ List<Size> result = new ArrayList<>();
+ for (Rational ratio: ratios) {
+ if (ratio.equals(ASPECT_RATIO_16_9) || ratio.equals(ASPECT_RATIO_4_3)) {
+ continue;
+ }
+
+ List<Size> sizes = Objects.requireNonNull(ratioToSizesMap.get(ratio));
+ result.addAll(selectParentResolutionsByAspectRatio(ratio, sizes, allowDoubleCropping));
+ }
+
+ return result;
+ }
+
+ @NonNull
+ private Map<Rational, List<Size>> groupSizesByAspectRatio(@NonNull List<Size> sizes) {
+ Map<Rational, List<Size>> result = new HashMap<>();
+
+ // Add 4:3 and 16:9 first so that other mod-16 sizes won't introduce additional keys.
+ result.put(ASPECT_RATIO_4_3, new ArrayList<>());
+ result.put(ASPECT_RATIO_16_9, new ArrayList<>());
+
+ // Group sizes by aspect-ratio with mod-16 considered.
+ for (Size size : sizes) {
+ if (size.getHeight() <= 0) {
+ continue;
+ }
+
+ // Get the aspect-ratio group if it is ready existed.
+ List<Size> group = null;
+ for (Rational ratio : result.keySet()) {
+ if (hasMatchingAspectRatio(size, ratio)) {
+ group = result.get(ratio);
+ break;
+ }
+ }
+
+ // Create a new aspect-ratio group if it is not existed.
+ if (group == null) {
+ group = new ArrayList<>();
+ result.put(toRational(size), group);
+ }
+
+ Objects.requireNonNull(group).add(size);
+ }
+
+ return result;
+ }
+
/**
* Gets child sizes sorted by {@link SupportedOutputSizesSorter}.
*
@@ -347,16 +431,6 @@
return false;
}
- private boolean needToAddFallbackResolutions() {
- // Need to add fallback resolutions if any required resolution is fallback aspect-ratio.
- for (Size size : getChildrenRequiredResolutions()) {
- if (hasMatchingAspectRatio(size, mFallbackAspectRatio)) {
- return true;
- }
- }
- return false;
- }
-
@NonNull
private Set<Size> getChildrenRequiredResolutions() {
Set<Size> result = new HashSet<>();
@@ -368,12 +442,64 @@
return result;
}
- private boolean isSensorAspectRatio(@NonNull Size size) {
- return hasMatchingAspectRatio(size, mSensorAspectRatio);
+ @NonNull
+ private List<Size> filterOutChildSizesCausingDoubleCropping(@NonNull Rational parentAspectRatio,
+ @NonNull List<Size> childSizes) {
+ List<Size> result = new ArrayList<>();
+ for (Size childSize: childSizes) {
+ if (!isDoubleCropping(parentAspectRatio, childSize)) {
+ result.add(childSize);
+ }
+ }
+
+ return result;
}
- private boolean isFallbackAspectRatio(@NonNull Size size) {
- return hasMatchingAspectRatio(size, mFallbackAspectRatio);
+ private boolean isDoubleCropping(@NonNull Rational parentRatio, @NonNull Size childSize) {
+ // No double cropping results when the sensor and parent have the same aspect ratio or
+ // when the parent and child have the same aspect ratio.
+ if (mSensorAspectRatio.equals(parentRatio) || hasMatchingAspectRatio(childSize,
+ parentRatio)) {
+ return false;
+ }
+
+ // When the cropping from sensor to parent and from parent to child are in the same
+ // direction, there is no double-cropping.
+ return areCroppingInDifferentDirection(
+ mSensorAspectRatio.floatValue(),
+ parentRatio.floatValue(),
+ toRational(childSize).floatValue()
+ );
+ }
+
+ private boolean isDoubleCropping(@NonNull Size parentSize, @NonNull Size childSize) {
+ return isDoubleCropping(toRational(parentSize), childSize);
+ }
+
+ private boolean areCroppingInDifferentDirection(float sensorRatioValue, float parentRatioValue,
+ float childRatioValue) {
+ // There is only one cropping direction When the sensor and parent have the same
+ // aspect-ratio or when the parent and child have the same aspect-ratio.
+ if (sensorRatioValue == parentRatioValue || parentRatioValue == childRatioValue) {
+ return false;
+ }
+
+ // When childRatio < parentRatio < sensorRatio or childRatio > parentRatio > sensorRatio,
+ // the cropping from sensor to parent and from parent to child are in the same direction.
+ if (sensorRatioValue > parentRatioValue) {
+ return parentRatioValue < childRatioValue;
+ } else {
+ return parentRatioValue > childRatioValue;
+ }
+ }
+
+ /**
+ * Sorts the input aspect-ratio by overlapping area with sensor (FOV) in descending order.
+ */
+ private void sortByFov(@NonNull List<Rational> ratios) {
+ Rational actualSensorAspectRatio = toRational(mSensorSize);
+ Collections.sort(ratios, new CompareAspectRatioByOverlappingAreaToReference(
+ actualSensorAspectRatio, true));
}
/**
@@ -383,7 +509,7 @@
@NonNull
static Rect getCropRectOfReferenceAspectRatio(@NonNull Size targetSize,
@NonNull Size referenceSize) {
- Rational referenceRatio = new Rational(referenceSize.getWidth(), referenceSize.getHeight());
+ Rational referenceRatio = toRational(referenceSize);
return getCenterCroppedRectangle(referenceRatio, targetSize);
}
@@ -438,7 +564,7 @@
@NonNull Size baseSize) {
int width = baseSize.getWidth();
int height = baseSize.getHeight();
- Rational referenceRatio = new Rational(width, height);
+ Rational referenceRatio = toRational(baseSize);
RectF cropRectInFloat;
if (cropRatio.floatValue() == referenceRatio.floatValue()) {
@@ -593,4 +719,53 @@
return childSize.getHeight() > parentSize.getHeight()
|| childSize.getWidth() > parentSize.getWidth();
}
+
+ @NonNull
+ private static Rational toRational(@NonNull Size size) {
+ // For 4:3 and 16:9, use hasMatchingAspectRatio to take "mod 16 calculation" into
+ // consideration. For example, a standard 16:9 supported size is 1920x1080. It may become
+ // 1920x1088 on some devices because 1088 is multiple of 16.
+ if (hasMatchingAspectRatio(size, ASPECT_RATIO_4_3)) {
+ return ASPECT_RATIO_4_3;
+ } else if (hasMatchingAspectRatio(size, ASPECT_RATIO_16_9)) {
+ return ASPECT_RATIO_16_9;
+ } else {
+ return new Rational(size.getWidth(), size.getHeight());
+ }
+ }
+
+ private static float computeAreaOverlapping(@NonNull Rational croppingRatio,
+ @NonNull Rational baseRatio) {
+ float croppingRatioValue = croppingRatio.floatValue();
+ float baseRatioValue = baseRatio.floatValue();
+
+ return (croppingRatioValue > baseRatioValue) ? baseRatioValue / croppingRatioValue
+ : croppingRatioValue / baseRatioValue;
+ }
+
+ private static class CompareAspectRatioByOverlappingAreaToReference implements
+ Comparator<Rational> {
+ @NonNull
+ private final Rational mReferenceAspectRatio;
+ private final boolean mReverse;
+
+ /** Creates a comparator which can reverse the total ordering. */
+ CompareAspectRatioByOverlappingAreaToReference(@NonNull Rational referenceAspectRatio,
+ boolean reverse) {
+ mReferenceAspectRatio = referenceAspectRatio;
+ mReverse = reverse;
+ }
+
+ @Override
+ public int compare(@NonNull Rational lhs, @NonNull Rational rhs) {
+ float lhsOverlapping = computeAreaOverlapping(lhs, mReferenceAspectRatio);
+ float rhsOverlapping = computeAreaOverlapping(rhs, mReferenceAspectRatio);
+
+ if (mReverse) {
+ return Float.compare(rhsOverlapping, lhsOverlapping);
+ } else {
+ return Float.compare(lhsOverlapping, rhsOverlapping);
+ }
+ }
+ }
}
diff --git a/camera/camera-core/src/test/java/androidx/camera/core/streamsharing/ResolutionsMergerTest.kt b/camera/camera-core/src/test/java/androidx/camera/core/streamsharing/ResolutionsMergerTest.kt
index c4794b6..dde7b9e 100644
--- a/camera/camera-core/src/test/java/androidx/camera/core/streamsharing/ResolutionsMergerTest.kt
+++ b/camera/camera-core/src/test/java/androidx/camera/core/streamsharing/ResolutionsMergerTest.kt
@@ -81,8 +81,8 @@
val config1 = createUseCaseConfig()
val config2 = createUseCaseConfig()
val childConfigs = setOf(config1, config2)
- val candidateChildSizes1 = listOf(SIZE_1920_1080, SIZE_1280_720) // 16:9
- val candidateChildSizes2 = listOf(SIZE_1280_960, SIZE_960_720, SIZE_640_480) // 4:3
+ val candidateChildSizes1 = listOf(SIZE_1920_1080, SIZE_1280_720, SIZE_640_480) // 16:9, 4:3
+ val candidateChildSizes2 = listOf(SIZE_1280_960, SIZE_960_720, SIZE_1280_720) // 4:3, 16:9
val sorter = FakeSupportedOutputSizesSorter(
mapOf(
config1 to candidateChildSizes1,
@@ -91,12 +91,12 @@
)
val merger = ResolutionsMerger(sensorSize, childConfigs, sorter, CAMERA_SUPPORTED_SIZES)
- // Act & Assert, should returns a list that concatenates 4:3 resolutions before 16:9
- // resolutions and removes resolutions that are too large (no need for multiple resolutions
- // that can be cropped to all child sizes) and too small (causing upscaling).
+ // Act & Assert, should returns a list that concatenates sensor (4:3) resolutions before
+ // 16:9 resolutions and removes resolutions that are too large (no need for multiple
+ // resolutions that can be cropped to all child sizes) and too small (causing upscaling).
val parentConfig = MutableOptionsBundle.create()
assertThat(merger.getMergedResolutions(parentConfig)).containsExactly(
- SIZE_1920_1440, SIZE_1280_960, SIZE_1920_1080, SIZE_1280_720
+ SIZE_1920_1440, SIZE_1280_960, SIZE_960_720, SIZE_1920_1080, SIZE_1280_720
).inOrder()
}
@@ -150,6 +150,107 @@
).inOrder()
}
+ @Test
+ fun getMergedResolutions_whenDifferentChildRequiresDifferentAspectRatio_canReturnCorrectly() {
+ // Arrange.
+ val sensorSize = SIZE_3264_2448 // 4:3
+ val config1 = createUseCaseConfig()
+ val config2 = createUseCaseConfig()
+ val childConfigs = setOf(config1, config2)
+ val candidateChildSizes1 = listOf(SIZE_1920_1080, SIZE_1280_720) // 16:9
+ val candidateChildSizes2 = listOf(SIZE_1280_960, SIZE_960_720, SIZE_640_480) // 4:3
+ val sorter = FakeSupportedOutputSizesSorter(
+ mapOf(
+ config1 to candidateChildSizes1,
+ config2 to candidateChildSizes2
+ )
+ )
+ val merger = ResolutionsMerger(sensorSize, childConfigs, sorter, CAMERA_SUPPORTED_SIZES)
+
+ // Act & Assert, should returns a list of sensor (4:3) resolutions and removes resolutions
+ // that are too large and too small.
+ val parentConfig = MutableOptionsBundle.create()
+ assertThat(merger.getMergedResolutions(parentConfig)).containsExactly(
+ SIZE_1920_1440, SIZE_1280_960
+ ).inOrder()
+ }
+
+ @Test
+ fun getMergedResolutions_whenAllChildrenRequires720To480Resolution_canReturnCorrectly() {
+ // Arrange.
+ val sensorSize = SIZE_3264_2448 // 4:3
+ val config1 = createUseCaseConfig()
+ val config2 = createUseCaseConfig()
+ val childConfigs = setOf(config1, config2)
+ val candidateChildSizes1 = listOf(SIZE_2560_1920, SIZE_1920_1440, SIZE_720_480) // 4:3, 3:2
+ val candidateChildSizes2 = listOf(SIZE_1280_960, SIZE_960_720, SIZE_720_480) // 4:3, 3:2
+ val sorter = FakeSupportedOutputSizesSorter(
+ mapOf(
+ config1 to candidateChildSizes1,
+ config2 to candidateChildSizes2
+ )
+ )
+ val merger = ResolutionsMerger(sensorSize, childConfigs, sorter, CAMERA_SUPPORTED_SIZES)
+
+ // Act & Assert, should returns a list that concatenates 4:3 resolutions before 3:2
+ // resolutions and removes resolutions that are too large (no need for multiple resolutions
+ // that can be cropped to all child sizes) and too small (causing upscaling).
+ val parentConfig = MutableOptionsBundle.create()
+ assertThat(merger.getMergedResolutions(parentConfig)).containsExactly(
+ SIZE_2560_1920, SIZE_1920_1440, SIZE_1280_960, SIZE_960_720, SIZE_720_480
+ ).inOrder()
+ }
+
+ @Test
+ fun getMergedResolutions_whenOnlyOneChildRequires720To480Resolution_canReturnCorrectly() {
+ // Arrange.
+ val sensorSize = SIZE_3264_2448 // 4:3
+ val config1 = createUseCaseConfig()
+ val config2 = createUseCaseConfig()
+ val childConfigs = setOf(config1, config2)
+ val candidateChildSizes1 = listOf(SIZE_2560_1920, SIZE_1920_1440, SIZE_720_480) // 4:3, 3:2
+ val candidateChildSizes2 = listOf(SIZE_1280_960, SIZE_960_720, SIZE_192_108) // 4:3, 16:9
+ val sorter = FakeSupportedOutputSizesSorter(
+ mapOf(
+ config1 to candidateChildSizes1,
+ config2 to candidateChildSizes2
+ )
+ )
+ val merger = ResolutionsMerger(sensorSize, childConfigs, sorter, CAMERA_SUPPORTED_SIZES)
+
+ // Act & Assert, should returns a list that concatenates 4:3 resolutions before 3:2
+ // resolutions and removes resolutions that are too large and too small.
+ val parentConfig = MutableOptionsBundle.create()
+ assertThat(merger.getMergedResolutions(parentConfig)).containsExactly(
+ SIZE_2560_1920, SIZE_1920_1440, SIZE_1280_960, SIZE_960_720, SIZE_720_480
+ ).inOrder()
+ }
+
+ @Test
+ fun getMergedResolutions_whenNeither16To9Nor4To3AreSupported_canReturnCorrectly() {
+ // Arrange.
+ val sensorSize = SIZE_3840_2000 // near 2:1
+ val config1 = createUseCaseConfig()
+ val config2 = createUseCaseConfig()
+ val childConfigs = setOf(config1, config2)
+ val candidateChildSizes1 = listOf(SIZE_2560_1440, SIZE_1280_720) // 16:9
+ val candidateChildSizes2 = listOf(SIZE_1920_1080, SIZE_960_540) // 16:9
+ val sorter = FakeSupportedOutputSizesSorter(
+ mapOf(
+ config1 to candidateChildSizes1,
+ config2 to candidateChildSizes2
+ )
+ )
+ val merger = ResolutionsMerger(sensorSize, childConfigs, sorter, SIZES_OTHER_ASPECT_RATIO)
+
+ // Act & Assert, should returns a list of near 2:1 resolutions and removes resolutions that
+ // are too large and too small.
+ val parentConfig = MutableOptionsBundle.create()
+ assertThat(merger.getMergedResolutions(parentConfig)).containsExactly(
+ SIZE_3840_2000, SIZE_3840_1920, SIZE_2560_1280, SIZE_1440_720
+ ).inOrder()
+ }
+
@Test(expected = IllegalArgumentException::class)
fun getPreferredChildSizePair_whenConfigNotPassedToConstructor_throwsException() {
// Arrange.
@@ -287,7 +388,9 @@
SIZE_960_720,
// 16:9
SIZE_1920_1080,
- SIZE_960_540
+ SIZE_960_540,
+ // 3:2
+ SIZE_720_480
)
val sorter = FakeSupportedOutputSizesSorter(mapOf(config to candidateChildSizes))
val merger = ResolutionsMerger(SENSOR_SIZE, setOf(config), sorter, CAMERA_SUPPORTED_SIZES)
@@ -296,6 +399,7 @@
// double-cropping.
assertThat(merger.getPreferredChildSize(SIZE_2560_1440, config)).isEqualTo(SIZE_1920_1080)
assertThat(merger.getPreferredChildSize(SIZE_1280_720, config)).isEqualTo(SIZE_960_540)
+ assertThat(merger.getPreferredChildSize(SIZE_720_480, config)).isEqualTo(SIZE_720_480)
// Act & Assert, should returns parent size when no matching.
assertThat(merger.getPreferredChildSize(SIZE_192_108, config)).isEqualTo(SIZE_192_108)
@@ -624,15 +728,23 @@
SIZE_192_108
)
// Other aspect-ratio resolutions.
+ private val SIZE_3840_2000 = Size(3840, 2000)
+ private val SIZE_3840_1920 = Size(3840, 1920)
+ private val SIZE_2560_1280 = Size(2560, 1280)
private val SIZE_1440_720 = Size(1440, 720)
private val SIZE_800_800 = Size(800, 800)
private val SIZE_720_720 = Size(720, 720)
+ private val SIZE_720_480 = Size(720, 480)
private val SIZE_500_400 = Size(500, 400)
private val SIZE_176_144 = Size(176, 144)
private val SIZES_OTHER_ASPECT_RATIO = listOf(
+ SIZE_3840_2000,
+ SIZE_3840_1920,
+ SIZE_2560_1280,
SIZE_1440_720,
SIZE_800_800,
SIZE_720_720,
+ SIZE_720_480,
SIZE_500_400,
SIZE_176_144
)
diff --git a/camera/camera-extensions/build.gradle b/camera/camera-extensions/build.gradle
index bf8110aa..c9c82b6 100644
--- a/camera/camera-extensions/build.gradle
+++ b/camera/camera-extensions/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/camera/camera-lifecycle/build.gradle b/camera/camera-lifecycle/build.gradle
index 1c433c2..b224fbb 100644
--- a/camera/camera-lifecycle/build.gradle
+++ b/camera/camera-lifecycle/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
@@ -45,7 +51,7 @@
}
androidTestImplementation(libs.kotlinStdlib)
androidTestImplementation(libs.kotlinCoroutinesAndroid)
- androidTestImplementation("androidx.annotation:annotation-experimental:1.1.0")
+ androidTestImplementation(project(":annotation:annotation-experimental"))
androidTestImplementation("androidx.concurrent:concurrent-futures-ktx:1.1.0")
androidTestImplementation(project(":internal-testutils-truth"))
androidTestImplementation("org.jetbrains.kotlinx:atomicfu:0.13.1")
diff --git a/camera/camera-testing/build.gradle b/camera/camera-testing/build.gradle
index 99f9fd1..a763ddd 100644
--- a/camera/camera-testing/build.gradle
+++ b/camera/camera-testing/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeCameraInfoInternal.java b/camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeCameraInfoInternal.java
index 02f5b88..a490b1e 100644
--- a/camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeCameraInfoInternal.java
+++ b/camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeCameraInfoInternal.java
@@ -337,6 +337,7 @@
return mIsFocusMeteringSupported;
}
+ @androidx.camera.core.ExperimentalZeroShutterLag
@Override
public boolean isZslSupported() {
return false;
diff --git a/camera/camera-testlib-extensions/build.gradle b/camera/camera-testlib-extensions/build.gradle
index 7e445ca..155b67b 100644
--- a/camera/camera-testlib-extensions/build.gradle
+++ b/camera/camera-testlib-extensions/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/camera/camera-view/build.gradle b/camera/camera-view/build.gradle
index 272d9e1..c5dbaba 100644
--- a/camera/camera-view/build.gradle
+++ b/camera/camera-view/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
@@ -29,7 +35,7 @@
api(project(":camera:camera-core"))
api(project(":camera:camera-video"))
implementation(project(":camera:camera-lifecycle"))
- implementation("androidx.annotation:annotation-experimental:1.3.1")
+ implementation(project(":annotation:annotation-experimental"))
implementation(libs.guavaListenableFuture)
implementation("androidx.core:core:1.3.2")
implementation("androidx.concurrent:concurrent-futures:1.0.0")
diff --git a/camera/camera-viewfinder-compose/build.gradle b/camera/camera-viewfinder-compose/build.gradle
index d2e5af0..3f2ae90 100644
--- a/camera/camera-viewfinder-compose/build.gradle
+++ b/camera/camera-viewfinder-compose/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/camera/camera-viewfinder-core/build.gradle b/camera/camera-viewfinder-core/build.gradle
index c99f783..7577a8b 100644
--- a/camera/camera-viewfinder-core/build.gradle
+++ b/camera/camera-viewfinder-core/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
@@ -25,7 +32,7 @@
dependencies {
api("androidx.annotation:annotation:1.2.0")
- implementation("androidx.annotation:annotation-experimental:1.3.1")
+ implementation(project(":annotation:annotation-experimental"))
implementation(libs.guavaListenableFuture)
implementation("androidx.core:core:1.7.0")
implementation("androidx.concurrent:concurrent-futures:1.1.0")
diff --git a/camera/camera-viewfinder-core/samples/build.gradle b/camera/camera-viewfinder-core/samples/build.gradle
index 12f0f62..8d9dbaf 100644
--- a/camera/camera-viewfinder-core/samples/build.gradle
+++ b/camera/camera-viewfinder-core/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/camera/camera-viewfinder/build.gradle b/camera/camera-viewfinder/build.gradle
index 2f498f2..d7e9211 100644
--- a/camera/camera-viewfinder/build.gradle
+++ b/camera/camera-viewfinder/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
@@ -25,7 +32,7 @@
dependencies {
api("androidx.annotation:annotation:1.2.0")
- implementation("androidx.annotation:annotation-experimental:1.3.1")
+ implementation(project(":annotation:annotation-experimental"))
implementation(libs.guavaListenableFuture)
implementation("androidx.core:core:1.7.0")
implementation("androidx.concurrent:concurrent-futures:1.1.0")
diff --git a/camera/integration-tests/avsynctestapp/build.gradle b/camera/integration-tests/avsynctestapp/build.gradle
index 9c5f5cf..14e4cc2 100644
--- a/camera/integration-tests/avsynctestapp/build.gradle
+++ b/camera/integration-tests/avsynctestapp/build.gradle
@@ -63,6 +63,9 @@
exclude(group:"androidx.test")
}
+ // Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath.
+ androidTestImplementation(project(":annotation:annotation-experimental"))
+
// Testing framework
testImplementation(libs.kotlinCoroutinesTest)
testImplementation(libs.junit)
diff --git a/camera/integration-tests/coretestapp/build.gradle b/camera/integration-tests/coretestapp/build.gradle
index fef8eda..24327c8 100644
--- a/camera/integration-tests/coretestapp/build.gradle
+++ b/camera/integration-tests/coretestapp/build.gradle
@@ -97,6 +97,9 @@
// explicitly add runner here to force consistency with androidTestImplementation
debugImplementation(libs.testRunner)
+ // Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath.
+ androidTestImplementation(project(":annotation:annotation-experimental"))
+
// Testing framework
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testExtJunit)
diff --git a/camera/integration-tests/diagnosetestapp/build.gradle b/camera/integration-tests/diagnosetestapp/build.gradle
index 638ee37..28ebe70 100644
--- a/camera/integration-tests/diagnosetestapp/build.gradle
+++ b/camera/integration-tests/diagnosetestapp/build.gradle
@@ -64,6 +64,9 @@
compileOnly(libs.kotlinCompiler)
+ // Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath.
+ androidTestImplementation(project(":annotation:annotation-experimental"))
+
// Testing framework
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
diff --git a/camera/integration-tests/extensionstestapp/build.gradle b/camera/integration-tests/extensionstestapp/build.gradle
index de50c02..3137f0a 100644
--- a/camera/integration-tests/extensionstestapp/build.gradle
+++ b/camera/integration-tests/extensionstestapp/build.gradle
@@ -15,6 +15,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.ApkCopyHelperKt
plugins {
@@ -66,6 +73,9 @@
implementation(libs.guavaAndroid)
implementation("androidx.viewpager2:viewpager2:1.0.0")
+ // Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath.
+ androidTestImplementation(project(":annotation:annotation-experimental"))
+
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testRunner)
diff --git a/camera/integration-tests/timingtestapp/build.gradle b/camera/integration-tests/timingtestapp/build.gradle
index 822ad5d..8eb3d62 100644
--- a/camera/integration-tests/timingtestapp/build.gradle
+++ b/camera/integration-tests/timingtestapp/build.gradle
@@ -66,6 +66,9 @@
implementation(libs.kotlinStdlib)
implementation(libs.kotlinCoroutinesAndroid)
+ // Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath.
+ androidTestImplementation(project(":annotation:annotation-experimental"))
+
// Testing framework
androidTestImplementation(project(":concurrent:concurrent-futures"))
androidTestImplementation(libs.testExtJunit)
diff --git a/camera/integration-tests/uiwidgetstestapp/build.gradle b/camera/integration-tests/uiwidgetstestapp/build.gradle
index 27c73ed..598b557 100644
--- a/camera/integration-tests/uiwidgetstestapp/build.gradle
+++ b/camera/integration-tests/uiwidgetstestapp/build.gradle
@@ -98,6 +98,9 @@
implementation 'androidx.compose.material:material-icons-extended:1.4.0'
androidTestImplementation 'androidx.compose.ui:ui-test-junit4:1.1.1'
+ // Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath.
+ androidTestImplementation(project(":annotation:annotation-experimental"))
+
// Testing framework
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
diff --git a/camera/integration-tests/viewfindertestapp/build.gradle b/camera/integration-tests/viewfindertestapp/build.gradle
index b5afb537..f882ac2 100644
--- a/camera/integration-tests/viewfindertestapp/build.gradle
+++ b/camera/integration-tests/viewfindertestapp/build.gradle
@@ -58,6 +58,9 @@
compileOnly(libs.kotlinCompiler)
+ // Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath.
+ androidTestImplementation(project(":annotation:annotation-experimental"))
+
// Testing framework
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
diff --git a/camera/integration-tests/viewtestapp/build.gradle b/camera/integration-tests/viewtestapp/build.gradle
index b2073c2..8cdc4c2 100644
--- a/camera/integration-tests/viewtestapp/build.gradle
+++ b/camera/integration-tests/viewtestapp/build.gradle
@@ -86,6 +86,9 @@
implementation("androidx.compose.ui:ui-tooling:1.4.0")
implementation("androidx.activity:activity-compose:1.3.1")
+ // Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath.
+ androidTestImplementation(project(":annotation:annotation-experimental"))
+
// Testing framework
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
diff --git a/car/app/app-automotive/build.gradle b/car/app/app-automotive/build.gradle
index 56706ae..aaf75d3 100644
--- a/car/app/app-automotive/build.gradle
+++ b/car/app/app-automotive/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
@@ -24,7 +31,7 @@
dependencies {
api(project(":car:app:app"))
api(libs.guavaListenableFuture)
- api("androidx.annotation:annotation-experimental:1.3.1")
+ api(project(":annotation:annotation-experimental"))
implementation(libs.guavaAndroid)
implementation("androidx.concurrent:concurrent-futures:1.1.0")
implementation("androidx.fragment:fragment:1.3.0")
diff --git a/car/app/app-projected/build.gradle b/car/app/app-projected/build.gradle
index e453e6a..237ba43 100644
--- a/car/app/app-projected/build.gradle
+++ b/car/app/app-projected/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/car/app/app-samples/navigation/automotive/build.gradle b/car/app/app-samples/navigation/automotive/build.gradle
index 9984ce7..5b2284f 100644
--- a/car/app/app-samples/navigation/automotive/build.gradle
+++ b/car/app/app-samples/navigation/automotive/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/car/app/app-samples/navigation/common/build.gradle b/car/app/app-samples/navigation/common/build.gradle
index 0b5ec8f..d079e9e 100644
--- a/car/app/app-samples/navigation/common/build.gradle
+++ b/car/app/app-samples/navigation/common/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
@@ -33,7 +40,7 @@
implementation(project(":car:app:app"))
implementation 'androidx.core:core:1.7.0'
- implementation "androidx.annotation:annotation-experimental:1.3.1"
+ implementation project(":annotation:annotation-experimental")
implementation 'androidx.lifecycle:lifecycle-livedata:2.3.1'
implementation 'androidx.activity:activity:1.2.3'
}
diff --git a/car/app/app-samples/navigation/mobile/build.gradle b/car/app/app-samples/navigation/mobile/build.gradle
index ece98f3..c99a3f1 100644
--- a/car/app/app-samples/navigation/mobile/build.gradle
+++ b/car/app/app-samples/navigation/mobile/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/car/app/app-samples/showcase/common/build.gradle b/car/app/app-samples/showcase/common/build.gradle
index e9a455a5..fe9ac9f 100644
--- a/car/app/app-samples/showcase/common/build.gradle
+++ b/car/app/app-samples/showcase/common/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
@@ -33,7 +40,7 @@
debugImplementation(libs.leakcanary)
implementation("androidx.core:core:1.7.0")
- implementation "androidx.annotation:annotation-experimental:1.3.1"
+ implementation project(":annotation:annotation-experimental")
}
diff --git a/car/app/app-samples/showcase/mobile/build.gradle b/car/app/app-samples/showcase/mobile/build.gradle
index ac1eaeb..c5b6e95 100644
--- a/car/app/app-samples/showcase/mobile/build.gradle
+++ b/car/app/app-samples/showcase/mobile/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/car/app/app-testing/build.gradle b/car/app/app-testing/build.gradle
index 2659e6a..0abc8c7 100644
--- a/car/app/app-testing/build.gradle
+++ b/car/app/app-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
@@ -27,7 +34,7 @@
implementation "androidx.lifecycle:lifecycle-common-java8:2.2.0"
implementation 'androidx.annotation:annotation:1.1.0'
implementation(libs.robolectric)
- implementation("androidx.annotation:annotation-experimental:1.3.1")
+ implementation(project(":annotation:annotation-experimental"))
testImplementation(project(":car:app:app-projected"))
testImplementation(libs.junit)
diff --git a/car/app/app/build.gradle b/car/app/app/build.gradle
index 6bba4a7..4582736 100644
--- a/car/app/app/build.gradle
+++ b/car/app/app/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Release
import androidx.build.metalava.MetalavaRunnerKt
@@ -54,7 +61,7 @@
implementation ("androidx.media:media:1.6.0")
// Session and Screen both implement LifeCycleOwner so this needs to be exposed.
api("androidx.lifecycle:lifecycle-common-java8:2.2.0")
- api("androidx.annotation:annotation-experimental:1.3.1")
+ api(project(":annotation:annotation-experimental"))
annotationProcessor(libs.nullaway)
diff --git a/cardview/cardview/build.gradle b/cardview/cardview/build.gradle
index 85ca6c6..068396b 100644
--- a/cardview/cardview/build.gradle
+++ b/cardview/cardview/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/collection/collection-benchmark-kmp/build.gradle b/collection/collection-benchmark-kmp/build.gradle
index 0bad6ce..6b84523 100644
--- a/collection/collection-benchmark-kmp/build.gradle
+++ b/collection/collection-benchmark-kmp/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import androidx.build.Publish
import org.jetbrains.kotlin.konan.target.HostManager
diff --git a/collection/collection-benchmark/build.gradle b/collection/collection-benchmark/build.gradle
index dc86ea8..09e05f5 100644
--- a/collection/collection-benchmark/build.gradle
+++ b/collection/collection-benchmark/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
import org.jetbrains.kotlin.gradle.plugin.mpp.BitcodeEmbeddingMode
diff --git a/collection/collection-ktx/build.gradle b/collection/collection-ktx/build.gradle
index 04c7a84..1cdeaee 100644
--- a/collection/collection-ktx/build.gradle
+++ b/collection/collection-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/collection/collection/build.gradle b/collection/collection/build.gradle
index dded829..9d80dea 100644
--- a/collection/collection/build.gradle
+++ b/collection/collection/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/collection/integration-tests/testapp/build.gradle b/collection/integration-tests/testapp/build.gradle
index 67a0ce6..14410da 100644
--- a/collection/integration-tests/testapp/build.gradle
+++ b/collection/integration-tests/testapp/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/compose/animation/animation-core-lint/build.gradle b/compose/animation/animation-core-lint/build.gradle
index 0e84803..fcdf271 100644
--- a/compose/animation/animation-core-lint/build.gradle
+++ b/compose/animation/animation-core-lint/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
diff --git a/compose/animation/animation-core/build.gradle b/compose/animation/animation-core/build.gradle
index f36db96..4ba3872 100644
--- a/compose/animation/animation-core/build.gradle
+++ b/compose/animation/animation-core/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/animation/animation-core/samples/build.gradle b/compose/animation/animation-core/samples/build.gradle
index c90aace..dc3cfcbd 100644
--- a/compose/animation/animation-core/samples/build.gradle
+++ b/compose/animation/animation-core/samples/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/animation/animation-graphics/build.gradle b/compose/animation/animation-graphics/build.gradle
index 12df0f9..1c7a544 100644
--- a/compose/animation/animation-graphics/build.gradle
+++ b/compose/animation/animation-graphics/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/animation/animation-graphics/samples/build.gradle b/compose/animation/animation-graphics/samples/build.gradle
index c317288..c794e59 100644
--- a/compose/animation/animation-graphics/samples/build.gradle
+++ b/compose/animation/animation-graphics/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/animation/animation-lint/build.gradle b/compose/animation/animation-lint/build.gradle
index e71729a..ce9b351 100644
--- a/compose/animation/animation-lint/build.gradle
+++ b/compose/animation/animation-lint/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
diff --git a/compose/animation/animation-tooling-internal/build.gradle b/compose/animation/animation-tooling-internal/build.gradle
index 0faae84..0d41720 100644
--- a/compose/animation/animation-tooling-internal/build.gradle
+++ b/compose/animation/animation-tooling-internal/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/compose/animation/animation/build.gradle b/compose/animation/animation/build.gradle
index a03b360..4532e53 100644
--- a/compose/animation/animation/build.gradle
+++ b/compose/animation/animation/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/animation/animation/integration-tests/animation-demos/build.gradle b/compose/animation/animation/integration-tests/animation-demos/build.gradle
index 3d6e7aa..2eb0a79 100644
--- a/compose/animation/animation/integration-tests/animation-demos/build.gradle
+++ b/compose/animation/animation/integration-tests/animation-demos/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
diff --git a/compose/animation/animation/samples/build.gradle b/compose/animation/animation/samples/build.gradle
index 9fd59da..d7aecde 100644
--- a/compose/animation/animation/samples/build.gradle
+++ b/compose/animation/animation/samples/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/benchmark-utils/build.gradle b/compose/benchmark-utils/build.gradle
index 75e3b28..d43e9da 100644
--- a/compose/benchmark-utils/build.gradle
+++ b/compose/benchmark-utils/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
diff --git a/compose/compiler/compiler-hosted/build.gradle b/compose/compiler/compiler-hosted/build.gradle
index e4ce28e..dfa7c90 100644
--- a/compose/compiler/compiler-hosted/build.gradle
+++ b/compose/compiler/compiler-hosted/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import androidx.build.LibraryType
diff --git a/compose/compiler/compiler-hosted/integration-tests/build.gradle b/compose/compiler/compiler-hosted/integration-tests/build.gradle
index 9539eea..5f14477 100644
--- a/compose/compiler/compiler-hosted/integration-tests/build.gradle
+++ b/compose/compiler/compiler-hosted/integration-tests/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/compose/compiler/compiler-hosted/integration-tests/kotlin-compiler-repackaged/build.gradle b/compose/compiler/compiler-hosted/integration-tests/kotlin-compiler-repackaged/build.gradle
index 5fb10af..0c1c377c 100644
--- a/compose/compiler/compiler-hosted/integration-tests/kotlin-compiler-repackaged/build.gradle
+++ b/compose/compiler/compiler-hosted/integration-tests/kotlin-compiler-repackaged/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
diff --git a/compose/compiler/compiler-hosted/integration-tests/protobuf-test-classes/build.gradle b/compose/compiler/compiler-hosted/integration-tests/protobuf-test-classes/build.gradle
index b7168d5..40b8acd 100644
--- a/compose/compiler/compiler-hosted/integration-tests/protobuf-test-classes/build.gradle
+++ b/compose/compiler/compiler-hosted/integration-tests/protobuf-test-classes/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/RememberIntrinsicTransformTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/RememberIntrinsicTransformTests.kt
index 9aec5bf..9675502 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/RememberIntrinsicTransformTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/RememberIntrinsicTransformTests.kt
@@ -844,4 +844,23 @@
}
""",
)
+
+ @Test
+ fun testRememberWithDefaultParams() = verifyGoldenComposeIrTransform(
+ extra = """
+ import androidx.compose.runtime.*
+
+ val LocalColor = compositionLocalOf { 0 }
+ """,
+ source = """
+ import androidx.compose.runtime.*
+
+ @Composable fun Icon(
+ param: Int,
+ defaultParam: Int = LocalColor.current
+ ) {
+ val remembered = remember(param, defaultParam) { TODO() }
+ }
+ """
+ )
}
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/analysis/ComposableDeclarationCheckerTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/analysis/ComposableDeclarationCheckerTests.kt
index c6946ef..be507df 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/analysis/ComposableDeclarationCheckerTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/analysis/ComposableDeclarationCheckerTests.kt
@@ -285,6 +285,18 @@
}
@Test
+ fun testDefaultInterfaceComposablesWithDefaultParameters() {
+ check(
+ """
+ import androidx.compose.runtime.Composable
+ interface A {
+ @Composable fun foo(x: Int = <!ABSTRACT_COMPOSABLE_DEFAULT_PARAMETER_VALUE!>0<!>) {}
+ }
+ """
+ )
+ }
+
+ @Test
fun testAbstractComposablesWithDefaultParameters() {
check(
"""
@@ -297,6 +309,18 @@
}
@Test
+ fun testOpenComposablesWithDefaultParameters() {
+ check(
+ """
+ import androidx.compose.runtime.Composable
+ open class A {
+ @Composable open fun foo(x: Int = <!ABSTRACT_COMPOSABLE_DEFAULT_PARAMETER_VALUE!>0<!>) {}
+ }
+ """
+ )
+ }
+
+ @Test
fun testInterfaceComposablesWithoutDefaultParameters() {
check(
"""
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterNonStaticDefaultParameters\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterNonStaticDefaultParameters\133useFir = false\135.txt"
index 42bf590..f23cfaa 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterNonStaticDefaultParameters\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterNonStaticDefaultParameters\133useFir = false\135.txt"
@@ -60,7 +60,7 @@
val s = <block>{
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "CC(remember):Test.kt#9igjgp")
- val tmp0_group = %composer.cache(%dirty and 0b1110 == 0b0100 or %dirty and 0b01110000 == 0b00100000 or %dirty and 0b001110000000 == 0b000100000000) {
+ val tmp0_group = %composer.cache(%dirty and 0b1110 == 0b0100 or %dirty and 0b01110000 == 0b00100000 or %dirty and 0b001110000000 xor 0b000110000000 > 256 && %composer.changed(c) || %dirty and 0b000110000000 == 0b000100000000) {
Any()
}
%composer.endReplaceableGroup()
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterNonStaticDefaultParameters\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterNonStaticDefaultParameters\133useFir = true\135.txt"
index 42bf590..f23cfaa 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterNonStaticDefaultParameters\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterNonStaticDefaultParameters\133useFir = true\135.txt"
@@ -60,7 +60,7 @@
val s = <block>{
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "CC(remember):Test.kt#9igjgp")
- val tmp0_group = %composer.cache(%dirty and 0b1110 == 0b0100 or %dirty and 0b01110000 == 0b00100000 or %dirty and 0b001110000000 == 0b000100000000) {
+ val tmp0_group = %composer.cache(%dirty and 0b1110 == 0b0100 or %dirty and 0b01110000 == 0b00100000 or %dirty and 0b001110000000 xor 0b000110000000 > 256 && %composer.changed(c) || %dirty and 0b000110000000 == 0b000100000000) {
Any()
}
%composer.endReplaceableGroup()
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTestsStrongSkipping/testRememberWithDefaultParams\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTestsStrongSkipping/testRememberWithDefaultParams\133useFir = false\135.txt"
new file mode 100644
index 0000000..760d0e4
--- /dev/null
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTestsStrongSkipping/testRememberWithDefaultParams\133useFir = false\135.txt"
@@ -0,0 +1,65 @@
+//
+// Source
+// ------------------------------------------
+
+import androidx.compose.runtime.*
+
+@Composable fun Icon(
+ param: Int,
+ defaultParam: Int = LocalColor.current
+) {
+ val remembered = remember(param, defaultParam) { TODO() }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
+
+@Composable
+fun Icon(param: Int, defaultParam: Int, %composer: Composer?, %changed: Int, %default: Int) {
+ %composer = %composer.startRestartGroup(<>)
+ sourceInformation(%composer, "C(Icon)P(1)<curren...>,<rememb...>:Test.kt")
+ val %dirty = %changed
+ if (%default and 0b0001 != 0) {
+ %dirty = %dirty or 0b0110
+ } else if (%changed and 0b0110 == 0) {
+ %dirty = %dirty or if (%composer.changed(param)) 0b0100 else 0b0010
+ }
+ if (%changed and 0b00110000 == 0) {
+ %dirty = %dirty or if (%default and 0b0010 == 0 && %composer.changed(defaultParam)) 0b00100000 else 0b00010000
+ }
+ if (%dirty and 0b00010011 != 0b00010010 || !%composer.skipping) {
+ %composer.startDefaults()
+ if (%changed and 0b0001 == 0 || %composer.defaultsInvalid) {
+ if (%default and 0b0010 != 0) {
+ defaultParam = LocalColor.<get-current>(%composer, 0b0110)
+ %dirty = %dirty and 0b01110000.inv()
+ }
+ } else {
+ %composer.skipToGroupEnd()
+ if (%default and 0b0010 != 0) {
+ %dirty = %dirty and 0b01110000.inv()
+ }
+ }
+ %composer.endDefaults()
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
+ val remembered = <block>{
+ %composer.startReplaceableGroup(<>)
+ sourceInformation(%composer, "CC(remember):Test.kt#9igjgp")
+ %composer.cache(%dirty and 0b1110 == 0b0100 or %dirty and 0b01110000 xor 0b00110000 > 32 && %composer.changed(defaultParam) || %dirty and 0b00110000 == 0b00100000) {
+ TODO()
+ }
+ %composer.endReplaceableGroup()
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
+ } else {
+ %composer.skipToGroupEnd()
+ }
+ %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
+ Icon(param, defaultParam, %composer, updateChangedFlags(%changed or 0b0001), %default)
+ }
+}
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTestsStrongSkipping/testRememberWithDefaultParams\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTestsStrongSkipping/testRememberWithDefaultParams\133useFir = true\135.txt"
new file mode 100644
index 0000000..760d0e4
--- /dev/null
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTestsStrongSkipping/testRememberWithDefaultParams\133useFir = true\135.txt"
@@ -0,0 +1,65 @@
+//
+// Source
+// ------------------------------------------
+
+import androidx.compose.runtime.*
+
+@Composable fun Icon(
+ param: Int,
+ defaultParam: Int = LocalColor.current
+) {
+ val remembered = remember(param, defaultParam) { TODO() }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
+
+@Composable
+fun Icon(param: Int, defaultParam: Int, %composer: Composer?, %changed: Int, %default: Int) {
+ %composer = %composer.startRestartGroup(<>)
+ sourceInformation(%composer, "C(Icon)P(1)<curren...>,<rememb...>:Test.kt")
+ val %dirty = %changed
+ if (%default and 0b0001 != 0) {
+ %dirty = %dirty or 0b0110
+ } else if (%changed and 0b0110 == 0) {
+ %dirty = %dirty or if (%composer.changed(param)) 0b0100 else 0b0010
+ }
+ if (%changed and 0b00110000 == 0) {
+ %dirty = %dirty or if (%default and 0b0010 == 0 && %composer.changed(defaultParam)) 0b00100000 else 0b00010000
+ }
+ if (%dirty and 0b00010011 != 0b00010010 || !%composer.skipping) {
+ %composer.startDefaults()
+ if (%changed and 0b0001 == 0 || %composer.defaultsInvalid) {
+ if (%default and 0b0010 != 0) {
+ defaultParam = LocalColor.<get-current>(%composer, 0b0110)
+ %dirty = %dirty and 0b01110000.inv()
+ }
+ } else {
+ %composer.skipToGroupEnd()
+ if (%default and 0b0010 != 0) {
+ %dirty = %dirty and 0b01110000.inv()
+ }
+ }
+ %composer.endDefaults()
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
+ val remembered = <block>{
+ %composer.startReplaceableGroup(<>)
+ sourceInformation(%composer, "CC(remember):Test.kt#9igjgp")
+ %composer.cache(%dirty and 0b1110 == 0b0100 or %dirty and 0b01110000 xor 0b00110000 > 32 && %composer.changed(defaultParam) || %dirty and 0b00110000 == 0b00100000) {
+ TODO()
+ }
+ %composer.endReplaceableGroup()
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
+ } else {
+ %composer.skipToGroupEnd()
+ }
+ %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
+ Icon(param, defaultParam, %composer, updateChangedFlags(%changed or 0b0001), %default)
+ }
+}
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/BuildMetrics.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/BuildMetrics.kt
index c89c1cd..06ceb0d 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/BuildMetrics.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/BuildMetrics.kt
@@ -56,7 +56,7 @@
fun recordGroup()
fun recordComposableCall(
expression: IrCall,
- paramMeta: List<ComposableFunctionBodyTransformer.ParamMeta>
+ paramMeta: List<ComposableFunctionBodyTransformer.CallArgumentMeta>
)
fun recordParameter(
declaration: IrValueParameter,
@@ -100,7 +100,7 @@
)
fun recordComposableCall(
expression: IrCall,
- paramMeta: List<ComposableFunctionBodyTransformer.ParamMeta>
+ paramMeta: List<ComposableFunctionBodyTransformer.CallArgumentMeta>
)
fun log(message: String)
fun Appendable.appendModuleJson()
@@ -119,7 +119,7 @@
override fun recordLambda(composable: Boolean, memoized: Boolean, singleton: Boolean) {}
override fun recordComposableCall(
expression: IrCall,
- paramMeta: List<ComposableFunctionBodyTransformer.ParamMeta>
+ paramMeta: List<ComposableFunctionBodyTransformer.CallArgumentMeta>
) {}
override fun log(message: String) {
println(message)
@@ -165,7 +165,7 @@
override fun recordGroup() {}
override fun recordComposableCall(
expression: IrCall,
- paramMeta: List<ComposableFunctionBodyTransformer.ParamMeta>
+ paramMeta: List<ComposableFunctionBodyTransformer.CallArgumentMeta>
) {}
override fun recordParameter(
declaration: IrValueParameter,
@@ -322,7 +322,7 @@
override fun recordComposableCall(
expression: IrCall,
- paramMeta: List<ComposableFunctionBodyTransformer.ParamMeta>
+ paramMeta: List<ComposableFunctionBodyTransformer.CallArgumentMeta>
) {
for (arg in paramMeta) {
totalArguments++
@@ -510,7 +510,7 @@
override fun recordComposableCall(
expression: IrCall,
- paramMeta: List<ComposableFunctionBodyTransformer.ParamMeta>
+ paramMeta: List<ComposableFunctionBodyTransformer.CallArgumentMeta>
) {
calls++
}
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/k1/ComposableDeclarationChecker.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/k1/ComposableDeclarationChecker.kt
index 7d85837..febc112 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/k1/ComposableDeclarationChecker.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/k1/ComposableDeclarationChecker.kt
@@ -141,7 +141,10 @@
}
}
- if (hasComposableAnnotation && descriptor.modality == Modality.ABSTRACT) {
+ if (
+ hasComposableAnnotation &&
+ (descriptor.modality == Modality.ABSTRACT || descriptor.modality == Modality.OPEN)
+ ) {
declaration.valueParameters.forEach {
val defaultValue = it.defaultValue
if (defaultValue != null) {
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/k1/ComposeErrorMessages.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/k1/ComposeErrorMessages.kt
index 04d8b07..6c9ff16 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/k1/ComposeErrorMessages.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/k1/ComposeErrorMessages.kt
@@ -91,7 +91,7 @@
)
MAP.put(
ComposeErrors.ABSTRACT_COMPOSABLE_DEFAULT_PARAMETER_VALUE,
- "Abstract Composable functions cannot have parameters with default values"
+ "Overridable Composable functions with default values are not currently supported"
)
MAP.put(
ComposeErrors.COMPOSABLE_FUN_MAIN,
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/k2/ComposableFunctionChecker.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/k2/ComposableFunctionChecker.kt
index 4e2e807..0a6c7a3 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/k2/ComposableFunctionChecker.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/k2/ComposableFunctionChecker.kt
@@ -24,6 +24,7 @@
import org.jetbrains.kotlin.fir.declarations.FirFunction
import org.jetbrains.kotlin.fir.declarations.getSingleExpectForActualOrNull
import org.jetbrains.kotlin.fir.declarations.utils.isAbstract
+import org.jetbrains.kotlin.fir.declarations.utils.isOpen
import org.jetbrains.kotlin.fir.declarations.utils.isOperator
import org.jetbrains.kotlin.fir.declarations.utils.isSuspend
import org.jetbrains.kotlin.fir.declarations.utils.nameOrSpecialName
@@ -70,7 +71,7 @@
}
// Check that there are no default arguments in abstract composable functions
- if (declaration.isAbstract) {
+ if (declaration.isAbstract || declaration.isOpen) {
for (valueParameter in declaration.valueParameters) {
val defaultValue = valueParameter.defaultValue ?: continue
reporter.reportOn(
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/k2/ComposeErrorMessages.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/k2/ComposeErrorMessages.kt
index 11081af..badc328 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/k2/ComposeErrorMessages.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/k2/ComposeErrorMessages.kt
@@ -62,7 +62,7 @@
map.put(
ComposeErrors.ABSTRACT_COMPOSABLE_DEFAULT_PARAMETER_VALUE,
- "Abstract Composable functions cannot have parameters with default values"
+ "Overridable Composable functions with default values are not currently supported"
)
map.put(
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt
index c846f55..afd9a53 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt
@@ -988,12 +988,12 @@
// populating dirty
if (!canSkipExecution) {
metas.forEach {
- if (it.maskParam == dirty) {
- it.maskParam = changedParam
+ if (it.paramRef?.maskParam == dirty) {
+ it.paramRef?.maskParam = changedParam
}
}
}
- irIntrinsicRememberInvalid(isMemoizedLambda, args, metas, ::irInferredChanged)
+ irIntrinsicRememberInvalid(isMemoizedLambda, args, metas, ::irIntrinsicChanged)
}
if (canSkipExecution) {
@@ -1154,12 +1154,12 @@
// populating dirty
if (!canSkipExecution) {
metas.forEach {
- if (it.maskParam == dirty) {
- it.maskParam = changedParam
+ if (it.paramRef?.maskParam == dirty) {
+ it.paramRef?.maskParam = changedParam
}
}
}
- irIntrinsicRememberInvalid(isMemoizedLambda, args, metas, ::irInferredChanged)
+ irIntrinsicRememberInvalid(isMemoizedLambda, args, metas, ::irIntrinsicChanged)
}
val transformedBody = if (canSkipExecution) {
@@ -2651,36 +2651,57 @@
}
}
- data class ParamMeta(
+ /**
+ * Argument information extracted from the call site and argument expression itself.
+ */
+ data class CallArgumentMeta(
+ /** stability of argument expression */
var stability: Stability = Stability.Unstable,
+ /** whether argument is vararg */
var isVararg: Boolean = false,
+ /** whether default value for the arg is provided */
var isProvided: Boolean = false,
+ /** whether the expression is static */
var isStatic: Boolean = false,
- var isCertain: Boolean = false,
- var maskSlot: Int = -1,
+ /** metadata from enclosing function parameters (NOT the function being called) */
+ var paramRef: ParamMeta? = null
+ ) {
+ val isCertain get() = paramRef != null
+ }
+
+ /**
+ * Composable call information extracted from composable function parameters referenced
+ * in a call argument.
+ */
+ data class ParamMeta(
+ /** Slot index in maskParam */
+ val maskSlot: Int = -1,
+ /** Reference to $changed or $dirty parameter with the [ParamState] mask */
var maskParam: IrChangedBitMaskValue? = null,
+ /** Whether the parameter has a non-static default value. */
+ val hasNonStaticDefault: Boolean = false
)
- private fun paramMetaOf(arg: IrExpression, isProvided: Boolean): ParamMeta {
- val meta = ParamMeta(isProvided = isProvided)
- populateParamMeta(arg, meta)
+ private fun argumentMetaOf(arg: IrExpression, isProvided: Boolean): CallArgumentMeta {
+ val meta = CallArgumentMeta(isProvided = isProvided)
+ populateArgumentMeta(arg, meta)
return meta
}
- private fun populateParamMeta(arg: IrExpression, meta: ParamMeta) {
+ private fun populateArgumentMeta(arg: IrExpression, meta: CallArgumentMeta) {
meta.stability = stabilityInferencer.stabilityOf(arg)
when {
arg.isStatic() -> meta.isStatic = true
arg is IrGetValue -> {
when (val owner = arg.symbol.owner) {
is IrValueParameter -> {
- extractParamMetaFromScopes(meta, owner)
+ meta.paramRef = extractParamMetaFromScopes(owner)
}
is IrVariable -> {
if (owner.isConst) {
meta.isStatic = true
} else if (!owner.isVar && owner.initializer != null) {
- populateParamMeta(owner.initializer!!, meta)
+ populateArgumentMeta(owner.initializer!!, meta)
}
}
}
@@ -2691,6 +2712,45 @@
}
}
+ private fun extractParamMetaFromScopes(param: IrValueDeclaration): ParamMeta? {
+ var scope: Scope? = currentScope
+ val fn = param.parent
+ while (scope != null) {
+ when (scope) {
+ is Scope.FunctionScope -> {
+ if (scope.function == fn) {
+ if (scope.isComposable) {
+ val slotIndex = scope.allTrackedParams.indexOf(param)
+ if (slotIndex != -1) {
+ return ParamMeta(
+ maskSlot = slotIndex,
+ maskParam = scope.dirty,
+ hasNonStaticDefault = if (param is IrValueParameter) {
+ param.defaultValue?.expression?.isStatic() == false
+ } else {
+ // No default for this parameter
+ false
+ }
+ )
+ }
+ }
+ return null
+ } else {
+ // If the capture is outside inline lambda, we don't allow meta propagation
+ if (!inlineLambdaInfo.isInlineLambda(scope.function)) {
+ return null
+ }
+ }
+ }
+ else -> {
+ /* Do nothing, continue traversing */
+ }
+ }
+ scope = scope.parent
+ }
+ return null
+ }
+
override fun visitBlock(expression: IrBlock): IrExpression {
return when (expression.origin) {
IrStatementOrigin.FOR_LOOP -> {
@@ -2900,8 +2960,8 @@
}
}
- val contextMeta = mutableListOf<ParamMeta>()
- val paramMeta = mutableListOf<ParamMeta>()
+ val contextMeta = mutableListOf<CallArgumentMeta>()
+ val paramMeta = mutableListOf<CallArgumentMeta>()
for (index in 0 until numContextParams + numRealValueParams) {
val arg = expression.getValueArgument(index)
@@ -2913,29 +2973,33 @@
// missed something.
error("Unexpected null argument for composable call")
} else {
- paramMeta.add(ParamMeta(isVararg = true))
+ paramMeta.add(CallArgumentMeta(isVararg = true))
continue
}
}
if (index < numContextParams) {
- val meta = paramMetaOf(arg, isProvided = true)
+ val meta = argumentMetaOf(arg, isProvided = true)
contextMeta.add(meta)
} else {
val bitIndex = defaultsBitIndex(index)
val maskValue = if (hasDefaultArgs) defaultMasks[defaultsParamIndex(index)] else 0
- val meta = paramMetaOf(arg, isProvided = maskValue and (0b1 shl bitIndex) == 0)
+ val meta = argumentMetaOf(arg, isProvided = maskValue and (0b1 shl bitIndex) == 0)
paramMeta.add(meta)
}
}
- val extensionMeta = expression.extensionReceiver?.let { paramMetaOf(it, isProvided = true) }
- val dispatchMeta = expression.dispatchReceiver?.let { paramMetaOf(it, isProvided = true) }
+ val extensionMeta = expression.extensionReceiver?.let {
+ argumentMetaOf(it, isProvided = true)
+ }
+ val dispatchMeta = expression.dispatchReceiver?.let {
+ argumentMetaOf(it, isProvided = true)
+ }
- val changedParams = buildChangedParamsForCall(
- contextParams = contextMeta,
- valueParams = paramMeta,
- extensionParam = extensionMeta,
- dispatchParam = dispatchMeta
+ val changedParams = buildChangedArgumentsForCall(
+ contextArgs = contextMeta,
+ valueArgs = paramMeta,
+ extensionArg = extensionMeta,
+ dispatchArg = dispatchMeta
)
changedParams.forEachIndexed { i, param ->
@@ -3011,12 +3075,12 @@
// Build the change parameters as if this was a call to remember to ensure the
// use of the $dirty flags are calculated correctly.
- val inputArgMetas = inputArgs.map { paramMetaOf(it, isProvided = true) }.also {
- buildChangedParamsForCall(
- contextParams = emptyList(),
- valueParams = it,
- extensionParam = null,
- dispatchParam = null
+ val inputArgMetas = inputArgs.map { argumentMetaOf(it, isProvided = true) }.also {
+ buildChangedArgumentsForCall(
+ contextArgs = emptyList(),
+ valueArgs = it,
+ extensionArg = null,
+ dispatchArg = null
)
}
@@ -3024,20 +3088,21 @@
// so we have to apply fixups after function body is transformed
var dirty: IrChangedBitMaskValue? = null
inputArgMetas.forEach {
- if (it.maskParam is IrChangedBitMaskVariable) {
+ val meta = it.paramRef
+ if (meta?.maskParam is IrChangedBitMaskVariable) {
if (dirty == null) {
- dirty = it.maskParam
+ dirty = meta.maskParam
} else {
// Validate that we only capture dirty param from a single scope. Capturing
// $dirty is only allowed in inline functions, so we are guaranteed to only
// encounter one.
- require(dirty == it.maskParam) {
+ require(dirty == meta.maskParam) {
"Only single dirty param is allowed in a capture scope"
}
}
}
}
- val usesDirty = inputArgMetas.any { it.maskParam is IrChangedBitMaskVariable }
+ val usesDirty = inputArgMetas.any { it.paramRef?.maskParam is IrChangedBitMaskVariable }
val isMemoizedLambda = expression.origin == ComposeMemoizedLambdaOrigin
@@ -3045,11 +3110,11 @@
// the restart function or the result of replacing remember with cached will be
// different.
val metaMaskConsistent = updateChangedFlagsFunction != null
- val changedFunction: (Boolean, IrExpression, ParamMeta) -> IrExpression? =
+ val changedFunction: (Boolean, IrExpression, CallArgumentMeta) -> IrExpression? =
if (usesDirty || !metaMaskConsistent) {
{ _, arg, _ -> irChanged(arg, compareInstanceForUnstableValues = isMemoizedLambda) }
} else {
- ::irInferredChanged
+ ::irIntrinsicChanged
}
// Hoist execution of input params outside of the remember group, similar to how it is
@@ -3141,27 +3206,30 @@
private fun irIntrinsicRememberInvalid(
isMemoizedLambda: Boolean,
args: List<IrExpression>,
- metas: List<ParamMeta>,
- changedExpr: (Boolean, IrExpression, ParamMeta) -> IrExpression?
+ metas: List<CallArgumentMeta>,
+ changedExpr: (Boolean, IrExpression, CallArgumentMeta) -> IrExpression?
): IrExpression =
args
.mapIndexedNotNull { i, arg -> changedExpr(isMemoizedLambda, arg, metas[i]) }
.reduceOrNull { acc, changed -> irBooleanOr(acc, changed) }
?: irConst(false)
- private fun irInferredChanged(
+ private fun irIntrinsicChanged(
isMemoizedLambda: Boolean,
arg: IrExpression,
- meta: ParamMeta
+ argInfo: CallArgumentMeta
): IrExpression? {
- val param = meta.maskParam
+ val meta = argInfo.paramRef
+ val param = meta?.maskParam
return when {
- meta.isStatic -> null
- meta.isCertain &&
- meta.stability.knownStable() &&
- param is IrChangedBitMaskVariable -> {
- // if it's a dirty flag, and the parameter is _guaranteed_ to be stable, then we
- // know that the value is now CERTAIN, thus we can avoid calling changed completely
+ argInfo.isStatic -> null
+ argInfo.isCertain &&
+ argInfo.stability.knownStable() &&
+ param is IrChangedBitMaskVariable &&
+ !meta.hasNonStaticDefault -> {
+ // if it's a dirty flag, and the parameter doesn't have a default value and is _known_
+ // to be stable, then we know that the value is now CERTAIN, thus we can avoid
+ // calling changed completely
//
// invalid = invalid or (mask == different)
irEqual(
@@ -3169,12 +3237,13 @@
irConst(ParamState.Different.bitsForSlot(meta.maskSlot))
)
}
- meta.isCertain &&
- !meta.stability.knownUnstable() &&
- param is IrChangedBitMaskVariable -> {
- // if it's a dirty flag, and the parameter might be stable, then we only check
- // changed if the value is unstable, otherwise we can just check to see if the mask
- // is different
+ argInfo.isCertain &&
+ !argInfo.stability.knownUnstable() &&
+ param is IrChangedBitMaskVariable &&
+ !meta.hasNonStaticDefault -> {
+ // if it's a dirty flag, and the parameter doesn't have a default value and it might
+ // be stable, then we only check changed if the value is unstable, otherwise we can
+ // just check to see if the mask is different
//
// invalid = invalid or (stable && mask == different || unstable && changed)
@@ -3192,13 +3261,14 @@
maskIsUnstableAndChanged
)
}
- meta.isCertain &&
- !meta.stability.knownUnstable() &&
+ argInfo.isCertain &&
+ !argInfo.stability.knownUnstable() &&
param != null -> {
- // if it's a changed flag then uncertain is a possible value. If it is uncertain
- // OR unstable, then we need to call changed. If it is uncertain or unstable here
- // it will _always_ be uncertain or unstable here, so this is safe. If it is not
- // uncertain or unstable, we can just check to see if its different
+ // if it's a changed flag or parameter with a default expression then uncertain is a
+ // possible value. If it is uncertain OR unstable, then we need to call changed.
+ // If it is uncertain or unstable here it will _always_ be uncertain or unstable
+ // here, so this is safe. If it is not uncertain or unstable, we can just check to
+ // see if its different
// unstableOrUncertain = mask xor 011 > 010
// invalid = invalid or ((unstableOrUncertain && changed()) || mask == different)
@@ -3306,61 +3376,29 @@
)
}
- private fun extractParamMetaFromScopes(meta: ParamMeta, param: IrValueDeclaration): Boolean {
- var scope: Scope? = currentScope
- val fn = param.parent
- while (scope != null) {
- when (scope) {
- is Scope.FunctionScope -> {
- if (scope.function == fn) {
- if (scope.isComposable) {
- val slotIndex = scope.allTrackedParams.indexOf(param)
- if (slotIndex != -1) {
- meta.isCertain = true
- meta.maskParam = scope.dirty
- meta.maskSlot = slotIndex
- }
- }
- return true
- } else {
- // If the capture is outside inline lambda, we don't allow meta propagation
- if (!inlineLambdaInfo.isInlineLambda(scope.function)) {
- return false
- }
- }
- }
- else -> {
- /* Do nothing, continue traversing */
- }
- }
- scope = scope.parent
- }
- return false
- }
-
- private fun buildChangedParamsForCall(
- contextParams: List<ParamMeta>,
- valueParams: List<ParamMeta>,
- extensionParam: ParamMeta?,
- dispatchParam: ParamMeta?
+ private fun buildChangedArgumentsForCall(
+ contextArgs: List<CallArgumentMeta>,
+ valueArgs: List<CallArgumentMeta>,
+ extensionArg: CallArgumentMeta?,
+ dispatchArg: CallArgumentMeta?
): List<IrExpression> {
- val allParams = listOfNotNull(extensionParam) +
- contextParams +
- valueParams +
- listOfNotNull(dispatchParam)
+ val allArgs = listOfNotNull(extensionArg) +
+ contextArgs +
+ valueArgs +
+ listOfNotNull(dispatchArg)
// passing in 0 for thisParams since they should be included in the params list
- val changedCount = changedParamCount(allParams.size, 0)
+ val changedCount = changedParamCount(allArgs.size, 0)
val result = mutableListOf<IrExpression>()
for (i in 0 until changedCount) {
val start = i * SLOTS_PER_INT
- val end = min(start + SLOTS_PER_INT, allParams.size)
- val slice = allParams.subList(start, end)
- result.add(buildChangedParamForCall(slice))
+ val end = min(start + SLOTS_PER_INT, allArgs.size)
+ val slice = allArgs.subList(start, end)
+ result.add(buildChangedArgumentForCall(slice))
}
return result
}
- private fun buildChangedParamForCall(params: List<ParamMeta>): IrExpression {
+ private fun buildChangedArgumentForCall(arguments: List<CallArgumentMeta>): IrExpression {
// The general pattern here is:
//
// $changed = bitMaskConstant or
@@ -3385,8 +3423,8 @@
var bitMaskConstant = 0b0
val orExprs = mutableListOf<IrExpression>()
- params.forEachIndexed { slot, meta ->
- val stability = meta.stability
+ arguments.forEachIndexed { slot, argInfo ->
+ val stability = argInfo.stability
when {
!strongSkippingEnabled && stability.knownUnstable() -> {
bitMaskConstant = bitMaskConstant or StabilityBits.UNSTABLE.bitsForSlot(slot)
@@ -3425,15 +3463,16 @@
}
}
}
- if (meta.isVararg) {
+ if (argInfo.isVararg) {
bitMaskConstant = bitMaskConstant or ParamState.Uncertain.bitsForSlot(slot)
- } else if (!meta.isProvided) {
+ } else if (!argInfo.isProvided) {
bitMaskConstant = bitMaskConstant or ParamState.Uncertain.bitsForSlot(slot)
- } else if (meta.isStatic) {
+ } else if (argInfo.isStatic) {
bitMaskConstant = bitMaskConstant or ParamState.Static.bitsForSlot(slot)
- } else if (!meta.isCertain) {
+ } else if (!argInfo.isCertain) {
bitMaskConstant = bitMaskConstant or ParamState.Uncertain.bitsForSlot(slot)
} else {
+ val meta = argInfo.paramRef ?: error("Meta is required if param is Certain")
val someMask = meta.maskParam ?: error("Mask param required if param is Certain")
val parentSlot = meta.maskSlot
require(parentSlot != -1) { "invalid parent slot for Certain param" }
@@ -3981,7 +4020,7 @@
private class IntrinsicRememberFixup(
val isMemoizedLambda: Boolean,
val args: List<IrExpression>,
- val metas: List<ParamMeta>,
+ val metas: List<CallArgumentMeta>,
val call: IrCall
)
private val intrinsicRememberFixups = mutableListOf<IntrinsicRememberFixup>()
@@ -3989,11 +4028,11 @@
fun recordIntrinsicRememberFixUp(
isMemoizedLambda: Boolean,
args: List<IrExpression>,
- metas: List<ParamMeta>,
+ metas: List<CallArgumentMeta>,
call: IrCall
) {
- val dirty = metas.find { it.maskParam is IrChangedBitMaskVariable }
- if (dirty?.maskParam == this.dirty) {
+ val dirty = metas.find { it.paramRef?.maskParam is IrChangedBitMaskVariable }
+ if (dirty?.paramRef?.maskParam == this.dirty) {
intrinsicRememberFixups.add(
IntrinsicRememberFixup(isMemoizedLambda, args, metas, call)
)
@@ -4012,7 +4051,7 @@
invalidExpr: (
isMemoizedLambda: Boolean,
List<IrExpression>,
- List<ParamMeta>
+ List<CallArgumentMeta>
) -> IrExpression
) {
intrinsicRememberFixups.forEach {
diff --git a/compose/compiler/compiler/build.gradle b/compose/compiler/compiler/build.gradle
index d47fc00..0bd5e23 100644
--- a/compose/compiler/compiler/build.gradle
+++ b/compose/compiler/compiler/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
diff --git a/compose/compiler/compiler/integration-tests/build.gradle b/compose/compiler/compiler/integration-tests/build.gradle
index 1e465c3..8c81a67 100644
--- a/compose/compiler/compiler/integration-tests/build.gradle
+++ b/compose/compiler/compiler/integration-tests/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.SdkResourceGenerator
import static androidx.build.AndroidXPlugin.isPlayground
diff --git a/compose/desktop/desktop/build.gradle b/compose/desktop/desktop/build.gradle
index ce2909cb..8f1e03b 100644
--- a/compose/desktop/desktop/build.gradle
+++ b/compose/desktop/desktop/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.AndroidXConfig
import androidx.build.BuildOnServerKt
import androidx.build.LibraryType
diff --git a/compose/desktop/desktop/samples/build.gradle b/compose/desktop/desktop/samples/build.gradle
index b4a9f69..7ac99ba 100644
--- a/compose/desktop/desktop/samples/build.gradle
+++ b/compose/desktop/desktop/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.AndroidXConfig
import androidx.build.BuildOnServerKt
diff --git a/compose/foundation/foundation-layout/api/api_lint.ignore b/compose/foundation/foundation-layout/api/api_lint.ignore
new file mode 100644
index 0000000..01e4af2
--- /dev/null
+++ b/compose/foundation/foundation-layout/api/api_lint.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+GetterSetterNames: field WindowInsets_androidKt.consumeWindowInsets:
+ Invalid name for boolean property `consumeWindowInsets`. Should start with one of `has`, `can`, `should`, `is`.
diff --git a/compose/foundation/foundation-layout/api/current.txt b/compose/foundation/foundation-layout/api/current.txt
index 2f822aa..ca66cb3 100644
--- a/compose/foundation/foundation-layout/api/current.txt
+++ b/compose/foundation/foundation-layout/api/current.txt
@@ -317,6 +317,7 @@
method @SuppressCompatibility @androidx.compose.foundation.layout.ExperimentalLayoutApi @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static boolean getAreSystemBarsVisible(androidx.compose.foundation.layout.WindowInsets.Companion);
method @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static androidx.compose.foundation.layout.WindowInsets getCaptionBar(androidx.compose.foundation.layout.WindowInsets.Companion);
method @SuppressCompatibility @androidx.compose.foundation.layout.ExperimentalLayoutApi @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static androidx.compose.foundation.layout.WindowInsets getCaptionBarIgnoringVisibility(androidx.compose.foundation.layout.WindowInsets.Companion);
+ method public boolean getConsumeWindowInsets();
method public static boolean getConsumeWindowInsets(androidx.compose.ui.platform.AbstractComposeView);
method @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static androidx.compose.foundation.layout.WindowInsets getDisplayCutout(androidx.compose.foundation.layout.WindowInsets.Companion);
method @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static androidx.compose.foundation.layout.WindowInsets getIme(androidx.compose.foundation.layout.WindowInsets.Companion);
@@ -340,6 +341,8 @@
method @SuppressCompatibility @androidx.compose.foundation.layout.ExperimentalLayoutApi @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static boolean isImeVisible(androidx.compose.foundation.layout.WindowInsets.Companion);
method @SuppressCompatibility @androidx.compose.foundation.layout.ExperimentalLayoutApi @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static boolean isTappableElementVisible(androidx.compose.foundation.layout.WindowInsets.Companion);
method public static void setConsumeWindowInsets(androidx.compose.ui.platform.AbstractComposeView, boolean);
+ method public void setConsumeWindowInsets(boolean);
+ property public boolean consumeWindowInsets;
}
}
diff --git a/compose/foundation/foundation-layout/api/restricted_current.txt b/compose/foundation/foundation-layout/api/restricted_current.txt
index cf9513b..a39ff50 100644
--- a/compose/foundation/foundation-layout/api/restricted_current.txt
+++ b/compose/foundation/foundation-layout/api/restricted_current.txt
@@ -324,6 +324,7 @@
method @SuppressCompatibility @androidx.compose.foundation.layout.ExperimentalLayoutApi @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static boolean getAreSystemBarsVisible(androidx.compose.foundation.layout.WindowInsets.Companion);
method @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static androidx.compose.foundation.layout.WindowInsets getCaptionBar(androidx.compose.foundation.layout.WindowInsets.Companion);
method @SuppressCompatibility @androidx.compose.foundation.layout.ExperimentalLayoutApi @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static androidx.compose.foundation.layout.WindowInsets getCaptionBarIgnoringVisibility(androidx.compose.foundation.layout.WindowInsets.Companion);
+ method public boolean getConsumeWindowInsets();
method public static boolean getConsumeWindowInsets(androidx.compose.ui.platform.AbstractComposeView);
method @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static androidx.compose.foundation.layout.WindowInsets getDisplayCutout(androidx.compose.foundation.layout.WindowInsets.Companion);
method @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static androidx.compose.foundation.layout.WindowInsets getIme(androidx.compose.foundation.layout.WindowInsets.Companion);
@@ -347,6 +348,8 @@
method @SuppressCompatibility @androidx.compose.foundation.layout.ExperimentalLayoutApi @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static boolean isImeVisible(androidx.compose.foundation.layout.WindowInsets.Companion);
method @SuppressCompatibility @androidx.compose.foundation.layout.ExperimentalLayoutApi @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static boolean isTappableElementVisible(androidx.compose.foundation.layout.WindowInsets.Companion);
method public static void setConsumeWindowInsets(androidx.compose.ui.platform.AbstractComposeView, boolean);
+ method public void setConsumeWindowInsets(boolean);
+ property public boolean consumeWindowInsets;
}
}
diff --git a/compose/foundation/foundation-layout/build.gradle b/compose/foundation/foundation-layout/build.gradle
index 80a4976..40eb325 100644
--- a/compose/foundation/foundation-layout/build.gradle
+++ b/compose/foundation/foundation-layout/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/foundation/foundation-layout/samples/build.gradle b/compose/foundation/foundation-layout/samples/build.gradle
index 3e07527..8718492 100644
--- a/compose/foundation/foundation-layout/samples/build.gradle
+++ b/compose/foundation/foundation-layout/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/foundation/foundation-lint/build.gradle b/compose/foundation/foundation-lint/build.gradle
index be4b941..e82ecd9 100644
--- a/compose/foundation/foundation-lint/build.gradle
+++ b/compose/foundation/foundation-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
diff --git a/compose/foundation/foundation/api/current.ignore b/compose/foundation/foundation/api/current.ignore
index cd093b7..eaadc5e 100644
--- a/compose/foundation/foundation/api/current.ignore
+++ b/compose/foundation/foundation/api/current.ignore
@@ -1,5 +1,15 @@
// Baseline format: 1.0
+AddedAbstractMethod: androidx.compose.foundation.pager.PageInfo#getKey():
+ Added method androidx.compose.foundation.pager.PageInfo.getKey()
+
+
RemovedClass: androidx.compose.foundation.text2.input.AllCapsTransformationKt:
Removed class androidx.compose.foundation.text2.input.AllCapsTransformationKt
RemovedClass: androidx.compose.foundation.text2.input.MaxLengthTransformationKt:
Removed class androidx.compose.foundation.text2.input.MaxLengthTransformationKt
+
+
+RemovedDeprecatedMethod: androidx.compose.foundation.gestures.TapGestureDetectorKt#awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope, boolean):
+ Removed deprecated method androidx.compose.foundation.gestures.TapGestureDetectorKt.awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope,boolean)
+RemovedDeprecatedMethod: androidx.compose.foundation.gestures.TapGestureDetectorKt#waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope):
+ Removed deprecated method androidx.compose.foundation.gestures.TapGestureDetectorKt.waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope)
diff --git a/compose/foundation/foundation/api/current.txt b/compose/foundation/foundation/api/current.txt
index 2a5d1c3..905e722 100644
--- a/compose/foundation/foundation/api/current.txt
+++ b/compose/foundation/foundation/api/current.txt
@@ -499,11 +499,11 @@
}
public final class TapGestureDetectorKt {
- method @Deprecated public static suspend androidx.compose.ui.input.pointer.PointerInputChange awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope, optional boolean requireUnconsumed);
method public static suspend Object? awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope, optional boolean requireUnconsumed, optional androidx.compose.ui.input.pointer.PointerEventPass pass, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method @Deprecated public static suspend Object? awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope, optional boolean requireUnconsumed, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
method public static suspend Object? detectTapGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onDoubleTap, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onLongPress, optional kotlin.jvm.functions.Function3<? super androidx.compose.foundation.gestures.PressGestureScope,? super androidx.compose.ui.geometry.Offset,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> onPress, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onTap, kotlin.coroutines.Continuation<? super kotlin.Unit>);
- method @Deprecated public static suspend androidx.compose.ui.input.pointer.PointerInputChange? waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope);
method public static suspend Object? waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, optional androidx.compose.ui.input.pointer.PointerEventPass pass, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method @Deprecated public static suspend Object? waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
}
public final class TransformGestureDetectorKt {
@@ -571,18 +571,23 @@
method public float calculateSnappingOffset(float currentVelocity);
}
- @SuppressCompatibility @androidx.compose.foundation.ExperimentalFoundationApi public fun interface SnapPosition {
- method public int position(int layoutSize, int itemSize, int beforeContentPadding, int afterContentPadding, int itemIndex);
- field public static final androidx.compose.foundation.gestures.snapping.SnapPosition.Companion Companion;
+ @androidx.compose.runtime.Stable public interface SnapPosition {
+ method public int position(int layoutSize, int itemSize, int beforeContentPadding, int afterContentPadding, int itemIndex, int itemCount);
}
- public static final class SnapPosition.Companion {
- method public androidx.compose.foundation.gestures.snapping.SnapPosition getCenter();
- method public androidx.compose.foundation.gestures.snapping.SnapPosition getEnd();
- method public androidx.compose.foundation.gestures.snapping.SnapPosition getStart();
- property public final androidx.compose.foundation.gestures.snapping.SnapPosition Center;
- property public final androidx.compose.foundation.gestures.snapping.SnapPosition End;
- property public final androidx.compose.foundation.gestures.snapping.SnapPosition Start;
+ public static final class SnapPosition.Center implements androidx.compose.foundation.gestures.snapping.SnapPosition {
+ method public int position(int layoutSize, int itemSize, int beforeContentPadding, int afterContentPadding, int itemIndex, int itemCount);
+ field public static final androidx.compose.foundation.gestures.snapping.SnapPosition.Center INSTANCE;
+ }
+
+ public static final class SnapPosition.End implements androidx.compose.foundation.gestures.snapping.SnapPosition {
+ method public int position(int layoutSize, int itemSize, int beforeContentPadding, int afterContentPadding, int itemIndex, int itemCount);
+ field public static final androidx.compose.foundation.gestures.snapping.SnapPosition.End INSTANCE;
+ }
+
+ public static final class SnapPosition.Start implements androidx.compose.foundation.gestures.snapping.SnapPosition {
+ method public int position(int layoutSize, int itemSize, int beforeContentPadding, int afterContentPadding, int itemIndex, int itemCount);
+ field public static final androidx.compose.foundation.gestures.snapping.SnapPosition.Start INSTANCE;
}
}
@@ -1156,10 +1161,12 @@
package androidx.compose.foundation.pager {
- @SuppressCompatibility @androidx.compose.foundation.ExperimentalFoundationApi public sealed interface PageInfo {
+ public sealed interface PageInfo {
method public int getIndex();
+ method public Object getKey();
method public int getOffset();
property public abstract int index;
+ property public abstract Object key;
property public abstract int offset;
}
@@ -1219,7 +1226,7 @@
property public abstract java.util.List<androidx.compose.foundation.pager.PageInfo> visiblePagesInfo;
}
- @SuppressCompatibility @androidx.compose.foundation.ExperimentalFoundationApi public sealed interface PagerScope {
+ public sealed interface PagerScope {
}
@androidx.compose.runtime.Stable public interface PagerSnapDistance {
diff --git a/compose/foundation/foundation/api/restricted_current.ignore b/compose/foundation/foundation/api/restricted_current.ignore
index cd093b7..eaadc5e 100644
--- a/compose/foundation/foundation/api/restricted_current.ignore
+++ b/compose/foundation/foundation/api/restricted_current.ignore
@@ -1,5 +1,15 @@
// Baseline format: 1.0
+AddedAbstractMethod: androidx.compose.foundation.pager.PageInfo#getKey():
+ Added method androidx.compose.foundation.pager.PageInfo.getKey()
+
+
RemovedClass: androidx.compose.foundation.text2.input.AllCapsTransformationKt:
Removed class androidx.compose.foundation.text2.input.AllCapsTransformationKt
RemovedClass: androidx.compose.foundation.text2.input.MaxLengthTransformationKt:
Removed class androidx.compose.foundation.text2.input.MaxLengthTransformationKt
+
+
+RemovedDeprecatedMethod: androidx.compose.foundation.gestures.TapGestureDetectorKt#awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope, boolean):
+ Removed deprecated method androidx.compose.foundation.gestures.TapGestureDetectorKt.awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope,boolean)
+RemovedDeprecatedMethod: androidx.compose.foundation.gestures.TapGestureDetectorKt#waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope):
+ Removed deprecated method androidx.compose.foundation.gestures.TapGestureDetectorKt.waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope)
diff --git a/compose/foundation/foundation/api/restricted_current.txt b/compose/foundation/foundation/api/restricted_current.txt
index 6173895..be240be 100644
--- a/compose/foundation/foundation/api/restricted_current.txt
+++ b/compose/foundation/foundation/api/restricted_current.txt
@@ -501,11 +501,11 @@
}
public final class TapGestureDetectorKt {
- method @Deprecated public static suspend androidx.compose.ui.input.pointer.PointerInputChange awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope, optional boolean requireUnconsumed);
method public static suspend Object? awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope, optional boolean requireUnconsumed, optional androidx.compose.ui.input.pointer.PointerEventPass pass, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method @Deprecated public static suspend Object? awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope, optional boolean requireUnconsumed, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
method public static suspend Object? detectTapGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onDoubleTap, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onLongPress, optional kotlin.jvm.functions.Function3<? super androidx.compose.foundation.gestures.PressGestureScope,? super androidx.compose.ui.geometry.Offset,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> onPress, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onTap, kotlin.coroutines.Continuation<? super kotlin.Unit>);
- method @Deprecated public static suspend androidx.compose.ui.input.pointer.PointerInputChange? waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope);
method public static suspend Object? waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, optional androidx.compose.ui.input.pointer.PointerEventPass pass, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method @Deprecated public static suspend Object? waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
}
public final class TransformGestureDetectorKt {
@@ -573,18 +573,23 @@
method public float calculateSnappingOffset(float currentVelocity);
}
- @SuppressCompatibility @androidx.compose.foundation.ExperimentalFoundationApi public fun interface SnapPosition {
- method public int position(int layoutSize, int itemSize, int beforeContentPadding, int afterContentPadding, int itemIndex);
- field public static final androidx.compose.foundation.gestures.snapping.SnapPosition.Companion Companion;
+ @androidx.compose.runtime.Stable public interface SnapPosition {
+ method public int position(int layoutSize, int itemSize, int beforeContentPadding, int afterContentPadding, int itemIndex, int itemCount);
}
- public static final class SnapPosition.Companion {
- method public androidx.compose.foundation.gestures.snapping.SnapPosition getCenter();
- method public androidx.compose.foundation.gestures.snapping.SnapPosition getEnd();
- method public androidx.compose.foundation.gestures.snapping.SnapPosition getStart();
- property public final androidx.compose.foundation.gestures.snapping.SnapPosition Center;
- property public final androidx.compose.foundation.gestures.snapping.SnapPosition End;
- property public final androidx.compose.foundation.gestures.snapping.SnapPosition Start;
+ public static final class SnapPosition.Center implements androidx.compose.foundation.gestures.snapping.SnapPosition {
+ method public int position(int layoutSize, int itemSize, int beforeContentPadding, int afterContentPadding, int itemIndex, int itemCount);
+ field public static final androidx.compose.foundation.gestures.snapping.SnapPosition.Center INSTANCE;
+ }
+
+ public static final class SnapPosition.End implements androidx.compose.foundation.gestures.snapping.SnapPosition {
+ method public int position(int layoutSize, int itemSize, int beforeContentPadding, int afterContentPadding, int itemIndex, int itemCount);
+ field public static final androidx.compose.foundation.gestures.snapping.SnapPosition.End INSTANCE;
+ }
+
+ public static final class SnapPosition.Start implements androidx.compose.foundation.gestures.snapping.SnapPosition {
+ method public int position(int layoutSize, int itemSize, int beforeContentPadding, int afterContentPadding, int itemIndex, int itemCount);
+ field public static final androidx.compose.foundation.gestures.snapping.SnapPosition.Start INSTANCE;
}
}
@@ -1158,10 +1163,12 @@
package androidx.compose.foundation.pager {
- @SuppressCompatibility @androidx.compose.foundation.ExperimentalFoundationApi public sealed interface PageInfo {
+ public sealed interface PageInfo {
method public int getIndex();
+ method public Object getKey();
method public int getOffset();
property public abstract int index;
+ property public abstract Object key;
property public abstract int offset;
}
@@ -1221,7 +1228,7 @@
property public abstract java.util.List<androidx.compose.foundation.pager.PageInfo> visiblePagesInfo;
}
- @SuppressCompatibility @androidx.compose.foundation.ExperimentalFoundationApi public sealed interface PagerScope {
+ public sealed interface PagerScope {
}
@androidx.compose.runtime.Stable public interface PagerSnapDistance {
diff --git a/compose/foundation/foundation/benchmark/build.gradle b/compose/foundation/foundation/benchmark/build.gradle
index 5eb1d5b..b24198f 100644
--- a/compose/foundation/foundation/benchmark/build.gradle
+++ b/compose/foundation/foundation/benchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/compose/foundation/foundation/build.gradle b/compose/foundation/foundation/build.gradle
index d1acfc6..58190c2 100644
--- a/compose/foundation/foundation/build.gradle
+++ b/compose/foundation/foundation/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
@@ -63,7 +70,7 @@
dependencies {
api("androidx.annotation:annotation:1.1.0")
implementation("androidx.emoji2:emoji2:1.3.0")
- implementation("androidx.core:core:1.11.0")
+ implementation("androidx.core:core:1.12.0")
}
}
diff --git a/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/pager/PagerCarrouselDemos.kt b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/pager/PagerCarrouselDemos.kt
index 11a55c8..940d20d 100644
--- a/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/pager/PagerCarrouselDemos.kt
+++ b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/pager/PagerCarrouselDemos.kt
@@ -70,12 +70,21 @@
val pagerState = rememberPagerState { PagesCount }
val snapPosition = remember {
- SnapPosition { layoutSize, itemSize, beforeContentPadding, afterContentPadding, pageIndex ->
- val availableLayoutSpace = layoutSize - beforeContentPadding - afterContentPadding
- when (pageIndex) {
- 0 -> 0
- PagesCount - 2 -> availableLayoutSpace - itemSize
- else -> availableLayoutSpace / 2 - itemSize / 2
+ object : SnapPosition {
+ override fun position(
+ layoutSize: Int,
+ itemSize: Int,
+ beforeContentPadding: Int,
+ afterContentPadding: Int,
+ itemIndex: Int,
+ itemCount: Int
+ ): Int {
+ val availableLayoutSpace = layoutSize - beforeContentPadding - afterContentPadding
+ return when (itemIndex) {
+ 0 -> 0
+ itemCount - 2 -> availableLayoutSpace - itemSize
+ else -> availableLayoutSpace / 2 - itemSize / 2
+ }
}
}
}
diff --git a/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/InteropTextFieldDemo.kt b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/InteropTextFieldDemo.kt
new file mode 100644
index 0000000..f236c62
--- /dev/null
+++ b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/InteropTextFieldDemo.kt
@@ -0,0 +1,67 @@
+/*
+ * 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.foundation.demos.text
+
+import android.widget.EditText
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.text.KeyboardOptions
+import androidx.compose.material.Text
+import androidx.compose.material.TextField
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.text.input.ImeAction
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.viewinterop.AndroidView
+
+@Composable
+fun InteropTextFieldDemo() {
+ var firstTextField by remember { mutableStateOf("") }
+ var secondTextField by remember { mutableStateOf("") }
+ Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
+ Text("First TextField")
+ TextField(
+ value = firstTextField,
+ onValueChange = { firstTextField = it },
+ Modifier.fillMaxWidth(),
+ keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next)
+ )
+
+ Text("First EditText")
+ AndroidView(factory = {
+ EditText(it)
+ }, Modifier.fillMaxWidth())
+
+ Text("Second TextField")
+ TextField(
+ value = secondTextField,
+ onValueChange = { secondTextField = it },
+ Modifier.fillMaxWidth(),
+ keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next)
+ )
+
+ Text("Second EditText")
+ AndroidView(factory = {
+ EditText(it)
+ }, Modifier.fillMaxWidth())
+ }
+}
diff --git a/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt
index 4a8c640..bbd3ef6 100644
--- a/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt
+++ b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt
@@ -142,6 +142,7 @@
ComposableDemo("Tail Following Text Field") { TailFollowingTextFieldDemo() },
ComposableDemo("Secondary input system") { PlatformTextInputAdapterDemo() },
ComposableDemo("Read-only field") { ReadOnlyTextFieldDemo() },
+ ComposableDemo("Interop") { InteropTextFieldDemo() }
)
),
DemoCategory(
diff --git a/compose/foundation/foundation/samples/build.gradle b/compose/foundation/foundation/samples/build.gradle
index 359ec89..22a9666 100644
--- a/compose/foundation/foundation/samples/build.gradle
+++ b/compose/foundation/foundation/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/SnapFlingBehaviorSample.kt b/compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/SnapFlingBehaviorSample.kt
index 37cc30d..4d063ed 100644
--- a/compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/SnapFlingBehaviorSample.kt
+++ b/compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/SnapFlingBehaviorSample.kt
@@ -107,8 +107,17 @@
// Illustrate using a custom SnapPosition that will snap to a static location (200dp) after
// the content padding.
val snappingLayout = remember(state, density) {
- val snapPosition = SnapPosition { _, _, beforeContentPadding, _, _ ->
- with(density) { beforeContentPadding + 200.dp.roundToPx() }
+ val snapPosition = object : SnapPosition {
+ override fun position(
+ layoutSize: Int,
+ itemSize: Int,
+ beforeContentPadding: Int,
+ afterContentPadding: Int,
+ itemIndex: Int,
+ itemCount: Int
+ ): Int {
+ return with(density) { beforeContentPadding + 200.dp.roundToPx() }
+ }
}
SnapLayoutInfoProvider(state, snapPosition)
}
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/gestures/snapping/LazyGridSnapFlingBehaviorTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/gestures/snapping/LazyGridSnapFlingBehaviorTest.kt
index e24ea3f..8d2c398 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/gestures/snapping/LazyGridSnapFlingBehaviorTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/gestures/snapping/LazyGridSnapFlingBehaviorTest.kt
@@ -20,7 +20,7 @@
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.FlingBehavior
import androidx.compose.foundation.gestures.Orientation
-import androidx.compose.foundation.gestures.snapping.SnapPosition.Companion.Center
+import androidx.compose.foundation.gestures.snapping.SnapPosition.Center
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.size
@@ -464,7 +464,8 @@
itemSize = it.sizeOnMainAxis(orientation = layoutInfo.orientation),
itemOffset = it.offsetOnMainAxis(orientation = layoutInfo.orientation),
itemIndex = it.index,
- snapPosition = Center
+ snapPosition = Center,
+ itemCount = layoutInfo.totalItemsCount
)
if (abs(distance) < minDistance) {
minDistance = abs(distance)
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/gestures/snapping/LazyListSnapFlingBehaviorTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/gestures/snapping/LazyListSnapFlingBehaviorTest.kt
index 8214d628..4690962 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/gestures/snapping/LazyListSnapFlingBehaviorTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/gestures/snapping/LazyListSnapFlingBehaviorTest.kt
@@ -20,7 +20,6 @@
import androidx.compose.foundation.gestures.FlingBehavior
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.gestures.ScrollScope
-import androidx.compose.foundation.gestures.snapping.SnapPosition.Companion.Center
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.size
@@ -448,7 +447,8 @@
itemSize = it.size,
itemOffset = it.offset,
itemIndex = it.index,
- snapPosition = Center
+ snapPosition = SnapPosition.Center,
+ itemCount = layoutInfo.totalItemsCount
)
if (abs(distance) < minDistance) {
minDistance = abs(distance)
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/BasePagerTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/BasePagerTest.kt
index 4aa29fc..c6b4947 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/BasePagerTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/BasePagerTest.kt
@@ -401,7 +401,7 @@
internal val TestReverseLayout = listOf(false, true)
internal val TestLayoutDirection = listOf(LayoutDirection.Rtl, LayoutDirection.Ltr)
internal val TestPageSpacing = listOf(0.dp, 8.dp)
-@OptIn(ExperimentalFoundationApi::class)
+
internal val TestSnapPosition = listOf(
SnapPosition.Start to "Start",
SnapPosition.Center to "Center",
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerSnapPositionTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerSnapPositionTest.kt
index 70a9ad3..91fae3c 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerSnapPositionTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerSnapPositionTest.kt
@@ -562,7 +562,7 @@
for (orientation in TestOrientation) {
for (snapPosition in TestSnapPosition) {
// skip start since it's being tested in PagerStateTest already.
- if (snapPosition == SnapPosition.Start) continue
+ if (snapPosition.first == SnapPosition.Start) continue
add(
ParamConfig(
orientation = orientation,
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerStateNonGestureScrollingTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerStateNonGestureScrollingTest.kt
index 37a5df7..6782093 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerStateNonGestureScrollingTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerStateNonGestureScrollingTest.kt
@@ -423,9 +423,18 @@
@Test
fun currentPage_shouldUpdateWithSnapPositionInLayout() {
// snap position is 200dp from edge of Pager
- val customSnapPosition = SnapPosition { _, _, _, _, _ ->
- with(rule.density) {
- 200.dp.roundToPx()
+ val customSnapPosition = object : SnapPosition {
+ override fun position(
+ layoutSize: Int,
+ itemSize: Int,
+ beforeContentPadding: Int,
+ afterContentPadding: Int,
+ itemIndex: Int,
+ itemCount: Int
+ ): Int {
+ return with(rule.density) {
+ 200.dp.roundToPx()
+ }
}
}
@@ -443,7 +452,7 @@
with(pagerState.layoutInfo) {
val viewPortSize = if (vertical) viewportSize.height else viewportSize.width
- Truth.assertThat(pagerState.currentPage).isEqualTo(visiblePagesInfo.fastMaxBy {
+ assertThat(pagerState.currentPage).isEqualTo(visiblePagesInfo.fastMaxBy {
-abs(
calculateDistanceToDesiredSnapPosition(
mainAxisViewPortSize = viewPortSize,
@@ -452,7 +461,8 @@
itemSize = pageSize,
itemOffset = it.offset,
itemIndex = it.index,
- snapPosition = customSnapPosition
+ snapPosition = customSnapPosition,
+ itemCount = pagerState.pageCount
)
)
}?.index)
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerTest.kt
index 6aabc08..091ac12 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerTest.kt
@@ -361,7 +361,7 @@
@Test
fun snapPositionChanges_shouldReLayoutPages() {
- val snapPosition = mutableStateOf(SnapPosition.Start)
+ val snapPosition = mutableStateOf<SnapPosition>(SnapPosition.Start)
rule.setContent {
HorizontalOrVerticalPager(
modifier = Modifier
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/CoreTextFieldFocusTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/CoreTextFieldFocusTest.kt
index 3ae4966..933c14d 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/CoreTextFieldFocusTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/CoreTextFieldFocusTest.kt
@@ -16,27 +16,99 @@
package androidx.compose.foundation.text
+import androidx.compose.foundation.focusable
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.size
import androidx.compose.runtime.RecomposeScope
import androidx.compose.runtime.currentRecomposeScope
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
+import androidx.compose.ui.focus.FocusManager
+import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.test.assertIsFocused
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.performClick
+import androidx.compose.ui.test.requestFocus
import androidx.compose.ui.text.input.TextFieldValue
+import androidx.compose.ui.unit.dp
import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.test.filters.SmallTest
+import androidx.test.filters.MediumTest
+import kotlin.test.assertTrue
+import org.junit.Assert
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
-@SmallTest
+@MediumTest
@RunWith(AndroidJUnit4::class)
class CoreTextFieldFocusTest {
@get:Rule
val rule = createComposeRule()
+ val keyboardHelper = KeyboardHelper(rule)
+
+ @Test
+ fun hideKeyboardWhenDisposed() {
+ val value = TextFieldValue("initial text")
+ var toggle by mutableStateOf(true)
+ rule.setContent {
+ keyboardHelper.initialize()
+
+ if (toggle) {
+ CoreTextField(
+ value = value,
+ onValueChange = {},
+ modifier = Modifier.testTag("TextField")
+ )
+ }
+ }
+
+ rule.onNodeWithTag("TextField").requestFocus()
+ keyboardHelper.waitForKeyboardVisibility(true)
+ assertTrue(keyboardHelper.isSoftwareKeyboardShown())
+
+ toggle = false
+ rule.waitForIdle()
+
+ keyboardHelper.waitForKeyboardVisibility(false)
+ Assert.assertFalse(keyboardHelper.isSoftwareKeyboardShown())
+ }
+
+ @Test
+ fun hideKeyboardWhenFocusCleared() {
+ val value = TextFieldValue("initial text")
+ lateinit var focusManager: FocusManager
+ rule.setContent {
+ keyboardHelper.initialize()
+ focusManager = LocalFocusManager.current
+ Row {
+ // Extra focusable that takes initial focus when focus is cleared.
+ Box(Modifier.size(10.dp).focusable())
+ CoreTextField(
+ value = value,
+ onValueChange = {},
+ modifier = Modifier.testTag("TextField")
+ )
+ }
+ }
+
+ rule.onNodeWithTag("TextField").requestFocus()
+ keyboardHelper.waitForKeyboardVisibility(true)
+ assertTrue(keyboardHelper.isSoftwareKeyboardShown())
+
+ rule.runOnIdle {
+ focusManager.clearFocus()
+ }
+
+ keyboardHelper.waitForKeyboardVisibility(false)
+ Assert.assertFalse(keyboardHelper.isSoftwareKeyboardShown())
+ }
+
@Test
fun tapToFocus() {
// Arrange.
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/selection/gestures/TextFieldSelectionGesturesTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/selection/gestures/TextFieldSelectionGesturesTest.kt
index 4403d90..dfd3fd0 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/selection/gestures/TextFieldSelectionGesturesTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/selection/gestures/TextFieldSelectionGesturesTest.kt
@@ -64,19 +64,23 @@
rule.waitForIdle()
rule.onNodeWithTag(pointerAreaTag).performTouchInput { click(characterPosition(0)) }
rule.waitForIdle()
+ asserter.applyAndAssert {
+ cursorHandleShown = true
+ }
+ asserter.cursorHandleShown = false
+ // most tests first action will start a selection, so leave cursor handle as false
}
@Test
fun whenTouch_withLongPressOutOfBounds_nothingHappens() {
- asserter.applyAndAssert {
- cursorHandleShown = true
- }
-
performTouchGesture {
longPress(topStart.nudge(yDirection = UP))
}
- asserter.assert()
+ asserter.applyAndAssert {
+ cursorHandleShown = true
+ }
+
touchDragTo(topEnd.nudge(yDirection = UP))
asserter.assert()
}
@@ -86,12 +90,17 @@
textFieldValue.value = TextFieldValue()
rule.waitForIdle()
+ rule.onNodeWithTag(pointerAreaTag).performTouchInput { click() }
+
+ asserter.applyAndAssert {
+ textContent = ""
+ }
+
performTouchGesture {
longClick(center)
}
asserter.applyAndAssert {
- textContent = ""
textToolbarShown = true // paste will show up if clipboard is not empty
hapticsCount++
}
@@ -102,12 +111,17 @@
textFieldValue.value = TextFieldValue()
rule.waitForIdle()
+ rule.onNodeWithTag(pointerAreaTag).performTouchInput { click() }
+
+ asserter.applyAndAssert {
+ textContent = ""
+ }
+
performTouchGesture {
longPress(center)
}
asserter.applyAndAssert {
- textContent = ""
hapticsCount++
}
@@ -131,6 +145,12 @@
textFieldValue.value = TextFieldValue()
rule.waitForIdle()
+ rule.onNodeWithTag(pointerAreaTag).performTouchInput { click() }
+
+ asserter.applyAndAssert {
+ textContent = ""
+ }
+
performTouchGesture {
longPress(center)
}
@@ -525,14 +545,19 @@
textFieldValue.value = TextFieldValue(content)
rule.waitForIdle()
+ rule.onNodeWithTag(pointerAreaTag).performTouchInput { click(characterPosition(0)) }
+
+ asserter.applyAndAssert {
+ textContent = content
+ cursorHandleShown = true
+ }
+
performTouchGesture {
longPress(centerEnd)
}
asserter.applyAndAssert {
- textContent = content
selection = 6.collapsed
- cursorHandleShown = true
hapticsCount++
}
@@ -679,14 +704,19 @@
textFieldValue.value = TextFieldValue(content)
rule.waitForIdle()
+ rule.onNodeWithTag(pointerAreaTag).performTouchInput { click(characterPosition(0)) }
+
+ asserter.applyAndAssert {
+ textContent = content
+ cursorHandleShown = true
+ }
+
performTouchGesture {
longPress(bottomEnd)
}
asserter.applyAndAssert {
- textContent = content
selection = 7.collapsed
- cursorHandleShown = true
hapticsCount++
}
@@ -1101,14 +1131,21 @@
textFieldValue.value = TextFieldValue(content)
rule.waitForIdle()
+ rule.onNodeWithTag(pointerAreaTag).performTouchInput { click(characterPosition(0)) }
+
+ asserter.applyAndAssert {
+ textContent = content
+ cursorHandleShown = true
+ }
+
performTouchGesture {
longPress(characterPosition(content.lastIndex))
}
asserter.applyAndAssert {
- textContent = content
selection = 0 to content.length
selectionHandlesShown = true
+ cursorHandleShown = false
magnifierShown = true
hapticsCount++
}
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/BasicTextField2Test.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/BasicTextField2Test.kt
index 87f3cdf..4cba9a59 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/BasicTextField2Test.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/BasicTextField2Test.kt
@@ -21,10 +21,14 @@
import android.view.inputmethod.InputConnection
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.ScrollState
+import androidx.compose.foundation.focusable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.size
+import androidx.compose.foundation.text.KeyboardHelper
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.foundation.text.TEST_FONT_FAMILY
import androidx.compose.foundation.text.selection.fetchTextLayoutResult
@@ -44,6 +48,7 @@
import androidx.compose.runtime.setValue
import androidx.compose.runtime.snapshotFlow
import androidx.compose.ui.Modifier
+import androidx.compose.ui.focus.FocusManager
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.graphics.Color
@@ -51,6 +56,7 @@
import androidx.compose.ui.platform.ClipboardManager
import androidx.compose.ui.platform.LocalClipboardManager
import androidx.compose.ui.platform.LocalDensity
+import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.platform.LocalWindowInfo
import androidx.compose.ui.platform.WindowInfo
@@ -92,6 +98,8 @@
import androidx.test.filters.SdkSuppress
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.flow.drop
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertTrue
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@@ -407,6 +415,63 @@
}
@Test
+ fun hideKeyboardWhenDisposed() {
+ val keyboardHelper = KeyboardHelper(rule)
+ val state = TextFieldState("initial text")
+ var toggle by mutableStateOf(true)
+ rule.setContent {
+ keyboardHelper.initialize()
+
+ if (toggle) {
+ BasicTextField2(
+ state = state,
+ modifier = Modifier.testTag("TextField")
+ )
+ }
+ }
+
+ rule.onNodeWithTag("TextField").requestFocus()
+ keyboardHelper.waitForKeyboardVisibility(true)
+ assertTrue(keyboardHelper.isSoftwareKeyboardShown())
+
+ toggle = false
+ rule.waitForIdle()
+
+ keyboardHelper.waitForKeyboardVisibility(false)
+ assertFalse(keyboardHelper.isSoftwareKeyboardShown())
+ }
+
+ @Test
+ fun hideKeyboardWhenFocusCleared() {
+ val keyboardHelper = KeyboardHelper(rule)
+ val state = TextFieldState("initial text")
+ lateinit var focusManager: FocusManager
+ rule.setContent {
+ keyboardHelper.initialize()
+ focusManager = LocalFocusManager.current
+ Row {
+ // Extra focusable that takes initial focus when focus is cleared.
+ Box(Modifier.size(10.dp).focusable())
+ BasicTextField2(
+ state = state,
+ modifier = Modifier.testTag("TextField")
+ )
+ }
+ }
+
+ rule.onNodeWithTag("TextField").requestFocus()
+ keyboardHelper.waitForKeyboardVisibility(true)
+ assertTrue(keyboardHelper.isSoftwareKeyboardShown())
+
+ rule.runOnIdle {
+ focusManager.clearFocus()
+ }
+
+ keyboardHelper.waitForKeyboardVisibility(false)
+ assertFalse(keyboardHelper.isSoftwareKeyboardShown())
+ }
+
+ @Test
fun textField_whenStateObjectChanges_newTextIsRendered() {
val state1 = TextFieldState("Hello")
val state2 = TextFieldState("World")
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/TextFieldCursorTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/TextFieldCursorTest.kt
index de323bc..d9139e4 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/TextFieldCursorTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/TextFieldCursorTest.kt
@@ -194,7 +194,7 @@
.assertCursor(cursorTopCenterInLtr)
}
- @Ignore("b/305799612")
+ @FlakyTest(bugId = 305799612)
@Test
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.O)
fun textFieldFocused_cursorRendered_rtlLayout() {
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/input/internal/undo/BasicTextField2UndoTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/input/internal/undo/BasicTextField2UndoTest.kt
index 8fcf05d..b20e406 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/input/internal/undo/BasicTextField2UndoTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/input/internal/undo/BasicTextField2UndoTest.kt
@@ -38,10 +38,8 @@
import androidx.compose.ui.test.requestFocus
import androidx.compose.ui.text.TextRange
import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.test.filters.FlakyTest
import androidx.test.filters.LargeTest
import com.google.common.truth.Truth.assertThat
-import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@@ -62,10 +60,10 @@
}
rule.onNode(hasSetTextAction()).performTextInput(", World")
- assertThat(state.text.toString()).isEqualTo("Hello, World")
+ state.assertText("Hello, World")
state.undoState.undo()
- assertThat(state.text.toString()).isEqualTo("Hello")
+ state.assertText("Hello")
rule.onNode(hasSetTextAction()).assertTextEquals("Hello")
}
@@ -95,10 +93,10 @@
}
rule.onNode(hasSetTextAction()).typeText(", World")
- assertThat(state.text.toString()).isEqualTo("Hello, World")
+ state.assertText("Hello, World")
state.undoState.undo()
- assertThat(state.text.toString()).isEqualTo("Hello")
+ state.assertText("Hello")
rule.onNode(hasSetTextAction()).assertTextEquals("Hello")
}
@@ -115,14 +113,14 @@
performTextInputSelection(TextRange(5))
performTextInput(" Compose")
}
- assertThat(state.text.toString()).isEqualTo("Hello Compose, World")
+ state.assertText("Hello Compose, World")
state.undoState.undo()
- assertThat(state.text.toString()).isEqualTo("Hello, World")
+ state.assertText("Hello, World")
rule.onNode(hasSetTextAction()).assertTextEquals("Hello, World")
state.undoState.undo()
- assertThat(state.text.toString()).isEqualTo("Hello")
+ state.assertText("Hello")
rule.onNode(hasSetTextAction()).assertTextEquals("Hello")
}
@@ -189,11 +187,10 @@
performTextInputSelection(TextRange(0, 5))
performTextInput("a")
}
- assertThat(state.text.toString()).isEqualTo("a")
+ state.assertTextAndSelection("a", TextRange(1))
state.undoState.undo()
- assertThat(state.text.toString()).isEqualTo("Hello")
- assertThat(state.text.selectionInChars).isEqualTo(TextRange(0, 5))
+ state.assertTextAndSelection("Hello", TextRange(0, 5))
}
@Test
@@ -208,14 +205,18 @@
performTextInputSelection(TextRange(2))
performTextInput(" abc ")
}
- assertThat(state.text.selectionInChars).isEqualTo(TextRange(7))
+
+ state.assertTextAndSelection("He abc llo", TextRange(7))
state.undoState.undo()
- assertThat(state.text.selectionInChars).isNotEqualTo(TextRange(7))
+ rule.runOnIdle {
+ assertThat(state.text.selectionInChars).isNotEqualTo(TextRange(7))
+ }
state.undoState.redo()
- assertThat(state.text.selectionInChars).isEqualTo(TextRange(7))
+
+ state.assertTextAndSelection("He abc llo", TextRange(7))
}
@Test
@@ -248,7 +249,6 @@
assertThat(state.undoState.canUndo).isFalse()
}
- @FlakyTest(bugId = 305090138)
@Test
fun clearHistory_removesAllUndoAndRedo() {
val state = TextFieldState()
@@ -265,20 +265,26 @@
typeText("ghi")
performTextClearance()
}
+ rule.waitForIdle()
state.undoState.undo()
+ rule.waitForIdle()
state.undoState.undo()
+ rule.waitForIdle()
state.undoState.undo()
- assertThat(state.undoState.canUndo).isTrue()
- assertThat(state.undoState.canRedo).isTrue()
+ rule.runOnIdle {
+ assertThat(state.undoState.canUndo).isTrue()
+ assertThat(state.undoState.canRedo).isTrue()
+ }
state.undoState.clearHistory()
- assertThat(state.undoState.canUndo).isFalse()
- assertThat(state.undoState.canRedo).isFalse()
+ rule.runOnIdle {
+ assertThat(state.undoState.canUndo).isFalse()
+ assertThat(state.undoState.canRedo).isFalse()
+ }
}
- @Ignore("b/308623690")
@Test
fun paste_neverMerges() {
val state = TextFieldState()
@@ -350,6 +356,12 @@
text.forEach { performTextInput(it.toString()) }
}
+ private fun TextFieldState.assertText(text: String) {
+ rule.runOnIdle {
+ assertThat(this.text.toString()).isEqualTo(text)
+ }
+ }
+
private fun TextFieldState.assertTextAndSelection(text: String, selection: TextRange) {
rule.runOnIdle {
assertThat(this.text.toString()).isEqualTo(text)
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/textfield/TextFieldCursorTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/textfield/TextFieldCursorTest.kt
index d4bacdf..27b2f23 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/textfield/TextFieldCursorTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/textfield/TextFieldCursorTest.kt
@@ -111,7 +111,7 @@
// default onTextLayout to capture cursor boundaries.
private val onTextLayout: (TextLayoutResult) -> Unit = { cursorRect = it.getCursorRect(0) }
- @Ignore("b/305799612")
+ @FlakyTest(bugId = 305799612)
@Test
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.O)
fun textFieldFocused_cursorRendered() = with(rule.density) {
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/LazyGridSnapLayoutInfoProvider.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/LazyGridSnapLayoutInfoProvider.kt
index 20e1bd0..13c1420 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/LazyGridSnapLayoutInfoProvider.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/LazyGridSnapLayoutInfoProvider.kt
@@ -56,7 +56,8 @@
itemSize = item.sizeOnMainAxis(orientation = layoutInfo.orientation),
itemOffset = item.offsetOnMainAxis(orientation = layoutInfo.orientation),
itemIndex = item.index,
- snapPosition = snapPosition
+ snapPosition = snapPosition,
+ itemCount = layoutInfo.totalItemsCount
)
// Find item that is closest to the center
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/LazyListSnapLayoutInfoProvider.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/LazyListSnapLayoutInfoProvider.kt
index 82c8f42..10444eb 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/LazyListSnapLayoutInfoProvider.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/LazyListSnapLayoutInfoProvider.kt
@@ -59,7 +59,8 @@
itemSize = item.size,
itemOffset = item.offset,
itemIndex = item.index,
- snapPosition = snapPosition
+ snapPosition = snapPosition,
+ itemCount = layoutInfo.totalItemsCount
)
// Find item that is closest to the center
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/SnapPosition.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/SnapPosition.kt
index ee0eede..691bedf 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/SnapPosition.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/SnapPosition.kt
@@ -16,19 +16,21 @@
package androidx.compose.foundation.gestures.snapping
-import androidx.compose.foundation.ExperimentalFoundationApi
+import androidx.compose.runtime.Stable
/**
- * Describes the general positioning of a given snap item in its containing layout.
+ * Describes the snapping positioning (i.e. final positioning after snapping animation finishes)
+ * of a given snap item in its containing layout.
*/
-@ExperimentalFoundationApi
-fun interface SnapPosition {
+@Stable
+interface SnapPosition {
/**
- * Calculates the anchor reference position where items will be snapped to in a snapping
+ * Calculates the snap position where items will be aligned to in a snapping
* container. For instance, if [SnapPosition.Center] is used, once the snapping finishes
- * one of the items in the snapping container will be aligned exactly to the position
- * returned by [position]. The value returned will be applied to the item's current offset
- * to generate its final positioning.
+ * the center of one of the items in the snapping container will be aligned exactly to the
+ * center of the snapping container, that is because the value returned by [position] was
+ * calculated as such a way that when one applies it to the item's current offset
+ * it will generate that final positioning.
*
* The reference point is with respect to the start of the layout (including the content
* padding)
@@ -43,46 +45,82 @@
* @param afterContentPadding The content padding in pixels applied after this Layout's
* content.
* @param itemIndex The index of the item being positioned.
+ * @param itemCount The total amount of items in the snapping container.
*/
fun position(
layoutSize: Int,
itemSize: Int,
beforeContentPadding: Int,
afterContentPadding: Int,
- itemIndex: Int
+ itemIndex: Int,
+ itemCount: Int
): Int
- companion object {
- /**
- * Aligns the center of the item with the center of the containing layout.
- */
- val Center =
- SnapPosition { layoutSize, itemSize, beforeContentPadding, afterContentPadding, _ ->
- val availableLayoutSpace = layoutSize - beforeContentPadding - afterContentPadding
- // we use availableLayoutSpace / 2 as the main anchor point and we discount half
- // an item size so the item appear aligned with the center of the container.
- availableLayoutSpace / 2 - itemSize / 2
- }
+ /**
+ * Aligns the center of the item with the center of the containing layout.
+ */
+ object Center : SnapPosition {
+ override fun position(
+ layoutSize: Int,
+ itemSize: Int,
+ beforeContentPadding: Int,
+ afterContentPadding: Int,
+ itemIndex: Int,
+ itemCount: Int
+ ): Int {
+ val availableLayoutSpace = layoutSize - beforeContentPadding - afterContentPadding
+ // we use availableLayoutSpace / 2 as the main anchor point and we discount half
+ // an item size so the item appear aligned with the center of the container.
+ return availableLayoutSpace / 2 - itemSize / 2
+ }
- /**
- * Aligns the start of the item with the start of the containing layout.
- */
- val Start = SnapPosition { _, _, _, _, _ -> 0 }
+ override fun toString(): String {
+ return "Center"
+ }
+ }
- /**
- * Aligns the end of the item with the end of the containing layout.
- */
- val End =
- SnapPosition { layoutSize, itemSize, beforeContentPadding, afterContentPadding, _ ->
- val availableLayoutSpace = layoutSize - beforeContentPadding - afterContentPadding
- // the snap position for the item is the end of the layout, discounting the item
- // size
- availableLayoutSpace - itemSize
- }
+ /**
+ * Aligns the start of the item with the start of the containing layout.
+ */
+ object Start : SnapPosition {
+ override fun position(
+ layoutSize: Int,
+ itemSize: Int,
+ beforeContentPadding: Int,
+ afterContentPadding: Int,
+ itemIndex: Int,
+ itemCount: Int
+ ): Int = 0
+
+ override fun toString(): String {
+ return "Start"
+ }
+ }
+
+ /**
+ * Aligns the end of the item with the end of the containing layout.
+ */
+ object End : SnapPosition {
+ override fun position(
+ layoutSize: Int,
+ itemSize: Int,
+ beforeContentPadding: Int,
+ afterContentPadding: Int,
+ itemIndex: Int,
+ itemCount: Int
+ ): Int {
+ val availableLayoutSpace = layoutSize - beforeContentPadding - afterContentPadding
+ // the snap position for the item is the end of the layout, discounting the item
+ // size
+ return availableLayoutSpace - itemSize
+ }
+
+ override fun toString(): String {
+ return "End"
+ }
}
}
-@OptIn(ExperimentalFoundationApi::class)
internal fun calculateDistanceToDesiredSnapPosition(
mainAxisViewPortSize: Int,
beforeContentPadding: Int,
@@ -90,7 +128,8 @@
itemSize: Int,
itemOffset: Int,
itemIndex: Int,
- snapPosition: SnapPosition
+ snapPosition: SnapPosition,
+ itemCount: Int
): Float {
val desiredDistance = with(snapPosition) {
position(
@@ -99,6 +138,7 @@
beforeContentPadding,
afterContentPadding,
itemIndex,
+ itemCount
)
}.toFloat()
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/MeasuredPage.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/MeasuredPage.kt
index 6586433..6339232 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/MeasuredPage.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/MeasuredPage.kt
@@ -16,7 +16,6 @@
package androidx.compose.foundation.pager
-import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.ui.Alignment
import androidx.compose.ui.layout.Placeable
@@ -25,13 +24,12 @@
import androidx.compose.ui.util.fastForEach
import androidx.compose.ui.util.fastForEachIndexed
-@OptIn(ExperimentalFoundationApi::class)
internal class MeasuredPage(
override val index: Int,
val size: Int,
private val placeables: List<Placeable>,
private val visualOffset: IntOffset,
- val key: Any,
+ override val key: Any,
orientation: Orientation,
private val horizontalAlignment: Alignment.Horizontal?,
private val verticalAlignment: Alignment.Vertical?,
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PageInfo.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PageInfo.kt
index 0e2f4b1..83a95be 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PageInfo.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PageInfo.kt
@@ -16,12 +16,9 @@
package androidx.compose.foundation.pager
-import androidx.compose.foundation.ExperimentalFoundationApi
-
/**
* This represents a single measured page in a [Pager] layout.
*/
-@ExperimentalFoundationApi
sealed interface PageInfo {
/**
@@ -30,6 +27,11 @@
val index: Int
/**
+ * The key of the page which was passed to the [HorizontalPager] or [VerticalPager] composables.
+ */
+ val key: Any
+
+ /**
* The main axis offset of the item in pixels. It is relative to the start of the [Pager]
* container.
*/
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/Pager.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/Pager.kt
index 1c6be4d..49271a0 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/Pager.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/Pager.kt
@@ -596,7 +596,8 @@
layoutInfo.beforeContentPadding,
layoutInfo.afterContentPadding,
pagerState.currentPage,
- pagerState.currentPageOffsetFraction
+ pagerState.currentPageOffsetFraction,
+ pagerState.pageCount
)
// the closest page should be close to the current page, we'll start from current page
@@ -618,7 +619,8 @@
itemSize = layoutInfo.pageSize,
itemOffset = currentOffset,
itemIndex = page,
- snapPosition = snapPosition
+ snapPosition = snapPosition,
+ itemCount = pagerState.pageCount
)
debugLog { "Snapping Offset=$offset for page=$page" }
@@ -651,7 +653,8 @@
itemSize = layoutInfo.pageSize,
itemOffset = currentOffset,
itemIndex = page,
- snapPosition = snapPosition
+ snapPosition = snapPosition,
+ itemCount = pagerState.pageCount
)
debugLog {
@@ -686,7 +689,6 @@
}
}
-@OptIn(ExperimentalFoundationApi::class)
internal fun SnapPosition.currentPageOffset(
layoutSize: Int,
pageSize: Int,
@@ -694,14 +696,16 @@
beforeContentPadding: Int,
afterContentPadding: Int,
currentPage: Int,
- currentPageOffsetFraction: Float
+ currentPageOffsetFraction: Float,
+ pageCount: Int
): Int {
val snapOffset = position(
layoutSize,
pageSize,
beforeContentPadding,
afterContentPadding,
- currentPage
+ currentPage,
+ pageCount
)
return (snapOffset - currentPageOffsetFraction * (pageSize + spaceBetweenPages)).roundToInt()
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerMeasure.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerMeasure.kt
index 9ef730a..802f191 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerMeasure.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerMeasure.kt
@@ -68,7 +68,7 @@
"Starting Measure Pass..." +
"\n CurrentPage = $currentPage" +
"\n CurrentPageOffset = $currentPageOffset" +
- "\n SnapPosition = ${snapPosition.string()}"
+ "\n SnapPosition = $snapPosition"
}
return if (pageCount <= 0) {
@@ -406,7 +406,8 @@
beforeContentPadding,
afterContentPadding,
pageSizeWithSpacing,
- snapPosition
+ snapPosition,
+ pageCount
)
val snapOffset = snapPosition.position(
@@ -414,7 +415,8 @@
pageAvailableSize,
beforeContentPadding,
afterContentPadding,
- newCurrentPage?.index ?: 0
+ newCurrentPage?.index ?: 0,
+ pageCount
)
val currentPagePositionOffset = (newCurrentPage?.offset ?: 0)
@@ -514,14 +516,14 @@
return list ?: emptyList()
}
-@OptIn(ExperimentalFoundationApi::class)
private fun calculateNewCurrentPage(
viewportSize: Int,
visiblePagesInfo: List<MeasuredPage>,
beforeContentPadding: Int,
afterContentPadding: Int,
itemSize: Int,
- snapPosition: SnapPosition
+ snapPosition: SnapPosition,
+ pageCount: Int
): MeasuredPage? {
return visiblePagesInfo.fastMaxBy {
-abs(
@@ -532,7 +534,8 @@
itemSize = itemSize,
itemOffset = it.offset,
itemIndex = it.index,
- snapPosition = snapPosition
+ snapPosition = snapPosition,
+ itemCount = pageCount
)
)
}
@@ -652,16 +655,6 @@
return positionedPages
}
-@OptIn(ExperimentalFoundationApi::class)
-private fun SnapPosition.string(): String {
- return when (this) {
- SnapPosition.Start -> "Start"
- SnapPosition.End -> "End"
- SnapPosition.Center -> "Center"
- else -> "Custom"
- }
-}
-
internal const val MinPageOffset = -0.5f
internal const val MaxPageOffset = 0.5f
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerMeasurePolicy.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerMeasurePolicy.kt
index a07498f..b318b2b 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerMeasurePolicy.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerMeasurePolicy.kt
@@ -153,7 +153,8 @@
beforeContentPadding,
afterContentPadding,
state.currentPage,
- state.currentPageOffsetFraction
+ state.currentPageOffsetFraction,
+ state.pageCount
)
}
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerScope.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerScope.kt
index 9790ff5..3470def 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerScope.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerScope.kt
@@ -16,13 +16,10 @@
package androidx.compose.foundation.pager
-import androidx.compose.foundation.ExperimentalFoundationApi
-
/**
* Receiver scope for [Pager].
+ * Note: This is empty now, but we may add new members in the future if needed.
*/
-@ExperimentalFoundationApi
sealed interface PagerScope
-@OptIn(ExperimentalFoundationApi::class)
internal object PagerScopeImpl : PagerScope
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/BasicTextField2.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/BasicTextField2.kt
index 9ea4b56..ec7361d 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/BasicTextField2.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/BasicTextField2.kt
@@ -56,6 +56,7 @@
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.SideEffect
+import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
@@ -515,10 +516,19 @@
internal fun TextFieldSelectionHandles(
selectionState: TextFieldSelectionState
) {
- val startHandleState = selectionState.startSelectionHandle
+ // Does not recompose if only position of the handle changes.
+ val startHandleState by remember {
+ derivedStateOf {
+ selectionState.getSelectionHandleState(isStartHandle = true, includePosition = false)
+ }
+ }
if (startHandleState.visible) {
SelectionHandle(
- offsetProvider = { selectionState.startSelectionHandle.position },
+ offsetProvider = {
+ selectionState
+ .getSelectionHandleState(isStartHandle = true, includePosition = true)
+ .position
+ },
isStartHandle = true,
direction = startHandleState.direction,
handlesCrossed = startHandleState.handlesCrossed,
@@ -528,10 +538,19 @@
)
}
- val endHandleState = selectionState.endSelectionHandle
+ // Does not recompose if only position of the handle changes.
+ val endHandleState by remember {
+ derivedStateOf {
+ selectionState.getSelectionHandleState(isStartHandle = false, includePosition = false)
+ }
+ }
if (endHandleState.visible) {
SelectionHandle(
- offsetProvider = { selectionState.endSelectionHandle.position },
+ offsetProvider = {
+ selectionState
+ .getSelectionHandleState(isStartHandle = false, includePosition = true)
+ .position
+ },
isStartHandle = false,
direction = endHandleState.direction,
handlesCrossed = endHandleState.handlesCrossed,
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/selection/TextFieldSelectionState.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/selection/TextFieldSelectionState.kt
index dd8350b..e0d81bf 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/selection/TextFieldSelectionState.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/selection/TextFieldSelectionState.kt
@@ -282,14 +282,6 @@
)
}
- val startSelectionHandle by derivedStateOf {
- getSelectionHandleState(isStartHandle = true)
- }
-
- val endSelectionHandle by derivedStateOf {
- getSelectionHandleState(isStartHandle = false)
- }
-
fun update(
hapticFeedBack: HapticFeedback,
clipboardManager: ClipboardManager,
@@ -917,7 +909,16 @@
)
}
- private fun getSelectionHandleState(isStartHandle: Boolean): TextFieldHandleState {
+ /**
+ * Calculates and returns the [TextFieldHandleState] of the requested selection handle which is
+ * specified by [isStartHandle]. Pass [includePosition] as false to omit the position from the
+ * result. This helps create a derived state which does not invalidate according position
+ * changes.
+ */
+ internal fun getSelectionHandleState(
+ isStartHandle: Boolean,
+ includePosition: Boolean
+ ): TextFieldHandleState {
val handle = if (isStartHandle) Handle.SelectionStart else Handle.SelectionEnd
val layoutResult = textLayoutState.layoutResult ?: return TextFieldHandleState.Hidden
@@ -944,8 +945,12 @@
// we let it stay on the screen to maintain gesture continuation. However, we still want
// to coerce handle's position to visible bounds to not let it jitter while scrolling the
// TextField as the selection is expanding.
- val coercedPosition = textLayoutCoordinates?.visibleBounds()?.let { position.coerceIn(it) }
- ?: position
+ val coercedPosition = if (includePosition) {
+ textLayoutCoordinates?.visibleBounds()?.let { position.coerceIn(it) }
+ ?: position
+ } else {
+ Offset.Unspecified
+ }
return TextFieldHandleState(
visible = true,
position = coercedPosition,
diff --git a/compose/integration-tests/demos/build.gradle b/compose/integration-tests/demos/build.gradle
index 6a64000..1bfb611 100644
--- a/compose/integration-tests/demos/build.gradle
+++ b/compose/integration-tests/demos/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
plugins {
id("AndroidXPlugin")
id("AndroidXComposePlugin")
diff --git a/compose/integration-tests/docs-snippets/build.gradle b/compose/integration-tests/docs-snippets/build.gradle
index 20bc90f..f57bfff 100644
--- a/compose/integration-tests/docs-snippets/build.gradle
+++ b/compose/integration-tests/docs-snippets/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/compose/integration-tests/hero/benchmark/build.gradle b/compose/integration-tests/hero/benchmark/build.gradle
index a3853ba..86e2872 100644
--- a/compose/integration-tests/hero/benchmark/build.gradle
+++ b/compose/integration-tests/hero/benchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/compose/integration-tests/macrobenchmark-target/build.gradle b/compose/integration-tests/macrobenchmark-target/build.gradle
index f521117..f3bc589 100644
--- a/compose/integration-tests/macrobenchmark-target/build.gradle
+++ b/compose/integration-tests/macrobenchmark-target/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
plugins {
id("AndroidXPlugin")
id("AndroidXComposePlugin")
diff --git a/compose/integration-tests/material-catalog/build.gradle b/compose/integration-tests/material-catalog/build.gradle
index c7bf51b..06103e5 100644
--- a/compose/integration-tests/material-catalog/build.gradle
+++ b/compose/integration-tests/material-catalog/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.ApkCopyHelperKt
import androidx.build.Publish
diff --git a/compose/lint/common-test/build.gradle b/compose/lint/common-test/build.gradle
index 2c9bdb3..baf4218 100644
--- a/compose/lint/common-test/build.gradle
+++ b/compose/lint/common-test/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/lint/common/build.gradle b/compose/lint/common/build.gradle
index 446ff4c..844c29b 100644
--- a/compose/lint/common/build.gradle
+++ b/compose/lint/common/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/lint/internal-lint-checks/build.gradle b/compose/lint/internal-lint-checks/build.gradle
index f2132be..d1078c6 100644
--- a/compose/lint/internal-lint-checks/build.gradle
+++ b/compose/lint/internal-lint-checks/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/material/material-icons-core/build.gradle b/compose/material/material-icons-core/build.gradle
index cf81e9d..900421c 100644
--- a/compose/material/material-icons-core/build.gradle
+++ b/compose/material/material-icons-core/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
import androidx.compose.material.icons.generator.tasks.IconGenerationTask
diff --git a/compose/material/material-icons-core/samples/build.gradle b/compose/material/material-icons-core/samples/build.gradle
index 0977215..2d7f7f1 100644
--- a/compose/material/material-icons-core/samples/build.gradle
+++ b/compose/material/material-icons-core/samples/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/material/material-icons-extended/build.gradle b/compose/material/material-icons-extended/build.gradle
index d3101fe..f2e7c39 100644
--- a/compose/material/material-icons-extended/build.gradle
+++ b/compose/material/material-icons-extended/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
import androidx.build.RunApiTasks
diff --git a/compose/material/material-lint/build.gradle b/compose/material/material-lint/build.gradle
index df5b0368..4c8e995 100644
--- a/compose/material/material-lint/build.gradle
+++ b/compose/material/material-lint/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
diff --git a/compose/material/material-ripple/benchmark/build.gradle b/compose/material/material-ripple/benchmark/build.gradle
index 9d66e6f..6cc659b 100644
--- a/compose/material/material-ripple/benchmark/build.gradle
+++ b/compose/material/material-ripple/benchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/material/material-ripple/build.gradle b/compose/material/material-ripple/build.gradle
index da5ee4a..e40a2e1 100644
--- a/compose/material/material-ripple/build.gradle
+++ b/compose/material/material-ripple/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/material/material/api/current.txt b/compose/material/material/api/current.txt
index d6afbb3..9f69f94 100644
--- a/compose/material/material/api/current.txt
+++ b/compose/material/material/api/current.txt
@@ -448,9 +448,10 @@
@SuppressCompatibility @kotlin.RequiresOptIn(message="This material API is experimental and is likely to change or to be removed in" + " the future.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public @interface ExperimentalMaterialApi {
}
- @SuppressCompatibility @androidx.compose.material.ExperimentalMaterialApi @kotlin.jvm.JvmDefaultWithCompatibility public interface ExposedDropdownMenuBoxScope {
- method @androidx.compose.runtime.Composable public default void ExposedDropdownMenu(boolean expanded, kotlin.jvm.functions.Function0<kotlin.Unit> onDismissRequest, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.ScrollState scrollState, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
- method public androidx.compose.ui.Modifier exposedDropdownSize(androidx.compose.ui.Modifier, optional boolean matchTextFieldWidth);
+ @SuppressCompatibility @androidx.compose.material.ExperimentalMaterialApi public abstract class ExposedDropdownMenuBoxScope {
+ ctor public ExposedDropdownMenuBoxScope();
+ method @androidx.compose.runtime.Composable public final void ExposedDropdownMenu(boolean expanded, kotlin.jvm.functions.Function0<kotlin.Unit> onDismissRequest, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.ScrollState scrollState, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
+ method public abstract androidx.compose.ui.Modifier exposedDropdownSize(androidx.compose.ui.Modifier, optional boolean matchTextFieldWidth);
}
@SuppressCompatibility @androidx.compose.material.ExperimentalMaterialApi public final class ExposedDropdownMenuDefaults {
diff --git a/compose/material/material/api/restricted_current.txt b/compose/material/material/api/restricted_current.txt
index d6afbb3..9f69f94 100644
--- a/compose/material/material/api/restricted_current.txt
+++ b/compose/material/material/api/restricted_current.txt
@@ -448,9 +448,10 @@
@SuppressCompatibility @kotlin.RequiresOptIn(message="This material API is experimental and is likely to change or to be removed in" + " the future.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public @interface ExperimentalMaterialApi {
}
- @SuppressCompatibility @androidx.compose.material.ExperimentalMaterialApi @kotlin.jvm.JvmDefaultWithCompatibility public interface ExposedDropdownMenuBoxScope {
- method @androidx.compose.runtime.Composable public default void ExposedDropdownMenu(boolean expanded, kotlin.jvm.functions.Function0<kotlin.Unit> onDismissRequest, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.ScrollState scrollState, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
- method public androidx.compose.ui.Modifier exposedDropdownSize(androidx.compose.ui.Modifier, optional boolean matchTextFieldWidth);
+ @SuppressCompatibility @androidx.compose.material.ExperimentalMaterialApi public abstract class ExposedDropdownMenuBoxScope {
+ ctor public ExposedDropdownMenuBoxScope();
+ method @androidx.compose.runtime.Composable public final void ExposedDropdownMenu(boolean expanded, kotlin.jvm.functions.Function0<kotlin.Unit> onDismissRequest, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.ScrollState scrollState, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
+ method public abstract androidx.compose.ui.Modifier exposedDropdownSize(androidx.compose.ui.Modifier, optional boolean matchTextFieldWidth);
}
@SuppressCompatibility @androidx.compose.material.ExperimentalMaterialApi public final class ExposedDropdownMenuDefaults {
diff --git a/compose/material/material/benchmark/build.gradle b/compose/material/material/benchmark/build.gradle
index 1e36d67..8b39308 100644
--- a/compose/material/material/benchmark/build.gradle
+++ b/compose/material/material/benchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/material/material/build.gradle b/compose/material/material/build.gradle
index 055564d..3ea9012 100644
--- a/compose/material/material/build.gradle
+++ b/compose/material/material/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/material/material/icons/generator/build.gradle b/compose/material/material/icons/generator/build.gradle
index 79a1c28..c7aa06a 100644
--- a/compose/material/material/icons/generator/build.gradle
+++ b/compose/material/material/icons/generator/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/compose/material/material/integration-tests/material-catalog/build.gradle b/compose/material/material/integration-tests/material-catalog/build.gradle
index 49c18e2..26c868d 100644
--- a/compose/material/material/integration-tests/material-catalog/build.gradle
+++ b/compose/material/material/integration-tests/material-catalog/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/compose/material/material/integration-tests/material-demos/build.gradle b/compose/material/material/integration-tests/material-demos/build.gradle
index af6d579..da885ff 100644
--- a/compose/material/material/integration-tests/material-demos/build.gradle
+++ b/compose/material/material/integration-tests/material-demos/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/compose/material/material/samples/build.gradle b/compose/material/material/samples/build.gradle
index 79ed5c6..649d091 100644
--- a/compose/material/material/samples/build.gradle
+++ b/compose/material/material/samples/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/material/material/src/androidMain/kotlin/androidx/compose/material/ExposedDropdownMenu.android.kt b/compose/material/material/src/androidMain/kotlin/androidx/compose/material/ExposedDropdownMenu.android.kt
index ddb1eee..a8da1da 100644
--- a/compose/material/material/src/androidMain/kotlin/androidx/compose/material/ExposedDropdownMenu.android.kt
+++ b/compose/material/material/src/androidMain/kotlin/androidx/compose/material/ExposedDropdownMenu.android.kt
@@ -102,7 +102,7 @@
val coordinates = remember { Ref<LayoutCoordinates>() }
val scope = remember(density, menuHeight, width) {
- object : ExposedDropdownMenuBoxScope {
+ object : ExposedDropdownMenuBoxScope() {
override fun Modifier.exposedDropdownSize(matchTextFieldWidth: Boolean): Modifier {
return with(density) {
heightIn(max = menuHeight.toDp()).let {
@@ -193,12 +193,11 @@
}
}
-@JvmDefaultWithCompatibility
/**
* Scope for [ExposedDropdownMenuBox].
*/
@ExperimentalMaterialApi
-interface ExposedDropdownMenuBoxScope {
+abstract class ExposedDropdownMenuBoxScope {
/**
* Modifier which should be applied to an [ExposedDropdownMenu]
* placed inside the scope. It's responsible for
@@ -214,7 +213,7 @@
* If set to true the width will match the width
* of the text field.
*/
- fun Modifier.exposedDropdownSize(
+ abstract fun Modifier.exposedDropdownSize(
matchTextFieldWidth: Boolean = true
): Modifier
diff --git a/compose/material3/material3-adaptive-navigation-suite/build.gradle b/compose/material3/material3-adaptive-navigation-suite/build.gradle
index 67b8c3b..785cab4 100644
--- a/compose/material3/material3-adaptive-navigation-suite/build.gradle
+++ b/compose/material3/material3-adaptive-navigation-suite/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.AndroidXComposePlugin
import androidx.build.KmpPlatformsKt
import androidx.build.LibraryType
diff --git a/compose/material3/material3-adaptive-navigation-suite/samples/build.gradle b/compose/material3/material3-adaptive-navigation-suite/samples/build.gradle
index f31873f..b0a3ae7 100644
--- a/compose/material3/material3-adaptive-navigation-suite/samples/build.gradle
+++ b/compose/material3/material3-adaptive-navigation-suite/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/material3/material3-adaptive/build.gradle b/compose/material3/material3-adaptive/build.gradle
index 476b13f..dd5ed5d 100644
--- a/compose/material3/material3-adaptive/build.gradle
+++ b/compose/material3/material3-adaptive/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
import androidx.build.Publish
diff --git a/compose/material3/material3-adaptive/samples/build.gradle b/compose/material3/material3-adaptive/samples/build.gradle
index 0084085..0be99cd 100644
--- a/compose/material3/material3-adaptive/samples/build.gradle
+++ b/compose/material3/material3-adaptive/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldTest.kt b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldTest.kt
index e7833fe..f142449 100644
--- a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldTest.kt
+++ b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldTest.kt
@@ -25,6 +25,9 @@
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.test.junit4.createComposeRule
@@ -106,6 +109,66 @@
rule.onNodeWithTag("SecondaryPane").assertExists()
rule.onNodeWithTag("TertiaryPane").assertExists()
}
+
+ @Test
+ fun threePaneScaffold_scaffoldValueChangeWithSinglePane_expandedPanesAreChanged() {
+ var testScaffoldValue by mutableStateOf(
+ ThreePaneScaffoldValue(
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Hidden,
+ PaneAdaptedValue.Hidden
+ )
+ )
+ rule.setContent {
+ SampleThreePaneScaffold(scaffoldValue = testScaffoldValue)
+ }
+
+ rule.onNodeWithTag("PrimaryPane").assertExists()
+ rule.onNodeWithTag("SecondaryPane").assertDoesNotExist()
+ rule.onNodeWithTag("TertiaryPane").assertDoesNotExist()
+
+ testScaffoldValue = ThreePaneScaffoldValue(
+ PaneAdaptedValue.Hidden,
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Hidden
+ )
+
+ rule.waitForIdle()
+
+ rule.onNodeWithTag("PrimaryPane").assertDoesNotExist()
+ rule.onNodeWithTag("SecondaryPane").assertExists()
+ rule.onNodeWithTag("TertiaryPane").assertDoesNotExist()
+ }
+
+ @Test
+ fun threePaneScaffold_scaffoldValueChangeWithDualPane_expandedPanesAreChanged() {
+ var testScaffoldValue by mutableStateOf(
+ ThreePaneScaffoldValue(
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Hidden,
+ PaneAdaptedValue.Expanded
+ )
+ )
+ rule.setContent {
+ SampleThreePaneScaffold(scaffoldValue = testScaffoldValue)
+ }
+
+ rule.onNodeWithTag("PrimaryPane").assertExists()
+ rule.onNodeWithTag("SecondaryPane").assertDoesNotExist()
+ rule.onNodeWithTag("TertiaryPane").assertExists()
+
+ testScaffoldValue = ThreePaneScaffoldValue(
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Hidden
+ )
+
+ rule.waitForIdle()
+
+ rule.onNodeWithTag("PrimaryPane").assertExists()
+ rule.onNodeWithTag("SecondaryPane").assertExists()
+ rule.onNodeWithTag("TertiaryPane").assertDoesNotExist()
+ }
}
@OptIn(ExperimentalMaterial3AdaptiveApi::class)
diff --git a/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/AndroidPosture.android.kt b/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/AndroidPosture.android.kt
index 4c927dd..61ad91e 100644
--- a/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/AndroidPosture.android.kt
+++ b/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/AndroidPosture.android.kt
@@ -17,7 +17,6 @@
package androidx.compose.material3.adaptive
import androidx.compose.ui.graphics.toComposeRect
-import androidx.compose.ui.util.fastForEach
import androidx.window.layout.FoldingFeature
/**
@@ -28,7 +27,8 @@
fun calculatePosture(foldingFeatures: List<FoldingFeature>): Posture {
var isTableTop = false
val hingeList = mutableListOf<HingeInfo>()
- foldingFeatures.fastForEach {
+ @Suppress("ListIterator")
+ foldingFeatures.forEach {
if (it.orientation == FoldingFeature.Orientation.HORIZONTAL &&
it.state == FoldingFeature.State.HALF_OPENED) {
isTableTop = true
diff --git a/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/Posture.kt b/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/Posture.kt
index 71d734c..6455c51 100644
--- a/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/Posture.kt
+++ b/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/Posture.kt
@@ -18,8 +18,6 @@
import androidx.compose.runtime.Immutable
import androidx.compose.ui.geometry.Rect
-import androidx.compose.ui.util.fastJoinToString
-import androidx.compose.ui.util.fastMapNotNull
/**
* Posture info that can help make layout adaptation decisions. For example when
@@ -59,8 +57,9 @@
}
override fun toString(): String {
+ @Suppress("ListIterator")
return "Posture(isTabletop=$isTabletop, " +
- "hinges=[${hingeList.fastJoinToString(", ")}])"
+ "hinges=[${hingeList.joinToString(", ")}])"
}
}
@@ -149,4 +148,5 @@
@ExperimentalMaterial3AdaptiveApi
private inline fun List<HingeInfo>.getBounds(predicate: HingeInfo.() -> Boolean): List<Rect> =
- fastMapNotNull { if (it.predicate()) it.bounds else null }
+ @Suppress("ListIterator")
+ mapNotNull { if (it.predicate()) it.bounds else null }
diff --git a/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffold.kt b/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffold.kt
index f9df15c..ba79ab9a8 100644
--- a/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffold.kt
+++ b/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffold.kt
@@ -421,7 +421,8 @@
val actualTop = layoutBounds.top + topContentPadding
val actualBottom = layoutBounds.bottom - bottomContentPadding
// Assume hinge bounds are sorted from left to right, non-overlapped.
- scaffoldDirective.excludedBounds.fastForEach { hingeBound ->
+ @Suppress("ListIterator")
+ scaffoldDirective.excludedBounds.forEach { hingeBound ->
if (hingeBound.left <= actualLeft) {
// The hinge is at the left of the layout, adjust the left edge of
// the current partition to the actual displayable bounds.
@@ -431,7 +432,7 @@
// room for more partitions, adjust the right edge of the current
// partition to the actual displayable bounds.
actualRight = min(hingeBound.left, actualRight)
- return@fastForEach
+ return@forEach
} else {
// The hinge is inside the layout, add the current partition to the list
// and move the left edge of the next partition to the right of the
@@ -789,11 +790,11 @@
@OptIn(ExperimentalMaterial3AdaptiveApi::class)
private class ThreePaneScaffoldScopeImpl : ThreePaneScaffoldScope, PaneScaffoldScopeImpl() {
- override var paneAdaptedValue: PaneAdaptedValue = PaneAdaptedValue.Hidden
- override var positionAnimationSpec: FiniteAnimationSpec<IntOffset>? = null
- override var enterTransition: EnterTransition = EnterTransition.None
- override var exitTransition: ExitTransition = ExitTransition.None
- override var animationToolingLabel: String = ""
+ override var paneAdaptedValue by mutableStateOf(PaneAdaptedValue.Hidden)
+ override var positionAnimationSpec: FiniteAnimationSpec<IntOffset>? by mutableStateOf(null)
+ override var enterTransition by mutableStateOf(EnterTransition.None)
+ override var exitTransition by mutableStateOf(ExitTransition.None)
+ override var animationToolingLabel by mutableStateOf("")
}
/**
diff --git a/compose/material3/material3-common/build.gradle b/compose/material3/material3-common/build.gradle
index 38e31c6..09fa42b 100644
--- a/compose/material3/material3-common/build.gradle
+++ b/compose/material3/material3-common/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
import androidx.build.Publish
diff --git a/compose/material3/material3-lint/build.gradle b/compose/material3/material3-lint/build.gradle
index 112aa3e..233c1ae 100644
--- a/compose/material3/material3-lint/build.gradle
+++ b/compose/material3/material3-lint/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
diff --git a/compose/material3/material3-window-size-class/build.gradle b/compose/material3/material3-window-size-class/build.gradle
index 2acef038..c2cc14e 100644
--- a/compose/material3/material3-window-size-class/build.gradle
+++ b/compose/material3/material3-window-size-class/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/material3/material3-window-size-class/samples/build.gradle b/compose/material3/material3-window-size-class/samples/build.gradle
index 71ffc63d1..9315c48 100644
--- a/compose/material3/material3-window-size-class/samples/build.gradle
+++ b/compose/material3/material3-window-size-class/samples/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/material3/material3/api/1.2.0-beta02.txt b/compose/material3/material3/api/1.2.0-beta02.txt
index c594c95..3057df6 100644
--- a/compose/material3/material3/api/1.2.0-beta02.txt
+++ b/compose/material3/material3/api/1.2.0-beta02.txt
@@ -731,10 +731,11 @@
@SuppressCompatibility @kotlin.RequiresOptIn(message="This material API is experimental and is likely to change or to be removed in" + " the future.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public @interface ExperimentalMaterial3Api {
}
- @SuppressCompatibility @androidx.compose.material3.ExperimentalMaterial3Api public interface ExposedDropdownMenuBoxScope {
- method @androidx.compose.runtime.Composable public default void ExposedDropdownMenu(boolean expanded, kotlin.jvm.functions.Function0<kotlin.Unit> onDismissRequest, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.ScrollState scrollState, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
- method public androidx.compose.ui.Modifier exposedDropdownSize(androidx.compose.ui.Modifier, optional boolean matchTextFieldWidth);
- method public androidx.compose.ui.Modifier menuAnchor(androidx.compose.ui.Modifier);
+ @SuppressCompatibility @androidx.compose.material3.ExperimentalMaterial3Api public abstract class ExposedDropdownMenuBoxScope {
+ ctor public ExposedDropdownMenuBoxScope();
+ method @androidx.compose.runtime.Composable public final void ExposedDropdownMenu(boolean expanded, kotlin.jvm.functions.Function0<kotlin.Unit> onDismissRequest, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.ScrollState scrollState, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
+ method public abstract androidx.compose.ui.Modifier exposedDropdownSize(androidx.compose.ui.Modifier, optional boolean matchTextFieldWidth);
+ method public abstract androidx.compose.ui.Modifier menuAnchor(androidx.compose.ui.Modifier);
}
@SuppressCompatibility @androidx.compose.material3.ExperimentalMaterial3Api public final class ExposedDropdownMenuDefaults {
diff --git a/compose/material3/material3/api/current.txt b/compose/material3/material3/api/current.txt
index c594c95..3057df6 100644
--- a/compose/material3/material3/api/current.txt
+++ b/compose/material3/material3/api/current.txt
@@ -731,10 +731,11 @@
@SuppressCompatibility @kotlin.RequiresOptIn(message="This material API is experimental and is likely to change or to be removed in" + " the future.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public @interface ExperimentalMaterial3Api {
}
- @SuppressCompatibility @androidx.compose.material3.ExperimentalMaterial3Api public interface ExposedDropdownMenuBoxScope {
- method @androidx.compose.runtime.Composable public default void ExposedDropdownMenu(boolean expanded, kotlin.jvm.functions.Function0<kotlin.Unit> onDismissRequest, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.ScrollState scrollState, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
- method public androidx.compose.ui.Modifier exposedDropdownSize(androidx.compose.ui.Modifier, optional boolean matchTextFieldWidth);
- method public androidx.compose.ui.Modifier menuAnchor(androidx.compose.ui.Modifier);
+ @SuppressCompatibility @androidx.compose.material3.ExperimentalMaterial3Api public abstract class ExposedDropdownMenuBoxScope {
+ ctor public ExposedDropdownMenuBoxScope();
+ method @androidx.compose.runtime.Composable public final void ExposedDropdownMenu(boolean expanded, kotlin.jvm.functions.Function0<kotlin.Unit> onDismissRequest, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.ScrollState scrollState, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
+ method public abstract androidx.compose.ui.Modifier exposedDropdownSize(androidx.compose.ui.Modifier, optional boolean matchTextFieldWidth);
+ method public abstract androidx.compose.ui.Modifier menuAnchor(androidx.compose.ui.Modifier);
}
@SuppressCompatibility @androidx.compose.material3.ExperimentalMaterial3Api public final class ExposedDropdownMenuDefaults {
diff --git a/compose/material3/material3/api/restricted_1.2.0-beta02.txt b/compose/material3/material3/api/restricted_1.2.0-beta02.txt
index c594c95..3057df6 100644
--- a/compose/material3/material3/api/restricted_1.2.0-beta02.txt
+++ b/compose/material3/material3/api/restricted_1.2.0-beta02.txt
@@ -731,10 +731,11 @@
@SuppressCompatibility @kotlin.RequiresOptIn(message="This material API is experimental and is likely to change or to be removed in" + " the future.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public @interface ExperimentalMaterial3Api {
}
- @SuppressCompatibility @androidx.compose.material3.ExperimentalMaterial3Api public interface ExposedDropdownMenuBoxScope {
- method @androidx.compose.runtime.Composable public default void ExposedDropdownMenu(boolean expanded, kotlin.jvm.functions.Function0<kotlin.Unit> onDismissRequest, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.ScrollState scrollState, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
- method public androidx.compose.ui.Modifier exposedDropdownSize(androidx.compose.ui.Modifier, optional boolean matchTextFieldWidth);
- method public androidx.compose.ui.Modifier menuAnchor(androidx.compose.ui.Modifier);
+ @SuppressCompatibility @androidx.compose.material3.ExperimentalMaterial3Api public abstract class ExposedDropdownMenuBoxScope {
+ ctor public ExposedDropdownMenuBoxScope();
+ method @androidx.compose.runtime.Composable public final void ExposedDropdownMenu(boolean expanded, kotlin.jvm.functions.Function0<kotlin.Unit> onDismissRequest, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.ScrollState scrollState, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
+ method public abstract androidx.compose.ui.Modifier exposedDropdownSize(androidx.compose.ui.Modifier, optional boolean matchTextFieldWidth);
+ method public abstract androidx.compose.ui.Modifier menuAnchor(androidx.compose.ui.Modifier);
}
@SuppressCompatibility @androidx.compose.material3.ExperimentalMaterial3Api public final class ExposedDropdownMenuDefaults {
diff --git a/compose/material3/material3/api/restricted_current.txt b/compose/material3/material3/api/restricted_current.txt
index c594c95..3057df6 100644
--- a/compose/material3/material3/api/restricted_current.txt
+++ b/compose/material3/material3/api/restricted_current.txt
@@ -731,10 +731,11 @@
@SuppressCompatibility @kotlin.RequiresOptIn(message="This material API is experimental and is likely to change or to be removed in" + " the future.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public @interface ExperimentalMaterial3Api {
}
- @SuppressCompatibility @androidx.compose.material3.ExperimentalMaterial3Api public interface ExposedDropdownMenuBoxScope {
- method @androidx.compose.runtime.Composable public default void ExposedDropdownMenu(boolean expanded, kotlin.jvm.functions.Function0<kotlin.Unit> onDismissRequest, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.ScrollState scrollState, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
- method public androidx.compose.ui.Modifier exposedDropdownSize(androidx.compose.ui.Modifier, optional boolean matchTextFieldWidth);
- method public androidx.compose.ui.Modifier menuAnchor(androidx.compose.ui.Modifier);
+ @SuppressCompatibility @androidx.compose.material3.ExperimentalMaterial3Api public abstract class ExposedDropdownMenuBoxScope {
+ ctor public ExposedDropdownMenuBoxScope();
+ method @androidx.compose.runtime.Composable public final void ExposedDropdownMenu(boolean expanded, kotlin.jvm.functions.Function0<kotlin.Unit> onDismissRequest, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.ScrollState scrollState, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
+ method public abstract androidx.compose.ui.Modifier exposedDropdownSize(androidx.compose.ui.Modifier, optional boolean matchTextFieldWidth);
+ method public abstract androidx.compose.ui.Modifier menuAnchor(androidx.compose.ui.Modifier);
}
@SuppressCompatibility @androidx.compose.material3.ExperimentalMaterial3Api public final class ExposedDropdownMenuDefaults {
diff --git a/compose/material3/material3/build.gradle b/compose/material3/material3/build.gradle
index d84585d..f59007c 100644
--- a/compose/material3/material3/build.gradle
+++ b/compose/material3/material3/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/material3/material3/integration-tests/material3-catalog/build.gradle b/compose/material3/material3/integration-tests/material3-catalog/build.gradle
index 4d02722..c3d256e1 100644
--- a/compose/material3/material3/integration-tests/material3-catalog/build.gradle
+++ b/compose/material3/material3/integration-tests/material3-catalog/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/compose/material3/material3/integration-tests/material3-demos/build.gradle b/compose/material3/material3/integration-tests/material3-demos/build.gradle
index 76ba389..cca0272 100644
--- a/compose/material3/material3/integration-tests/material3-demos/build.gradle
+++ b/compose/material3/material3/integration-tests/material3-demos/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/compose/material3/material3/samples/build.gradle b/compose/material3/material3/samples/build.gradle
index a8a3a83..17f67aa 100644
--- a/compose/material3/material3/samples/build.gradle
+++ b/compose/material3/material3/samples/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/ExposedDropdownMenu.android.kt b/compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/ExposedDropdownMenu.android.kt
index 6705d4c..6f8a271 100644
--- a/compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/ExposedDropdownMenu.android.kt
+++ b/compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/ExposedDropdownMenu.android.kt
@@ -129,7 +129,7 @@
val collapsedDescription = getString(Strings.MenuCollapsed)
val scope = remember(expanded, onExpandedChange, config, view, density) {
- object : ExposedDropdownMenuBoxScope {
+ object : ExposedDropdownMenuBoxScope() {
override fun Modifier.menuAnchor(): Modifier = this
.onGloballyPositioned {
anchorCoordinates = it
@@ -226,13 +226,13 @@
* Scope for [ExposedDropdownMenuBox].
*/
@ExperimentalMaterial3Api
-interface ExposedDropdownMenuBoxScope {
+abstract class ExposedDropdownMenuBoxScope {
/**
* Modifier which should be applied to a [TextField] (or [OutlinedTextField]) placed inside the
* scope. It's responsible for properly anchoring the [ExposedDropdownMenu], handling semantics
* of the component, and requesting focus.
*/
- fun Modifier.menuAnchor(): Modifier
+ abstract fun Modifier.menuAnchor(): Modifier
/**
* Modifier which should be applied to an [ExposedDropdownMenu] placed inside the scope. It's
@@ -244,7 +244,7 @@
* @param matchTextFieldWidth whether the menu should match the width of the text field to which
* it's attached. If set to `true`, the width will match the width of the text field.
*/
- fun Modifier.exposedDropdownSize(
+ abstract fun Modifier.exposedDropdownSize(
matchTextFieldWidth: Boolean = true
): Modifier
diff --git a/compose/runtime/runtime-lint/build.gradle b/compose/runtime/runtime-lint/build.gradle
index ac9b31a..f01441a 100644
--- a/compose/runtime/runtime-lint/build.gradle
+++ b/compose/runtime/runtime-lint/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
diff --git a/compose/runtime/runtime-livedata/build.gradle b/compose/runtime/runtime-livedata/build.gradle
index d5183d9..58fc8ee 100644
--- a/compose/runtime/runtime-livedata/build.gradle
+++ b/compose/runtime/runtime-livedata/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/compose/runtime/runtime-livedata/samples/build.gradle b/compose/runtime/runtime-livedata/samples/build.gradle
index b5aa353..4f5ab4b 100644
--- a/compose/runtime/runtime-livedata/samples/build.gradle
+++ b/compose/runtime/runtime-livedata/samples/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/runtime/runtime-rxjava2/build.gradle b/compose/runtime/runtime-rxjava2/build.gradle
index 035c1f5..b0df134e 100644
--- a/compose/runtime/runtime-rxjava2/build.gradle
+++ b/compose/runtime/runtime-rxjava2/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/compose/runtime/runtime-rxjava2/samples/build.gradle b/compose/runtime/runtime-rxjava2/samples/build.gradle
index 9b4bc69..af352ad 100644
--- a/compose/runtime/runtime-rxjava2/samples/build.gradle
+++ b/compose/runtime/runtime-rxjava2/samples/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/runtime/runtime-rxjava3/build.gradle b/compose/runtime/runtime-rxjava3/build.gradle
index 3336eea..73a9189 100644
--- a/compose/runtime/runtime-rxjava3/build.gradle
+++ b/compose/runtime/runtime-rxjava3/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/compose/runtime/runtime-rxjava3/samples/build.gradle b/compose/runtime/runtime-rxjava3/samples/build.gradle
index 79e1c1c..b0e37bc 100644
--- a/compose/runtime/runtime-rxjava3/samples/build.gradle
+++ b/compose/runtime/runtime-rxjava3/samples/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/runtime/runtime-saveable-lint/build.gradle b/compose/runtime/runtime-saveable-lint/build.gradle
index 6bdc70a..5e09a4c 100644
--- a/compose/runtime/runtime-saveable-lint/build.gradle
+++ b/compose/runtime/runtime-saveable-lint/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
diff --git a/compose/runtime/runtime-saveable/build.gradle b/compose/runtime/runtime-saveable/build.gradle
index 8f828c1..155e1d1 100644
--- a/compose/runtime/runtime-saveable/build.gradle
+++ b/compose/runtime/runtime-saveable/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/runtime/runtime-saveable/samples/build.gradle b/compose/runtime/runtime-saveable/samples/build.gradle
index a790a9e..d994399 100644
--- a/compose/runtime/runtime-saveable/samples/build.gradle
+++ b/compose/runtime/runtime-saveable/samples/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/runtime/runtime-tracing/build.gradle b/compose/runtime/runtime-tracing/build.gradle
index 00b177b..4f60cda 100644
--- a/compose/runtime/runtime-tracing/build.gradle
+++ b/compose/runtime/runtime-tracing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/compose/runtime/runtime/api/current.txt b/compose/runtime/runtime/api/current.txt
index dd6f956..59d20ff 100644
--- a/compose/runtime/runtime/api/current.txt
+++ b/compose/runtime/runtime/api/current.txt
@@ -319,6 +319,11 @@
method @androidx.compose.runtime.Composable public static inline kotlinx.coroutines.CoroutineScope rememberCoroutineScope(optional kotlin.jvm.functions.Function0<? extends kotlin.coroutines.CoroutineContext> getContext);
}
+ public final class ExpectKt {
+ method @Deprecated public androidx.compose.runtime.MonotonicFrameClock getDefaultMonotonicFrameClock();
+ property @Deprecated public androidx.compose.runtime.MonotonicFrameClock DefaultMonotonicFrameClock;
+ }
+
@SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.ERROR, message="This is an experimental API for Compose and is likely to change before becoming " + "stable.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.FUNCTION, kotlin.annotation.AnnotationTarget.PROPERTY, kotlin.annotation.AnnotationTarget.PROPERTY_GETTER}) public @interface ExperimentalComposeApi {
}
diff --git a/compose/runtime/runtime/api/restricted_current.txt b/compose/runtime/runtime/api/restricted_current.txt
index bfe27dd..14cb03b 100644
--- a/compose/runtime/runtime/api/restricted_current.txt
+++ b/compose/runtime/runtime/api/restricted_current.txt
@@ -348,7 +348,9 @@
}
public final class ExpectKt {
+ method @Deprecated public androidx.compose.runtime.MonotonicFrameClock getDefaultMonotonicFrameClock();
method @kotlin.PublishedApi internal static inline <R> R synchronized(Object lock, kotlin.jvm.functions.Function0<? extends R> block);
+ property @Deprecated public androidx.compose.runtime.MonotonicFrameClock DefaultMonotonicFrameClock;
}
@SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.ERROR, message="This is an experimental API for Compose and is likely to change before becoming " + "stable.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.FUNCTION, kotlin.annotation.AnnotationTarget.PROPERTY, kotlin.annotation.AnnotationTarget.PROPERTY_GETTER}) public @interface ExperimentalComposeApi {
diff --git a/compose/runtime/runtime/build.gradle b/compose/runtime/runtime/build.gradle
index 1278413..bd9fafc 100644
--- a/compose/runtime/runtime/build.gradle
+++ b/compose/runtime/runtime/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/runtime/runtime/integration-tests/build.gradle b/compose/runtime/runtime/integration-tests/build.gradle
index 161b672..7d76885 100644
--- a/compose/runtime/runtime/integration-tests/build.gradle
+++ b/compose/runtime/runtime/integration-tests/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
diff --git a/compose/runtime/runtime/samples/build.gradle b/compose/runtime/runtime/samples/build.gradle
index 2e8ada7..1fab6a6 100644
--- a/compose/runtime/runtime/samples/build.gradle
+++ b/compose/runtime/runtime/samples/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/runtime/runtime/src/nonEmulatorCommonTest/kotlin/androidx/compose/runtime/CompositionTests.kt b/compose/runtime/runtime/src/nonEmulatorCommonTest/kotlin/androidx/compose/runtime/CompositionTests.kt
index efbebc3..f8ca05a 100644
--- a/compose/runtime/runtime/src/nonEmulatorCommonTest/kotlin/androidx/compose/runtime/CompositionTests.kt
+++ b/compose/runtime/runtime/src/nonEmulatorCommonTest/kotlin/androidx/compose/runtime/CompositionTests.kt
@@ -4073,6 +4073,28 @@
}
}
+ private val LocalNumber = compositionLocalOf { 0 }
+ @Composable fun Test(number: Int = LocalNumber.current) {
+ val remembered = remember(number) { number + 1 }
+ assertEquals(remembered, number + 1)
+ }
+
+ @Test
+ fun remember_defaultParamInRestartableFunction() = compositionTest {
+ var state by mutableIntStateOf(0)
+ compose {
+ CompositionLocalProvider(LocalNumber provides state) {
+ Test()
+ }
+ }
+
+ validate {}
+
+ state++
+ advance()
+ revalidate()
+ }
+
private inline fun CoroutineScope.withGlobalSnapshotManager(block: CoroutineScope.() -> Unit) {
val channel = Channel<Unit>(Channel.CONFLATED)
val job = launch {
diff --git a/compose/test-utils/build.gradle b/compose/test-utils/build.gradle
index 230c55d..5b85a53 100644
--- a/compose/test-utils/build.gradle
+++ b/compose/test-utils/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/compose/ui/ui-android-stubs/build.gradle b/compose/ui/ui-android-stubs/build.gradle
index e84b550..b40a943 100644
--- a/compose/ui/ui-android-stubs/build.gradle
+++ b/compose/ui/ui-android-stubs/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/ui/ui-geometry/build.gradle b/compose/ui/ui-geometry/build.gradle
index 6c06a85..1d9fa6a 100644
--- a/compose/ui/ui-geometry/build.gradle
+++ b/compose/ui/ui-geometry/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/ui/ui-graphics-lint/build.gradle b/compose/ui/ui-graphics-lint/build.gradle
index 836b521..8583313 100644
--- a/compose/ui/ui-graphics-lint/build.gradle
+++ b/compose/ui/ui-graphics-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
diff --git a/compose/ui/ui-graphics/build.gradle b/compose/ui/ui-graphics/build.gradle
index 784adda..ee6bf60 100644
--- a/compose/ui/ui-graphics/build.gradle
+++ b/compose/ui/ui-graphics/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/ui/ui-graphics/samples/build.gradle b/compose/ui/ui-graphics/samples/build.gradle
index 15643a9..2540cfd 100644
--- a/compose/ui/ui-graphics/samples/build.gradle
+++ b/compose/ui/ui-graphics/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/ui/ui-inspection/build.gradle b/compose/ui/ui-inspection/build.gradle
index 6c8a650..e409f2db 100644
--- a/compose/ui/ui-inspection/build.gradle
+++ b/compose/ui/ui-inspection/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/compose/ui/ui-lint/build.gradle b/compose/ui/ui-lint/build.gradle
index 01be668..debfd8e 100644
--- a/compose/ui/ui-lint/build.gradle
+++ b/compose/ui/ui-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
diff --git a/compose/ui/ui-test-junit4/build.gradle b/compose/ui/ui-test-junit4/build.gradle
index f185596..c41faf1 100644
--- a/compose/ui/ui-test-junit4/build.gradle
+++ b/compose/ui/ui-test-junit4/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/ui/ui-test-manifest-lint/build.gradle b/compose/ui/ui-test-manifest-lint/build.gradle
index 2a3ed70..65fbd6b5 100644
--- a/compose/ui/ui-test-manifest-lint/build.gradle
+++ b/compose/ui/ui-test-manifest-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/ui/ui-test-manifest/build.gradle b/compose/ui/ui-test-manifest/build.gradle
index 4dec60a..edec4a5 100644
--- a/compose/ui/ui-test-manifest/build.gradle
+++ b/compose/ui/ui-test-manifest/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/compose/ui/ui-test/build.gradle b/compose/ui/ui-test/build.gradle
index 3e0c6df..373f9e7 100644
--- a/compose/ui/ui-test/build.gradle
+++ b/compose/ui/ui-test/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/ui/ui-test/samples/build.gradle b/compose/ui/ui-test/samples/build.gradle
index 0845c78..eda15f1 100644
--- a/compose/ui/ui-test/samples/build.gradle
+++ b/compose/ui/ui-test/samples/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/ui/ui-test/src/androidInstrumentedTest/kotlin/androidx/compose/ui/test/BitmapCapturingTest.kt b/compose/ui/ui-test/src/androidInstrumentedTest/kotlin/androidx/compose/ui/test/BitmapCapturingTest.kt
index df7537a..0b5c06c 100644
--- a/compose/ui/ui-test/src/androidInstrumentedTest/kotlin/androidx/compose/ui/test/BitmapCapturingTest.kt
+++ b/compose/ui/ui-test/src/androidInstrumentedTest/kotlin/androidx/compose/ui/test/BitmapCapturingTest.kt
@@ -17,7 +17,6 @@
package androidx.compose.ui.test
import android.os.Build
-import android.view.View
import androidx.activity.ComponentActivity
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
@@ -33,7 +32,6 @@
import androidx.compose.testutils.assertPixels
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
-import androidx.compose.ui.platform.ViewRootForTest
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.test.junit4.createAndroidComposeRule
import androidx.compose.ui.unit.Density
@@ -295,17 +293,4 @@
else -> rule.setContent(content)
}
}
-
- private fun fetchNodeRootView(nodeTag: String): View {
- return fetchNodeInteraction(nodeTag).fetchRootView()
- }
-
- private fun fetchNodeInteraction(nodeTag: String): SemanticsNodeInteraction {
- return rule.onNodeWithTag(nodeTag)
- }
-}
-
-private fun SemanticsNodeInteraction.fetchRootView(): View {
- val node = fetchSemanticsNode()
- return (node.root as ViewRootForTest).view
}
diff --git a/compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/android/WindowCapture.android.kt b/compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/android/WindowCapture.android.kt
index 3de4273..524d18f 100644
--- a/compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/android/WindowCapture.android.kt
+++ b/compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/android/WindowCapture.android.kt
@@ -27,6 +27,7 @@
import android.view.Window
import androidx.annotation.DoNotInline
import androidx.annotation.RequiresApi
+import androidx.annotation.VisibleForTesting
import androidx.compose.ui.graphics.ImageBitmap
import androidx.compose.ui.graphics.asImageBitmap
import androidx.compose.ui.test.ComposeTimeoutException
@@ -42,12 +43,42 @@
testContext: TestContext,
boundsInWindow: Rect,
): ImageBitmap {
- // Turn on hardware rendering, if necessary
- return withDrawingEnabled {
- // First force drawing to happen
- decorView.forceRedraw(testContext)
- // Then we generate the bitmap
- generateBitmap(boundsInWindow).asImageBitmap()
+ lateinit var imageBitmap: ImageBitmap
+ runWithRetryWhenNoData {
+ // Turn on hardware rendering, if necessary
+ imageBitmap = withDrawingEnabled {
+ // First force drawing to happen
+ decorView.forceRedraw(testContext)
+ // Then we generate the bitmap
+ generateBitmap(boundsInWindow).asImageBitmap()
+ }
+ }
+ return imageBitmap
+}
+
+@VisibleForTesting
+internal fun runWithRetryWhenNoData(retryBlock: () -> Unit) {
+ var retryAttempts = 0
+ var shouldRetry = true
+ while (shouldRetry) {
+ try {
+ shouldRetry = false
+ retryBlock()
+ } catch (e: PixelCopyException) {
+ // retry up to 3 times only if the resulting error is "source no data"
+ if (e.copyResultStatus == PixelCopy.ERROR_SOURCE_NO_DATA && retryAttempts >= 2) {
+ throw PixelCopyException(
+ e.copyResultStatus,
+ "PixelCopy failed with result ERROR_SOURCE_NO_DATA after 3 retry attempts!"
+ )
+ } else if (e.copyResultStatus == PixelCopy.ERROR_SOURCE_NO_DATA) {
+ shouldRetry = true
+ } else {
+ throw e
+ }
+ } finally {
+ retryAttempts++
+ }
}
}
@@ -125,10 +156,17 @@
throw AssertionError("Failed waiting for PixelCopy!")
}
if (copyResult != PixelCopy.SUCCESS) {
- throw AssertionError("PixelCopy failed with result $copyResult!")
+ throw PixelCopyException(copyResultStatus = copyResult)
}
}
+internal class PixelCopyException(
+ val copyResultStatus: Int,
+ message: String? = null
+) : RuntimeException(
+ message ?: "PixelCopy failed with result $copyResultStatus!"
+)
+
// Unfortunately this is a copy paste from AndroidComposeTestRule. At this moment it is a bit
// tricky to share this method. We can expose it on TestOwner in theory.
private fun MainTestClock.waitUntil(timeoutMillis: Long, condition: () -> Boolean) {
diff --git a/compose/ui/ui-test/src/androidUnitTest/kotlin/androidx/compose/ui/test/util/BitmapCapturingRetryLogicTest.kt b/compose/ui/ui-test/src/androidUnitTest/kotlin/androidx/compose/ui/test/util/BitmapCapturingRetryLogicTest.kt
new file mode 100644
index 0000000..3a6a1b3
--- /dev/null
+++ b/compose/ui/ui-test/src/androidUnitTest/kotlin/androidx/compose/ui/test/util/BitmapCapturingRetryLogicTest.kt
@@ -0,0 +1,116 @@
+/*
+ * 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.test.util
+
+import android.view.PixelCopy
+import androidx.compose.testutils.expectError
+import androidx.compose.ui.test.android.PixelCopyException
+import androidx.compose.ui.test.android.runWithRetryWhenNoData
+import androidx.compose.ui.test.junit4.createComposeRule
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import com.google.common.truth.Truth.assertThat
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@RunWith(AndroidJUnit4::class)
+class BitmapCapturingRetryLogicTest {
+
+ @get:Rule
+ val rule = createComposeRule()
+
+ @Test
+ fun pixelCopyRequest_succeeded_noRetries() {
+ var attempt = 0
+
+ expectError<PixelCopyException>(false) {
+ runWithRetryWhenNoData {
+ try {
+ // success
+ } finally {
+ attempt++
+ }
+ }
+ }
+
+ assertThat(attempt).isEqualTo(1)
+ }
+
+ @Test
+ fun pixelCopyRequest_succeeded_afterRetry_whenNoData() {
+ var attempt = 0
+
+ expectError<PixelCopyException>(false) {
+ runWithRetryWhenNoData {
+ try {
+ if (attempt == 0) {
+ throw PixelCopyException(PixelCopy.ERROR_SOURCE_NO_DATA)
+ } else {
+ // success
+ }
+ } finally {
+ attempt++
+ }
+ }
+ }
+ }
+
+ @Test
+ fun pixelCopyRequest_retry_whenNoData() {
+ var attempt = 0
+
+ expectError<PixelCopyException> {
+ runWithRetryWhenNoData {
+ try {
+ throw PixelCopyException(PixelCopy.ERROR_SOURCE_NO_DATA)
+ } finally {
+ attempt++
+ }
+ }
+ }
+ assertThat(attempt).isEqualTo(3)
+ }
+
+ @Test
+ fun pixelCopyRequest_error_rethrow() {
+ expectError<PixelCopyException> {
+ runWithRetryWhenNoData {
+ throw PixelCopyException(PixelCopy.ERROR_UNKNOWN)
+ }
+ }
+ }
+
+ @Test
+ fun pixelCopyRequest_error_rethrow_afterRetry() {
+ var attempt = 0
+
+ expectError<PixelCopyException> {
+ runWithRetryWhenNoData {
+ try {
+ if (attempt == 0) {
+ throw PixelCopyException(PixelCopy.ERROR_SOURCE_NO_DATA)
+ } else {
+ throw PixelCopyException(PixelCopy.ERROR_UNKNOWN)
+ }
+ } finally {
+ attempt++
+ }
+ }
+ }
+ assertThat(attempt).isEqualTo(2)
+ }
+}
diff --git a/compose/ui/ui-text-google-fonts/build.gradle b/compose/ui/ui-text-google-fonts/build.gradle
index 5d2ee3a..ce24693 100644
--- a/compose/ui/ui-text-google-fonts/build.gradle
+++ b/compose/ui/ui-text-google-fonts/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/compose/ui/ui-text/build.gradle b/compose/ui/ui-text/build.gradle
index 0472ed1..693ab90 100644
--- a/compose/ui/ui-text/build.gradle
+++ b/compose/ui/ui-text/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/ui/ui-text/samples/build.gradle b/compose/ui/ui-text/samples/build.gradle
index a6d5aa4..ea2947f 100644
--- a/compose/ui/ui-text/samples/build.gradle
+++ b/compose/ui/ui-text/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/ui/ui-tooling-data/build.gradle b/compose/ui/ui-tooling-data/build.gradle
index 55b0d4e..1a6fcb7 100644
--- a/compose/ui/ui-tooling-data/build.gradle
+++ b/compose/ui/ui-tooling-data/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/ui/ui-tooling-preview/api/current.txt b/compose/ui/ui-tooling-preview/api/current.txt
index bee1c29..3cc4af6 100644
--- a/compose/ui/ui-tooling-preview/api/current.txt
+++ b/compose/ui/ui-tooling-preview/api/current.txt
@@ -2,6 +2,14 @@
package androidx.compose.ui.tooling.preview {
public final class Devices {
+ method @Deprecated public String getWEAR_OS_LARGE_ROUND();
+ method @Deprecated public String getWEAR_OS_RECT();
+ method @Deprecated public String getWEAR_OS_SMALL_ROUND();
+ method @Deprecated public String getWEAR_OS_SQUARE();
+ property @Deprecated public String WEAR_OS_LARGE_ROUND;
+ property @Deprecated public String WEAR_OS_RECT;
+ property @Deprecated public String WEAR_OS_SMALL_ROUND;
+ property @Deprecated public String WEAR_OS_SQUARE;
field public static final String AUTOMOTIVE_1024p = "id:automotive_1024p_landscape";
field public static final String DEFAULT = "";
field public static final String DESKTOP = "spec:id=reference_desktop,shape=Normal,width=1920,height=1080,unit=dp,dpi=160";
diff --git a/compose/ui/ui-tooling-preview/api/restricted_current.txt b/compose/ui/ui-tooling-preview/api/restricted_current.txt
index bee1c29..3cc4af6 100644
--- a/compose/ui/ui-tooling-preview/api/restricted_current.txt
+++ b/compose/ui/ui-tooling-preview/api/restricted_current.txt
@@ -2,6 +2,14 @@
package androidx.compose.ui.tooling.preview {
public final class Devices {
+ method @Deprecated public String getWEAR_OS_LARGE_ROUND();
+ method @Deprecated public String getWEAR_OS_RECT();
+ method @Deprecated public String getWEAR_OS_SMALL_ROUND();
+ method @Deprecated public String getWEAR_OS_SQUARE();
+ property @Deprecated public String WEAR_OS_LARGE_ROUND;
+ property @Deprecated public String WEAR_OS_RECT;
+ property @Deprecated public String WEAR_OS_SMALL_ROUND;
+ property @Deprecated public String WEAR_OS_SQUARE;
field public static final String AUTOMOTIVE_1024p = "id:automotive_1024p_landscape";
field public static final String DEFAULT = "";
field public static final String DESKTOP = "spec:id=reference_desktop,shape=Normal,width=1920,height=1080,unit=dp,dpi=160";
diff --git a/compose/ui/ui-tooling-preview/build.gradle b/compose/ui/ui-tooling-preview/build.gradle
index 3a4d298..0b81b0c 100644
--- a/compose/ui/ui-tooling-preview/build.gradle
+++ b/compose/ui/ui-tooling-preview/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/ui/ui-tooling/build.gradle b/compose/ui/ui-tooling/build.gradle
index ae7ffa9..682722e 100644
--- a/compose/ui/ui-tooling/build.gradle
+++ b/compose/ui/ui-tooling/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/ui/ui-unit/build.gradle b/compose/ui/ui-unit/build.gradle
index 11f119e..5d03e7c 100644
--- a/compose/ui/ui-unit/build.gradle
+++ b/compose/ui/ui-unit/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/ui/ui-unit/samples/build.gradle b/compose/ui/ui-unit/samples/build.gradle
index 45bec6c..ae1cb6e 100644
--- a/compose/ui/ui-unit/samples/build.gradle
+++ b/compose/ui/ui-unit/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/ui/ui-util/build.gradle b/compose/ui/ui-util/build.gradle
index 7992369..3d2125e 100644
--- a/compose/ui/ui-util/build.gradle
+++ b/compose/ui/ui-util/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/ui/ui-viewbinding/build.gradle b/compose/ui/ui-viewbinding/build.gradle
index 84f9d82..1d07dab 100644
--- a/compose/ui/ui-viewbinding/build.gradle
+++ b/compose/ui/ui-viewbinding/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/compose/ui/ui-viewbinding/samples/build.gradle b/compose/ui/ui-viewbinding/samples/build.gradle
index 88219c6..c2e2d2c 100644
--- a/compose/ui/ui-viewbinding/samples/build.gradle
+++ b/compose/ui/ui-viewbinding/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/ui/ui/api/current.txt b/compose/ui/ui/api/current.txt
index bf73fa0..98f2ca2 100644
--- a/compose/ui/ui/api/current.txt
+++ b/compose/ui/ui/api/current.txt
@@ -1866,7 +1866,6 @@
method public int getType();
method public long getUptimeMillis();
method public boolean isConsumed();
- property @Deprecated public final androidx.compose.ui.input.pointer.ConsumedData consumed;
property @SuppressCompatibility @androidx.compose.ui.ExperimentalComposeUiApi public final java.util.List<androidx.compose.ui.input.pointer.HistoricalChange> historical;
property public final long id;
property public final boolean isConsumed;
diff --git a/compose/ui/ui/api/restricted_current.txt b/compose/ui/ui/api/restricted_current.txt
index cb38fb3..a6b666a 100644
--- a/compose/ui/ui/api/restricted_current.txt
+++ b/compose/ui/ui/api/restricted_current.txt
@@ -1866,7 +1866,6 @@
method public int getType();
method public long getUptimeMillis();
method public boolean isConsumed();
- property @Deprecated public final androidx.compose.ui.input.pointer.ConsumedData consumed;
property @SuppressCompatibility @androidx.compose.ui.ExperimentalComposeUiApi public final java.util.List<androidx.compose.ui.input.pointer.HistoricalChange> historical;
property public final long id;
property public final boolean isConsumed;
diff --git a/compose/ui/ui/benchmark/build.gradle b/compose/ui/ui/benchmark/build.gradle
index 0aa9498..8e0821a 100644
--- a/compose/ui/ui/benchmark/build.gradle
+++ b/compose/ui/ui/benchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/ui/ui/build.gradle b/compose/ui/ui/build.gradle
index c051864..7480380e 100644
--- a/compose/ui/ui/build.gradle
+++ b/compose/ui/ui/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/compose/ui/ui/integration-tests/ui-demos/build.gradle b/compose/ui/ui/integration-tests/ui-demos/build.gradle
index f9ab406..cd57812 100644
--- a/compose/ui/ui/integration-tests/ui-demos/build.gradle
+++ b/compose/ui/ui/integration-tests/ui-demos/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
plugins {
id("AndroidXPlugin")
id("com.android.library")
diff --git a/compose/ui/ui/samples/build.gradle b/compose/ui/ui/samples/build.gradle
index a6ce338..ffe2ad7 100644
--- a/compose/ui/ui/samples/build.gradle
+++ b/compose/ui/ui/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/ComposeViewTest.kt b/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/ComposeViewTest.kt
index 8cef97d..809a2abd4 100644
--- a/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/ComposeViewTest.kt
+++ b/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/ComposeViewTest.kt
@@ -17,6 +17,7 @@
package androidx.compose.ui.viewinterop
import android.content.Context
+import android.content.res.Configuration
import android.os.Build
import android.view.ContextThemeWrapper
import android.view.View
@@ -48,6 +49,7 @@
import androidx.compose.ui.layout.boundsInWindow
import androidx.compose.ui.layout.onGloballyPositioned
import androidx.compose.ui.platform.AbstractComposeView
+import androidx.compose.ui.platform.AndroidComposeView
import androidx.compose.ui.platform.ComposeView
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.LocalView
@@ -59,6 +61,7 @@
import androidx.compose.ui.test.performScrollTo
import androidx.compose.ui.test.performTouchInput
import androidx.compose.ui.tests.R
+import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.IntRect
@@ -783,6 +786,41 @@
composeView.assertCanScroll(right = true)
}
}
+
+ @Test
+ fun composeView_densityChange() {
+ lateinit var composeView: AndroidComposeView
+ lateinit var currentDensity: Density
+ rule.setContent {
+ composeView = LocalView.current as AndroidComposeView
+ currentDensity = LocalDensity.current
+ Box(Modifier.size(100.dp))
+ }
+
+ val density = rule.density
+ val newDensity = density.density * 2f
+
+ rule.runOnUiThread {
+ assertEquals(
+ composeView.width,
+ with(density) { 100.dp.roundToPx() }
+ )
+
+ rule.activity.resources.displayMetrics.density = newDensity
+ val newConfig = Configuration().apply {
+ setTo(rule.activity.resources.configuration)
+ }
+ composeView.dispatchConfigurationChanged(newConfig)
+ }
+
+ rule.runOnIdle {
+ assertEquals(currentDensity.density, newDensity)
+ assertEquals(
+ composeView.width,
+ with(Density(newDensity)) { 100.dp.roundToPx() }
+ )
+ }
+ }
}
private const val SCROLLABLE_TAG = "scrollable"
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
index d9a5105..45abe04 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
@@ -224,7 +224,7 @@
override val view: View get() = this
- override var density = Density(context)
+ override var density by mutableStateOf(Density(context), referentialEqualityPolicy())
private set
private val semanticsModifier = EmptySemanticsElement
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
index 299dac5..7225ea3 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
@@ -1317,7 +1317,7 @@
// Unfortunately, talkback has a bug of using "checked", so we set state
// description here
if (role == Role.Switch && stateDescription == null) {
- stateDescription = view.context.resources.getString(R.string.on)
+ stateDescription = view.context.resources.getString(R.string.state_on)
}
}
@@ -1325,7 +1325,7 @@
// Unfortunately, talkback has a bug of using "not checked", so we set state
// description here
if (role == Role.Switch && stateDescription == null) {
- stateDescription = view.context.resources.getString(R.string.off)
+ stateDescription = view.context.resources.getString(R.string.state_off)
}
}
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/text/input/TextInputServiceAndroid.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/text/input/TextInputServiceAndroid.android.kt
index 936ecb7..b3ac11e 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/text/input/TextInputServiceAndroid.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/text/input/TextInputServiceAndroid.android.kt
@@ -267,19 +267,6 @@
}
private fun processInputCommands() {
- // When focus changes to a non-Compose view, the system will take care of managing the
- // keyboard (via ImeFocusController) so we don't need to do anything. This can happen
- // when a Compose text field is focused, then the user taps on an EditText view.
- // And any commands that come in while we're not focused should also just be ignored,
- // since no unfocused view should be messing with the keyboard.
- // TODO(b/215761849) When focus moves to a different ComposeView than this one, this
- // logic doesn't work and the keyboard is not hidden.
- if (!view.isFocused) {
- // All queued commands should be ignored.
- textInputCommandQueue.clear()
- return
- }
-
// Multiple commands may have been queued up in the channel while this function was
// waiting to be resumed. We don't execute the commands as they come in because making a
// bunch of calls to change the actual IME quickly can result in flickers. Instead, we
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/window/AndroidPopup.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/window/AndroidPopup.android.kt
index 8379852..5e60f37 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/window/AndroidPopup.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/window/AndroidPopup.android.kt
@@ -31,6 +31,9 @@
import android.view.ViewGroup
import android.view.ViewOutlineProvider
import android.view.WindowManager
+import android.window.OnBackInvokedCallback
+import android.window.OnBackInvokedDispatcher
+import androidx.annotation.DoNotInline
import androidx.annotation.RequiresApi
import androidx.annotation.VisibleForTesting
import androidx.compose.runtime.Composable
@@ -429,6 +432,8 @@
}
})
+ private var backCallback: Any? = null
+
init {
id = android.R.id.content
setViewTreeLifecycleOwner(composeView.findViewTreeLifecycleOwner())
@@ -480,12 +485,14 @@
override fun onAttachedToWindow() {
super.onAttachedToWindow()
snapshotStateObserver.start()
+ maybeRegisterBackCallback()
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
snapshotStateObserver.stop()
snapshotStateObserver.clear()
+ maybeUnregisterBackCallback()
}
override fun internalOnMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
@@ -549,6 +556,23 @@
return super.dispatchKeyEvent(event)
}
+ private fun maybeRegisterBackCallback() {
+ if (!properties.dismissOnBackPress || Build.VERSION.SDK_INT < 33) {
+ return
+ }
+ if (backCallback == null) {
+ backCallback = Api33Impl.createBackCallback(onDismissRequest)
+ }
+ Api33Impl.maybeRegisterBackCallback(this, backCallback)
+ }
+
+ private fun maybeUnregisterBackCallback() {
+ if (Build.VERSION.SDK_INT >= 33) {
+ Api33Impl.maybeUnregisterBackCallback(this, backCallback)
+ }
+ backCallback = null
+ }
+
/**
* Set whether the popup can grab a focus and support dismissal.
*/
@@ -791,6 +815,33 @@
}
}
+@RequiresApi(33)
+private object Api33Impl {
+ @JvmStatic
+ @DoNotInline
+ fun createBackCallback(onDismissRequest: (() -> Unit)?) =
+ OnBackInvokedCallback { onDismissRequest?.invoke() }
+
+ @JvmStatic
+ @DoNotInline
+ fun maybeRegisterBackCallback(view: View, backCallback: Any?) {
+ if (backCallback is OnBackInvokedCallback) {
+ view.findOnBackInvokedDispatcher()?.registerOnBackInvokedCallback(
+ OnBackInvokedDispatcher.PRIORITY_OVERLAY,
+ backCallback
+ )
+ }
+ }
+
+ @JvmStatic
+ @DoNotInline
+ fun maybeUnregisterBackCallback(view: View, backCallback: Any?) {
+ if (backCallback is OnBackInvokedCallback) {
+ view.findOnBackInvokedDispatcher()?.unregisterOnBackInvokedCallback(backCallback)
+ }
+ }
+}
+
/**
* Collection of methods delegated to platform methods to support APIs only available on newer
* platforms and testing.
diff --git a/compose/ui/ui/src/androidMain/res/values-af/strings.xml b/compose/ui/ui/src/androidMain/res/values-af/strings.xml
index 0f09788..eb4e3db 100644
--- a/compose/ui/ui/src/androidMain/res/values-af/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-af/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Gedeeltelik gemerk"</string>
- <string name="on" msgid="8655164131929253426">"Aan"</string>
- <string name="off" msgid="875452955155264703">"Af"</string>
+ <string name="state_on" msgid="8655164131929253426">"Aan"</string>
+ <string name="state_off" msgid="875452955155264703">"Af"</string>
<string name="switch_role" msgid="2561197295334830845">"Skakel oor"</string>
<string name="selected" msgid="6043586758067023">"Gekies"</string>
<string name="not_selected" msgid="6610465462668679431">"Nie gekies nie"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-am/strings.xml b/compose/ui/ui/src/androidMain/res/values-am/strings.xml
index 538380e..5bc9f5a 100644
--- a/compose/ui/ui/src/androidMain/res/values-am/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-am/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"በከፊል የተፈተሸ"</string>
- <string name="on" msgid="8655164131929253426">"በርቷል"</string>
- <string name="off" msgid="875452955155264703">"ጠፍቷል"</string>
+ <string name="state_on" msgid="8655164131929253426">"በርቷል"</string>
+ <string name="state_off" msgid="875452955155264703">"ጠፍቷል"</string>
<string name="switch_role" msgid="2561197295334830845">"ማብሪያ/ማጥፊያ"</string>
<string name="selected" msgid="6043586758067023">"ተመርጧል"</string>
<string name="not_selected" msgid="6610465462668679431">"ያልተመረጡ"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-ar/strings.xml b/compose/ui/ui/src/androidMain/res/values-ar/strings.xml
index 0ae4b62..6534a73 100644
--- a/compose/ui/ui/src/androidMain/res/values-ar/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-ar/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"تم وضع علامة في المربّع بشكل جزئي"</string>
- <string name="on" msgid="8655164131929253426">"مفعّل"</string>
- <string name="off" msgid="875452955155264703">"غير مفعّل"</string>
+ <string name="state_on" msgid="8655164131929253426">"مفعّل"</string>
+ <string name="state_off" msgid="875452955155264703">"غير مفعّل"</string>
<string name="switch_role" msgid="2561197295334830845">"تبديل"</string>
<string name="selected" msgid="6043586758067023">"محدّد"</string>
<string name="not_selected" msgid="6610465462668679431">"غير محدّد"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-as/strings.xml b/compose/ui/ui/src/androidMain/res/values-as/strings.xml
index 50b42ca..2bfb082 100644
--- a/compose/ui/ui/src/androidMain/res/values-as/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-as/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"আংশিকভাৱে পৰীক্ষা কৰা হৈছে"</string>
- <string name="on" msgid="8655164131929253426">"অন কৰা আছে"</string>
- <string name="off" msgid="875452955155264703">"অফ আছে"</string>
+ <string name="state_on" msgid="8655164131929253426">"অন কৰা আছে"</string>
+ <string name="state_off" msgid="875452955155264703">"অফ আছে"</string>
<string name="switch_role" msgid="2561197295334830845">"ছুইচ"</string>
<string name="selected" msgid="6043586758067023">"বাছনি কৰা হৈছে"</string>
<string name="not_selected" msgid="6610465462668679431">"বাছনি কৰা হোৱা নাই"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-az/strings.xml b/compose/ui/ui/src/androidMain/res/values-az/strings.xml
index 2aeb117..b40ae60 100644
--- a/compose/ui/ui/src/androidMain/res/values-az/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-az/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Qismən yoxlanıb"</string>
- <string name="on" msgid="8655164131929253426">"Aktiv"</string>
- <string name="off" msgid="875452955155264703">"Deaktiv"</string>
+ <string name="state_on" msgid="8655164131929253426">"Aktiv"</string>
+ <string name="state_off" msgid="875452955155264703">"Deaktiv"</string>
<string name="switch_role" msgid="2561197295334830845">"Dəyişdirin"</string>
<string name="selected" msgid="6043586758067023">"Seçilib"</string>
<string name="not_selected" msgid="6610465462668679431">"Seçilməyib"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-b+sr+Latn/strings.xml b/compose/ui/ui/src/androidMain/res/values-b+sr+Latn/strings.xml
index 6b0adbe..9b1d96d 100644
--- a/compose/ui/ui/src/androidMain/res/values-b+sr+Latn/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-b+sr+Latn/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Delimično označeno"</string>
- <string name="on" msgid="8655164131929253426">"Uključeno"</string>
- <string name="off" msgid="875452955155264703">"Isključeno"</string>
+ <string name="state_on" msgid="8655164131929253426">"Uključeno"</string>
+ <string name="state_off" msgid="875452955155264703">"Isključeno"</string>
<string name="switch_role" msgid="2561197295334830845">"Prekidač"</string>
<string name="selected" msgid="6043586758067023">"Izabrano"</string>
<string name="not_selected" msgid="6610465462668679431">"Nije izabrano"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-be/strings.xml b/compose/ui/ui/src/androidMain/res/values-be/strings.xml
index 8eb5433..f05bf33 100644
--- a/compose/ui/ui/src/androidMain/res/values-be/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-be/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Выбрана часткова"</string>
- <string name="on" msgid="8655164131929253426">"Уключана"</string>
- <string name="off" msgid="875452955155264703">"Выключана"</string>
+ <string name="state_on" msgid="8655164131929253426">"Уключана"</string>
+ <string name="state_off" msgid="875452955155264703">"Выключана"</string>
<string name="switch_role" msgid="2561197295334830845">"Пераключальнік"</string>
<string name="selected" msgid="6043586758067023">"Выбрана"</string>
<string name="not_selected" msgid="6610465462668679431">"Не выбрана"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-bg/strings.xml b/compose/ui/ui/src/androidMain/res/values-bg/strings.xml
index 049ec87..09dc095 100644
--- a/compose/ui/ui/src/androidMain/res/values-bg/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-bg/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Частично отметнато"</string>
- <string name="on" msgid="8655164131929253426">"Вкл."</string>
- <string name="off" msgid="875452955155264703">"Изкл."</string>
+ <string name="state_on" msgid="8655164131929253426">"Вкл."</string>
+ <string name="state_off" msgid="875452955155264703">"Изкл."</string>
<string name="switch_role" msgid="2561197295334830845">"Превключване"</string>
<string name="selected" msgid="6043586758067023">"Избрано"</string>
<string name="not_selected" msgid="6610465462668679431">"Не е избрано"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-bn/strings.xml b/compose/ui/ui/src/androidMain/res/values-bn/strings.xml
index 698a059..8d8786f 100644
--- a/compose/ui/ui/src/androidMain/res/values-bn/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-bn/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"কয়েকটি বিকল্প বেছে নেওয়া হয়েছে"</string>
- <string name="on" msgid="8655164131929253426">"চালু আছে"</string>
- <string name="off" msgid="875452955155264703">"বন্ধ আছে"</string>
+ <string name="state_on" msgid="8655164131929253426">"চালু আছে"</string>
+ <string name="state_off" msgid="875452955155264703">"বন্ধ আছে"</string>
<string name="switch_role" msgid="2561197295334830845">"সুইচ"</string>
<string name="selected" msgid="6043586758067023">"বেছে নেওয়া হয়েছে"</string>
<string name="not_selected" msgid="6610465462668679431">"বেছে নেওয়া হয়নি"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-bs/strings.xml b/compose/ui/ui/src/androidMain/res/values-bs/strings.xml
index 69bab68f..b37dcc9 100644
--- a/compose/ui/ui/src/androidMain/res/values-bs/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-bs/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Djelimično označeno"</string>
- <string name="on" msgid="8655164131929253426">"Uključeno"</string>
- <string name="off" msgid="875452955155264703">"Isključeno"</string>
+ <string name="state_on" msgid="8655164131929253426">"Uključeno"</string>
+ <string name="state_off" msgid="875452955155264703">"Isključeno"</string>
<string name="switch_role" msgid="2561197295334830845">"Promijeni"</string>
<string name="selected" msgid="6043586758067023">"Odabrano"</string>
<string name="not_selected" msgid="6610465462668679431">"Nije odabrano"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-ca/strings.xml b/compose/ui/ui/src/androidMain/res/values-ca/strings.xml
index 93de37a..c238c2e 100644
--- a/compose/ui/ui/src/androidMain/res/values-ca/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-ca/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Marcat parcialment"</string>
- <string name="on" msgid="8655164131929253426">"Activat"</string>
- <string name="off" msgid="875452955155264703">"Desactivat"</string>
+ <string name="state_on" msgid="8655164131929253426">"Activat"</string>
+ <string name="state_off" msgid="875452955155264703">"Desactivat"</string>
<string name="switch_role" msgid="2561197295334830845">"Interruptor"</string>
<string name="selected" msgid="6043586758067023">"Seleccionat"</string>
<string name="not_selected" msgid="6610465462668679431">"No seleccionat"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-cs/strings.xml b/compose/ui/ui/src/androidMain/res/values-cs/strings.xml
index 80daf64..9fbcbf4 100644
--- a/compose/ui/ui/src/androidMain/res/values-cs/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-cs/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Částečně zaškrtnuto"</string>
- <string name="on" msgid="8655164131929253426">"Zapnuto"</string>
- <string name="off" msgid="875452955155264703">"Vypnuto"</string>
+ <string name="state_on" msgid="8655164131929253426">"Zapnuto"</string>
+ <string name="state_off" msgid="875452955155264703">"Vypnuto"</string>
<string name="switch_role" msgid="2561197295334830845">"Přepnout"</string>
<string name="selected" msgid="6043586758067023">"Vybráno"</string>
<string name="not_selected" msgid="6610465462668679431">"Nevybráno"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-da/strings.xml b/compose/ui/ui/src/androidMain/res/values-da/strings.xml
index 99eb486..a93c927 100644
--- a/compose/ui/ui/src/androidMain/res/values-da/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-da/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Delvist markeret"</string>
- <string name="on" msgid="8655164131929253426">"Til"</string>
- <string name="off" msgid="875452955155264703">"Fra"</string>
+ <string name="state_on" msgid="8655164131929253426">"Til"</string>
+ <string name="state_off" msgid="875452955155264703">"Fra"</string>
<string name="switch_role" msgid="2561197295334830845">"Kontakt"</string>
<string name="selected" msgid="6043586758067023">"Valgt"</string>
<string name="not_selected" msgid="6610465462668679431">"Ikke valgt"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-de/strings.xml b/compose/ui/ui/src/androidMain/res/values-de/strings.xml
index 9eb5c3b..efdcf31 100644
--- a/compose/ui/ui/src/androidMain/res/values-de/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-de/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Teilweise aktiviert"</string>
- <string name="on" msgid="8655164131929253426">"An"</string>
- <string name="off" msgid="875452955155264703">"Aus"</string>
+ <string name="state_on" msgid="8655164131929253426">"An"</string>
+ <string name="state_off" msgid="875452955155264703">"Aus"</string>
<string name="switch_role" msgid="2561197295334830845">"Wechseln"</string>
<string name="selected" msgid="6043586758067023">"Ausgewählt"</string>
<string name="not_selected" msgid="6610465462668679431">"Nicht ausgewählt"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-el/strings.xml b/compose/ui/ui/src/androidMain/res/values-el/strings.xml
index 1da628f..6c2c7d8 100644
--- a/compose/ui/ui/src/androidMain/res/values-el/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-el/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Έγινε μερικός έλεγχος"</string>
- <string name="on" msgid="8655164131929253426">"Ενεργό"</string>
- <string name="off" msgid="875452955155264703">"Ανενεργό"</string>
+ <string name="state_on" msgid="8655164131929253426">"Ενεργό"</string>
+ <string name="state_off" msgid="875452955155264703">"Ανενεργό"</string>
<string name="switch_role" msgid="2561197295334830845">"Εναλλαγή"</string>
<string name="selected" msgid="6043586758067023">"Επιλεγμένο"</string>
<string name="not_selected" msgid="6610465462668679431">"Δεν έχει επιλεχθεί"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-en-rAU/strings.xml b/compose/ui/ui/src/androidMain/res/values-en-rAU/strings.xml
index dbf19c5..bb93cc7 100644
--- a/compose/ui/ui/src/androidMain/res/values-en-rAU/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-en-rAU/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Partially ticked"</string>
- <string name="on" msgid="8655164131929253426">"On"</string>
- <string name="off" msgid="875452955155264703">"Off"</string>
+ <string name="state_on" msgid="8655164131929253426">"On"</string>
+ <string name="state_off" msgid="875452955155264703">"Off"</string>
<string name="switch_role" msgid="2561197295334830845">"Switch"</string>
<string name="selected" msgid="6043586758067023">"Selected"</string>
<string name="not_selected" msgid="6610465462668679431">"Not selected"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-en-rCA/strings.xml b/compose/ui/ui/src/androidMain/res/values-en-rCA/strings.xml
index 9df0af4..e31eb6f 100644
--- a/compose/ui/ui/src/androidMain/res/values-en-rCA/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-en-rCA/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Partially checked"</string>
- <string name="on" msgid="8655164131929253426">"On"</string>
- <string name="off" msgid="875452955155264703">"Off"</string>
+ <string name="state_on" msgid="8655164131929253426">"On"</string>
+ <string name="state_off" msgid="875452955155264703">"Off"</string>
<string name="switch_role" msgid="2561197295334830845">"Switch"</string>
<string name="selected" msgid="6043586758067023">"Selected"</string>
<string name="not_selected" msgid="6610465462668679431">"Not selected"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-en-rGB/strings.xml b/compose/ui/ui/src/androidMain/res/values-en-rGB/strings.xml
index dbf19c5..bb93cc7 100644
--- a/compose/ui/ui/src/androidMain/res/values-en-rGB/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-en-rGB/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Partially ticked"</string>
- <string name="on" msgid="8655164131929253426">"On"</string>
- <string name="off" msgid="875452955155264703">"Off"</string>
+ <string name="state_on" msgid="8655164131929253426">"On"</string>
+ <string name="state_off" msgid="875452955155264703">"Off"</string>
<string name="switch_role" msgid="2561197295334830845">"Switch"</string>
<string name="selected" msgid="6043586758067023">"Selected"</string>
<string name="not_selected" msgid="6610465462668679431">"Not selected"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-en-rIN/strings.xml b/compose/ui/ui/src/androidMain/res/values-en-rIN/strings.xml
index dbf19c5..bb93cc7 100644
--- a/compose/ui/ui/src/androidMain/res/values-en-rIN/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-en-rIN/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Partially ticked"</string>
- <string name="on" msgid="8655164131929253426">"On"</string>
- <string name="off" msgid="875452955155264703">"Off"</string>
+ <string name="state_on" msgid="8655164131929253426">"On"</string>
+ <string name="state_off" msgid="875452955155264703">"Off"</string>
<string name="switch_role" msgid="2561197295334830845">"Switch"</string>
<string name="selected" msgid="6043586758067023">"Selected"</string>
<string name="not_selected" msgid="6610465462668679431">"Not selected"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-en-rXC/strings.xml b/compose/ui/ui/src/androidMain/res/values-en-rXC/strings.xml
index ddd1168..efec474 100644
--- a/compose/ui/ui/src/androidMain/res/values-en-rXC/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-en-rXC/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Partially checked"</string>
- <string name="on" msgid="8655164131929253426">"On"</string>
- <string name="off" msgid="875452955155264703">"Off"</string>
+ <string name="state_on" msgid="8655164131929253426">"On"</string>
+ <string name="state_off" msgid="875452955155264703">"Off"</string>
<string name="switch_role" msgid="2561197295334830845">"Switch"</string>
<string name="selected" msgid="6043586758067023">"Selected"</string>
<string name="not_selected" msgid="6610465462668679431">"Not selected"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-es-rUS/strings.xml b/compose/ui/ui/src/androidMain/res/values-es-rUS/strings.xml
index 810018a..78571f1 100644
--- a/compose/ui/ui/src/androidMain/res/values-es-rUS/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-es-rUS/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Verificado parcialmente"</string>
- <string name="on" msgid="8655164131929253426">"Sí"</string>
- <string name="off" msgid="875452955155264703">"No"</string>
+ <string name="state_on" msgid="8655164131929253426">"Sí"</string>
+ <string name="state_off" msgid="875452955155264703">"No"</string>
<string name="switch_role" msgid="2561197295334830845">"Cambiar"</string>
<string name="selected" msgid="6043586758067023">"Seleccionado"</string>
<string name="not_selected" msgid="6610465462668679431">"Sin seleccionar"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-es/strings.xml b/compose/ui/ui/src/androidMain/res/values-es/strings.xml
index f5ff864..10518f6 100644
--- a/compose/ui/ui/src/androidMain/res/values-es/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-es/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Marcado parcialmente"</string>
- <string name="on" msgid="8655164131929253426">"Activado"</string>
- <string name="off" msgid="875452955155264703">"Desactivado"</string>
+ <string name="state_on" msgid="8655164131929253426">"Activado"</string>
+ <string name="state_off" msgid="875452955155264703">"Desactivado"</string>
<string name="switch_role" msgid="2561197295334830845">"Interruptor"</string>
<string name="selected" msgid="6043586758067023">"Seleccionado"</string>
<string name="not_selected" msgid="6610465462668679431">"No seleccionado"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-et/strings.xml b/compose/ui/ui/src/androidMain/res/values-et/strings.xml
index 071f163..9e41ee7 100644
--- a/compose/ui/ui/src/androidMain/res/values-et/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-et/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Osaliselt märgitud"</string>
- <string name="on" msgid="8655164131929253426">"Sees"</string>
- <string name="off" msgid="875452955155264703">"Väljas"</string>
+ <string name="state_on" msgid="8655164131929253426">"Sees"</string>
+ <string name="state_off" msgid="875452955155264703">"Väljas"</string>
<string name="switch_role" msgid="2561197295334830845">"Lüliti"</string>
<string name="selected" msgid="6043586758067023">"Valitud"</string>
<string name="not_selected" msgid="6610465462668679431">"Pole valitud"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-eu/strings.xml b/compose/ui/ui/src/androidMain/res/values-eu/strings.xml
index 4b2479a..675f56f 100644
--- a/compose/ui/ui/src/androidMain/res/values-eu/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-eu/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Erdi-markatuta"</string>
- <string name="on" msgid="8655164131929253426">"Aktibatuta"</string>
- <string name="off" msgid="875452955155264703">"Desaktibatuta"</string>
+ <string name="state_on" msgid="8655164131929253426">"Aktibatuta"</string>
+ <string name="state_off" msgid="875452955155264703">"Desaktibatuta"</string>
<string name="switch_role" msgid="2561197295334830845">"Aldatu"</string>
<string name="selected" msgid="6043586758067023">"Hautatuta"</string>
<string name="not_selected" msgid="6610465462668679431">"Hautatu gabe"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-fa/strings.xml b/compose/ui/ui/src/androidMain/res/values-fa/strings.xml
index cef1316..cdadb5f 100644
--- a/compose/ui/ui/src/androidMain/res/values-fa/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-fa/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"برخی موارد علامتگذاری شده است"</string>
- <string name="on" msgid="8655164131929253426">"روشن"</string>
- <string name="off" msgid="875452955155264703">"خاموش"</string>
+ <string name="state_on" msgid="8655164131929253426">"روشن"</string>
+ <string name="state_off" msgid="875452955155264703">"خاموش"</string>
<string name="switch_role" msgid="2561197295334830845">"کلید"</string>
<string name="selected" msgid="6043586758067023">"انتخاب شد"</string>
<string name="not_selected" msgid="6610465462668679431">"انتخابنشده"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-fi/strings.xml b/compose/ui/ui/src/androidMain/res/values-fi/strings.xml
index d689e5e..91de0ce 100644
--- a/compose/ui/ui/src/androidMain/res/values-fi/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-fi/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Osittain tarkistettu"</string>
- <string name="on" msgid="8655164131929253426">"Päällä"</string>
- <string name="off" msgid="875452955155264703">"Pois"</string>
+ <string name="state_on" msgid="8655164131929253426">"Päällä"</string>
+ <string name="state_off" msgid="875452955155264703">"Pois"</string>
<string name="switch_role" msgid="2561197295334830845">"Vaihda"</string>
<string name="selected" msgid="6043586758067023">"Valittu"</string>
<string name="not_selected" msgid="6610465462668679431">"Ei valittu"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-fr-rCA/strings.xml b/compose/ui/ui/src/androidMain/res/values-fr-rCA/strings.xml
index 8134827..fe5a9ee 100644
--- a/compose/ui/ui/src/androidMain/res/values-fr-rCA/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-fr-rCA/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Partiellement vérifié"</string>
- <string name="on" msgid="8655164131929253426">"Activé"</string>
- <string name="off" msgid="875452955155264703">"Désactivé"</string>
+ <string name="state_on" msgid="8655164131929253426">"Activé"</string>
+ <string name="state_off" msgid="875452955155264703">"Désactivé"</string>
<string name="switch_role" msgid="2561197295334830845">"Basculer"</string>
<string name="selected" msgid="6043586758067023">"Sélectionné"</string>
<string name="not_selected" msgid="6610465462668679431">"Non sélectionné"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-fr/strings.xml b/compose/ui/ui/src/androidMain/res/values-fr/strings.xml
index c919d89..6a2bb6e 100644
--- a/compose/ui/ui/src/androidMain/res/values-fr/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-fr/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Partiellement coché"</string>
- <string name="on" msgid="8655164131929253426">"Activé"</string>
- <string name="off" msgid="875452955155264703">"Désactivé"</string>
+ <string name="state_on" msgid="8655164131929253426">"Activé"</string>
+ <string name="state_off" msgid="875452955155264703">"Désactivé"</string>
<string name="switch_role" msgid="2561197295334830845">"Changer"</string>
<string name="selected" msgid="6043586758067023">"Sélectionné"</string>
<string name="not_selected" msgid="6610465462668679431">"Non sélectionné"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-gl/strings.xml b/compose/ui/ui/src/androidMain/res/values-gl/strings.xml
index 5b62280..f0d5293 100644
--- a/compose/ui/ui/src/androidMain/res/values-gl/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-gl/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Marcada parcialmente"</string>
- <string name="on" msgid="8655164131929253426">"Activado"</string>
- <string name="off" msgid="875452955155264703">"Desactivado"</string>
+ <string name="state_on" msgid="8655164131929253426">"Activado"</string>
+ <string name="state_off" msgid="875452955155264703">"Desactivado"</string>
<string name="switch_role" msgid="2561197295334830845">"Interruptor"</string>
<string name="selected" msgid="6043586758067023">"Seleccionado"</string>
<string name="not_selected" msgid="6610465462668679431">"Non seleccionado"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-gu/strings.xml b/compose/ui/ui/src/androidMain/res/values-gu/strings.xml
index 0c42b5b..20b3cc5 100644
--- a/compose/ui/ui/src/androidMain/res/values-gu/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-gu/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"આંશિક રીતે ચેક કરેલા વિકલ્પો"</string>
- <string name="on" msgid="8655164131929253426">"ચાલુ છે"</string>
- <string name="off" msgid="875452955155264703">"બંધ છે"</string>
+ <string name="state_on" msgid="8655164131929253426">"ચાલુ છે"</string>
+ <string name="state_off" msgid="875452955155264703">"બંધ છે"</string>
<string name="switch_role" msgid="2561197295334830845">"સ્વિચ"</string>
<string name="selected" msgid="6043586758067023">"પસંદગી કરી"</string>
<string name="not_selected" msgid="6610465462668679431">"પસંદગી કરી નથી"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-hi/strings.xml b/compose/ui/ui/src/androidMain/res/values-hi/strings.xml
index 8f80fdc..f9db678 100644
--- a/compose/ui/ui/src/androidMain/res/values-hi/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-hi/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"कुछ विकल्पों को चुना गया"</string>
- <string name="on" msgid="8655164131929253426">"चालू है"</string>
- <string name="off" msgid="875452955155264703">"बंद है"</string>
+ <string name="state_on" msgid="8655164131929253426">"चालू है"</string>
+ <string name="state_off" msgid="875452955155264703">"बंद है"</string>
<string name="switch_role" msgid="2561197295334830845">"स्विच करें"</string>
<string name="selected" msgid="6043586758067023">"चुना गया"</string>
<string name="not_selected" msgid="6610465462668679431">"नहीं चुना गया"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-hr/strings.xml b/compose/ui/ui/src/androidMain/res/values-hr/strings.xml
index ad31ee7..adf23b2 100644
--- a/compose/ui/ui/src/androidMain/res/values-hr/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-hr/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Djelomično potvrđeno"</string>
- <string name="on" msgid="8655164131929253426">"Uključeno"</string>
- <string name="off" msgid="875452955155264703">"Isključeno"</string>
+ <string name="state_on" msgid="8655164131929253426">"Uključeno"</string>
+ <string name="state_off" msgid="875452955155264703">"Isključeno"</string>
<string name="switch_role" msgid="2561197295334830845">"Prekidač"</string>
<string name="selected" msgid="6043586758067023">"Odabrano"</string>
<string name="not_selected" msgid="6610465462668679431">"Nije odabrano"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-hu/strings.xml b/compose/ui/ui/src/androidMain/res/values-hu/strings.xml
index 884b0f5..7f5cead 100644
--- a/compose/ui/ui/src/androidMain/res/values-hu/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-hu/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Részlegesen ellenőrizve"</string>
- <string name="on" msgid="8655164131929253426">"Be"</string>
- <string name="off" msgid="875452955155264703">"Ki"</string>
+ <string name="state_on" msgid="8655164131929253426">"Be"</string>
+ <string name="state_off" msgid="875452955155264703">"Ki"</string>
<string name="switch_role" msgid="2561197295334830845">"Kapcsoló"</string>
<string name="selected" msgid="6043586758067023">"Kijelölve"</string>
<string name="not_selected" msgid="6610465462668679431">"Nincs kijelölve"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-hy/strings.xml b/compose/ui/ui/src/androidMain/res/values-hy/strings.xml
index 0e21d53..71f5641 100644
--- a/compose/ui/ui/src/androidMain/res/values-hy/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-hy/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Մասնակի նշված"</string>
- <string name="on" msgid="8655164131929253426">"Միացված է"</string>
- <string name="off" msgid="875452955155264703">"Անջատված է"</string>
+ <string name="state_on" msgid="8655164131929253426">"Միացված է"</string>
+ <string name="state_off" msgid="875452955155264703">"Անջատված է"</string>
<string name="switch_role" msgid="2561197295334830845">"Փոխանջատիչ"</string>
<string name="selected" msgid="6043586758067023">"Ընտրված է"</string>
<string name="not_selected" msgid="6610465462668679431">"Ընտրված չէ"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-in/strings.xml b/compose/ui/ui/src/androidMain/res/values-in/strings.xml
index 92abab8..1552525 100644
--- a/compose/ui/ui/src/androidMain/res/values-in/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-in/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Diperiksa sebagian"</string>
- <string name="on" msgid="8655164131929253426">"Aktif"</string>
- <string name="off" msgid="875452955155264703">"Nonaktif"</string>
+ <string name="state_on" msgid="8655164131929253426">"Aktif"</string>
+ <string name="state_off" msgid="875452955155264703">"Nonaktif"</string>
<string name="switch_role" msgid="2561197295334830845">"Alihkan"</string>
<string name="selected" msgid="6043586758067023">"Dipilih"</string>
<string name="not_selected" msgid="6610465462668679431">"Tidak dipilih"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-is/strings.xml b/compose/ui/ui/src/androidMain/res/values-is/strings.xml
index 1bca170..1554557 100644
--- a/compose/ui/ui/src/androidMain/res/values-is/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-is/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Hakað við að hluta til"</string>
- <string name="on" msgid="8655164131929253426">"Kveikt"</string>
- <string name="off" msgid="875452955155264703">"Slökkt"</string>
+ <string name="state_on" msgid="8655164131929253426">"Kveikt"</string>
+ <string name="state_off" msgid="875452955155264703">"Slökkt"</string>
<string name="switch_role" msgid="2561197295334830845">"Skipta"</string>
<string name="selected" msgid="6043586758067023">"Valið"</string>
<string name="not_selected" msgid="6610465462668679431">"Ekki valið"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-it/strings.xml b/compose/ui/ui/src/androidMain/res/values-it/strings.xml
index 0b2a31a..a4c2800 100644
--- a/compose/ui/ui/src/androidMain/res/values-it/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-it/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Elemento parzialmente selezionato"</string>
- <string name="on" msgid="8655164131929253426">"On"</string>
- <string name="off" msgid="875452955155264703">"Off"</string>
+ <string name="state_on" msgid="8655164131929253426">"On"</string>
+ <string name="state_off" msgid="875452955155264703">"Off"</string>
<string name="switch_role" msgid="2561197295334830845">"Opzione"</string>
<string name="selected" msgid="6043586758067023">"Elemento selezionato"</string>
<string name="not_selected" msgid="6610465462668679431">"Opzione non selezionata"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-iw/strings.xml b/compose/ui/ui/src/androidMain/res/values-iw/strings.xml
index 7a66039..9197c9e 100644
--- a/compose/ui/ui/src/androidMain/res/values-iw/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-iw/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"מסומנת חלקית"</string>
- <string name="on" msgid="8655164131929253426">"פועל"</string>
- <string name="off" msgid="875452955155264703">"כבוי"</string>
+ <string name="state_on" msgid="8655164131929253426">"פועל"</string>
+ <string name="state_off" msgid="875452955155264703">"כבוי"</string>
<string name="switch_role" msgid="2561197295334830845">"מתג"</string>
<string name="selected" msgid="6043586758067023">"נבחר"</string>
<string name="not_selected" msgid="6610465462668679431">"לא נבחר"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-ja/strings.xml b/compose/ui/ui/src/androidMain/res/values-ja/strings.xml
index 37317bb..fe948a3 100644
--- a/compose/ui/ui/src/androidMain/res/values-ja/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-ja/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"一部 ON"</string>
- <string name="on" msgid="8655164131929253426">"オン"</string>
- <string name="off" msgid="875452955155264703">"オフ"</string>
+ <string name="state_on" msgid="8655164131929253426">"オン"</string>
+ <string name="state_off" msgid="875452955155264703">"オフ"</string>
<string name="switch_role" msgid="2561197295334830845">"切り替える"</string>
<string name="selected" msgid="6043586758067023">"選択済み"</string>
<string name="not_selected" msgid="6610465462668679431">"未選択"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-ka/strings.xml b/compose/ui/ui/src/androidMain/res/values-ka/strings.xml
index e1b2414..dccb67e 100644
--- a/compose/ui/ui/src/androidMain/res/values-ka/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-ka/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"ნაწილობრივ შემოწმებულია"</string>
- <string name="on" msgid="8655164131929253426">"ჩართული"</string>
- <string name="off" msgid="875452955155264703">"გამორთული"</string>
+ <string name="state_on" msgid="8655164131929253426">"ჩართული"</string>
+ <string name="state_off" msgid="875452955155264703">"გამორთული"</string>
<string name="switch_role" msgid="2561197295334830845">"გადართვა"</string>
<string name="selected" msgid="6043586758067023">"არჩეული"</string>
<string name="not_selected" msgid="6610465462668679431">"არ არის არჩეული"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-kk/strings.xml b/compose/ui/ui/src/androidMain/res/values-kk/strings.xml
index 9b1bb70..a370b0f 100644
--- a/compose/ui/ui/src/androidMain/res/values-kk/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-kk/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Жартылай белгіленді."</string>
- <string name="on" msgid="8655164131929253426">"Қосулы"</string>
- <string name="off" msgid="875452955155264703">"Өшірулі"</string>
+ <string name="state_on" msgid="8655164131929253426">"Қосулы"</string>
+ <string name="state_off" msgid="875452955155264703">"Өшірулі"</string>
<string name="switch_role" msgid="2561197295334830845">"Ауысу"</string>
<string name="selected" msgid="6043586758067023">"Таңдалды"</string>
<string name="not_selected" msgid="6610465462668679431">"Таңдалмады"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-km/strings.xml b/compose/ui/ui/src/androidMain/res/values-km/strings.xml
index f89ea75..947e4ca 100644
--- a/compose/ui/ui/src/androidMain/res/values-km/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-km/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"បានធីកខ្លះ"</string>
- <string name="on" msgid="8655164131929253426">"បើក"</string>
- <string name="off" msgid="875452955155264703">"បិទ"</string>
+ <string name="state_on" msgid="8655164131929253426">"បើក"</string>
+ <string name="state_off" msgid="875452955155264703">"បិទ"</string>
<string name="switch_role" msgid="2561197295334830845">"ប៊ូតុងបិទបើក"</string>
<string name="selected" msgid="6043586758067023">"បានជ្រើសរើស"</string>
<string name="not_selected" msgid="6610465462668679431">"មិនបានជ្រើសរើស"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-kn/strings.xml b/compose/ui/ui/src/androidMain/res/values-kn/strings.xml
index 42244c8..ce94cd5 100644
--- a/compose/ui/ui/src/androidMain/res/values-kn/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-kn/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"ಭಾಗಶಃ ಪರೀಕ್ಷಿಸಲಾಗಿದೆ"</string>
- <string name="on" msgid="8655164131929253426">"ಆನ್ ಆಗಿದೆ"</string>
- <string name="off" msgid="875452955155264703">"ಆಫ್ ಆಗಿದೆ"</string>
+ <string name="state_on" msgid="8655164131929253426">"ಆನ್ ಆಗಿದೆ"</string>
+ <string name="state_off" msgid="875452955155264703">"ಆಫ್ ಆಗಿದೆ"</string>
<string name="switch_role" msgid="2561197295334830845">"ಬದಲಿಸಿ"</string>
<string name="selected" msgid="6043586758067023">"ಆಯ್ಕೆಮಾಡಲಾಗಿದೆ"</string>
<string name="not_selected" msgid="6610465462668679431">"ಆಯ್ಕೆ ಮಾಡಿಲ್ಲ"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-ko/strings.xml b/compose/ui/ui/src/androidMain/res/values-ko/strings.xml
index 3d4979c..ad51a86 100644
--- a/compose/ui/ui/src/androidMain/res/values-ko/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-ko/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"일부 선택됨"</string>
- <string name="on" msgid="8655164131929253426">"켜짐"</string>
- <string name="off" msgid="875452955155264703">"꺼짐"</string>
+ <string name="state_on" msgid="8655164131929253426">"켜짐"</string>
+ <string name="state_off" msgid="875452955155264703">"꺼짐"</string>
<string name="switch_role" msgid="2561197295334830845">"스위치"</string>
<string name="selected" msgid="6043586758067023">"선택됨"</string>
<string name="not_selected" msgid="6610465462668679431">"선택되지 않음"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-ky/strings.xml b/compose/ui/ui/src/androidMain/res/values-ky/strings.xml
index 3ea8609..f43271de 100644
--- a/compose/ui/ui/src/androidMain/res/values-ky/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-ky/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Жарым-жартылай текшерилди"</string>
- <string name="on" msgid="8655164131929253426">"Күйүк"</string>
- <string name="off" msgid="875452955155264703">"Өчүк"</string>
+ <string name="state_on" msgid="8655164131929253426">"Күйүк"</string>
+ <string name="state_off" msgid="875452955155264703">"Өчүк"</string>
<string name="switch_role" msgid="2561197295334830845">"Которгуч"</string>
<string name="selected" msgid="6043586758067023">"Тандалды"</string>
<string name="not_selected" msgid="6610465462668679431">"Тандалган жок"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-lo/strings.xml b/compose/ui/ui/src/androidMain/res/values-lo/strings.xml
index 2675043..09c65dc 100644
--- a/compose/ui/ui/src/androidMain/res/values-lo/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-lo/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"ກວດສອບບາງສ່ວນແລ້ວ"</string>
- <string name="on" msgid="8655164131929253426">"ເປີດ"</string>
- <string name="off" msgid="875452955155264703">"ປິດ"</string>
+ <string name="state_on" msgid="8655164131929253426">"ເປີດ"</string>
+ <string name="state_off" msgid="875452955155264703">"ປິດ"</string>
<string name="switch_role" msgid="2561197295334830845">"ປຸ່ມກົດ"</string>
<string name="selected" msgid="6043586758067023">"ເລືອກແລ້ວ"</string>
<string name="not_selected" msgid="6610465462668679431">"ບໍ່ໄດ້ເລືອກ"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-lt/strings.xml b/compose/ui/ui/src/androidMain/res/values-lt/strings.xml
index 18f07c9..91af052 100644
--- a/compose/ui/ui/src/androidMain/res/values-lt/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-lt/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Iš dalies pažymėta"</string>
- <string name="on" msgid="8655164131929253426">"Įjungta"</string>
- <string name="off" msgid="875452955155264703">"Išjungta"</string>
+ <string name="state_on" msgid="8655164131929253426">"Įjungta"</string>
+ <string name="state_off" msgid="875452955155264703">"Išjungta"</string>
<string name="switch_role" msgid="2561197295334830845">"Jungiklis"</string>
<string name="selected" msgid="6043586758067023">"Pasirinkta"</string>
<string name="not_selected" msgid="6610465462668679431">"Nepasirinkta"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-lv/strings.xml b/compose/ui/ui/src/androidMain/res/values-lv/strings.xml
index 43d9c33..bf9b84f 100644
--- a/compose/ui/ui/src/androidMain/res/values-lv/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-lv/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Daļēji atzīmēta"</string>
- <string name="on" msgid="8655164131929253426">"Ieslēgts"</string>
- <string name="off" msgid="875452955155264703">"Izslēgts"</string>
+ <string name="state_on" msgid="8655164131929253426">"Ieslēgts"</string>
+ <string name="state_off" msgid="875452955155264703">"Izslēgts"</string>
<string name="switch_role" msgid="2561197295334830845">"Slēdzis"</string>
<string name="selected" msgid="6043586758067023">"Atlasīts"</string>
<string name="not_selected" msgid="6610465462668679431">"Nav atlasīts"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-mk/strings.xml b/compose/ui/ui/src/androidMain/res/values-mk/strings.xml
index bb92da8..ab40ec5 100644
--- a/compose/ui/ui/src/androidMain/res/values-mk/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-mk/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Делумно проверено"</string>
- <string name="on" msgid="8655164131929253426">"Вклучено"</string>
- <string name="off" msgid="875452955155264703">"Исклучено"</string>
+ <string name="state_on" msgid="8655164131929253426">"Вклучено"</string>
+ <string name="state_off" msgid="875452955155264703">"Исклучено"</string>
<string name="switch_role" msgid="2561197295334830845">"Прекинувач"</string>
<string name="selected" msgid="6043586758067023">"Избрано"</string>
<string name="not_selected" msgid="6610465462668679431">"Не е избрано"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-ml/strings.xml b/compose/ui/ui/src/androidMain/res/values-ml/strings.xml
index c67e83e..3710d32 100644
--- a/compose/ui/ui/src/androidMain/res/values-ml/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-ml/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"ഭാഗികമായി ചെക്ക് മാർക്കിട്ടു"</string>
- <string name="on" msgid="8655164131929253426">"ഓണാണ്"</string>
- <string name="off" msgid="875452955155264703">"ഓഫാണ്"</string>
+ <string name="state_on" msgid="8655164131929253426">"ഓണാണ്"</string>
+ <string name="state_off" msgid="875452955155264703">"ഓഫാണ്"</string>
<string name="switch_role" msgid="2561197295334830845">"മാറുക"</string>
<string name="selected" msgid="6043586758067023">"തിരഞ്ഞെടുത്തു"</string>
<string name="not_selected" msgid="6610465462668679431">"തിരഞ്ഞെടുത്തില്ല"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-mn/strings.xml b/compose/ui/ui/src/androidMain/res/values-mn/strings.xml
index 1d98eea..1e21df7 100644
--- a/compose/ui/ui/src/androidMain/res/values-mn/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-mn/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Хэсэгчлэн тэмдэглэсэн"</string>
- <string name="on" msgid="8655164131929253426">"Асаалттай"</string>
- <string name="off" msgid="875452955155264703">"Унтраалттай"</string>
+ <string name="state_on" msgid="8655164131929253426">"Асаалттай"</string>
+ <string name="state_off" msgid="875452955155264703">"Унтраалттай"</string>
<string name="switch_role" msgid="2561197295334830845">"Сэлгэх"</string>
<string name="selected" msgid="6043586758067023">"Сонгосон"</string>
<string name="not_selected" msgid="6610465462668679431">"Сонгоогүй"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-mr/strings.xml b/compose/ui/ui/src/androidMain/res/values-mr/strings.xml
index db02d08..71126d4 100644
--- a/compose/ui/ui/src/androidMain/res/values-mr/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-mr/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"अंशतः तपासले"</string>
- <string name="on" msgid="8655164131929253426">"सुरू आहे"</string>
- <string name="off" msgid="875452955155264703">"बंद आहे"</string>
+ <string name="state_on" msgid="8655164131929253426">"सुरू आहे"</string>
+ <string name="state_off" msgid="875452955155264703">"बंद आहे"</string>
<string name="switch_role" msgid="2561197295334830845">"स्विच"</string>
<string name="selected" msgid="6043586758067023">"निवडला"</string>
<string name="not_selected" msgid="6610465462668679431">"निवडला नाही"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-ms/strings.xml b/compose/ui/ui/src/androidMain/res/values-ms/strings.xml
index cca8e32..417c100 100644
--- a/compose/ui/ui/src/androidMain/res/values-ms/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-ms/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Sebahagiannya ditandai"</string>
- <string name="on" msgid="8655164131929253426">"Hidup"</string>
- <string name="off" msgid="875452955155264703">"Mati"</string>
+ <string name="state_on" msgid="8655164131929253426">"Hidup"</string>
+ <string name="state_off" msgid="875452955155264703">"Mati"</string>
<string name="switch_role" msgid="2561197295334830845">"Tukar"</string>
<string name="selected" msgid="6043586758067023">"Dipilih"</string>
<string name="not_selected" msgid="6610465462668679431">"Tidak dipilih"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-my/strings.xml b/compose/ui/ui/src/androidMain/res/values-my/strings.xml
index 465ef08..79b34b0 100644
--- a/compose/ui/ui/src/androidMain/res/values-my/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-my/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"တစ်ဝက်တစ်ပျက် စစ်ဆေးထားသည်"</string>
- <string name="on" msgid="8655164131929253426">"ဖွင့်"</string>
- <string name="off" msgid="875452955155264703">"ပိတ်"</string>
+ <string name="state_on" msgid="8655164131929253426">"ဖွင့်"</string>
+ <string name="state_off" msgid="875452955155264703">"ပိတ်"</string>
<string name="switch_role" msgid="2561197295334830845">"ပြောင်းရန်"</string>
<string name="selected" msgid="6043586758067023">"ရွေးထားသည်"</string>
<string name="not_selected" msgid="6610465462668679431">"ရွေးမထားပါ"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-nb/strings.xml b/compose/ui/ui/src/androidMain/res/values-nb/strings.xml
index 6ac8d13..7de85e7 100644
--- a/compose/ui/ui/src/androidMain/res/values-nb/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-nb/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Delvis avmerket"</string>
- <string name="on" msgid="8655164131929253426">"På"</string>
- <string name="off" msgid="875452955155264703">"Av"</string>
+ <string name="state_on" msgid="8655164131929253426">"På"</string>
+ <string name="state_off" msgid="875452955155264703">"Av"</string>
<string name="switch_role" msgid="2561197295334830845">"Bryter"</string>
<string name="selected" msgid="6043586758067023">"Valgt"</string>
<string name="not_selected" msgid="6610465462668679431">"Ikke valgt"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-ne/strings.xml b/compose/ui/ui/src/androidMain/res/values-ne/strings.xml
index 7e15748..61c2920 100644
--- a/compose/ui/ui/src/androidMain/res/values-ne/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-ne/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"आंशिक रूपमा जाँच गरिएको"</string>
- <string name="on" msgid="8655164131929253426">"अन छ"</string>
- <string name="off" msgid="875452955155264703">"अफ छ"</string>
+ <string name="state_on" msgid="8655164131929253426">"अन छ"</string>
+ <string name="state_off" msgid="875452955155264703">"अफ छ"</string>
<string name="switch_role" msgid="2561197295334830845">"बदल्नुहोस्"</string>
<string name="selected" msgid="6043586758067023">"चयन गरिएको छ"</string>
<string name="not_selected" msgid="6610465462668679431">"चयन गरिएको छैन"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-nl/strings.xml b/compose/ui/ui/src/androidMain/res/values-nl/strings.xml
index df57d19..ead225b 100644
--- a/compose/ui/ui/src/androidMain/res/values-nl/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-nl/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Gedeeltelijk aangevinkt"</string>
- <string name="on" msgid="8655164131929253426">"Aan"</string>
- <string name="off" msgid="875452955155264703">"Uit"</string>
+ <string name="state_on" msgid="8655164131929253426">"Aan"</string>
+ <string name="state_off" msgid="875452955155264703">"Uit"</string>
<string name="switch_role" msgid="2561197295334830845">"Overschakelen"</string>
<string name="selected" msgid="6043586758067023">"Geselecteerd"</string>
<string name="not_selected" msgid="6610465462668679431">"Niet geselecteerd"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-or/strings.xml b/compose/ui/ui/src/androidMain/res/values-or/strings.xml
index 36b8189..37ed3bf 100644
--- a/compose/ui/ui/src/androidMain/res/values-or/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-or/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"ଆଶିଂକ ଭାବେ ଯାଞ୍ଚ କରାଯାଇଛି"</string>
- <string name="on" msgid="8655164131929253426">"ଚାଲୁ ଅଛି"</string>
- <string name="off" msgid="875452955155264703">"ବନ୍ଦ ଅଛି"</string>
+ <string name="state_on" msgid="8655164131929253426">"ଚାଲୁ ଅଛି"</string>
+ <string name="state_off" msgid="875452955155264703">"ବନ୍ଦ ଅଛି"</string>
<string name="switch_role" msgid="2561197295334830845">"ସ୍ୱିଚ କରନ୍ତୁ"</string>
<string name="selected" msgid="6043586758067023">"ଚୟନିତ"</string>
<string name="not_selected" msgid="6610465462668679431">"ଚୟନ କରାଯାଇନାହିଁ"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-pa/strings.xml b/compose/ui/ui/src/androidMain/res/values-pa/strings.xml
index 269fe3f..6c96b2f 100644
--- a/compose/ui/ui/src/androidMain/res/values-pa/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-pa/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"ਅੰਸ਼ਕ ਤੌਰ ਤੇ ਜਾਂਚ ਕੀਤੀ ਗਈ"</string>
- <string name="on" msgid="8655164131929253426">"ਚਾਲੂ ਹੈ"</string>
- <string name="off" msgid="875452955155264703">"ਬੰਦ ਹੈ"</string>
+ <string name="state_on" msgid="8655164131929253426">"ਚਾਲੂ ਹੈ"</string>
+ <string name="state_off" msgid="875452955155264703">"ਬੰਦ ਹੈ"</string>
<string name="switch_role" msgid="2561197295334830845">"ਸਵਿੱਚ ਕਰੋ"</string>
<string name="selected" msgid="6043586758067023">"ਚੁਣੀ ਗਈ"</string>
<string name="not_selected" msgid="6610465462668679431">"ਚੁਣੀ ਨਹੀਂ ਗਈ"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-pl/strings.xml b/compose/ui/ui/src/androidMain/res/values-pl/strings.xml
index bbc7dd9..1ff0b56 100644
--- a/compose/ui/ui/src/androidMain/res/values-pl/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-pl/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Częściowo zaznaczone"</string>
- <string name="on" msgid="8655164131929253426">"Włączono"</string>
- <string name="off" msgid="875452955155264703">"Wyłączono"</string>
+ <string name="state_on" msgid="8655164131929253426">"Włączono"</string>
+ <string name="state_off" msgid="875452955155264703">"Wyłączono"</string>
<string name="switch_role" msgid="2561197295334830845">"Przełącznik"</string>
<string name="selected" msgid="6043586758067023">"Wybrano"</string>
<string name="not_selected" msgid="6610465462668679431">"Nie wybrano"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-pt-rBR/strings.xml b/compose/ui/ui/src/androidMain/res/values-pt-rBR/strings.xml
index e602a9f..572cbee 100644
--- a/compose/ui/ui/src/androidMain/res/values-pt-rBR/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-pt-rBR/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Parcialmente selecionada"</string>
- <string name="on" msgid="8655164131929253426">"Ativado"</string>
- <string name="off" msgid="875452955155264703">"Desativado"</string>
+ <string name="state_on" msgid="8655164131929253426">"Ativado"</string>
+ <string name="state_off" msgid="875452955155264703">"Desativado"</string>
<string name="switch_role" msgid="2561197295334830845">"Chave"</string>
<string name="selected" msgid="6043586758067023">"Selecionado"</string>
<string name="not_selected" msgid="6610465462668679431">"Não selecionado"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-pt-rPT/strings.xml b/compose/ui/ui/src/androidMain/res/values-pt-rPT/strings.xml
index 92b8419..0024ff8 100644
--- a/compose/ui/ui/src/androidMain/res/values-pt-rPT/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-pt-rPT/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Parcialmente selecionada"</string>
- <string name="on" msgid="8655164131929253426">"Ativado"</string>
- <string name="off" msgid="875452955155264703">"Desativado"</string>
+ <string name="state_on" msgid="8655164131929253426">"Ativado"</string>
+ <string name="state_off" msgid="875452955155264703">"Desativado"</string>
<string name="switch_role" msgid="2561197295334830845">"Mudar"</string>
<string name="selected" msgid="6043586758067023">"Selecionado"</string>
<string name="not_selected" msgid="6610465462668679431">"Não selecionado"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-pt/strings.xml b/compose/ui/ui/src/androidMain/res/values-pt/strings.xml
index e602a9f..572cbee 100644
--- a/compose/ui/ui/src/androidMain/res/values-pt/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-pt/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Parcialmente selecionada"</string>
- <string name="on" msgid="8655164131929253426">"Ativado"</string>
- <string name="off" msgid="875452955155264703">"Desativado"</string>
+ <string name="state_on" msgid="8655164131929253426">"Ativado"</string>
+ <string name="state_off" msgid="875452955155264703">"Desativado"</string>
<string name="switch_role" msgid="2561197295334830845">"Chave"</string>
<string name="selected" msgid="6043586758067023">"Selecionado"</string>
<string name="not_selected" msgid="6610465462668679431">"Não selecionado"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-ro/strings.xml b/compose/ui/ui/src/androidMain/res/values-ro/strings.xml
index 6123619..027697e 100644
--- a/compose/ui/ui/src/androidMain/res/values-ro/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-ro/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Bifată parțial"</string>
- <string name="on" msgid="8655164131929253426">"Activat"</string>
- <string name="off" msgid="875452955155264703">"Dezactivat"</string>
+ <string name="state_on" msgid="8655164131929253426">"Activat"</string>
+ <string name="state_off" msgid="875452955155264703">"Dezactivat"</string>
<string name="switch_role" msgid="2561197295334830845">"Comută"</string>
<string name="selected" msgid="6043586758067023">"Selectat"</string>
<string name="not_selected" msgid="6610465462668679431">"Neselectat"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-ru/strings.xml b/compose/ui/ui/src/androidMain/res/values-ru/strings.xml
index 39817d1..295cb11 100644
--- a/compose/ui/ui/src/androidMain/res/values-ru/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-ru/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Отмечено частично"</string>
- <string name="on" msgid="8655164131929253426">"Включено"</string>
- <string name="off" msgid="875452955155264703">"Отключено"</string>
+ <string name="state_on" msgid="8655164131929253426">"Включено"</string>
+ <string name="state_off" msgid="875452955155264703">"Отключено"</string>
<string name="switch_role" msgid="2561197295334830845">"Переключатель"</string>
<string name="selected" msgid="6043586758067023">"Выбрано"</string>
<string name="not_selected" msgid="6610465462668679431">"Не выбрано"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-si/strings.xml b/compose/ui/ui/src/androidMain/res/values-si/strings.xml
index 3610c5d..3fb091b 100644
--- a/compose/ui/ui/src/androidMain/res/values-si/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-si/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"අඩ වශයෙන් ලකුණු කළ"</string>
- <string name="on" msgid="8655164131929253426">"ක්රියාත්මකයි"</string>
- <string name="off" msgid="875452955155264703">"ක්රියාවිරහිතයි"</string>
+ <string name="state_on" msgid="8655164131929253426">"ක්රියාත්මකයි"</string>
+ <string name="state_off" msgid="875452955155264703">"ක්රියාවිරහිතයි"</string>
<string name="switch_role" msgid="2561197295334830845">"මාරු කරන්න"</string>
<string name="selected" msgid="6043586758067023">"තෝරන ලදි"</string>
<string name="not_selected" msgid="6610465462668679431">"තෝරා නැත"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-sk/strings.xml b/compose/ui/ui/src/androidMain/res/values-sk/strings.xml
index 1ef5d97..9e11bd95 100644
--- a/compose/ui/ui/src/androidMain/res/values-sk/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-sk/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Čiastočne začiarknuté"</string>
- <string name="on" msgid="8655164131929253426">"Zapnuté"</string>
- <string name="off" msgid="875452955155264703">"Vypnuté"</string>
+ <string name="state_on" msgid="8655164131929253426">"Zapnuté"</string>
+ <string name="state_off" msgid="875452955155264703">"Vypnuté"</string>
<string name="switch_role" msgid="2561197295334830845">"Prepnúť"</string>
<string name="selected" msgid="6043586758067023">"Vybrané"</string>
<string name="not_selected" msgid="6610465462668679431">"Nevybrané"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-sl/strings.xml b/compose/ui/ui/src/androidMain/res/values-sl/strings.xml
index 121a772..2ce13d7 100644
--- a/compose/ui/ui/src/androidMain/res/values-sl/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-sl/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Delno potrjeno"</string>
- <string name="on" msgid="8655164131929253426">"Vklopljeno"</string>
- <string name="off" msgid="875452955155264703">"Izklopljeno"</string>
+ <string name="state_on" msgid="8655164131929253426">"Vklopljeno"</string>
+ <string name="state_off" msgid="875452955155264703">"Izklopljeno"</string>
<string name="switch_role" msgid="2561197295334830845">"Stikalo"</string>
<string name="selected" msgid="6043586758067023">"Izbrano"</string>
<string name="not_selected" msgid="6610465462668679431">"Ni izbrano"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-sq/strings.xml b/compose/ui/ui/src/androidMain/res/values-sq/strings.xml
index 7f8ce7b..3dc62af 100644
--- a/compose/ui/ui/src/androidMain/res/values-sq/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-sq/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Pjesërisht e shënuar"</string>
- <string name="on" msgid="8655164131929253426">"Aktiv"</string>
- <string name="off" msgid="875452955155264703">"Joaktiv"</string>
+ <string name="state_on" msgid="8655164131929253426">"Aktiv"</string>
+ <string name="state_off" msgid="875452955155264703">"Joaktiv"</string>
<string name="switch_role" msgid="2561197295334830845">"Ndërro"</string>
<string name="selected" msgid="6043586758067023">"Zgjedhur"</string>
<string name="not_selected" msgid="6610465462668679431">"Nuk është zgjedhur"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-sr/strings.xml b/compose/ui/ui/src/androidMain/res/values-sr/strings.xml
index 466b1b6..564dac6 100644
--- a/compose/ui/ui/src/androidMain/res/values-sr/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-sr/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Делимично означено"</string>
- <string name="on" msgid="8655164131929253426">"Укључено"</string>
- <string name="off" msgid="875452955155264703">"Искључено"</string>
+ <string name="state_on" msgid="8655164131929253426">"Укључено"</string>
+ <string name="state_off" msgid="875452955155264703">"Искључено"</string>
<string name="switch_role" msgid="2561197295334830845">"Прекидач"</string>
<string name="selected" msgid="6043586758067023">"Изабрано"</string>
<string name="not_selected" msgid="6610465462668679431">"Није изабрано"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-sv/strings.xml b/compose/ui/ui/src/androidMain/res/values-sv/strings.xml
index 185737c..3dbaf6b 100644
--- a/compose/ui/ui/src/androidMain/res/values-sv/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-sv/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Delvis markerad"</string>
- <string name="on" msgid="8655164131929253426">"På"</string>
- <string name="off" msgid="875452955155264703">"Av"</string>
+ <string name="state_on" msgid="8655164131929253426">"På"</string>
+ <string name="state_off" msgid="875452955155264703">"Av"</string>
<string name="switch_role" msgid="2561197295334830845">"Reglage"</string>
<string name="selected" msgid="6043586758067023">"Valt"</string>
<string name="not_selected" msgid="6610465462668679431">"Inte vald"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-sw/strings.xml b/compose/ui/ui/src/androidMain/res/values-sw/strings.xml
index 00e3d61..09b9640 100644
--- a/compose/ui/ui/src/androidMain/res/values-sw/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-sw/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Imekaguliwa kwa kiasi fulani"</string>
- <string name="on" msgid="8655164131929253426">"Imewashwa"</string>
- <string name="off" msgid="875452955155264703">"Imezimwa"</string>
+ <string name="state_on" msgid="8655164131929253426">"Imewashwa"</string>
+ <string name="state_off" msgid="875452955155264703">"Imezimwa"</string>
<string name="switch_role" msgid="2561197295334830845">"Swichi"</string>
<string name="selected" msgid="6043586758067023">"Umechagua"</string>
<string name="not_selected" msgid="6610465462668679431">"Hujachagua"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-ta/strings.xml b/compose/ui/ui/src/androidMain/res/values-ta/strings.xml
index de9bb21..81407fa 100644
--- a/compose/ui/ui/src/androidMain/res/values-ta/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-ta/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"சில மட்டுமே தேர்ந்தெடுக்கப்பட்டுள்ளன"</string>
- <string name="on" msgid="8655164131929253426">"இயக்கப்பட்டுள்ளது"</string>
- <string name="off" msgid="875452955155264703">"முடக்கப்பட்டுள்ளது"</string>
+ <string name="state_on" msgid="8655164131929253426">"இயக்கப்பட்டுள்ளது"</string>
+ <string name="state_off" msgid="875452955155264703">"முடக்கப்பட்டுள்ளது"</string>
<string name="switch_role" msgid="2561197295334830845">"மாற்றுதல்"</string>
<string name="selected" msgid="6043586758067023">"தேர்ந்தெடுக்கப்பட்டுள்ளது"</string>
<string name="not_selected" msgid="6610465462668679431">"தேர்ந்தெடுக்கப்படவில்லை"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-te/strings.xml b/compose/ui/ui/src/androidMain/res/values-te/strings.xml
index 598e8c5..2b3c28a 100644
--- a/compose/ui/ui/src/androidMain/res/values-te/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-te/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"పాక్షికంగా ఎంచుకోబడింది"</string>
- <string name="on" msgid="8655164131929253426">"ఆన్లో ఉంది"</string>
- <string name="off" msgid="875452955155264703">"ఆఫ్లో ఉంది"</string>
+ <string name="state_on" msgid="8655164131929253426">"ఆన్లో ఉంది"</string>
+ <string name="state_off" msgid="875452955155264703">"ఆఫ్లో ఉంది"</string>
<string name="switch_role" msgid="2561197295334830845">"Switch"</string>
<string name="selected" msgid="6043586758067023">"ఎంచుకోబడింది"</string>
<string name="not_selected" msgid="6610465462668679431">"ఎంచుకోబడలేదు"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-th/strings.xml b/compose/ui/ui/src/androidMain/res/values-th/strings.xml
index f0a1576..cf658f4 100644
--- a/compose/ui/ui/src/androidMain/res/values-th/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-th/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"เลือกบางส่วน"</string>
- <string name="on" msgid="8655164131929253426">"เปิด"</string>
- <string name="off" msgid="875452955155264703">"ปิด"</string>
+ <string name="state_on" msgid="8655164131929253426">"เปิด"</string>
+ <string name="state_off" msgid="875452955155264703">"ปิด"</string>
<string name="switch_role" msgid="2561197295334830845">"เปลี่ยน"</string>
<string name="selected" msgid="6043586758067023">"เลือกไว้"</string>
<string name="not_selected" msgid="6610465462668679431">"ไม่ได้เลือก"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-tl/strings.xml b/compose/ui/ui/src/androidMain/res/values-tl/strings.xml
index cbebde9..7551c981 100644
--- a/compose/ui/ui/src/androidMain/res/values-tl/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-tl/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Bahagyang may check"</string>
- <string name="on" msgid="8655164131929253426">"Naka-on"</string>
- <string name="off" msgid="875452955155264703">"Naka-off"</string>
+ <string name="state_on" msgid="8655164131929253426">"Naka-on"</string>
+ <string name="state_off" msgid="875452955155264703">"Naka-off"</string>
<string name="switch_role" msgid="2561197295334830845">"Lumipat"</string>
<string name="selected" msgid="6043586758067023">"Napili"</string>
<string name="not_selected" msgid="6610465462668679431">"Hindi napili"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-tr/strings.xml b/compose/ui/ui/src/androidMain/res/values-tr/strings.xml
index 7be7793..29e403f 100644
--- a/compose/ui/ui/src/androidMain/res/values-tr/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-tr/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Kısmi olarak kontrol edildi"</string>
- <string name="on" msgid="8655164131929253426">"Açık"</string>
- <string name="off" msgid="875452955155264703">"Kapalı"</string>
+ <string name="state_on" msgid="8655164131929253426">"Açık"</string>
+ <string name="state_off" msgid="875452955155264703">"Kapalı"</string>
<string name="switch_role" msgid="2561197295334830845">"Anahtar"</string>
<string name="selected" msgid="6043586758067023">"Seçili"</string>
<string name="not_selected" msgid="6610465462668679431">"Seçili değil"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-uk/strings.xml b/compose/ui/ui/src/androidMain/res/values-uk/strings.xml
index a16e78a..ce2f540 100644
--- a/compose/ui/ui/src/androidMain/res/values-uk/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-uk/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Частково вибрано"</string>
- <string name="on" msgid="8655164131929253426">"Увімкнено"</string>
- <string name="off" msgid="875452955155264703">"Вимкнено"</string>
+ <string name="state_on" msgid="8655164131929253426">"Увімкнено"</string>
+ <string name="state_off" msgid="875452955155264703">"Вимкнено"</string>
<string name="switch_role" msgid="2561197295334830845">"Перемикач"</string>
<string name="selected" msgid="6043586758067023">"Вибрано"</string>
<string name="not_selected" msgid="6610465462668679431">"Не вибрано"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-ur/strings.xml b/compose/ui/ui/src/androidMain/res/values-ur/strings.xml
index d2cfa69..db2e2a8 100644
--- a/compose/ui/ui/src/androidMain/res/values-ur/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-ur/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"جزوی طور پر چیک کردہ"</string>
- <string name="on" msgid="8655164131929253426">"آن ہے"</string>
- <string name="off" msgid="875452955155264703">"آف ہے"</string>
+ <string name="state_on" msgid="8655164131929253426">"آن ہے"</string>
+ <string name="state_off" msgid="875452955155264703">"آف ہے"</string>
<string name="switch_role" msgid="2561197295334830845">"سوئچ"</string>
<string name="selected" msgid="6043586758067023">"منتخب کردہ"</string>
<string name="not_selected" msgid="6610465462668679431">"غیر منتخب کردہ"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-uz/strings.xml b/compose/ui/ui/src/androidMain/res/values-uz/strings.xml
index 2fca41c..6459eee 100644
--- a/compose/ui/ui/src/androidMain/res/values-uz/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-uz/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Qisman belgilandi"</string>
- <string name="on" msgid="8655164131929253426">"Yoniq"</string>
- <string name="off" msgid="875452955155264703">"Oʻchiq"</string>
+ <string name="state_on" msgid="8655164131929253426">"Yoniq"</string>
+ <string name="state_off" msgid="875452955155264703">"Oʻchiq"</string>
<string name="switch_role" msgid="2561197295334830845">"Almashtirish"</string>
<string name="selected" msgid="6043586758067023">"Tanlangan"</string>
<string name="not_selected" msgid="6610465462668679431">"Tanlanmagan"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-vi/strings.xml b/compose/ui/ui/src/androidMain/res/values-vi/strings.xml
index c083d08..0da2126 100644
--- a/compose/ui/ui/src/androidMain/res/values-vi/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-vi/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Đã kiểm tra một phần"</string>
- <string name="on" msgid="8655164131929253426">"Đang bật"</string>
- <string name="off" msgid="875452955155264703">"Đang tắt"</string>
+ <string name="state_on" msgid="8655164131929253426">"Đang bật"</string>
+ <string name="state_off" msgid="875452955155264703">"Đang tắt"</string>
<string name="switch_role" msgid="2561197295334830845">"Chuyển"</string>
<string name="selected" msgid="6043586758067023">"Đã chọn"</string>
<string name="not_selected" msgid="6610465462668679431">"Chưa chọn"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-zh-rCN/strings.xml b/compose/ui/ui/src/androidMain/res/values-zh-rCN/strings.xml
index 4277175..de0a846 100644
--- a/compose/ui/ui/src/androidMain/res/values-zh-rCN/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-zh-rCN/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"部分选中"</string>
- <string name="on" msgid="8655164131929253426">"已开启"</string>
- <string name="off" msgid="875452955155264703">"已关闭"</string>
+ <string name="state_on" msgid="8655164131929253426">"已开启"</string>
+ <string name="state_off" msgid="875452955155264703">"已关闭"</string>
<string name="switch_role" msgid="2561197295334830845">"开关"</string>
<string name="selected" msgid="6043586758067023">"已选择"</string>
<string name="not_selected" msgid="6610465462668679431">"未选择"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-zh-rHK/strings.xml b/compose/ui/ui/src/androidMain/res/values-zh-rHK/strings.xml
index b746a8b..f7ef924 100644
--- a/compose/ui/ui/src/androidMain/res/values-zh-rHK/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-zh-rHK/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"部分剔咗"</string>
- <string name="on" msgid="8655164131929253426">"開"</string>
- <string name="off" msgid="875452955155264703">"閂"</string>
+ <string name="state_on" msgid="8655164131929253426">"開"</string>
+ <string name="state_off" msgid="875452955155264703">"閂"</string>
<string name="switch_role" msgid="2561197295334830845">"按鈕裝置"</string>
<string name="selected" msgid="6043586758067023">"揀咗"</string>
<string name="not_selected" msgid="6610465462668679431">"未揀"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-zh-rTW/strings.xml b/compose/ui/ui/src/androidMain/res/values-zh-rTW/strings.xml
index b833b6b..aa35359 100644
--- a/compose/ui/ui/src/androidMain/res/values-zh-rTW/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-zh-rTW/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"部分檢查"</string>
- <string name="on" msgid="8655164131929253426">"已開啟"</string>
- <string name="off" msgid="875452955155264703">"已關閉"</string>
+ <string name="state_on" msgid="8655164131929253426">"已開啟"</string>
+ <string name="state_off" msgid="875452955155264703">"已關閉"</string>
<string name="switch_role" msgid="2561197295334830845">"切換鈕"</string>
<string name="selected" msgid="6043586758067023">"已選取"</string>
<string name="not_selected" msgid="6610465462668679431">"未選取"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values-zu/strings.xml b/compose/ui/ui/src/androidMain/res/values-zu/strings.xml
index d1f80e4..281cf87 100644
--- a/compose/ui/ui/src/androidMain/res/values-zu/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values-zu/strings.xml
@@ -18,8 +18,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="indeterminate" msgid="7933458017204019916">"Kuhlolwe kancane"</string>
- <string name="on" msgid="8655164131929253426">"Vuliwe"</string>
- <string name="off" msgid="875452955155264703">"Valiwe"</string>
+ <string name="state_on" msgid="8655164131929253426">"Vuliwe"</string>
+ <string name="state_off" msgid="875452955155264703">"Valiwe"</string>
<string name="switch_role" msgid="2561197295334830845">"Shintsha"</string>
<string name="selected" msgid="6043586758067023">"Okukhethiwe"</string>
<string name="not_selected" msgid="6610465462668679431">"Ayikhethiwe"</string>
diff --git a/compose/ui/ui/src/androidMain/res/values/strings.xml b/compose/ui/ui/src/androidMain/res/values/strings.xml
index 8524e9e..5d955a7 100644
--- a/compose/ui/ui/src/androidMain/res/values/strings.xml
+++ b/compose/ui/ui/src/androidMain/res/values/strings.xml
@@ -19,9 +19,9 @@
<!-- Spoken description of indeterminate state of a tri-state checkbox -->
<string name="indeterminate">Partially checked</string>
<!-- Spoken description of on state of a switch -->
- <string name="on">On</string>
+ <string name="state_on">On</string>
<!-- Spoken description of off state of a switch -->
- <string name="off">Off</string>
+ <string name="state_off">Off</string>
<!-- Spoken description naming a Switch Material UI widget -->
<string name="switch_role">Switch</string>
<!-- Spoken description of selected state of a selectable item -->
diff --git a/compose/ui/ui/src/androidUnitTest/kotlin/androidx/compose/ui/text/input/TextInputServiceAndroidCommandDebouncingTest.kt b/compose/ui/ui/src/androidUnitTest/kotlin/androidx/compose/ui/text/input/TextInputServiceAndroidCommandDebouncingTest.kt
index f8b8270..19ff239 100644
--- a/compose/ui/ui/src/androidUnitTest/kotlin/androidx/compose/ui/text/input/TextInputServiceAndroidCommandDebouncingTest.kt
+++ b/compose/ui/ui/src/androidUnitTest/kotlin/androidx/compose/ui/text/input/TextInputServiceAndroidCommandDebouncingTest.kt
@@ -237,7 +237,7 @@
}
@Test
- fun commandsAreIgnored_ifFocusLostBeforeProcessing() {
+ fun commandsAreNotIgnored_ifFocusLostBeforeProcessing() {
// Send command while view still has focus.
service.showSoftwareKeyboard()
// Blur the view.
@@ -245,7 +245,7 @@
// Process the queued commands.
scope.advanceUntilIdle()
- assertThat(inputMethodManager.showSoftInputCalls).isEqualTo(0)
+ assertThat(inputMethodManager.showSoftInputCalls).isEqualTo(1)
}
@Test
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsProperties.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsProperties.kt
index 0b0e358..e235912 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsProperties.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsProperties.kt
@@ -821,7 +821,7 @@
var SemanticsPropertyReceiver.stateDescription by SemanticsProperties.StateDescription
/**
- * The semantics is represents a range of possible values with a current value.
+ * The semantics represents a range of possible values with a current value.
* For example, when used on a slider control, this will allow screen readers to communicate
* the slider's state.
*/
diff --git a/concurrent/concurrent-futures-ktx/build.gradle b/concurrent/concurrent-futures-ktx/build.gradle
index 59fadfa..15e8be0 100644
--- a/concurrent/concurrent-futures-ktx/build.gradle
+++ b/concurrent/concurrent-futures-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/concurrent/concurrent-futures/build.gradle b/concurrent/concurrent-futures/build.gradle
index 3c047f9..a731715 100644
--- a/concurrent/concurrent-futures/build.gradle
+++ b/concurrent/concurrent-futures/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/constraintlayout/constraintlayout-compose-lint/build.gradle b/constraintlayout/constraintlayout-compose-lint/build.gradle
index 947de0d..84322c5 100644
--- a/constraintlayout/constraintlayout-compose-lint/build.gradle
+++ b/constraintlayout/constraintlayout-compose-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
diff --git a/constraintlayout/constraintlayout-compose/build.gradle b/constraintlayout/constraintlayout-compose/build.gradle
index c005e38..070ebb48 100644
--- a/constraintlayout/constraintlayout-compose/build.gradle
+++ b/constraintlayout/constraintlayout-compose/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/constraintlayout/constraintlayout-core/build.gradle b/constraintlayout/constraintlayout-core/build.gradle
index cfbaebc..717357f 100644
--- a/constraintlayout/constraintlayout-core/build.gradle
+++ b/constraintlayout/constraintlayout-core/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/constraintlayout/constraintlayout/build.gradle b/constraintlayout/constraintlayout/build.gradle
index 9a4f6cc..7bafbac 100644
--- a/constraintlayout/constraintlayout/build.gradle
+++ b/constraintlayout/constraintlayout/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/contentpager/contentpager/build.gradle b/contentpager/contentpager/build.gradle
index 98784a0..b4cb66e 100644
--- a/contentpager/contentpager/build.gradle
+++ b/contentpager/contentpager/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/coordinatorlayout/coordinatorlayout/build.gradle b/coordinatorlayout/coordinatorlayout/build.gradle
index 32f025f..2b8abe0 100644
--- a/coordinatorlayout/coordinatorlayout/build.gradle
+++ b/coordinatorlayout/coordinatorlayout/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/core/core-animation-testing/build.gradle b/core/core-animation-testing/build.gradle
index 7caadd3..1165d54 100644
--- a/core/core-animation-testing/build.gradle
+++ b/core/core-animation-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/core/core-animation/build.gradle b/core/core-animation/build.gradle
index 0bd7a99..55c948d 100644
--- a/core/core-animation/build.gradle
+++ b/core/core-animation/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/core/core-appdigest/build.gradle b/core/core-appdigest/build.gradle
index 03230df..2b441d8 100644
--- a/core/core-appdigest/build.gradle
+++ b/core/core-appdigest/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/core/core-i18n/build.gradle b/core/core-i18n/build.gradle
index df268b5..7705edf 100644
--- a/core/core-i18n/build.gradle
+++ b/core/core-i18n/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/core/core-ktx/build.gradle b/core/core-ktx/build.gradle
index 862d27c..24a1d25 100644
--- a/core/core-ktx/build.gradle
+++ b/core/core-ktx/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/core/core-location-altitude-proto/build.gradle b/core/core-location-altitude-proto/build.gradle
index 02afaf0..6f109c5 100644
--- a/core/core-location-altitude-proto/build.gradle
+++ b/core/core-location-altitude-proto/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/core/core-location-altitude/build.gradle b/core/core-location-altitude/build.gradle
index ddd54e2..1530ba8 100644
--- a/core/core-location-altitude/build.gradle
+++ b/core/core-location-altitude/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/core/core-performance-play-services/build.gradle b/core/core-performance-play-services/build.gradle
index 2398ed1..d302469 100644
--- a/core/core-performance-play-services/build.gradle
+++ b/core/core-performance-play-services/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/core/core-performance-testing/build.gradle b/core/core-performance-testing/build.gradle
index 002681c..ff2b4d6 100644
--- a/core/core-performance-testing/build.gradle
+++ b/core/core-performance-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/core/core-performance/build.gradle b/core/core-performance/build.gradle
index f4aac3b..23d7a9a 100644
--- a/core/core-performance/build.gradle
+++ b/core/core-performance/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/core/core-performance/samples/build.gradle b/core/core-performance/samples/build.gradle
index ef28e3c..522219d 100644
--- a/core/core-performance/samples/build.gradle
+++ b/core/core-performance/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/core/core-remoteviews/build.gradle b/core/core-remoteviews/build.gradle
index 8e1fa76..3452498 100644
--- a/core/core-remoteviews/build.gradle
+++ b/core/core-remoteviews/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/core/core-role/build.gradle b/core/core-role/build.gradle
index 4b6e60e..d61093a 100644
--- a/core/core-role/build.gradle
+++ b/core/core-role/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/core/core-splashscreen/build.gradle b/core/core-splashscreen/build.gradle
index 2a98181..c3d875b 100644
--- a/core/core-splashscreen/build.gradle
+++ b/core/core-splashscreen/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/core/core-splashscreen/samples/build.gradle b/core/core-splashscreen/samples/build.gradle
index bdde361..b2a88c8 100644
--- a/core/core-splashscreen/samples/build.gradle
+++ b/core/core-splashscreen/samples/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/core/core-telecom/build.gradle b/core/core-telecom/build.gradle
index 047deba..4c8fbd1 100644
--- a/core/core-telecom/build.gradle
+++ b/core/core-telecom/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
@@ -28,7 +35,7 @@
api(libs.guavaListenableFuture)
implementation("androidx.annotation:annotation:1.4.0")
// @OptIn annotations
- api("androidx.annotation:annotation-experimental:1.3.0")
+ api(project(":annotation:annotation-experimental"))
implementation("androidx.core:core:1.9.0")
implementation(libs.kotlinCoroutinesCore)
implementation(libs.kotlinCoroutinesGuava)
diff --git a/core/core-telecom/integration-tests/testapp/build.gradle b/core/core-telecom/integration-tests/testapp/build.gradle
index 582f731..d831923 100644
--- a/core/core-telecom/integration-tests/testapp/build.gradle
+++ b/core/core-telecom/integration-tests/testapp/build.gradle
@@ -48,6 +48,10 @@
implementation('androidx.navigation:navigation-fragment-ktx:2.5.3')
implementation('androidx.navigation:navigation-ui-ktx:2.5.3')
implementation('androidx.recyclerview:recyclerview:1.2.1')
+
+ // Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath.
+ androidTestImplementation(project(":annotation:annotation-experimental"))
+
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testRunner)
}
diff --git a/core/core-testing/build.gradle b/core/core-testing/build.gradle
index 883c7b4..b28f926 100644
--- a/core/core-testing/build.gradle
+++ b/core/core-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/core/core/build.gradle b/core/core/build.gradle
index 439ad5d..17d3ad1 100644
--- a/core/core/build.gradle
+++ b/core/core/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
@@ -15,7 +22,7 @@
}
api("androidx.annotation:annotation:1.6.0")
- api("androidx.annotation:annotation-experimental:1.3.0")
+ api(project(":annotation:annotation-experimental"))
api("androidx.lifecycle:lifecycle-runtime:2.6.2")
api("androidx.versionedparcelable:versionedparcelable:1.1.1")
implementation("androidx.collection:collection:1.0.0")
diff --git a/core/core/integration-tests/publishing/build.gradle b/core/core/integration-tests/publishing/build.gradle
index 6d9b83e..138ed40 100644
--- a/core/core/integration-tests/publishing/build.gradle
+++ b/core/core/integration-tests/publishing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.SdkResourceGenerator
plugins {
diff --git a/core/core/src/main/java/androidx/core/app/ActivityCompat.java b/core/core/src/main/java/androidx/core/app/ActivityCompat.java
index 6ac4335..d89856a 100644
--- a/core/core/src/main/java/androidx/core/app/ActivityCompat.java
+++ b/core/core/src/main/java/androidx/core/app/ActivityCompat.java
@@ -466,7 +466,7 @@
* </p>
* <p>
* Calling this API for permissions already granted to your app would show UI
- * to the user to decided whether the app can still hold these permissions. This
+ * to the user to decide whether the app can still hold these permissions. This
* can be useful if the way your app uses the data guarded by the permissions
* changes significantly.
* </p>
diff --git a/core/haptics/haptics/build.gradle b/core/haptics/haptics/build.gradle
index fdee3b5..aaaa2c4 100644
--- a/core/haptics/haptics/build.gradle
+++ b/core/haptics/haptics/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/core/uwb/uwb-rxjava3/build.gradle b/core/uwb/uwb-rxjava3/build.gradle
index 671910d..6ff1306 100644
--- a/core/uwb/uwb-rxjava3/build.gradle
+++ b/core/uwb/uwb-rxjava3/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/core/uwb/uwb/build.gradle b/core/uwb/uwb/build.gradle
index 7c8cf11..58e816b 100644
--- a/core/uwb/uwb/build.gradle
+++ b/core/uwb/uwb/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/credentials/credentials-fido/build.gradle b/credentials/credentials-fido/build.gradle
index aab49bf..f2ac41e 100644
--- a/credentials/credentials-fido/build.gradle
+++ b/credentials/credentials-fido/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/credentials/credentials-play-services-auth/build.gradle b/credentials/credentials-play-services-auth/build.gradle
index 3b5972d..1199346 100644
--- a/credentials/credentials-play-services-auth/build.gradle
+++ b/credentials/credentials-play-services-auth/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/credentials/credentials-provider/build.gradle b/credentials/credentials-provider/build.gradle
index a2d506c..9f79fc5 100644
--- a/credentials/credentials-provider/build.gradle
+++ b/credentials/credentials-provider/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/credentials/credentials/api/current.ignore b/credentials/credentials/api/current.ignore
new file mode 100644
index 0000000..a16d599
--- /dev/null
+++ b/credentials/credentials/api/current.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+RemovedMethod: androidx.credentials.CreateCredentialRequest#getPreferImmediatelyAvailableCredentials():
+ Removed method androidx.credentials.CreateCredentialRequest.getPreferImmediatelyAvailableCredentials()
+RemovedMethod: androidx.credentials.GetCredentialRequest#getPreferImmediatelyAvailableCredentials():
+ Removed method androidx.credentials.GetCredentialRequest.getPreferImmediatelyAvailableCredentials()
diff --git a/credentials/credentials/api/current.txt b/credentials/credentials/api/current.txt
index f0198f7b..e238c32 100644
--- a/credentials/credentials/api/current.txt
+++ b/credentials/credentials/api/current.txt
@@ -10,10 +10,10 @@
method public final android.os.Bundle getCredentialData();
method public final androidx.credentials.CreateCredentialRequest.DisplayInfo getDisplayInfo();
method public final String? getOrigin();
- method public final boolean getPreferImmediatelyAvailableCredentials();
method public final String getType();
method public final boolean isAutoSelectAllowed();
method public final boolean isSystemProviderRequired();
+ method public final boolean preferImmediatelyAvailableCredentials();
property public final android.os.Bundle candidateQueryData;
property public final android.os.Bundle credentialData;
property public final androidx.credentials.CreateCredentialRequest.DisplayInfo displayInfo;
@@ -156,8 +156,8 @@
method public java.util.List<androidx.credentials.CredentialOption> getCredentialOptions();
method public String? getOrigin();
method public boolean getPreferIdentityDocUi();
- method public boolean getPreferImmediatelyAvailableCredentials();
method public android.content.ComponentName? getPreferUiBrandingComponentName();
+ method public boolean preferImmediatelyAvailableCredentials();
property public final java.util.List<androidx.credentials.CredentialOption> credentialOptions;
property public final String? origin;
property public final boolean preferIdentityDocUi;
diff --git a/credentials/credentials/api/restricted_current.ignore b/credentials/credentials/api/restricted_current.ignore
new file mode 100644
index 0000000..a16d599
--- /dev/null
+++ b/credentials/credentials/api/restricted_current.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+RemovedMethod: androidx.credentials.CreateCredentialRequest#getPreferImmediatelyAvailableCredentials():
+ Removed method androidx.credentials.CreateCredentialRequest.getPreferImmediatelyAvailableCredentials()
+RemovedMethod: androidx.credentials.GetCredentialRequest#getPreferImmediatelyAvailableCredentials():
+ Removed method androidx.credentials.GetCredentialRequest.getPreferImmediatelyAvailableCredentials()
diff --git a/credentials/credentials/api/restricted_current.txt b/credentials/credentials/api/restricted_current.txt
index f0198f7b..e238c32 100644
--- a/credentials/credentials/api/restricted_current.txt
+++ b/credentials/credentials/api/restricted_current.txt
@@ -10,10 +10,10 @@
method public final android.os.Bundle getCredentialData();
method public final androidx.credentials.CreateCredentialRequest.DisplayInfo getDisplayInfo();
method public final String? getOrigin();
- method public final boolean getPreferImmediatelyAvailableCredentials();
method public final String getType();
method public final boolean isAutoSelectAllowed();
method public final boolean isSystemProviderRequired();
+ method public final boolean preferImmediatelyAvailableCredentials();
property public final android.os.Bundle candidateQueryData;
property public final android.os.Bundle credentialData;
property public final androidx.credentials.CreateCredentialRequest.DisplayInfo displayInfo;
@@ -156,8 +156,8 @@
method public java.util.List<androidx.credentials.CredentialOption> getCredentialOptions();
method public String? getOrigin();
method public boolean getPreferIdentityDocUi();
- method public boolean getPreferImmediatelyAvailableCredentials();
method public android.content.ComponentName? getPreferUiBrandingComponentName();
+ method public boolean preferImmediatelyAvailableCredentials();
property public final java.util.List<androidx.credentials.CredentialOption> credentialOptions;
property public final String? origin;
property public final boolean preferIdentityDocUi;
diff --git a/credentials/credentials/build.gradle b/credentials/credentials/build.gradle
index e869105..6e32da8 100644
--- a/credentials/credentials/build.gradle
+++ b/credentials/credentials/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
@@ -55,4 +62,5 @@
type = LibraryType.PUBLISHED_LIBRARY
inceptionYear = "2022"
description = "Android Credentials Library"
+ metalavaK2UastEnabled = true
}
diff --git a/credentials/credentials/samples/build.gradle b/credentials/credentials/samples/build.gradle
index 885df849..7f1665e 100644
--- a/credentials/credentials/samples/build.gradle
+++ b/credentials/credentials/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/cursoradapter/cursoradapter/build.gradle b/cursoradapter/cursoradapter/build.gradle
index cff7d37..6f45661 100644
--- a/cursoradapter/cursoradapter/build.gradle
+++ b/cursoradapter/cursoradapter/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/customview/customview-poolingcontainer/build.gradle b/customview/customview-poolingcontainer/build.gradle
index d0bbaa2..babd09f 100644
--- a/customview/customview-poolingcontainer/build.gradle
+++ b/customview/customview-poolingcontainer/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/customview/customview/build.gradle b/customview/customview/build.gradle
index b9b8b46..83658ba 100644
--- a/customview/customview/build.gradle
+++ b/customview/customview/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/datastore/datastore-benchmark/build.gradle b/datastore/datastore-benchmark/build.gradle
index 97ed619..3a06fc9 100644
--- a/datastore/datastore-benchmark/build.gradle
+++ b/datastore/datastore-benchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/datastore/datastore-compose-samples/build.gradle b/datastore/datastore-compose-samples/build.gradle
index dcb75af..698b179 100644
--- a/datastore/datastore-compose-samples/build.gradle
+++ b/datastore/datastore-compose-samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
diff --git a/datastore/datastore-core-okio/build.gradle b/datastore/datastore-core-okio/build.gradle
index 75c82c7..1c3b505 100644
--- a/datastore/datastore-core-okio/build.gradle
+++ b/datastore/datastore-core-okio/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/datastore/datastore-core/build.gradle b/datastore/datastore-core/build.gradle
index 2416171..16e0319 100644
--- a/datastore/datastore-core/build.gradle
+++ b/datastore/datastore-core/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/datastore/datastore-preferences-core/build.gradle b/datastore/datastore-preferences-core/build.gradle
index ce4f663..712741f 100644
--- a/datastore/datastore-preferences-core/build.gradle
+++ b/datastore/datastore-preferences-core/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.KmpPlatformsKt
import androidx.build.LibraryType
diff --git a/datastore/datastore-preferences-proto/build.gradle b/datastore/datastore-preferences-proto/build.gradle
index 0d18af0c..d5b5bb1 100644
--- a/datastore/datastore-preferences-proto/build.gradle
+++ b/datastore/datastore-preferences-proto/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/datastore/datastore-preferences-rxjava2/build.gradle b/datastore/datastore-preferences-rxjava2/build.gradle
index 409ee90..31c980d 100644
--- a/datastore/datastore-preferences-rxjava2/build.gradle
+++ b/datastore/datastore-preferences-rxjava2/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/datastore/datastore-preferences-rxjava3/build.gradle b/datastore/datastore-preferences-rxjava3/build.gradle
index 1585714..758d348 100644
--- a/datastore/datastore-preferences-rxjava3/build.gradle
+++ b/datastore/datastore-preferences-rxjava3/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/datastore/datastore-preferences/build.gradle b/datastore/datastore-preferences/build.gradle
index e0295f2c..f4ce242 100644
--- a/datastore/datastore-preferences/build.gradle
+++ b/datastore/datastore-preferences/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.PlatformIdentifier
import androidx.build.Publish
diff --git a/datastore/datastore-proto/build.gradle b/datastore/datastore-proto/build.gradle
index a9cd4cb1..6dce7f3 100644
--- a/datastore/datastore-proto/build.gradle
+++ b/datastore/datastore-proto/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/datastore/datastore-rxjava2/build.gradle b/datastore/datastore-rxjava2/build.gradle
index b5f73de..87f304f 100644
--- a/datastore/datastore-rxjava2/build.gradle
+++ b/datastore/datastore-rxjava2/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/datastore/datastore-rxjava3/build.gradle b/datastore/datastore-rxjava3/build.gradle
index 4c93912..7c50719 100644
--- a/datastore/datastore-rxjava3/build.gradle
+++ b/datastore/datastore-rxjava3/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/datastore/datastore-sampleapp/build.gradle b/datastore/datastore-sampleapp/build.gradle
index 4fd7663..9a94612 100644
--- a/datastore/datastore-sampleapp/build.gradle
+++ b/datastore/datastore-sampleapp/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
diff --git a/datastore/datastore/build.gradle b/datastore/datastore/build.gradle
index 1170050..8189c7a 100644
--- a/datastore/datastore/build.gradle
+++ b/datastore/datastore/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/development/project-creator/compose-template/groupId/artifactId/build.gradle b/development/project-creator/compose-template/groupId/artifactId/build.gradle
index e381824..ce8f88d 100644
--- a/development/project-creator/compose-template/groupId/artifactId/build.gradle
+++ b/development/project-creator/compose-template/groupId/artifactId/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/development/project-creator/java-template/groupId/artifactId/build.gradle b/development/project-creator/java-template/groupId/artifactId/build.gradle
index e1af3b3..8ea8a3a 100644
--- a/development/project-creator/java-template/groupId/artifactId/build.gradle
+++ b/development/project-creator/java-template/groupId/artifactId/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/development/project-creator/kotlin-template/groupId/artifactId/build.gradle b/development/project-creator/kotlin-template/groupId/artifactId/build.gradle
index 33feb6d..2b85968 100644
--- a/development/project-creator/kotlin-template/groupId/artifactId/build.gradle
+++ b/development/project-creator/kotlin-template/groupId/artifactId/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/development/project-creator/native-template/groupId/artifactId/build.gradle b/development/project-creator/native-template/groupId/artifactId/build.gradle
index ca86ac6d..69b0a95 100644
--- a/development/project-creator/native-template/groupId/artifactId/build.gradle
+++ b/development/project-creator/native-template/groupId/artifactId/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/docs-public/build.gradle b/docs-public/build.gradle
index bb4b195..6cdb2b3 100644
--- a/docs-public/build.gradle
+++ b/docs-public/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
plugins {
id("com.android.library")
id("AndroidXDocsPlugin")
diff --git a/docs-tip-of-tree/build.gradle b/docs-tip-of-tree/build.gradle
index 9a22b16..2aa2e0b 100644
--- a/docs-tip-of-tree/build.gradle
+++ b/docs-tip-of-tree/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
plugins {
id("com.android.library")
id("AndroidXDocsPlugin")
diff --git a/documentfile/documentfile/build.gradle b/documentfile/documentfile/build.gradle
index b0698e5..4ed5624 100644
--- a/documentfile/documentfile/build.gradle
+++ b/documentfile/documentfile/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/draganddrop/draganddrop/build.gradle b/draganddrop/draganddrop/build.gradle
index 03f1d44..746f3d5 100644
--- a/draganddrop/draganddrop/build.gradle
+++ b/draganddrop/draganddrop/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/drawerlayout/drawerlayout/build.gradle b/drawerlayout/drawerlayout/build.gradle
index 37999ce..296b10f 100644
--- a/drawerlayout/drawerlayout/build.gradle
+++ b/drawerlayout/drawerlayout/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/dynamicanimation/dynamicanimation-ktx/build.gradle b/dynamicanimation/dynamicanimation-ktx/build.gradle
index 47311f5..8fde43d 100644
--- a/dynamicanimation/dynamicanimation-ktx/build.gradle
+++ b/dynamicanimation/dynamicanimation-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/dynamicanimation/dynamicanimation/build.gradle b/dynamicanimation/dynamicanimation/build.gradle
index 28dc9a3..218ec79 100644
--- a/dynamicanimation/dynamicanimation/build.gradle
+++ b/dynamicanimation/dynamicanimation/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/emoji/emoji-appcompat/build.gradle b/emoji/emoji-appcompat/build.gradle
index e4dcd44..2260797 100644
--- a/emoji/emoji-appcompat/build.gradle
+++ b/emoji/emoji-appcompat/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/emoji/emoji-bundled/build.gradle b/emoji/emoji-bundled/build.gradle
index d040960a..b6fa457c 100644
--- a/emoji/emoji-bundled/build.gradle
+++ b/emoji/emoji-bundled/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/emoji/emoji/build.gradle b/emoji/emoji/build.gradle
index e57794a..86a9825 100644
--- a/emoji/emoji/build.gradle
+++ b/emoji/emoji/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.Publish
diff --git a/emoji2/emoji2-benchmark/build.gradle b/emoji2/emoji2-benchmark/build.gradle
index 63be59e..a7db4fa 100644
--- a/emoji2/emoji2-benchmark/build.gradle
+++ b/emoji2/emoji2-benchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/emoji2/emoji2-bundled/build.gradle b/emoji2/emoji2-bundled/build.gradle
index 8d7759f..ebd10e7 100644
--- a/emoji2/emoji2-bundled/build.gradle
+++ b/emoji2/emoji2-bundled/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/emoji2/emoji2-emojipicker/api/current.txt b/emoji2/emoji2-emojipicker/api/current.txt
index 65d3ad7..8f56c18b 100644
--- a/emoji2/emoji2-emojipicker/api/current.txt
+++ b/emoji2/emoji2-emojipicker/api/current.txt
@@ -29,13 +29,13 @@
}
public interface RecentEmojiProvider {
- method public suspend Object? getRecentEmojiList(kotlin.coroutines.Continuation<? super java.util.List<? extends java.lang.String>>);
+ method public suspend Object? getRecentEmojiList(kotlin.coroutines.Continuation<? super java.util.List<java.lang.String>>);
method public void recordSelection(String emoji);
}
public final class RecentEmojiProviderAdapter implements androidx.emoji2.emojipicker.RecentEmojiProvider {
ctor public RecentEmojiProviderAdapter(androidx.emoji2.emojipicker.RecentEmojiAsyncProvider recentEmojiAsyncProvider);
- method public suspend Object? getRecentEmojiList(kotlin.coroutines.Continuation<? super java.util.List<? extends java.lang.String>>);
+ method public suspend Object? getRecentEmojiList(kotlin.coroutines.Continuation<? super java.util.List<java.lang.String>>);
method public void recordSelection(String emoji);
}
diff --git a/emoji2/emoji2-emojipicker/api/restricted_current.txt b/emoji2/emoji2-emojipicker/api/restricted_current.txt
index 65d3ad7..8f56c18b 100644
--- a/emoji2/emoji2-emojipicker/api/restricted_current.txt
+++ b/emoji2/emoji2-emojipicker/api/restricted_current.txt
@@ -29,13 +29,13 @@
}
public interface RecentEmojiProvider {
- method public suspend Object? getRecentEmojiList(kotlin.coroutines.Continuation<? super java.util.List<? extends java.lang.String>>);
+ method public suspend Object? getRecentEmojiList(kotlin.coroutines.Continuation<? super java.util.List<java.lang.String>>);
method public void recordSelection(String emoji);
}
public final class RecentEmojiProviderAdapter implements androidx.emoji2.emojipicker.RecentEmojiProvider {
ctor public RecentEmojiProviderAdapter(androidx.emoji2.emojipicker.RecentEmojiAsyncProvider recentEmojiAsyncProvider);
- method public suspend Object? getRecentEmojiList(kotlin.coroutines.Continuation<? super java.util.List<? extends java.lang.String>>);
+ method public suspend Object? getRecentEmojiList(kotlin.coroutines.Continuation<? super java.util.List<java.lang.String>>);
method public void recordSelection(String emoji);
}
diff --git a/emoji2/emoji2-emojipicker/build.gradle b/emoji2/emoji2-emojipicker/build.gradle
index b0be4a0..f160015 100644
--- a/emoji2/emoji2-emojipicker/build.gradle
+++ b/emoji2/emoji2-emojipicker/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/emoji2/emoji2-views-helper/build.gradle b/emoji2/emoji2-views-helper/build.gradle
index 5e5a39a..99a3bfb 100644
--- a/emoji2/emoji2-views-helper/build.gradle
+++ b/emoji2/emoji2-views-helper/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/emoji2/emoji2-views/build.gradle b/emoji2/emoji2-views/build.gradle
index 572be41..6295ab4 100644
--- a/emoji2/emoji2-views/build.gradle
+++ b/emoji2/emoji2-views/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/emoji2/emoji2/build.gradle b/emoji2/emoji2/build.gradle
index 4323a36..732dc1c 100644
--- a/emoji2/emoji2/build.gradle
+++ b/emoji2/emoji2/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.Publish
diff --git a/enterprise/enterprise-feedback-testing/build.gradle b/enterprise/enterprise-feedback-testing/build.gradle
index 4fcdcd9..7f2a7b0 100644
--- a/enterprise/enterprise-feedback-testing/build.gradle
+++ b/enterprise/enterprise-feedback-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/enterprise/enterprise-feedback/build.gradle b/enterprise/enterprise-feedback/build.gradle
index b776679..6e907ba 100644
--- a/enterprise/enterprise-feedback/build.gradle
+++ b/enterprise/enterprise-feedback/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/exifinterface/exifinterface/build.gradle b/exifinterface/exifinterface/build.gradle
index 8ab8192..b1f2065 100644
--- a/exifinterface/exifinterface/build.gradle
+++ b/exifinterface/exifinterface/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/external/libyuv/build.gradle b/external/libyuv/build.gradle
index 7b8f935..6bf1dae 100644
--- a/external/libyuv/build.gradle
+++ b/external/libyuv/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/external/paparazzi/paparazzi-agent/build.gradle b/external/paparazzi/paparazzi-agent/build.gradle
index dbe1124..802d417 100644
--- a/external/paparazzi/paparazzi-agent/build.gradle
+++ b/external/paparazzi/paparazzi-agent/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/external/paparazzi/paparazzi/build.gradle b/external/paparazzi/paparazzi/build.gradle
index 8e87582..bc018ac 100644
--- a/external/paparazzi/paparazzi/build.gradle
+++ b/external/paparazzi/paparazzi/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.gradle.api.artifacts.transform.TransformParameters.None
import java.util.zip.ZipInputStream
diff --git a/fragment/fragment-ktx/build.gradle b/fragment/fragment-ktx/build.gradle
index c614be4..83d6c56 100644
--- a/fragment/fragment-ktx/build.gradle
+++ b/fragment/fragment-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/fragment/fragment-lint/build.gradle b/fragment/fragment-lint/build.gradle
index b4f8162..1a48d86 100644
--- a/fragment/fragment-lint/build.gradle
+++ b/fragment/fragment-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/fragment/fragment-testing-lint/build.gradle b/fragment/fragment-testing-lint/build.gradle
index a9641c7..b91fa08 100644
--- a/fragment/fragment-testing-lint/build.gradle
+++ b/fragment/fragment-testing-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/fragment/fragment-testing-manifest-lint/build.gradle b/fragment/fragment-testing-manifest-lint/build.gradle
index 9b4b9f4..e82f5a8 100644
--- a/fragment/fragment-testing-manifest-lint/build.gradle
+++ b/fragment/fragment-testing-manifest-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/fragment/fragment-testing-manifest/build.gradle b/fragment/fragment-testing-manifest/build.gradle
index e45be5e..4f29962 100644
--- a/fragment/fragment-testing-manifest/build.gradle
+++ b/fragment/fragment-testing-manifest/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/fragment/fragment-testing/build.gradle b/fragment/fragment-testing/build.gradle
index c9ab626..32c0c97 100644
--- a/fragment/fragment-testing/build.gradle
+++ b/fragment/fragment-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/fragment/fragment-truth/build.gradle b/fragment/fragment-truth/build.gradle
index e4a0733..6bdf72d 100644
--- a/fragment/fragment-truth/build.gradle
+++ b/fragment/fragment-truth/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/fragment/fragment/build.gradle b/fragment/fragment/build.gradle
index b04638b..352bb4c 100644
--- a/fragment/fragment/build.gradle
+++ b/fragment/fragment/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@@ -36,7 +43,7 @@
api("androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1")
implementation("androidx.profileinstaller:profileinstaller:1.3.0")
api("androidx.savedstate:savedstate:1.2.1")
- api("androidx.annotation:annotation-experimental:1.0.0")
+ api(projectOrArtifact(":annotation:annotation-experimental"))
api(libs.kotlinStdlib)
androidTestImplementation("androidx.appcompat:appcompat:1.1.0", {
diff --git a/fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java b/fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
index fa5874e..7e09f69 100644
--- a/fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
+++ b/fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
@@ -1627,7 +1627,7 @@
* </p>
* <p>
* Calling this API for permissions already granted to your app would show UI
- * to the user to decided whether the app can still hold these permissions. This
+ * to the user to decide whether the app can still hold these permissions. This
* can be useful if the way your app uses the data guarded by the permissions
* changes significantly.
* </p>
diff --git a/glance/glance-appwidget-preview/build.gradle b/glance/glance-appwidget-preview/build.gradle
index f7d91d6..5075396 100644
--- a/glance/glance-appwidget-preview/build.gradle
+++ b/glance/glance-appwidget-preview/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/glance/glance-appwidget-proto/build.gradle b/glance/glance-appwidget-proto/build.gradle
index 0829f6a..2458964 100644
--- a/glance/glance-appwidget-proto/build.gradle
+++ b/glance/glance-appwidget-proto/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/glance/glance-appwidget-testing/build.gradle b/glance/glance-appwidget-testing/build.gradle
index 8d5db0b..97bf0fc 100644
--- a/glance/glance-appwidget-testing/build.gradle
+++ b/glance/glance-appwidget-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/glance/glance-appwidget-testing/samples/build.gradle b/glance/glance-appwidget-testing/samples/build.gradle
index a5da7fa1..23365ef 100644
--- a/glance/glance-appwidget-testing/samples/build.gradle
+++ b/glance/glance-appwidget-testing/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/glance/glance-appwidget/api/current.ignore b/glance/glance-appwidget/api/current.ignore
index 7467a7d..aeea2e8 100644
--- a/glance/glance-appwidget/api/current.ignore
+++ b/glance/glance-appwidget/api/current.ignore
@@ -95,3 +95,7 @@
Attempted to remove default value from parameter arg7 in androidx.glance.appwidget.AppWidgetComposerKt.compose
DefaultValueChange: androidx.glance.appwidget.GlanceAppWidgetManager#requestPinGlanceAppWidget(Class<T>, androidx.glance.appwidget.GlanceAppWidget, Object, android.app.PendingIntent, kotlin.coroutines.Continuation<? super java.lang.Boolean>) parameter #4:
Attempted to remove default value from parameter arg5 in androidx.glance.appwidget.GlanceAppWidgetManager.requestPinGlanceAppWidget
+
+
+RemovedMethod: androidx.glance.appwidget.GlanceAppWidgetKt#updateIf(androidx.glance.appwidget.GlanceAppWidget, android.content.Context, kotlin.jvm.functions.Function1<? super java.lang.State,java.lang.Boolean>):
+ Removed method androidx.glance.appwidget.GlanceAppWidgetKt.updateIf(androidx.glance.appwidget.GlanceAppWidget,android.content.Context,kotlin.jvm.functions.Function1<? super java.lang.State,java.lang.Boolean>)
diff --git a/glance/glance-appwidget/api/current.txt b/glance/glance-appwidget/api/current.txt
index 1280cbb..018ff98 100644
--- a/glance/glance-appwidget/api/current.txt
+++ b/glance/glance-appwidget/api/current.txt
@@ -67,7 +67,7 @@
public final class GlanceAppWidgetKt {
method public static suspend Object? provideContent(androidx.glance.appwidget.GlanceAppWidget, kotlin.jvm.functions.Function0<kotlin.Unit> content, kotlin.coroutines.Continuation<?>);
method public static suspend Object? updateAll(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, kotlin.coroutines.Continuation<? super kotlin.Unit>);
- method public static suspend inline <reified State> void updateIf(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, kotlin.jvm.functions.Function1<? super State,java.lang.Boolean> predicate);
+ method public static suspend inline <reified State> Object? updateIf(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, kotlin.jvm.functions.Function1<? super State,java.lang.Boolean> predicate, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class GlanceAppWidgetManager {
diff --git a/glance/glance-appwidget/api/restricted_current.ignore b/glance/glance-appwidget/api/restricted_current.ignore
index 7467a7d..aeea2e8 100644
--- a/glance/glance-appwidget/api/restricted_current.ignore
+++ b/glance/glance-appwidget/api/restricted_current.ignore
@@ -95,3 +95,7 @@
Attempted to remove default value from parameter arg7 in androidx.glance.appwidget.AppWidgetComposerKt.compose
DefaultValueChange: androidx.glance.appwidget.GlanceAppWidgetManager#requestPinGlanceAppWidget(Class<T>, androidx.glance.appwidget.GlanceAppWidget, Object, android.app.PendingIntent, kotlin.coroutines.Continuation<? super java.lang.Boolean>) parameter #4:
Attempted to remove default value from parameter arg5 in androidx.glance.appwidget.GlanceAppWidgetManager.requestPinGlanceAppWidget
+
+
+RemovedMethod: androidx.glance.appwidget.GlanceAppWidgetKt#updateIf(androidx.glance.appwidget.GlanceAppWidget, android.content.Context, kotlin.jvm.functions.Function1<? super java.lang.State,java.lang.Boolean>):
+ Removed method androidx.glance.appwidget.GlanceAppWidgetKt.updateIf(androidx.glance.appwidget.GlanceAppWidget,android.content.Context,kotlin.jvm.functions.Function1<? super java.lang.State,java.lang.Boolean>)
diff --git a/glance/glance-appwidget/api/restricted_current.txt b/glance/glance-appwidget/api/restricted_current.txt
index 1280cbb..018ff98 100644
--- a/glance/glance-appwidget/api/restricted_current.txt
+++ b/glance/glance-appwidget/api/restricted_current.txt
@@ -67,7 +67,7 @@
public final class GlanceAppWidgetKt {
method public static suspend Object? provideContent(androidx.glance.appwidget.GlanceAppWidget, kotlin.jvm.functions.Function0<kotlin.Unit> content, kotlin.coroutines.Continuation<?>);
method public static suspend Object? updateAll(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, kotlin.coroutines.Continuation<? super kotlin.Unit>);
- method public static suspend inline <reified State> void updateIf(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, kotlin.jvm.functions.Function1<? super State,java.lang.Boolean> predicate);
+ method public static suspend inline <reified State> Object? updateIf(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, kotlin.jvm.functions.Function1<? super State,java.lang.Boolean> predicate, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class GlanceAppWidgetManager {
diff --git a/glance/glance-appwidget/build.gradle b/glance/glance-appwidget/build.gradle
index 57f3a0e..ca03f23 100644
--- a/glance/glance-appwidget/build.gradle
+++ b/glance/glance-appwidget/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
import androidx.glance.appwidget.layoutgenerator.gradle.LayoutGeneratorTask
diff --git a/glance/glance-appwidget/glance-layout-generator/build.gradle b/glance/glance-appwidget/glance-layout-generator/build.gradle
index 59f58d8..28eb120 100644
--- a/glance/glance-appwidget/glance-layout-generator/build.gradle
+++ b/glance/glance-appwidget/glance-layout-generator/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/glance/glance-appwidget/samples/build.gradle b/glance/glance-appwidget/samples/build.gradle
index 559a527..01f1cd7 100644
--- a/glance/glance-appwidget/samples/build.gradle
+++ b/glance/glance-appwidget/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/glance/glance-material/build.gradle b/glance/glance-material/build.gradle
index 84e3be0..21fc469 100644
--- a/glance/glance-material/build.gradle
+++ b/glance/glance-material/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/glance/glance-material3/build.gradle b/glance/glance-material3/build.gradle
index 594ebec..a065893 100644
--- a/glance/glance-material3/build.gradle
+++ b/glance/glance-material3/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/glance/glance-preview/build.gradle b/glance/glance-preview/build.gradle
index 4961b80..ac6f17c 100644
--- a/glance/glance-preview/build.gradle
+++ b/glance/glance-preview/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/glance/glance-template/build.gradle b/glance/glance-template/build.gradle
index 6ea5c4c..dec7cd8 100644
--- a/glance/glance-template/build.gradle
+++ b/glance/glance-template/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
import androidx.build.AndroidXComposePlugin
@@ -42,7 +49,7 @@
implementation(libs.kotlinStdlib)
// Force upgrade since 1.2.0 is not compatible with latest lint.
- implementation("androidx.annotation:annotation-experimental:1.3.0")
+ implementation(project(":annotation:annotation-experimental"))
testImplementation(libs.robolectric)
testImplementation(libs.testCore)
diff --git a/glance/glance-testing/build.gradle b/glance/glance-testing/build.gradle
index 992d35f..80a720d 100644
--- a/glance/glance-testing/build.gradle
+++ b/glance/glance-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/glance/glance-wear-tiles-preview/build.gradle b/glance/glance-wear-tiles-preview/build.gradle
index 13c4d10..7dec30a 100644
--- a/glance/glance-wear-tiles-preview/build.gradle
+++ b/glance/glance-wear-tiles-preview/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/glance/glance-wear-tiles/build.gradle b/glance/glance-wear-tiles/build.gradle
index e158ee6..9d6ce410 100644
--- a/glance/glance-wear-tiles/build.gradle
+++ b/glance/glance-wear-tiles/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/glance/glance/build.gradle b/glance/glance/build.gradle
index 0a8e136..43f0cde 100644
--- a/glance/glance/build.gradle
+++ b/glance/glance/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
@@ -39,7 +46,7 @@
implementation(libs.kotlinStdlib)
// Force upgrade since 1.2.0 is not compatible with latest lint.
- implementation("androidx.annotation:annotation-experimental:1.3.0")
+ implementation(project(":annotation:annotation-experimental"))
testImplementation(libs.robolectric)
testImplementation(libs.testCore)
diff --git a/graphics/filters/filters/build.gradle b/graphics/filters/filters/build.gradle
index 72a3ba7..d6406c1 100644
--- a/graphics/filters/filters/build.gradle
+++ b/graphics/filters/filters/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
@@ -36,7 +43,7 @@
implementation('androidx.media3:media3-transformer:' + media3Version)
// Force upgrade since 1.2.0 is not compatible with latest lint.
- implementation("androidx.annotation:annotation-experimental:1.3.0")
+ implementation(project(":annotation:annotation-experimental"))
// Test dependencies
androidTestImplementation(libs.testExtJunit)
diff --git a/graphics/graphics-core/build.gradle b/graphics/graphics-core/build.gradle
index 9dfe084..5841931 100644
--- a/graphics/graphics-core/build.gradle
+++ b/graphics/graphics-core/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
@@ -26,7 +33,7 @@
dependencies {
api(libs.kotlinStdlib)
implementation(libs.kotlinCoroutinesAndroid)
- implementation("androidx.annotation:annotation-experimental:1.1.0-rc01")
+ implementation(project(":annotation:annotation-experimental"))
implementation("androidx.core:core:1.8.0")
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
diff --git a/graphics/graphics-path/build.gradle b/graphics/graphics-path/build.gradle
index 7eed6d8..091c671 100644
--- a/graphics/graphics-path/build.gradle
+++ b/graphics/graphics-path/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/graphics/graphics-shapes/build.gradle b/graphics/graphics-shapes/build.gradle
index d7c1342..bc98beb 100644
--- a/graphics/graphics-shapes/build.gradle
+++ b/graphics/graphics-shapes/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/graphics/integration-tests/testapp-compose/build.gradle b/graphics/integration-tests/testapp-compose/build.gradle
index 18c6689..d41a1e4 100644
--- a/graphics/integration-tests/testapp-compose/build.gradle
+++ b/graphics/integration-tests/testapp-compose/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
/*
diff --git a/graphics/integration-tests/testapp/build.gradle b/graphics/integration-tests/testapp/build.gradle
index b536543..e191d19 100644
--- a/graphics/integration-tests/testapp/build.gradle
+++ b/graphics/integration-tests/testapp/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/gridlayout/gridlayout/build.gradle b/gridlayout/gridlayout/build.gradle
index f15724a..7de737b 100644
--- a/gridlayout/gridlayout/build.gradle
+++ b/gridlayout/gridlayout/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/health/connect/connect-client-proto/build.gradle b/health/connect/connect-client-proto/build.gradle
index 3b8ef21..82d73a0 100644
--- a/health/connect/connect-client-proto/build.gradle
+++ b/health/connect/connect-client-proto/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/health/connect/connect-client/api/current.txt b/health/connect/connect-client/api/current.txt
index 62d196e..65e848f 100644
--- a/health/connect/connect-client/api/current.txt
+++ b/health/connect/connect-client/api/current.txt
@@ -3,8 +3,8 @@
@kotlin.jvm.JvmDefaultWithCompatibility public interface HealthConnectClient {
method public suspend Object? aggregate(androidx.health.connect.client.request.AggregateRequest request, kotlin.coroutines.Continuation<? super androidx.health.connect.client.aggregate.AggregationResult>);
- method public suspend Object? aggregateGroupByDuration(androidx.health.connect.client.request.AggregateGroupByDurationRequest request, kotlin.coroutines.Continuation<? super java.util.List<? extends androidx.health.connect.client.aggregate.AggregationResultGroupedByDuration>>);
- method public suspend Object? aggregateGroupByPeriod(androidx.health.connect.client.request.AggregateGroupByPeriodRequest request, kotlin.coroutines.Continuation<? super java.util.List<? extends androidx.health.connect.client.aggregate.AggregationResultGroupedByPeriod>>);
+ method public suspend Object? aggregateGroupByDuration(androidx.health.connect.client.request.AggregateGroupByDurationRequest request, kotlin.coroutines.Continuation<? super java.util.List<androidx.health.connect.client.aggregate.AggregationResultGroupedByDuration>>);
+ method public suspend Object? aggregateGroupByPeriod(androidx.health.connect.client.request.AggregateGroupByPeriodRequest request, kotlin.coroutines.Continuation<? super java.util.List<androidx.health.connect.client.aggregate.AggregationResultGroupedByPeriod>>);
method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.connect.client.records.Record> recordType, androidx.health.connect.client.time.TimeRangeFilter timeRangeFilter, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.connect.client.records.Record> recordType, java.util.List<java.lang.String> recordIdsList, java.util.List<java.lang.String> clientRecordIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public suspend Object? getChanges(String changesToken, kotlin.coroutines.Continuation<? super androidx.health.connect.client.response.ChangesResponse>);
@@ -44,15 +44,15 @@
}
public final class HealthConnectClientExt {
- method public static suspend inline <reified T extends androidx.health.connect.client.records.Record> void deleteRecords(androidx.health.connect.client.HealthConnectClient, androidx.health.connect.client.time.TimeRangeFilter timeRangeFilter);
- method public static suspend inline <reified T extends androidx.health.connect.client.records.Record> void deleteRecords(androidx.health.connect.client.HealthConnectClient, java.util.List<java.lang.String> recordIdsList, java.util.List<java.lang.String> clientRecordIdsList);
- method public static suspend inline <reified T extends androidx.health.connect.client.records.Record> androidx.health.connect.client.response.ReadRecordResponse<T> readRecord(androidx.health.connect.client.HealthConnectClient, String recordId);
+ method public static suspend inline <reified T extends androidx.health.connect.client.records.Record> Object? deleteRecords(androidx.health.connect.client.HealthConnectClient, androidx.health.connect.client.time.TimeRangeFilter timeRangeFilter, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend inline <reified T extends androidx.health.connect.client.records.Record> Object? deleteRecords(androidx.health.connect.client.HealthConnectClient, java.util.List<java.lang.String> recordIdsList, java.util.List<java.lang.String> clientRecordIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend inline <reified T extends androidx.health.connect.client.records.Record> Object? readRecord(androidx.health.connect.client.HealthConnectClient, String recordId, kotlin.coroutines.Continuation<? super androidx.health.connect.client.response.ReadRecordResponse<T>>);
}
@kotlin.jvm.JvmDefaultWithCompatibility public interface PermissionController {
method public static androidx.activity.result.contract.ActivityResultContract<java.util.Set<java.lang.String>,java.util.Set<java.lang.String>> createRequestPermissionResultContract();
method public static androidx.activity.result.contract.ActivityResultContract<java.util.Set<java.lang.String>,java.util.Set<java.lang.String>> createRequestPermissionResultContract(optional String providerPackageName);
- method public suspend Object? getGrantedPermissions(kotlin.coroutines.Continuation<? super java.util.Set<? extends java.lang.String>>);
+ method public suspend Object? getGrantedPermissions(kotlin.coroutines.Continuation<? super java.util.Set<java.lang.String>>);
method public suspend Object? revokeAllPermissions(kotlin.coroutines.Continuation<? super kotlin.Unit>);
field public static final androidx.health.connect.client.PermissionController.Companion Companion;
}
diff --git a/health/connect/connect-client/api/restricted_current.txt b/health/connect/connect-client/api/restricted_current.txt
index ea2fea8..f249592 100644
--- a/health/connect/connect-client/api/restricted_current.txt
+++ b/health/connect/connect-client/api/restricted_current.txt
@@ -3,8 +3,8 @@
@kotlin.jvm.JvmDefaultWithCompatibility public interface HealthConnectClient {
method public suspend Object? aggregate(androidx.health.connect.client.request.AggregateRequest request, kotlin.coroutines.Continuation<? super androidx.health.connect.client.aggregate.AggregationResult>);
- method public suspend Object? aggregateGroupByDuration(androidx.health.connect.client.request.AggregateGroupByDurationRequest request, kotlin.coroutines.Continuation<? super java.util.List<? extends androidx.health.connect.client.aggregate.AggregationResultGroupedByDuration>>);
- method public suspend Object? aggregateGroupByPeriod(androidx.health.connect.client.request.AggregateGroupByPeriodRequest request, kotlin.coroutines.Continuation<? super java.util.List<? extends androidx.health.connect.client.aggregate.AggregationResultGroupedByPeriod>>);
+ method public suspend Object? aggregateGroupByDuration(androidx.health.connect.client.request.AggregateGroupByDurationRequest request, kotlin.coroutines.Continuation<? super java.util.List<androidx.health.connect.client.aggregate.AggregationResultGroupedByDuration>>);
+ method public suspend Object? aggregateGroupByPeriod(androidx.health.connect.client.request.AggregateGroupByPeriodRequest request, kotlin.coroutines.Continuation<? super java.util.List<androidx.health.connect.client.aggregate.AggregationResultGroupedByPeriod>>);
method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.connect.client.records.Record> recordType, androidx.health.connect.client.time.TimeRangeFilter timeRangeFilter, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.connect.client.records.Record> recordType, java.util.List<java.lang.String> recordIdsList, java.util.List<java.lang.String> clientRecordIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public suspend Object? getChanges(String changesToken, kotlin.coroutines.Continuation<? super androidx.health.connect.client.response.ChangesResponse>);
@@ -44,15 +44,15 @@
}
public final class HealthConnectClientExt {
- method public static suspend inline <reified T extends androidx.health.connect.client.records.Record> void deleteRecords(androidx.health.connect.client.HealthConnectClient, androidx.health.connect.client.time.TimeRangeFilter timeRangeFilter);
- method public static suspend inline <reified T extends androidx.health.connect.client.records.Record> void deleteRecords(androidx.health.connect.client.HealthConnectClient, java.util.List<java.lang.String> recordIdsList, java.util.List<java.lang.String> clientRecordIdsList);
- method public static suspend inline <reified T extends androidx.health.connect.client.records.Record> androidx.health.connect.client.response.ReadRecordResponse<T> readRecord(androidx.health.connect.client.HealthConnectClient, String recordId);
+ method public static suspend inline <reified T extends androidx.health.connect.client.records.Record> Object? deleteRecords(androidx.health.connect.client.HealthConnectClient, androidx.health.connect.client.time.TimeRangeFilter timeRangeFilter, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend inline <reified T extends androidx.health.connect.client.records.Record> Object? deleteRecords(androidx.health.connect.client.HealthConnectClient, java.util.List<java.lang.String> recordIdsList, java.util.List<java.lang.String> clientRecordIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend inline <reified T extends androidx.health.connect.client.records.Record> Object? readRecord(androidx.health.connect.client.HealthConnectClient, String recordId, kotlin.coroutines.Continuation<? super androidx.health.connect.client.response.ReadRecordResponse<T>>);
}
@kotlin.jvm.JvmDefaultWithCompatibility public interface PermissionController {
method public static androidx.activity.result.contract.ActivityResultContract<java.util.Set<java.lang.String>,java.util.Set<java.lang.String>> createRequestPermissionResultContract();
method public static androidx.activity.result.contract.ActivityResultContract<java.util.Set<java.lang.String>,java.util.Set<java.lang.String>> createRequestPermissionResultContract(optional String providerPackageName);
- method public suspend Object? getGrantedPermissions(kotlin.coroutines.Continuation<? super java.util.Set<? extends java.lang.String>>);
+ method public suspend Object? getGrantedPermissions(kotlin.coroutines.Continuation<? super java.util.Set<java.lang.String>>);
method public suspend Object? revokeAllPermissions(kotlin.coroutines.Continuation<? super kotlin.Unit>);
field public static final androidx.health.connect.client.PermissionController.Companion Companion;
}
diff --git a/health/connect/connect-client/build.gradle b/health/connect/connect-client/build.gradle
index 106ef0d..d72c003 100644
--- a/health/connect/connect-client/build.gradle
+++ b/health/connect/connect-client/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/health/connect/connect-client/samples/build.gradle b/health/connect/connect-client/samples/build.gradle
index 5635618..08b7839 100644
--- a/health/connect/connect-client/samples/build.gradle
+++ b/health/connect/connect-client/samples/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.LibraryType
diff --git a/health/health-services-client/api/current.ignore b/health/health-services-client/api/current.ignore
new file mode 100644
index 0000000..096df2d
--- /dev/null
+++ b/health/health-services-client/api/current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+RemovedMethod: androidx.health.services.client.data.PassiveListenerConfig#getShouldUserActivityInfoBeRequested():
+ Removed method androidx.health.services.client.data.PassiveListenerConfig.getShouldUserActivityInfoBeRequested()
diff --git a/health/health-services-client/api/current.txt b/health/health-services-client/api/current.txt
index 667e7d2..b13f7bd 100644
--- a/health/health-services-client/api/current.txt
+++ b/health/health-services-client/api/current.txt
@@ -852,7 +852,7 @@
method public java.util.Set<androidx.health.services.client.data.PassiveGoal> getDailyGoals();
method public java.util.Set<androidx.health.services.client.data.DataType<?,? extends androidx.health.services.client.data.DataPoint<?>>> getDataTypes();
method public java.util.Set<androidx.health.services.client.data.HealthEvent.Type> getHealthEventTypes();
- method public boolean getShouldUserActivityInfoBeRequested();
+ method public boolean shouldUserActivityInfoBeRequested();
property public final java.util.Set<androidx.health.services.client.data.PassiveGoal> dailyGoals;
property public final java.util.Set<androidx.health.services.client.data.DataType<?,? extends androidx.health.services.client.data.DataPoint<?>>> dataTypes;
property public final java.util.Set<androidx.health.services.client.data.HealthEvent.Type> healthEventTypes;
diff --git a/health/health-services-client/api/restricted_current.ignore b/health/health-services-client/api/restricted_current.ignore
new file mode 100644
index 0000000..096df2d
--- /dev/null
+++ b/health/health-services-client/api/restricted_current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+RemovedMethod: androidx.health.services.client.data.PassiveListenerConfig#getShouldUserActivityInfoBeRequested():
+ Removed method androidx.health.services.client.data.PassiveListenerConfig.getShouldUserActivityInfoBeRequested()
diff --git a/health/health-services-client/api/restricted_current.txt b/health/health-services-client/api/restricted_current.txt
index 5622eb4..d3191b4 100644
--- a/health/health-services-client/api/restricted_current.txt
+++ b/health/health-services-client/api/restricted_current.txt
@@ -854,7 +854,7 @@
method public java.util.Set<androidx.health.services.client.data.PassiveGoal> getDailyGoals();
method public java.util.Set<androidx.health.services.client.data.DataType<?,? extends androidx.health.services.client.data.DataPoint<?>>> getDataTypes();
method public java.util.Set<androidx.health.services.client.data.HealthEvent.Type> getHealthEventTypes();
- method public boolean getShouldUserActivityInfoBeRequested();
+ method public boolean shouldUserActivityInfoBeRequested();
property public final java.util.Set<androidx.health.services.client.data.PassiveGoal> dailyGoals;
property public final java.util.Set<androidx.health.services.client.data.DataType<?,? extends androidx.health.services.client.data.DataPoint<?>>> dataTypes;
property public final java.util.Set<androidx.health.services.client.data.HealthEvent.Type> healthEventTypes;
diff --git a/health/health-services-client/build.gradle b/health/health-services-client/build.gradle
index 4942dab..464b41f 100644
--- a/health/health-services-client/build.gradle
+++ b/health/health-services-client/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
@@ -80,4 +87,5 @@
mavenVersion = LibraryVersions.HEALTH_SERVICES_CLIENT
inceptionYear = "2021"
description = "This library helps developers create performant health applications in a platform agnostic way"
+ metalavaK2UastEnabled = true
}
diff --git a/heifwriter/heifwriter/build.gradle b/heifwriter/heifwriter/build.gradle
index 701ab8d..5470bcd 100644
--- a/heifwriter/heifwriter/build.gradle
+++ b/heifwriter/heifwriter/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/hilt/hilt-common/build.gradle b/hilt/hilt-common/build.gradle
index 51f0f2b..732fa4b 100644
--- a/hilt/hilt-common/build.gradle
+++ b/hilt/hilt-common/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/hilt/hilt-compiler/build.gradle b/hilt/hilt-compiler/build.gradle
index 0ec234f..7980e5f 100644
--- a/hilt/hilt-compiler/build.gradle
+++ b/hilt/hilt-compiler/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.SdkHelperKt
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/hilt/hilt-navigation-compose/build.gradle b/hilt/hilt-navigation-compose/build.gradle
index a6239a3..7f7b4a3 100644
--- a/hilt/hilt-navigation-compose/build.gradle
+++ b/hilt/hilt-navigation-compose/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/hilt/hilt-navigation-compose/samples/build.gradle b/hilt/hilt-navigation-compose/samples/build.gradle
index 625d18b..07de759 100644
--- a/hilt/hilt-navigation-compose/samples/build.gradle
+++ b/hilt/hilt-navigation-compose/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/hilt/hilt-navigation-fragment/build.gradle b/hilt/hilt-navigation-fragment/build.gradle
index 8039592..91175ad 100644
--- a/hilt/hilt-navigation-fragment/build.gradle
+++ b/hilt/hilt-navigation-fragment/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/hilt/hilt-navigation/build.gradle b/hilt/hilt-navigation/build.gradle
index ed6157a..4fe350f 100644
--- a/hilt/hilt-navigation/build.gradle
+++ b/hilt/hilt-navigation/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/hilt/hilt-work/build.gradle b/hilt/hilt-work/build.gradle
index a690f78..cde673d 100644
--- a/hilt/hilt-work/build.gradle
+++ b/hilt/hilt-work/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/input/input-motionprediction/build.gradle b/input/input-motionprediction/build.gradle
index 2eb82b9..cb3871b 100644
--- a/input/input-motionprediction/build.gradle
+++ b/input/input-motionprediction/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/inspection/inspection-gradle-plugin/build.gradle b/inspection/inspection-gradle-plugin/build.gradle
index f058543..fbb8824 100644
--- a/inspection/inspection-gradle-plugin/build.gradle
+++ b/inspection/inspection-gradle-plugin/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
import androidx.build.SdkResourceGenerator
diff --git a/inspection/inspection-testing/build.gradle b/inspection/inspection-testing/build.gradle
index f7b000e..56c6f36 100644
--- a/inspection/inspection-testing/build.gradle
+++ b/inspection/inspection-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/inspection/inspection/build.gradle b/inspection/inspection/build.gradle
index 89bdd45..8027038 100644
--- a/inspection/inspection/build.gradle
+++ b/inspection/inspection/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/interpolator/interpolator/build.gradle b/interpolator/interpolator/build.gradle
index 05b4ccd..7aad74f 100644
--- a/interpolator/interpolator/build.gradle
+++ b/interpolator/interpolator/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/javascriptengine/javascriptengine/build.gradle b/javascriptengine/javascriptengine/build.gradle
index b6684a5..9efbcfc 100644
--- a/javascriptengine/javascriptengine/build.gradle
+++ b/javascriptengine/javascriptengine/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/kruth/kruth/build.gradle b/kruth/kruth/build.gradle
index a383bb8..3a2ad51 100644
--- a/kruth/kruth/build.gradle
+++ b/kruth/kruth/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/leanback/leanback-grid/build.gradle b/leanback/leanback-grid/build.gradle
index 3183352..07a5aaf 100644
--- a/leanback/leanback-grid/build.gradle
+++ b/leanback/leanback-grid/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/leanback/leanback-paging/build.gradle b/leanback/leanback-paging/build.gradle
index 0bcaf3b..0191bc0 100644
--- a/leanback/leanback-paging/build.gradle
+++ b/leanback/leanback-paging/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/leanback/leanback-preference/build.gradle b/leanback/leanback-preference/build.gradle
index 9ec6a3f..18813bc 100644
--- a/leanback/leanback-preference/build.gradle
+++ b/leanback/leanback-preference/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/leanback/leanback-tab/build.gradle b/leanback/leanback-tab/build.gradle
index be1ace5..f764bc5 100644
--- a/leanback/leanback-tab/build.gradle
+++ b/leanback/leanback-tab/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/leanback/leanback/build.gradle b/leanback/leanback/build.gradle
index 7e42bc0..6244914 100644
--- a/leanback/leanback/build.gradle
+++ b/leanback/leanback/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
@@ -55,5 +62,6 @@
mavenVersion = LibraryVersions.LEANBACK
inceptionYear = "2014"
description = "Android Support Leanback v17"
+ metalavaK2UastEnabled = true
failOnDeprecationWarnings = false
}
diff --git a/libraryversions.toml b/libraryversions.toml
index 347aa2a..7cfeba5 100644
--- a/libraryversions.toml
+++ b/libraryversions.toml
@@ -94,7 +94,7 @@
LEANBACK_TAB = "1.1.0-beta01"
LEGACY = "1.1.0-alpha01"
LIBYUV = "0.1.0-dev01"
-LIFECYCLE = "2.7.0-rc01"
+LIFECYCLE = "2.8.0-alpha01"
LIFECYCLE_EXTENSIONS = "2.2.0"
LOADER = "1.2.0-alpha01"
MEDIA = "1.7.0-rc01"
diff --git a/lifecycle/integration-tests/incrementality/build.gradle b/lifecycle/integration-tests/incrementality/build.gradle
index 21dcdf0..3b547a5 100644
--- a/lifecycle/integration-tests/incrementality/build.gradle
+++ b/lifecycle/integration-tests/incrementality/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.SdkResourceGenerator
plugins {
diff --git a/lifecycle/lifecycle-common-java8/build.gradle b/lifecycle/lifecycle-common-java8/build.gradle
index 4de506b..6572b50 100644
--- a/lifecycle/lifecycle-common-java8/build.gradle
+++ b/lifecycle/lifecycle-common-java8/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/lifecycle/lifecycle-common/build.gradle b/lifecycle/lifecycle-common/build.gradle
index 1ce18f6..bc25ff6 100644
--- a/lifecycle/lifecycle-common/build.gradle
+++ b/lifecycle/lifecycle-common/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/lifecycle/lifecycle-compiler/build.gradle b/lifecycle/lifecycle-compiler/build.gradle
index 5a4e902..95ce2cf 100644
--- a/lifecycle/lifecycle-compiler/build.gradle
+++ b/lifecycle/lifecycle-compiler/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/lifecycle/lifecycle-extensions/build.gradle b/lifecycle/lifecycle-extensions/build.gradle
index 7915a16..23b5dbc 100644
--- a/lifecycle/lifecycle-extensions/build.gradle
+++ b/lifecycle/lifecycle-extensions/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/lifecycle/lifecycle-livedata-core-ktx-lint/build.gradle b/lifecycle/lifecycle-livedata-core-ktx-lint/build.gradle
index 59c894a..9699395 100644
--- a/lifecycle/lifecycle-livedata-core-ktx-lint/build.gradle
+++ b/lifecycle/lifecycle-livedata-core-ktx-lint/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/lifecycle/lifecycle-livedata-core-ktx/build.gradle b/lifecycle/lifecycle-livedata-core-ktx/build.gradle
index cc989bd..bd13060 100644
--- a/lifecycle/lifecycle-livedata-core-ktx/build.gradle
+++ b/lifecycle/lifecycle-livedata-core-ktx/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/lifecycle/lifecycle-livedata-core-truth/build.gradle b/lifecycle/lifecycle-livedata-core-truth/build.gradle
index 910f657..e743bd6 100644
--- a/lifecycle/lifecycle-livedata-core-truth/build.gradle
+++ b/lifecycle/lifecycle-livedata-core-truth/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/lifecycle/lifecycle-livedata-core/build.gradle b/lifecycle/lifecycle-livedata-core/build.gradle
index 878e9a5..772ba3f 100644
--- a/lifecycle/lifecycle-livedata-core/build.gradle
+++ b/lifecycle/lifecycle-livedata-core/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/lifecycle/lifecycle-livedata-ktx/build.gradle b/lifecycle/lifecycle-livedata-ktx/build.gradle
index e4597ea..b54fd32 100644
--- a/lifecycle/lifecycle-livedata-ktx/build.gradle
+++ b/lifecycle/lifecycle-livedata-ktx/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/lifecycle/lifecycle-livedata/build.gradle b/lifecycle/lifecycle-livedata/build.gradle
index 8a935bc..e1c78537 100644
--- a/lifecycle/lifecycle-livedata/build.gradle
+++ b/lifecycle/lifecycle-livedata/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/lifecycle/lifecycle-process/build.gradle b/lifecycle/lifecycle-process/build.gradle
index df3dcb0..d54ff4c 100644
--- a/lifecycle/lifecycle-process/build.gradle
+++ b/lifecycle/lifecycle-process/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/lifecycle/lifecycle-reactivestreams-ktx/build.gradle b/lifecycle/lifecycle-reactivestreams-ktx/build.gradle
index e8e3111..3bf9a40 100644
--- a/lifecycle/lifecycle-reactivestreams-ktx/build.gradle
+++ b/lifecycle/lifecycle-reactivestreams-ktx/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/lifecycle/lifecycle-reactivestreams/build.gradle b/lifecycle/lifecycle-reactivestreams/build.gradle
index 52367ed..7badea4 100644
--- a/lifecycle/lifecycle-reactivestreams/build.gradle
+++ b/lifecycle/lifecycle-reactivestreams/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/lifecycle/lifecycle-runtime-compose/build.gradle b/lifecycle/lifecycle-runtime-compose/build.gradle
index 2ad66fd..24b4513 100644
--- a/lifecycle/lifecycle-runtime-compose/build.gradle
+++ b/lifecycle/lifecycle-runtime-compose/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@@ -27,7 +34,7 @@
dependencies {
api projectOrArtifact(":lifecycle:lifecycle-runtime-ktx")
- api("androidx.annotation:annotation-experimental:1.1.0")
+ api(projectOrArtifact(":annotation:annotation-experimental"))
api("androidx.compose.runtime:runtime:1.0.1")
api("androidx.compose.ui:ui:1.0.1")
diff --git a/lifecycle/lifecycle-runtime-compose/integration-tests/lifecycle-runtime-compose-demos/build.gradle b/lifecycle/lifecycle-runtime-compose/integration-tests/lifecycle-runtime-compose-demos/build.gradle
index 122cf219..e03ae24 100644
--- a/lifecycle/lifecycle-runtime-compose/integration-tests/lifecycle-runtime-compose-demos/build.gradle
+++ b/lifecycle/lifecycle-runtime-compose/integration-tests/lifecycle-runtime-compose-demos/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/lifecycle/lifecycle-runtime-compose/samples/build.gradle b/lifecycle/lifecycle-runtime-compose/samples/build.gradle
index 741eaf86..020a892 100644
--- a/lifecycle/lifecycle-runtime-compose/samples/build.gradle
+++ b/lifecycle/lifecycle-runtime-compose/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/lifecycle/lifecycle-runtime-ktx-lint/build.gradle b/lifecycle/lifecycle-runtime-ktx-lint/build.gradle
index e10aea4..2fd2e56 100644
--- a/lifecycle/lifecycle-runtime-ktx-lint/build.gradle
+++ b/lifecycle/lifecycle-runtime-ktx-lint/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/lifecycle/lifecycle-runtime-ktx/build.gradle b/lifecycle/lifecycle-runtime-ktx/build.gradle
index 1c2d829..1f60592 100644
--- a/lifecycle/lifecycle-runtime-ktx/build.gradle
+++ b/lifecycle/lifecycle-runtime-ktx/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/lifecycle/lifecycle-runtime-testing-lint/build.gradle b/lifecycle/lifecycle-runtime-testing-lint/build.gradle
index d2bd9e9..9a253fb 100644
--- a/lifecycle/lifecycle-runtime-testing-lint/build.gradle
+++ b/lifecycle/lifecycle-runtime-testing-lint/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
diff --git a/lifecycle/lifecycle-runtime-testing/build.gradle b/lifecycle/lifecycle-runtime-testing/build.gradle
index 6da60ce..de2c5bf 100644
--- a/lifecycle/lifecycle-runtime-testing/build.gradle
+++ b/lifecycle/lifecycle-runtime-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/lifecycle/lifecycle-runtime/build.gradle b/lifecycle/lifecycle-runtime/build.gradle
index 0a94474..057d90e 100644
--- a/lifecycle/lifecycle-runtime/build.gradle
+++ b/lifecycle/lifecycle-runtime/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/lifecycle/lifecycle-service/build.gradle b/lifecycle/lifecycle-service/build.gradle
index a39577a..c674df1 100644
--- a/lifecycle/lifecycle-service/build.gradle
+++ b/lifecycle/lifecycle-service/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/lifecycle/lifecycle-viewmodel-compose/api/current.txt b/lifecycle/lifecycle-viewmodel-compose/api/current.txt
index 7383797..98bd4e6 100644
--- a/lifecycle/lifecycle-viewmodel-compose/api/current.txt
+++ b/lifecycle/lifecycle-viewmodel-compose/api/current.txt
@@ -8,7 +8,7 @@
field public static final androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner INSTANCE;
}
- @SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.WARNING) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.RUNTIME) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface SavedStateHandleSaveableApi {
+ @SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.WARNING) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface SavedStateHandleSaveableApi {
}
public final class SavedStateHandleSaverKt {
diff --git a/lifecycle/lifecycle-viewmodel-compose/api/restricted_current.txt b/lifecycle/lifecycle-viewmodel-compose/api/restricted_current.txt
index 7383797..98bd4e6 100644
--- a/lifecycle/lifecycle-viewmodel-compose/api/restricted_current.txt
+++ b/lifecycle/lifecycle-viewmodel-compose/api/restricted_current.txt
@@ -8,7 +8,7 @@
field public static final androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner INSTANCE;
}
- @SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.WARNING) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.RUNTIME) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface SavedStateHandleSaveableApi {
+ @SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.WARNING) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface SavedStateHandleSaveableApi {
}
public final class SavedStateHandleSaverKt {
diff --git a/lifecycle/lifecycle-viewmodel-compose/build.gradle b/lifecycle/lifecycle-viewmodel-compose/build.gradle
index 1be95e8..4b06506 100644
--- a/lifecycle/lifecycle-viewmodel-compose/build.gradle
+++ b/lifecycle/lifecycle-viewmodel-compose/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@@ -32,7 +39,7 @@
api projectOrArtifact(":lifecycle:lifecycle-viewmodel-savedstate")
api("androidx.compose.runtime:runtime:1.0.1")
api "androidx.compose.ui:ui:1.0.1"
- api("androidx.annotation:annotation-experimental:1.1.0")
+ api(projectOrArtifact(":annotation:annotation-experimental"))
implementation(libs.kotlinStdlib)
diff --git a/lifecycle/lifecycle-viewmodel-compose/integration-tests/lifecycle-viewmodel-demos/build.gradle b/lifecycle/lifecycle-viewmodel-compose/integration-tests/lifecycle-viewmodel-demos/build.gradle
index daaf090..f7022a8 100644
--- a/lifecycle/lifecycle-viewmodel-compose/integration-tests/lifecycle-viewmodel-demos/build.gradle
+++ b/lifecycle/lifecycle-viewmodel-compose/integration-tests/lifecycle-viewmodel-demos/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/lifecycle/lifecycle-viewmodel-compose/samples/build.gradle b/lifecycle/lifecycle-viewmodel-compose/samples/build.gradle
index cb9c0ac..cd2f40e 100644
--- a/lifecycle/lifecycle-viewmodel-compose/samples/build.gradle
+++ b/lifecycle/lifecycle-viewmodel-compose/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/lifecycle/lifecycle-viewmodel-compose/src/main/java/androidx/lifecycle/viewmodel/compose/SavedStateHandleSaveableApi.kt b/lifecycle/lifecycle-viewmodel-compose/src/main/java/androidx/lifecycle/viewmodel/compose/SavedStateHandleSaveableApi.kt
index f685fd1..9990a0b 100644
--- a/lifecycle/lifecycle-viewmodel-compose/src/main/java/androidx/lifecycle/viewmodel/compose/SavedStateHandleSaveableApi.kt
+++ b/lifecycle/lifecycle-viewmodel-compose/src/main/java/androidx/lifecycle/viewmodel/compose/SavedStateHandleSaveableApi.kt
@@ -19,7 +19,7 @@
/**
* @see SavedStateHandle
*/
-@Retention(AnnotationRetention.RUNTIME)
+@Retention(AnnotationRetention.BINARY)
@Target(AnnotationTarget.FUNCTION)
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
annotation class SavedStateHandleSaveableApi
diff --git a/lifecycle/lifecycle-viewmodel-ktx/build.gradle b/lifecycle/lifecycle-viewmodel-ktx/build.gradle
index 7dcd857..407b2e1 100644
--- a/lifecycle/lifecycle-viewmodel-ktx/build.gradle
+++ b/lifecycle/lifecycle-viewmodel-ktx/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/lifecycle/lifecycle-viewmodel-savedstate/build.gradle b/lifecycle/lifecycle-viewmodel-savedstate/build.gradle
index d995d63..3a3706a 100644
--- a/lifecycle/lifecycle-viewmodel-savedstate/build.gradle
+++ b/lifecycle/lifecycle-viewmodel-savedstate/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/lifecycle/lifecycle-viewmodel/build.gradle b/lifecycle/lifecycle-viewmodel/build.gradle
index e7f157c..eea273e 100644
--- a/lifecycle/lifecycle-viewmodel/build.gradle
+++ b/lifecycle/lifecycle-viewmodel/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/lint-checks/build.gradle b/lint-checks/build.gradle
index 3fccf78..7d6fa107 100644
--- a/lint-checks/build.gradle
+++ b/lint-checks/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.ExportAtomicLibraryGroupsToTextTask
import androidx.build.LibraryType
diff --git a/lint-checks/integration-tests/build.gradle b/lint-checks/integration-tests/build.gradle
index daf7310..130e500 100644
--- a/lint-checks/integration-tests/build.gradle
+++ b/lint-checks/integration-tests/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
diff --git a/loader/loader-ktx/build.gradle b/loader/loader-ktx/build.gradle
index 325b363..6472e3a 100644
--- a/loader/loader-ktx/build.gradle
+++ b/loader/loader-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/loader/loader/build.gradle b/loader/loader/build.gradle
index 331c8a6..a9287e0 100644
--- a/loader/loader/build.gradle
+++ b/loader/loader/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/media/media/build.gradle b/media/media/build.gradle
index 7e7457b..aa5ea22 100644
--- a/media/media/build.gradle
+++ b/media/media/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/media2/media2-common/build.gradle b/media2/media2-common/build.gradle
index 27f8bef..29efd41 100644
--- a/media2/media2-common/build.gradle
+++ b/media2/media2-common/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/media2/media2-exoplayer/build.gradle b/media2/media2-exoplayer/build.gradle
index 9348052..1defb33 100644
--- a/media2/media2-exoplayer/build.gradle
+++ b/media2/media2-exoplayer/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/media2/media2-player/build.gradle b/media2/media2-player/build.gradle
index 70a7c6f..3f9d5f7 100644
--- a/media2/media2-player/build.gradle
+++ b/media2/media2-player/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/media2/media2-session/build.gradle b/media2/media2-session/build.gradle
index dbb6e4d..c2a30ee 100644
--- a/media2/media2-session/build.gradle
+++ b/media2/media2-session/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/media2/media2-widget/build.gradle b/media2/media2-widget/build.gradle
index 8089619..b4a53a2 100644
--- a/media2/media2-widget/build.gradle
+++ b/media2/media2-widget/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/mediarouter/mediarouter-testing/build.gradle b/mediarouter/mediarouter-testing/build.gradle
index fd973e9..9712d7e 100644
--- a/mediarouter/mediarouter-testing/build.gradle
+++ b/mediarouter/mediarouter-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/mediarouter/mediarouter/build.gradle b/mediarouter/mediarouter/build.gradle
index 61a8200..f408c28 100644
--- a/mediarouter/mediarouter/build.gradle
+++ b/mediarouter/mediarouter/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
@@ -34,7 +41,7 @@
implementation("androidx.palette:palette:1.0.0")
implementation("androidx.recyclerview:recyclerview:1.1.0")
implementation("androidx.appcompat:appcompat-resources:1.2.0")
- implementation "androidx.annotation:annotation-experimental:1.3.0"
+ implementation project(":annotation:annotation-experimental")
testImplementation(libs.junit)
testImplementation(libs.testCore)
diff --git a/metrics/metrics-performance/build.gradle b/metrics/metrics-performance/build.gradle
index 9eef67b..a8c8b9a 100644
--- a/metrics/metrics-performance/build.gradle
+++ b/metrics/metrics-performance/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/navigation/navigation-benchmark/build.gradle b/navigation/navigation-benchmark/build.gradle
index 53cfa31..ef9ee24 100644
--- a/navigation/navigation-benchmark/build.gradle
+++ b/navigation/navigation-benchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/navigation/navigation-common-ktx/build.gradle b/navigation/navigation-common-ktx/build.gradle
index dcdb1ae..b78112e 100644
--- a/navigation/navigation-common-ktx/build.gradle
+++ b/navigation/navigation-common-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode
diff --git a/navigation/navigation-common-lint/build.gradle b/navigation/navigation-common-lint/build.gradle
index 2bdc5ef..b099b59 100644
--- a/navigation/navigation-common-lint/build.gradle
+++ b/navigation/navigation-common-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/navigation/navigation-common/build.gradle b/navigation/navigation-common/build.gradle
index 7102eda..77c8ed9 100644
--- a/navigation/navigation-common/build.gradle
+++ b/navigation/navigation-common/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/navigation/navigation-compose-lint/build.gradle b/navigation/navigation-compose-lint/build.gradle
index aa54393..74f87b8 100644
--- a/navigation/navigation-compose-lint/build.gradle
+++ b/navigation/navigation-compose-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
diff --git a/navigation/navigation-compose/build.gradle b/navigation/navigation-compose/build.gradle
index fd8e5357..f06ef99 100644
--- a/navigation/navigation-compose/build.gradle
+++ b/navigation/navigation-compose/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/navigation/navigation-compose/integration-tests/navigation-demos/build.gradle b/navigation/navigation-compose/integration-tests/navigation-demos/build.gradle
index b3c1ff9..140b0aa 100644
--- a/navigation/navigation-compose/integration-tests/navigation-demos/build.gradle
+++ b/navigation/navigation-compose/integration-tests/navigation-demos/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/navigation/navigation-compose/samples/build.gradle b/navigation/navigation-compose/samples/build.gradle
index 5c93b17..8b287c0 100644
--- a/navigation/navigation-compose/samples/build.gradle
+++ b/navigation/navigation-compose/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/navigation/navigation-dynamic-features-fragment/build.gradle b/navigation/navigation-dynamic-features-fragment/build.gradle
index b1689fe..b32355a 100644
--- a/navigation/navigation-dynamic-features-fragment/build.gradle
+++ b/navigation/navigation-dynamic-features-fragment/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/navigation/navigation-dynamic-features-runtime/build.gradle b/navigation/navigation-dynamic-features-runtime/build.gradle
index 973bfa8..d39b0be 100644
--- a/navigation/navigation-dynamic-features-runtime/build.gradle
+++ b/navigation/navigation-dynamic-features-runtime/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/navigation/navigation-fragment-ktx/build.gradle b/navigation/navigation-fragment-ktx/build.gradle
index 16a263f5..84b6d20 100644
--- a/navigation/navigation-fragment-ktx/build.gradle
+++ b/navigation/navigation-fragment-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/navigation/navigation-fragment/build.gradle b/navigation/navigation-fragment/build.gradle
index 6facd3f..9533257 100644
--- a/navigation/navigation-fragment/build.gradle
+++ b/navigation/navigation-fragment/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/navigation/navigation-runtime-ktx/build.gradle b/navigation/navigation-runtime-ktx/build.gradle
index f08ad9d..93fa350 100644
--- a/navigation/navigation-runtime-ktx/build.gradle
+++ b/navigation/navigation-runtime-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/navigation/navigation-runtime-lint/build.gradle b/navigation/navigation-runtime-lint/build.gradle
index 3362b92..18ab355 100644
--- a/navigation/navigation-runtime-lint/build.gradle
+++ b/navigation/navigation-runtime-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/navigation/navigation-runtime-truth/build.gradle b/navigation/navigation-runtime-truth/build.gradle
index 4ff4554f..e250034 100644
--- a/navigation/navigation-runtime-truth/build.gradle
+++ b/navigation/navigation-runtime-truth/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/navigation/navigation-runtime/api/current.txt b/navigation/navigation-runtime/api/current.txt
index f3513c2..5de0d5e 100644
--- a/navigation/navigation-runtime/api/current.txt
+++ b/navigation/navigation-runtime/api/current.txt
@@ -181,7 +181,7 @@
method public androidx.navigation.NavDeepLinkBuilder setGraph(@NavigationRes int navGraphId);
}
- @SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.WARNING) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.RUNTIME) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface NavDeepLinkSaveStateControl {
+ @SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.WARNING) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface NavDeepLinkSaveStateControl {
}
public interface NavHost {
diff --git a/navigation/navigation-runtime/api/restricted_current.txt b/navigation/navigation-runtime/api/restricted_current.txt
index f3513c2..5de0d5e 100644
--- a/navigation/navigation-runtime/api/restricted_current.txt
+++ b/navigation/navigation-runtime/api/restricted_current.txt
@@ -181,7 +181,7 @@
method public androidx.navigation.NavDeepLinkBuilder setGraph(@NavigationRes int navGraphId);
}
- @SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.WARNING) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.RUNTIME) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface NavDeepLinkSaveStateControl {
+ @SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.WARNING) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface NavDeepLinkSaveStateControl {
}
public interface NavHost {
diff --git a/navigation/navigation-runtime/build.gradle b/navigation/navigation-runtime/build.gradle
index 59fd673..9976f83 100644
--- a/navigation/navigation-runtime/build.gradle
+++ b/navigation/navigation-runtime/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@@ -28,7 +35,7 @@
api("androidx.activity:activity-ktx:1.7.1")
api("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
api("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2")
- api("androidx.annotation:annotation-experimental:1.1.0")
+ api(projectOrArtifact(":annotation:annotation-experimental"))
implementation('androidx.collection:collection:1.0.0')
api(libs.kotlinStdlib)
diff --git a/navigation/navigation-runtime/src/main/java/androidx/navigation/NavDeepLinkSaveStateControl.kt b/navigation/navigation-runtime/src/main/java/androidx/navigation/NavDeepLinkSaveStateControl.kt
index b4a1099..15341ca 100644
--- a/navigation/navigation-runtime/src/main/java/androidx/navigation/NavDeepLinkSaveStateControl.kt
+++ b/navigation/navigation-runtime/src/main/java/androidx/navigation/NavDeepLinkSaveStateControl.kt
@@ -19,7 +19,7 @@
/**
* @see NavController.enableDeepLinkSaveState
*/
-@Retention(AnnotationRetention.RUNTIME)
+@Retention(AnnotationRetention.BINARY)
@Target(AnnotationTarget.FUNCTION)
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
public annotation class NavDeepLinkSaveStateControl
diff --git a/navigation/navigation-safe-args-generator/build.gradle b/navigation/navigation-safe-args-generator/build.gradle
index 4a019c6..6b926eb 100644
--- a/navigation/navigation-safe-args-generator/build.gradle
+++ b/navigation/navigation-safe-args-generator/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.SdkHelperKt
diff --git a/navigation/navigation-safe-args-gradle-plugin/build.gradle b/navigation/navigation-safe-args-gradle-plugin/build.gradle
index 843c716..c680bc3 100644
--- a/navigation/navigation-safe-args-gradle-plugin/build.gradle
+++ b/navigation/navigation-safe-args-gradle-plugin/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.SdkResourceGenerator
diff --git a/navigation/navigation-testing/build.gradle b/navigation/navigation-testing/build.gradle
index e2ac6f3..133557d 100644
--- a/navigation/navigation-testing/build.gradle
+++ b/navigation/navigation-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/navigation/navigation-ui-ktx/build.gradle b/navigation/navigation-ui-ktx/build.gradle
index f386457..8b47902 100644
--- a/navigation/navigation-ui-ktx/build.gradle
+++ b/navigation/navigation-ui-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/navigation/navigation-ui/api/current.txt b/navigation/navigation-ui/api/current.txt
index b13fa76..326d323 100644
--- a/navigation/navigation-ui/api/current.txt
+++ b/navigation/navigation-ui/api/current.txt
@@ -78,7 +78,7 @@
field public static final androidx.navigation.ui.NavigationUI INSTANCE;
}
- @SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.WARNING) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.RUNTIME) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface NavigationUiSaveStateControl {
+ @SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.WARNING) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface NavigationUiSaveStateControl {
}
public final class NavigationViewKt {
diff --git a/navigation/navigation-ui/api/restricted_current.txt b/navigation/navigation-ui/api/restricted_current.txt
index b13fa76..326d323 100644
--- a/navigation/navigation-ui/api/restricted_current.txt
+++ b/navigation/navigation-ui/api/restricted_current.txt
@@ -78,7 +78,7 @@
field public static final androidx.navigation.ui.NavigationUI INSTANCE;
}
- @SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.WARNING) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.RUNTIME) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface NavigationUiSaveStateControl {
+ @SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.WARNING) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface NavigationUiSaveStateControl {
}
public final class NavigationViewKt {
diff --git a/navigation/navigation-ui/build.gradle b/navigation/navigation-ui/build.gradle
index adaa4da..eab9cd6 100644
--- a/navigation/navigation-ui/build.gradle
+++ b/navigation/navigation-ui/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import androidx.build.Publish
@@ -40,7 +47,7 @@
api("androidx.drawerlayout:drawerlayout:1.1.1")
api("com.google.android.material:material:1.4.0")
implementation("androidx.transition:transition:1.3.0")
- api("androidx.annotation:annotation-experimental:1.1.0")
+ api(projectOrArtifact(":annotation:annotation-experimental"))
androidTestImplementation(project(":internal-testutils-navigation"), {
exclude group: "androidx.navigation", module: "navigation-common"
diff --git a/navigation/navigation-ui/src/main/java/androidx/navigation/ui/NavigationUiSaveStateControl.kt b/navigation/navigation-ui/src/main/java/androidx/navigation/ui/NavigationUiSaveStateControl.kt
index 1063256..adb462e 100644
--- a/navigation/navigation-ui/src/main/java/androidx/navigation/ui/NavigationUiSaveStateControl.kt
+++ b/navigation/navigation-ui/src/main/java/androidx/navigation/ui/NavigationUiSaveStateControl.kt
@@ -19,7 +19,7 @@
/**
* @see NavigationUI
*/
-@Retention(AnnotationRetention.RUNTIME)
+@Retention(AnnotationRetention.BINARY)
@Target(AnnotationTarget.FUNCTION)
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
public annotation class NavigationUiSaveStateControl
diff --git a/paging/integration-tests/testapp/build.gradle b/paging/integration-tests/testapp/build.gradle
index 8b17e5b..cd102d8 100644
--- a/paging/integration-tests/testapp/build.gradle
+++ b/paging/integration-tests/testapp/build.gradle
@@ -45,6 +45,9 @@
// and androidTestImpl, for both AOSP and playground builds.
implementation(project(":annotation:annotation"))
+ // Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath.
+ androidTestImplementation(project(":annotation:annotation-experimental"))
+
androidTestImplementation(libs.kotlinTest)
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testExtJunit)
diff --git a/paging/paging-common-ktx/build.gradle b/paging/paging-common-ktx/build.gradle
index 87e2ccf..b4dfab7 100644
--- a/paging/paging-common-ktx/build.gradle
+++ b/paging/paging-common-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/paging/paging-common/build.gradle b/paging/paging-common/build.gradle
index 4225395..e04b47e 100644
--- a/paging/paging-common/build.gradle
+++ b/paging/paging-common/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import androidx.build.PlatformIdentifier
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
diff --git a/paging/paging-common/src/commonMain/kotlin/androidx/paging/MutableCombinedLoadStateCollection.kt b/paging/paging-common/src/commonMain/kotlin/androidx/paging/MutableCombinedLoadStateCollection.kt
index 755c80d..9bd6f0f 100644
--- a/paging/paging-common/src/commonMain/kotlin/androidx/paging/MutableCombinedLoadStateCollection.kt
+++ b/paging/paging-common/src/commonMain/kotlin/androidx/paging/MutableCombinedLoadStateCollection.kt
@@ -39,18 +39,20 @@
private val _stateFlow = MutableStateFlow<CombinedLoadStates?>(null)
public val stateFlow = _stateFlow.asStateFlow()
+ // load states are de-duplicated
fun set(sourceLoadStates: LoadStates, remoteLoadStates: LoadStates?) =
dispatchNewState { currState ->
computeNewState(currState, sourceLoadStates, remoteLoadStates)
}
+ // load states are de-duplicated
fun set(type: LoadType, remote: Boolean, state: LoadState) =
dispatchNewState { currState ->
var source = currState?.source ?: LoadStates.IDLE
- var mediator = currState?.mediator ?: LoadStates.IDLE
+ var mediator = currState?.mediator
if (remote) {
- mediator = mediator.modifyState(type, state)
+ mediator = LoadStates.IDLE.modifyState(type, state)
} else {
source = source.modifyState(type, state)
}
diff --git a/paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt b/paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
index ccdcacc..bc9a9fd 100644
--- a/paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
+++ b/paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
@@ -16,7 +16,6 @@
package androidx.paging
-import androidx.paging.LoadState.NotLoading
import androidx.paging.LoadType.APPEND
import androidx.paging.LoadType.PREPEND
import androidx.paging.LoadType.REFRESH
@@ -263,13 +262,6 @@
if (changeCount > 0) {
callback.onChanged(firstItemIndex, changeCount)
}
-
- // Dropping from prepend direction implies NotLoading(endOfPaginationReached = false).
- callback.onStateUpdate(
- loadType = PREPEND,
- fromMediator = false,
- loadState = NotLoading.Incomplete
- )
} else {
val oldPlaceholdersAfter = placeholdersAfter
@@ -306,13 +298,6 @@
count = changeCount
)
}
-
- // Dropping from append direction implies NotLoading(endOfPaginationReached = false).
- callback.onStateUpdate(
- loadType = APPEND,
- fromMediator = false,
- loadState = NotLoading.Incomplete
- )
}
}
diff --git a/paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt b/paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
index cf23efa..a173a9e 100644
--- a/paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
+++ b/paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
@@ -89,7 +89,7 @@
// for state updates from LoadStateUpdate events
override fun onStateUpdate(source: LoadStates, mediator: LoadStates?) {
- dispatchLoadStates(source, mediator)
+ combinedLoadStatesCollection.set(source, mediator)
}
// for state updates from Drop events
@@ -103,14 +103,6 @@
}
}
- private fun dispatchLoadStates(source: LoadStates, mediator: LoadStates?) {
- // CombinedLoadStates is de-duplicated within set()
- combinedLoadStatesCollection.set(
- sourceLoadStates = source,
- remoteLoadStates = mediator
- )
- }
-
/**
* Handler for [PagingDataEvent] emitted by a [PagingData] that was submitted to
* this [PagingDataPresenter]
@@ -180,9 +172,9 @@
presentPagingDataEvent(pageStore.processEvent(event))
// dispatch load states
- dispatchLoadStates(
- source = event.sourceLoadStates,
- mediator = event.mediatorLoadStates,
+ combinedLoadStatesCollection.set(
+ sourceLoadStates = event.sourceLoadStates,
+ remoteLoadStates = event.mediatorLoadStates,
)
// If index points to a placeholder after transformations, resend it unless
@@ -232,17 +224,24 @@
yield()
}
- // Process DROP to be shown to the UI
+ // Process DROP and send to presenter
pageStore.processEvent(event, processPageEventCallback)
+ // dispatch load states
+ combinedLoadStatesCollection.set(
+ type = event.loadType,
+ remote = false,
+ state = LoadState.NotLoading.Incomplete
+ )
+
// Reset lastAccessedIndexUnfulfilled if a page is dropped, to avoid
// infinite loops when maxSize is insufficiently large.
lastAccessedIndexUnfulfilled = false
}
event is PageEvent.LoadStateUpdate ->
- processPageEventCallback.onStateUpdate(
- source = event.source,
- mediator = event.mediator,
+ combinedLoadStatesCollection.set(
+ sourceLoadStates = event.source,
+ remoteLoadStates = event.mediator,
)
}
// Notify page updates after pageStore processes them.
@@ -493,7 +492,7 @@
if (dispatchLoadStates) {
// Dispatch LoadState updates as soon as we are done diffing, but after
// setting new pageStore.
- dispatchLoadStates(sourceLoadStates!!, mediatorLoadStates)
+ combinedLoadStatesCollection.set(sourceLoadStates!!, mediatorLoadStates)
}
if (newPageStore.size == 0) {
// Send an initialize hint in case the new list is empty (no items or placeholders),
diff --git a/paging/paging-common/src/commonTest/kotlin/androidx/paging/PageStoreTest.kt b/paging/paging-common/src/commonTest/kotlin/androidx/paging/PageStoreTest.kt
index e19d32e..5b37246 100644
--- a/paging/paging-common/src/commonTest/kotlin/androidx/paging/PageStoreTest.kt
+++ b/paging/paging-common/src/commonTest/kotlin/androidx/paging/PageStoreTest.kt
@@ -17,7 +17,6 @@
package androidx.paging
import androidx.kruth.assertThat
-import androidx.paging.LoadState.NotLoading
import androidx.paging.LoadType.APPEND
import androidx.paging.LoadType.PREPEND
import androidx.paging.PageStore.ProcessPageEventCallback
@@ -244,9 +243,7 @@
callback = callback
)
- assertThat(callback.getAllAndClear()).isEqualTo(
- events + listOf(StateEvent(APPEND, false, NotLoading.Incomplete))
- )
+ assertThat(callback.getAllAndClear()).isEqualTo(events)
// assert final list state
val finalData = initialPages.subList(0, initialPages.size - pagesToDrop).flatten()
@@ -285,9 +282,7 @@
callback = callback
)
- assertThat(callback.getAllAndClear()).isEqualTo(
- events + listOf(StateEvent(PREPEND, false, NotLoading.Incomplete))
- )
+ assertThat(callback.getAllAndClear()).isEqualTo(events)
// assert final list state
val finalData = initialPages.take(initialPages.size - pagesToDrop).reversed().flatten()
diff --git a/paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt b/paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
index b68d26c..dd61ec5 100644
--- a/paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
+++ b/paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
@@ -1584,6 +1584,58 @@
}
@Test
+ fun appendDrop_loadStates() = appendDrop_loadStates(false)
+
+ @Test
+ fun appendDrop_loadStates_collectWithCachedIn() = appendDrop_loadStates(true)
+
+ private fun appendDrop_loadStates(collectWithCachedIn: Boolean) =
+ runTest(
+ collectWithCachedIn,
+ initialKey = 96,
+ config = PagingConfig(
+ pageSize = 1,
+ maxSize = 4,
+ enablePlaceholders = false
+ )
+ ) { presenter, _, _, _ ->
+ val collectLoadStates = launch { presenter.collectLoadStates() }
+
+ // initial REFRESH
+ advanceUntilIdle()
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(96 until 99)
+ assertThat(presenter.newCombinedLoadStates()).containsExactly(
+ localLoadStatesOf(refreshLocal = Loading),
+ // ensure append has reached end of pagination
+ localLoadStatesOf(),
+ )
+
+ // trigger append to reach max page size
+ presenter[2]
+ advanceUntilIdle()
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(96 until 100)
+ assertThat(presenter.newCombinedLoadStates()).containsExactly(
+ localLoadStatesOf(appendLocal = Loading),
+ localLoadStatesOf(appendLocal = NotLoading.Complete),
+ )
+
+ // trigger prepend and drop from append direction
+ presenter[0]
+ advanceUntilIdle()
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(95 until 99)
+ assertThat(presenter.newCombinedLoadStates()).containsExactly(
+ localLoadStatesOf(prependLocal = Loading, appendLocal = NotLoading.Complete),
+ // page from the end is dropped so now appendLocal should be NotLoading.Incomplete
+ localLoadStatesOf(prependLocal = Loading),
+ localLoadStatesOf(),
+ )
+ collectLoadStates.cancel()
+ }
+
+ @Test
fun prependInvalid_loadStates() = prependInvalid_loadStates(false)
@Test
@@ -1644,6 +1696,59 @@
}
@Test
+ fun prependDrop_loadStates() = prependDrop_loadStates(false)
+
+ @Test
+ fun prependDrop_loadStates_collectWithCachedIn() = prependDrop_loadStates(true)
+
+ private fun prependDrop_loadStates(collectWithCachedIn: Boolean) =
+ runTest(
+ collectWithCachedIn,
+ initialKey = 1,
+ config = PagingConfig(
+ pageSize = 1,
+ maxSize = 4,
+ enablePlaceholders = false
+ )
+ ) { presenter, _, _, _ ->
+ val collectLoadStates = launch { presenter.collectLoadStates() }
+
+ // initial REFRESH
+ advanceUntilIdle()
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(1 until 4)
+ assertThat(presenter.newCombinedLoadStates()).containsExactly(
+ localLoadStatesOf(refreshLocal = Loading),
+ // ensure append has reached end of pagination
+ localLoadStatesOf(),
+ )
+
+ // trigger prepend to reach max page size
+ presenter[0]
+ advanceUntilIdle()
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(0 until 4)
+ assertThat(presenter.newCombinedLoadStates()).containsExactly(
+ localLoadStatesOf(prependLocal = Loading),
+ localLoadStatesOf(prependLocal = NotLoading.Complete),
+ )
+
+ // trigger append and drop from prepend direction
+ presenter[3]
+ advanceUntilIdle()
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(1 until 5)
+ assertThat(presenter.newCombinedLoadStates()).containsExactly(
+ localLoadStatesOf(prependLocal = NotLoading.Complete, appendLocal = Loading),
+ // first page is dropped so now prependLocal should be NotLoading.Incomplete
+ localLoadStatesOf(appendLocal = Loading),
+ localLoadStatesOf(),
+ )
+
+ collectLoadStates.cancel()
+ }
+
+ @Test
fun refreshInvalid_loadStates() = refreshInvalid_loadStates(false)
@Test
@@ -2211,6 +2316,7 @@
private fun runTest(
collectWithCachedIn: Boolean,
initialKey: Int? = null,
+ config: PagingConfig = PagingConfig(pageSize = 3, enablePlaceholders = false),
block: TestScope.(
presenter: SimplePresenter,
pagingSources: List<TestPagingSource>,
@@ -2220,7 +2326,7 @@
) = testScope.runTest {
val pagingSources = mutableListOf<TestPagingSource>()
val pager = Pager(
- config = PagingConfig(pageSize = 3, enablePlaceholders = false),
+ config = config,
initialKey = initialKey,
pagingSourceFactory = {
TestPagingSource(
diff --git a/paging/paging-compose/build.gradle b/paging/paging-compose/build.gradle
index 138ae2c..3502bf0 100644
--- a/paging/paging-compose/build.gradle
+++ b/paging/paging-compose/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/paging/paging-compose/integration-tests/paging-demos/build.gradle b/paging/paging-compose/integration-tests/paging-demos/build.gradle
index 586f17d..e9cb7bb 100644
--- a/paging/paging-compose/integration-tests/paging-demos/build.gradle
+++ b/paging/paging-compose/integration-tests/paging-demos/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/paging/paging-compose/samples/build.gradle b/paging/paging-compose/samples/build.gradle
index ced7866..1df0616 100644
--- a/paging/paging-compose/samples/build.gradle
+++ b/paging/paging-compose/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/paging/paging-guava/build.gradle b/paging/paging-guava/build.gradle
index 7ce3e9b..b1e4aeb 100644
--- a/paging/paging-guava/build.gradle
+++ b/paging/paging-guava/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/paging/paging-runtime-ktx/build.gradle b/paging/paging-runtime-ktx/build.gradle
index 403b48e..1399fe5 100644
--- a/paging/paging-runtime-ktx/build.gradle
+++ b/paging/paging-runtime-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/paging/paging-runtime/build.gradle b/paging/paging-runtime/build.gradle
index a80973c..3f58721 100644
--- a/paging/paging-runtime/build.gradle
+++ b/paging/paging-runtime/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/paging/paging-rxjava2-ktx/build.gradle b/paging/paging-rxjava2-ktx/build.gradle
index d6f3244..f41e14e 100644
--- a/paging/paging-rxjava2-ktx/build.gradle
+++ b/paging/paging-rxjava2-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/paging/paging-rxjava2/build.gradle b/paging/paging-rxjava2/build.gradle
index c23998e..3f6f4db 100644
--- a/paging/paging-rxjava2/build.gradle
+++ b/paging/paging-rxjava2/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/paging/paging-rxjava3/build.gradle b/paging/paging-rxjava3/build.gradle
index f193372..3a61c6f 100644
--- a/paging/paging-rxjava3/build.gradle
+++ b/paging/paging-rxjava3/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/paging/paging-testing/build.gradle b/paging/paging-testing/build.gradle
index 2955b5f..dfd3274 100644
--- a/paging/paging-testing/build.gradle
+++ b/paging/paging-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.KmpPlatformsKt
import androidx.build.PlatformIdentifier
diff --git a/paging/samples/build.gradle b/paging/samples/build.gradle
index 3ae4643..861a0cd 100644
--- a/paging/samples/build.gradle
+++ b/paging/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@@ -34,7 +41,7 @@
compileOnly(project(":annotation:annotation-sampled"))
implementation("androidx.appcompat:appcompat:1.2.0")
- implementation("androidx.annotation:annotation-experimental:1.1.0")
+ implementation(project(":annotation:annotation-experimental"))
implementation("androidx.fragment:fragment-ktx:1.3.0")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0")
implementation("androidx.recyclerview:recyclerview:1.2.0")
diff --git a/palette/palette-ktx/build.gradle b/palette/palette-ktx/build.gradle
index 79052a8..98748c6 100644
--- a/palette/palette-ktx/build.gradle
+++ b/palette/palette-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/palette/palette/build.gradle b/palette/palette/build.gradle
index 9b7a4b1..4630275 100644
--- a/palette/palette/build.gradle
+++ b/palette/palette/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/percentlayout/percentlayout/build.gradle b/percentlayout/percentlayout/build.gradle
index c441747..7f95e6a 100644
--- a/percentlayout/percentlayout/build.gradle
+++ b/percentlayout/percentlayout/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/playground-common/playground-plugin/shared/build.gradle b/playground-common/playground-plugin/shared/build.gradle
index 8571eae7..ceec8ec 100644
--- a/playground-common/playground-plugin/shared/build.gradle
+++ b/playground-common/playground-plugin/shared/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
plugins {
id("java-gradle-plugin")
id("groovy")
diff --git a/playground-common/playground.properties b/playground-common/playground.properties
index 73bc029..e118b55 100644
--- a/playground-common/playground.properties
+++ b/playground-common/playground.properties
@@ -26,5 +26,5 @@
# Disable docs
androidx.enableDocumentation=false
androidx.playground.snapshotBuildId=11236659
-androidx.playground.metalavaBuildId=11243104
+androidx.playground.metalavaBuildId=11268661
androidx.studio.type=playground
diff --git a/preference/preference-ktx/build.gradle b/preference/preference-ktx/build.gradle
index ecc2755..eaca3dc 100644
--- a/preference/preference-ktx/build.gradle
+++ b/preference/preference-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/print/print/build.gradle b/print/print/build.gradle
index 3b3738f..90c825c 100644
--- a/print/print/build.gradle
+++ b/print/print/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/privacysandbox/activity/activity-client/build.gradle b/privacysandbox/activity/activity-client/build.gradle
index f7ec166..3b2876c 100644
--- a/privacysandbox/activity/activity-client/build.gradle
+++ b/privacysandbox/activity/activity-client/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/privacysandbox/activity/activity-core/build.gradle b/privacysandbox/activity/activity-core/build.gradle
index b52889a..8a19206 100644
--- a/privacysandbox/activity/activity-core/build.gradle
+++ b/privacysandbox/activity/activity-core/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/privacysandbox/activity/activity-provider/build.gradle b/privacysandbox/activity/activity-provider/build.gradle
index 856130b..d48f82e 100644
--- a/privacysandbox/activity/activity-provider/build.gradle
+++ b/privacysandbox/activity/activity-provider/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/privacysandbox/ads/ads-adservices-java/build.gradle b/privacysandbox/ads/ads-adservices-java/build.gradle
index b3a4b71..6cd503f 100644
--- a/privacysandbox/ads/ads-adservices-java/build.gradle
+++ b/privacysandbox/ads/ads-adservices-java/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/privacysandbox/ads/ads-adservices/build.gradle b/privacysandbox/ads/ads-adservices/build.gradle
index 1c3fa23..f13566ed 100644
--- a/privacysandbox/ads/ads-adservices/build.gradle
+++ b/privacysandbox/ads/ads-adservices/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/privacysandbox/plugins/plugins-privacysandbox-library/build.gradle b/privacysandbox/plugins/plugins-privacysandbox-library/build.gradle
index 90ac0a9..3977a8e 100644
--- a/privacysandbox/plugins/plugins-privacysandbox-library/build.gradle
+++ b/privacysandbox/plugins/plugins-privacysandbox-library/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.SdkResourceGenerator
diff --git a/privacysandbox/sdkruntime/sdkruntime-client/build.gradle b/privacysandbox/sdkruntime/sdkruntime-client/build.gradle
index 9cdad69..444737c 100644
--- a/privacysandbox/sdkruntime/sdkruntime-client/build.gradle
+++ b/privacysandbox/sdkruntime/sdkruntime-client/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import javax.inject.Inject
@@ -137,7 +144,7 @@
}
namespace "androidx.privacysandbox.sdkruntime.client"
- compileSdkVersion = "android-34-ext8"
+ compileSdkVersion = "android-34-ext10"
}
androidx {
diff --git a/privacysandbox/sdkruntime/sdkruntime-core/build.gradle b/privacysandbox/sdkruntime/sdkruntime-core/build.gradle
index 0ce8658..73c5876 100644
--- a/privacysandbox/sdkruntime/sdkruntime-core/build.gradle
+++ b/privacysandbox/sdkruntime/sdkruntime-core/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
@@ -48,7 +55,7 @@
}
namespace "androidx.privacysandbox.sdkruntime.core"
- compileSdkVersion = "android-34-ext8"
+ compileSdkVersion = "android-34-ext10"
}
androidx {
diff --git a/privacysandbox/sdkruntime/sdkruntime-provider/build.gradle b/privacysandbox/sdkruntime/sdkruntime-provider/build.gradle
index a71810a..d83e35f 100644
--- a/privacysandbox/sdkruntime/sdkruntime-provider/build.gradle
+++ b/privacysandbox/sdkruntime/sdkruntime-provider/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
@@ -37,7 +44,7 @@
android {
namespace "androidx.privacysandbox.sdkruntime.provider"
- compileSdkVersion = "android-34-ext8"
+ compileSdkVersion = "android-34-ext10"
}
androidx {
diff --git a/privacysandbox/sdkruntime/test-sdks/current/build.gradle b/privacysandbox/sdkruntime/test-sdks/current/build.gradle
index 4aa8042..134c99b 100644
--- a/privacysandbox/sdkruntime/test-sdks/current/build.gradle
+++ b/privacysandbox/sdkruntime/test-sdks/current/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import com.android.build.api.artifact.SingleArtifact
plugins {
diff --git a/privacysandbox/sdkruntime/test-sdks/v1/build.gradle b/privacysandbox/sdkruntime/test-sdks/v1/build.gradle
index ecd8b9c..c00c814 100644
--- a/privacysandbox/sdkruntime/test-sdks/v1/build.gradle
+++ b/privacysandbox/sdkruntime/test-sdks/v1/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import com.android.build.api.artifact.SingleArtifact
plugins {
diff --git a/privacysandbox/sdkruntime/test-sdks/v2/build.gradle b/privacysandbox/sdkruntime/test-sdks/v2/build.gradle
index 3c2243a..0678870 100644
--- a/privacysandbox/sdkruntime/test-sdks/v2/build.gradle
+++ b/privacysandbox/sdkruntime/test-sdks/v2/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import com.android.build.api.artifact.SingleArtifact
plugins {
diff --git a/privacysandbox/sdkruntime/test-sdks/v4/build.gradle b/privacysandbox/sdkruntime/test-sdks/v4/build.gradle
index 901ebd5..510e9f2 100644
--- a/privacysandbox/sdkruntime/test-sdks/v4/build.gradle
+++ b/privacysandbox/sdkruntime/test-sdks/v4/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import com.android.build.api.artifact.SingleArtifact
plugins {
diff --git a/privacysandbox/tools/tools-apicompiler/build.gradle b/privacysandbox/tools/tools-apicompiler/build.gradle
index 19095f2..19c3cec 100644
--- a/privacysandbox/tools/tools-apicompiler/build.gradle
+++ b/privacysandbox/tools/tools-apicompiler/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.SdkHelperKt
import androidx.build.AndroidXConfig
diff --git a/privacysandbox/tools/tools-apigenerator/build.gradle b/privacysandbox/tools/tools-apigenerator/build.gradle
index 14930e0..4975dd9 100644
--- a/privacysandbox/tools/tools-apigenerator/build.gradle
+++ b/privacysandbox/tools/tools-apigenerator/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.SdkHelperKt
import androidx.build.AndroidXConfig
diff --git a/privacysandbox/tools/tools-apipackager/build.gradle b/privacysandbox/tools/tools-apipackager/build.gradle
index 19089d3..62c2b42 100644
--- a/privacysandbox/tools/tools-apipackager/build.gradle
+++ b/privacysandbox/tools/tools-apipackager/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/privacysandbox/tools/tools-core/build.gradle b/privacysandbox/tools/tools-core/build.gradle
index 71a4050..633bba0 100644
--- a/privacysandbox/tools/tools-core/build.gradle
+++ b/privacysandbox/tools/tools-core/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.RunApiTasks
import androidx.build.SdkHelperKt
diff --git a/privacysandbox/tools/tools-testing/build.gradle b/privacysandbox/tools/tools-testing/build.gradle
index 87354d6..a1fd9f3 100644
--- a/privacysandbox/tools/tools-testing/build.gradle
+++ b/privacysandbox/tools/tools-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/privacysandbox/tools/tools/build.gradle b/privacysandbox/tools/tools/build.gradle
index aaf8cd1..50c9f7a 100644
--- a/privacysandbox/tools/tools/build.gradle
+++ b/privacysandbox/tools/tools/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/privacysandbox/ui/ui-client/build.gradle b/privacysandbox/ui/ui-client/build.gradle
index d278278..1c30032 100644
--- a/privacysandbox/ui/ui-client/build.gradle
+++ b/privacysandbox/ui/ui-client/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/privacysandbox/ui/ui-core/build.gradle b/privacysandbox/ui/ui-core/build.gradle
index 1cbdc13..e00b425 100644
--- a/privacysandbox/ui/ui-core/build.gradle
+++ b/privacysandbox/ui/ui-core/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/privacysandbox/ui/ui-provider/build.gradle b/privacysandbox/ui/ui-provider/build.gradle
index 8f8cb75..bd21c28 100644
--- a/privacysandbox/ui/ui-provider/build.gradle
+++ b/privacysandbox/ui/ui-provider/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/privacysandbox/ui/ui-tests/build.gradle b/privacysandbox/ui/ui-tests/build.gradle
index 76d7dae..7e9b08b 100644
--- a/privacysandbox/ui/ui-tests/build.gradle
+++ b/privacysandbox/ui/ui-tests/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/profileinstaller/integration-tests/profile-verification-sample-no-initializer/build.gradle b/profileinstaller/integration-tests/profile-verification-sample-no-initializer/build.gradle
index 75b2f84..d1e8d26 100644
--- a/profileinstaller/integration-tests/profile-verification-sample-no-initializer/build.gradle
+++ b/profileinstaller/integration-tests/profile-verification-sample-no-initializer/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import com.android.build.api.artifact.SingleArtifact
plugins {
diff --git a/profileinstaller/integration-tests/profile-verification-sample/build.gradle b/profileinstaller/integration-tests/profile-verification-sample/build.gradle
index 8d9c645..9a8a31d 100644
--- a/profileinstaller/integration-tests/profile-verification-sample/build.gradle
+++ b/profileinstaller/integration-tests/profile-verification-sample/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import com.android.build.api.artifact.SingleArtifact
plugins {
diff --git a/profileinstaller/integration-tests/profile-verification/build.gradle b/profileinstaller/integration-tests/profile-verification/build.gradle
index ec7556c..54bf77a 100644
--- a/profileinstaller/integration-tests/profile-verification/build.gradle
+++ b/profileinstaller/integration-tests/profile-verification/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import com.google.common.io.Files
import org.apache.commons.compress.utils.IOUtils
diff --git a/profileinstaller/profileinstaller-benchmark/build.gradle b/profileinstaller/profileinstaller-benchmark/build.gradle
index 920f540..8646ff0 100644
--- a/profileinstaller/profileinstaller-benchmark/build.gradle
+++ b/profileinstaller/profileinstaller-benchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/profileinstaller/profileinstaller/build.gradle b/profileinstaller/profileinstaller/build.gradle
index c0930d3..724107c1 100644
--- a/profileinstaller/profileinstaller/build.gradle
+++ b/profileinstaller/profileinstaller/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/recommendation/recommendation/build.gradle b/recommendation/recommendation/build.gradle
index 19e7acd..5dc0869 100644
--- a/recommendation/recommendation/build.gradle
+++ b/recommendation/recommendation/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/recyclerview/recyclerview-lint/build.gradle b/recyclerview/recyclerview-lint/build.gradle
index 67c9e63..37064ef 100644
--- a/recyclerview/recyclerview-lint/build.gradle
+++ b/recyclerview/recyclerview-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/recyclerview/recyclerview-selection/build.gradle b/recyclerview/recyclerview-selection/build.gradle
index 46d8fce..2c70ef2 100644
--- a/recyclerview/recyclerview-selection/build.gradle
+++ b/recyclerview/recyclerview-selection/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/recyclerview/recyclerview/build.gradle b/recyclerview/recyclerview/build.gradle
index 6a24783..dab5c07 100644
--- a/recyclerview/recyclerview/build.gradle
+++ b/recyclerview/recyclerview/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/remotecallback/remotecallback-processor/build.gradle b/remotecallback/remotecallback-processor/build.gradle
index b097e37..932f574 100644
--- a/remotecallback/remotecallback-processor/build.gradle
+++ b/remotecallback/remotecallback-processor/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/remotecallback/remotecallback/build.gradle b/remotecallback/remotecallback/build.gradle
index bbac5924..bc5b285 100644
--- a/remotecallback/remotecallback/build.gradle
+++ b/remotecallback/remotecallback/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/resourceinspection/resourceinspection-annotation/build.gradle b/resourceinspection/resourceinspection-annotation/build.gradle
index fa51321..1476034 100644
--- a/resourceinspection/resourceinspection-annotation/build.gradle
+++ b/resourceinspection/resourceinspection-annotation/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/resourceinspection/resourceinspection-processor/build.gradle b/resourceinspection/resourceinspection-processor/build.gradle
index edd9e79..720cf10e 100644
--- a/resourceinspection/resourceinspection-processor/build.gradle
+++ b/resourceinspection/resourceinspection-processor/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.SdkHelperKt
diff --git a/room/benchmark/build.gradle b/room/benchmark/build.gradle
index f5b8320..835d34b 100644
--- a/room/benchmark/build.gradle
+++ b/room/benchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/room/integration-tests/incremental-annotation-processing/build.gradle b/room/integration-tests/incremental-annotation-processing/build.gradle
index bd41a2f..3821f46 100644
--- a/room/integration-tests/incremental-annotation-processing/build.gradle
+++ b/room/integration-tests/incremental-annotation-processing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.SdkResourceGenerator
plugins {
diff --git a/room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt b/room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt
index db0f197..a6311dd 100644
--- a/room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt
+++ b/room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt
@@ -154,6 +154,7 @@
}
}
+ @OptIn(androidx.room.ExperimentalRoomApi::class)
@Test
fun allBookSuspend_autoClose() {
val context: Context = ApplicationProvider.getApplicationContext()
diff --git a/room/room-common/api/current.txt b/room/room-common/api/current.txt
index 0106179..f4e229c 100644
--- a/room/room-common/api/current.txt
+++ b/room/room-common/api/current.txt
@@ -54,7 +54,7 @@
field public static final String VALUE_UNSPECIFIED = "[value-unspecified]";
}
- @IntDef({UNSPECIFIED, BINARY, NOCASE, RTRIM, LOCALIZED, UNICODE}) @RequiresApi(21) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public static @interface ColumnInfo.Collate {
+ @IntDef({androidx.room.ColumnInfo.UNSPECIFIED, androidx.room.ColumnInfo.BINARY, androidx.room.ColumnInfo.NOCASE, androidx.room.ColumnInfo.RTRIM, androidx.room.ColumnInfo.LOCALIZED, androidx.room.ColumnInfo.UNICODE}) @RequiresApi(21) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public static @interface ColumnInfo.Collate {
}
public static final class ColumnInfo.Companion {
@@ -73,7 +73,7 @@
field public static final String VALUE_UNSPECIFIED = "[value-unspecified]";
}
- @IntDef({UNDEFINED, TEXT, INTEGER, REAL, BLOB}) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public static @interface ColumnInfo.SQLiteTypeAffinity {
+ @IntDef({androidx.room.ColumnInfo.UNDEFINED, androidx.room.ColumnInfo.TEXT, androidx.room.ColumnInfo.INTEGER, androidx.room.ColumnInfo.REAL, androidx.room.ColumnInfo.BLOB}) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public static @interface ColumnInfo.SQLiteTypeAffinity {
}
@kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface Dao {
@@ -167,7 +167,7 @@
field public static final int SET_NULL = 3; // 0x3
}
- @IntDef({NO_ACTION, RESTRICT, SET_NULL, SET_DEFAULT, CASCADE}) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public static @interface ForeignKey.Action {
+ @IntDef({androidx.room.ForeignKey.NO_ACTION, androidx.room.ForeignKey.RESTRICT, androidx.room.ForeignKey.SET_NULL, androidx.room.ForeignKey.SET_DEFAULT, androidx.room.ForeignKey.CASCADE}) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public static @interface ForeignKey.Action {
}
public static final class ForeignKey.Companion {
@@ -292,6 +292,10 @@
}
public static final class OnConflictStrategy.Companion {
+ method @Deprecated public int getFAIL();
+ method @Deprecated public int getROLLBACK();
+ property @Deprecated public int FAIL;
+ property @Deprecated public int ROLLBACK;
field public static final int ABORT = 3; // 0x3
field @Deprecated public static final int FAIL = 4; // 0x4
field public static final int IGNORE = 5; // 0x5
diff --git a/room/room-common/api/restricted_current.txt b/room/room-common/api/restricted_current.txt
index c4ee79a..4accc75d2 100644
--- a/room/room-common/api/restricted_current.txt
+++ b/room/room-common/api/restricted_current.txt
@@ -54,7 +54,7 @@
field public static final String VALUE_UNSPECIFIED = "[value-unspecified]";
}
- @IntDef({UNSPECIFIED, BINARY, NOCASE, RTRIM, LOCALIZED, UNICODE}) @RequiresApi(21) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public static @interface ColumnInfo.Collate {
+ @IntDef({androidx.room.ColumnInfo.UNSPECIFIED, androidx.room.ColumnInfo.BINARY, androidx.room.ColumnInfo.NOCASE, androidx.room.ColumnInfo.RTRIM, androidx.room.ColumnInfo.LOCALIZED, androidx.room.ColumnInfo.UNICODE}) @RequiresApi(21) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public static @interface ColumnInfo.Collate {
}
public static final class ColumnInfo.Companion {
@@ -73,7 +73,7 @@
field public static final String VALUE_UNSPECIFIED = "[value-unspecified]";
}
- @IntDef({UNDEFINED, TEXT, INTEGER, REAL, BLOB}) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public static @interface ColumnInfo.SQLiteTypeAffinity {
+ @IntDef({androidx.room.ColumnInfo.UNDEFINED, androidx.room.ColumnInfo.TEXT, androidx.room.ColumnInfo.INTEGER, androidx.room.ColumnInfo.REAL, androidx.room.ColumnInfo.BLOB}) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public static @interface ColumnInfo.SQLiteTypeAffinity {
}
@kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface Dao {
@@ -167,7 +167,7 @@
field public static final int SET_NULL = 3; // 0x3
}
- @IntDef({NO_ACTION, RESTRICT, SET_NULL, SET_DEFAULT, CASCADE}) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public static @interface ForeignKey.Action {
+ @IntDef({androidx.room.ForeignKey.NO_ACTION, androidx.room.ForeignKey.RESTRICT, androidx.room.ForeignKey.SET_NULL, androidx.room.ForeignKey.SET_DEFAULT, androidx.room.ForeignKey.CASCADE}) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public static @interface ForeignKey.Action {
}
public static final class ForeignKey.Companion {
@@ -292,6 +292,10 @@
}
public static final class OnConflictStrategy.Companion {
+ method @Deprecated public int getFAIL();
+ method @Deprecated public int getROLLBACK();
+ property @Deprecated public int FAIL;
+ property @Deprecated public int ROLLBACK;
field public static final int ABORT = 3; // 0x3
field @Deprecated public static final int FAIL = 4; // 0x4
field public static final int IGNORE = 5; // 0x5
diff --git a/room/room-common/build.gradle b/room/room-common/build.gradle
index c67a39d..241d52e 100644
--- a/room/room-common/build.gradle
+++ b/room/room-common/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
import androidx.build.Publish
diff --git a/room/room-compiler-processing-testing/build.gradle b/room/room-compiler-processing-testing/build.gradle
index 81a7875..4e2e6ab 100644
--- a/room/room-compiler-processing-testing/build.gradle
+++ b/room/room-compiler-processing-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.KotlinTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/room/room-compiler-processing/build.gradle b/room/room-compiler-processing/build.gradle
index 2b4f78a2..42a9e97 100644
--- a/room/room-compiler-processing/build.gradle
+++ b/room/room-compiler-processing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/room/room-compiler/build.gradle b/room/room-compiler/build.gradle
index 31eeab1..f0c0121 100644
--- a/room/room-compiler/build.gradle
+++ b/room/room-compiler/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BuildOnServerKt
import androidx.build.LibraryType
import androidx.build.SdkHelperKt
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/processor/GeneratedCustomConverterTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/processor/GeneratedCustomConverterTest.kt
new file mode 100644
index 0000000..fc28dad
--- /dev/null
+++ b/room/room-compiler/src/test/kotlin/androidx/room/processor/GeneratedCustomConverterTest.kt
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2023 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.processor
+
+import androidx.room.RoomKspProcessor
+import androidx.room.RoomProcessor
+import androidx.room.compiler.processing.XElement
+import androidx.room.compiler.processing.XFiler
+import androidx.room.compiler.processing.XProcessingEnv
+import androidx.room.compiler.processing.XProcessingStep
+import androidx.room.compiler.processing.addOriginatingElement
+import androidx.room.compiler.processing.javac.JavacBasicAnnotationProcessor
+import androidx.room.compiler.processing.ksp.KspBasicAnnotationProcessor
+import androidx.room.compiler.processing.util.Source
+import androidx.room.compiler.processing.util.runProcessorTest
+import com.google.devtools.ksp.processing.SymbolProcessorEnvironment
+import com.google.devtools.ksp.processing.SymbolProcessorProvider
+import com.squareup.javapoet.ClassName
+import com.squareup.javapoet.JavaFile
+import com.squareup.javapoet.MethodSpec
+import com.squareup.javapoet.TypeSpec
+import javax.lang.model.SourceVersion
+import javax.lang.model.element.Modifier
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.junit.runners.JUnit4
+
+@RunWith(JUnit4::class)
+class GeneratedCustomConverterTest {
+
+ @Test
+ fun generatedConverter() {
+ val src = Source.kotlin(
+ "Sources.kt",
+ """
+ import androidx.room.*
+
+ @Database(entities = [MyEntity::class], version = 1, exportSchema = false)
+ @TypeConverters(Generated_CustomConverters::class)
+ abstract class MyDatabase : RoomDatabase() {
+ abstract fun getMyDao(): MyDao
+ }
+
+ @Dao
+ interface MyDao {
+ @Query("SELECT * FROM MyEntity")
+ fun getMyEntity(): MyEntity
+ }
+
+ @Entity
+ @GenConverter
+ data class MyEntity(
+ @PrimaryKey val id: Long,
+ val data: Foo
+ )
+
+ class Foo
+
+ annotation class GenConverter
+ """.trimIndent()
+ )
+ runProcessorTest(
+ sources = listOf(src),
+ javacProcessors =
+ listOf(RoomProcessor(), JavacCustomConverter()),
+ symbolProcessorProviders =
+ listOf(RoomKspProcessor.Provider(), KspCustomConverter.Provider())
+ ) {
+ it.hasNoWarnings()
+ }
+ }
+
+ class CustomConverterGenerator : XProcessingStep {
+ override fun annotations() = setOf("GenConverter")
+ override fun process(
+ env: XProcessingEnv,
+ elementsByAnnotation: Map<String, Set<XElement>>,
+ isLastRound: Boolean
+ ): Set<XElement> {
+ val elements = elementsByAnnotation.getOrDefault("GenConverter", emptySet())
+ val element = elements.singleOrNull() ?: return emptySet()
+ val typeSpec = TypeSpec.classBuilder("Generated_CustomConverters")
+ .addOriginatingElement(element)
+ .addModifiers(Modifier.PUBLIC, Modifier.FINAL)
+ .addMethod(MethodSpec.methodBuilder("fooToString")
+ .addAnnotation(ClassName.get("androidx.room", "TypeConverter"))
+ .addModifiers(Modifier.PUBLIC)
+ .returns(ClassName.get("java.lang", "String"))
+ .addParameter(ClassName.get("", "Foo"), "f")
+ .addStatement("return \$S", "")
+ .build()
+ )
+ .addMethod(MethodSpec.methodBuilder("stringToFoo")
+ .addAnnotation(ClassName.get("androidx.room", "TypeConverter"))
+ .addModifiers(Modifier.PUBLIC)
+ .returns(ClassName.get("", "Foo"))
+ .addParameter(ClassName.get("java.lang", "String"), "s")
+ .addStatement("return new Foo()")
+ .build()
+ )
+ .build()
+ val javaFile = JavaFile.builder("", typeSpec).build()
+ env.filer.write(javaFile, XFiler.Mode.Isolating)
+ return emptySet()
+ }
+ }
+
+ class JavacCustomConverter : JavacBasicAnnotationProcessor() {
+ override fun processingSteps() = listOf(CustomConverterGenerator())
+ override fun getSupportedSourceVersion() = SourceVersion.latest()
+ }
+
+ class KspCustomConverter(env: SymbolProcessorEnvironment) : KspBasicAnnotationProcessor(env) {
+ override fun processingSteps() = listOf(CustomConverterGenerator())
+ class Provider : SymbolProcessorProvider {
+ override fun create(environment: SymbolProcessorEnvironment) =
+ KspCustomConverter(environment)
+ }
+ }
+}
diff --git a/room/room-gradle-plugin/build.gradle b/room/room-gradle-plugin/build.gradle
index 6b3e02f..5b0b1e7 100644
--- a/room/room-gradle-plugin/build.gradle
+++ b/room/room-gradle-plugin/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.SdkResourceGenerator
diff --git a/room/room-guava/build.gradle b/room/room-guava/build.gradle
index d327c97..447c000 100644
--- a/room/room-guava/build.gradle
+++ b/room/room-guava/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/room/room-ktx/build.gradle b/room/room-ktx/build.gradle
index 0cf215a..58a0f23 100644
--- a/room/room-ktx/build.gradle
+++ b/room/room-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/room/room-migration/build.gradle b/room/room-migration/build.gradle
index b717d633..2a7e17c 100644
--- a/room/room-migration/build.gradle
+++ b/room/room-migration/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/room/room-paging-guava/build.gradle b/room/room-paging-guava/build.gradle
index 5926417..fd4bc96 100644
--- a/room/room-paging-guava/build.gradle
+++ b/room/room-paging-guava/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/room/room-paging-rxjava2/build.gradle b/room/room-paging-rxjava2/build.gradle
index ef456c6..f767f78 100644
--- a/room/room-paging-rxjava2/build.gradle
+++ b/room/room-paging-rxjava2/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/room/room-paging-rxjava3/build.gradle b/room/room-paging-rxjava3/build.gradle
index 9f9c7617..ade15bc 100644
--- a/room/room-paging-rxjava3/build.gradle
+++ b/room/room-paging-rxjava3/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/room/room-paging/build.gradle b/room/room-paging/build.gradle
index 440665a..cbe5f5d 100644
--- a/room/room-paging/build.gradle
+++ b/room/room-paging/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/room/room-runtime-lint/build.gradle b/room/room-runtime-lint/build.gradle
index 52cc23c..5a0f53d 100644
--- a/room/room-runtime-lint/build.gradle
+++ b/room/room-runtime-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/room/room-runtime/api/current.txt b/room/room-runtime/api/current.txt
index 57ca0f5..ef76640 100644
--- a/room/room-runtime/api/current.txt
+++ b/room/room-runtime/api/current.txt
@@ -26,7 +26,7 @@
field public final java.util.List<java.lang.Object> typeConverters;
}
- @SuppressCompatibility @RequiresOptIn @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.FUNCTION}) public @interface ExperimentalRoomApi {
+ @SuppressCompatibility @kotlin.RequiresOptIn @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.FUNCTION}) public @interface ExperimentalRoomApi {
}
public class InvalidationTracker {
@@ -70,6 +70,7 @@
method @Deprecated protected androidx.sqlite.db.SupportSQLiteOpenHelper createOpenHelper(androidx.room.DatabaseConfiguration config);
method @Deprecated public void endTransaction();
method public androidx.room.InvalidationTracker getInvalidationTracker();
+ method @Deprecated @kotlin.jvm.Volatile protected androidx.sqlite.db.SupportSQLiteDatabase? getMDatabase();
method public androidx.sqlite.db.SupportSQLiteOpenHelper getOpenHelper();
method public java.util.concurrent.Executor getQueryExecutor();
method public java.util.concurrent.Executor getTransactionExecutor();
@@ -84,9 +85,11 @@
method public android.database.Cursor query(String query, Object?[]? args);
method public void runInTransaction(Runnable body);
method public <V> V runInTransaction(java.util.concurrent.Callable<V> body);
+ method @Deprecated @kotlin.jvm.Volatile protected void setMDatabase(androidx.sqlite.db.SupportSQLiteDatabase?);
method @Deprecated public void setTransactionSuccessful();
property public androidx.room.InvalidationTracker invalidationTracker;
property public boolean isOpen;
+ property @Deprecated @kotlin.jvm.Volatile protected androidx.sqlite.db.SupportSQLiteDatabase? mDatabase;
property public androidx.sqlite.db.SupportSQLiteOpenHelper openHelper;
property public java.util.concurrent.Executor queryExecutor;
property public java.util.concurrent.Executor transactionExecutor;
diff --git a/room/room-runtime/api/restricted_current.txt b/room/room-runtime/api/restricted_current.txt
index 5b386e3..39ae331 100644
--- a/room/room-runtime/api/restricted_current.txt
+++ b/room/room-runtime/api/restricted_current.txt
@@ -74,7 +74,7 @@
method public java.util.List<java.lang.Long> upsertAndReturnIdsList(T[] entities);
}
- @SuppressCompatibility @RequiresOptIn @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.FUNCTION}) public @interface ExperimentalRoomApi {
+ @SuppressCompatibility @kotlin.RequiresOptIn @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.FUNCTION}) public @interface ExperimentalRoomApi {
}
public class InvalidationTracker {
@@ -125,6 +125,8 @@
method @Deprecated protected androidx.sqlite.db.SupportSQLiteOpenHelper createOpenHelper(androidx.room.DatabaseConfiguration config);
method @Deprecated public void endTransaction();
method public androidx.room.InvalidationTracker getInvalidationTracker();
+ method @Deprecated @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) protected java.util.List<androidx.room.RoomDatabase.Callback>? getMCallbacks();
+ method @Deprecated @kotlin.jvm.Volatile protected androidx.sqlite.db.SupportSQLiteDatabase? getMDatabase();
method public androidx.sqlite.db.SupportSQLiteOpenHelper getOpenHelper();
method public java.util.concurrent.Executor getQueryExecutor();
method public java.util.concurrent.Executor getTransactionExecutor();
@@ -139,9 +141,13 @@
method public android.database.Cursor query(String query, Object?[]? args);
method public void runInTransaction(Runnable body);
method public <V> V runInTransaction(java.util.concurrent.Callable<V> body);
+ method @Deprecated @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) protected void setMCallbacks(java.util.List<androidx.room.RoomDatabase.Callback>?);
+ method @Deprecated @kotlin.jvm.Volatile protected void setMDatabase(androidx.sqlite.db.SupportSQLiteDatabase?);
method @Deprecated public void setTransactionSuccessful();
property public androidx.room.InvalidationTracker invalidationTracker;
property public boolean isOpen;
+ property @Deprecated @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) protected java.util.List<androidx.room.RoomDatabase.Callback>? mCallbacks;
+ property @Deprecated @kotlin.jvm.Volatile protected androidx.sqlite.db.SupportSQLiteDatabase? mDatabase;
property public androidx.sqlite.db.SupportSQLiteOpenHelper openHelper;
property public java.util.concurrent.Executor queryExecutor;
property public java.util.concurrent.Executor transactionExecutor;
diff --git a/room/room-runtime/build.gradle b/room/room-runtime/build.gradle
index fedf63e..33991a3 100644
--- a/room/room-runtime/build.gradle
+++ b/room/room-runtime/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
@@ -99,7 +106,7 @@
compileOnly("androidx.collection:collection:1.2.0")
compileOnly("androidx.lifecycle:lifecycle-livedata-core:2.0.0")
compileOnly("androidx.paging:paging-common:2.0.0")
- implementation("androidx.annotation:annotation-experimental:1.1.0-rc01")
+ implementation(projectOrArtifact(":annotation:annotation-experimental"))
}
}
androidUnitTest {
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/DatabaseConfiguration.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/DatabaseConfiguration.android.kt
index 30740b5..0e92ee0 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/DatabaseConfiguration.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/DatabaseConfiguration.android.kt
@@ -210,6 +210,7 @@
* aren't required.
*
*/
+ @OptIn(ExperimentalRoomApi::class)
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
@Deprecated("This constructor is deprecated.")
constructor(
@@ -275,6 +276,7 @@
* @param copyFromFile The pre-packaged database file.
*
*/
+ @OptIn(ExperimentalRoomApi::class)
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
@Deprecated("This constructor is deprecated.")
constructor(
@@ -344,6 +346,7 @@
* pre-package database file will be copied from.
*
*/
+ @OptIn(ExperimentalRoomApi::class)
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
@Deprecated("This constructor is deprecated.")
constructor(
@@ -415,6 +418,7 @@
* @param prepackagedDatabaseCallback The pre-packaged callback.
*
*/
+ @OptIn(ExperimentalRoomApi::class)
@SuppressLint("LambdaLast")
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
@Deprecated("This constructor is deprecated.")
@@ -489,6 +493,7 @@
* @param typeConverters The type converters.
*
*/
+ @OptIn(ExperimentalRoomApi::class)
@SuppressLint("LambdaLast")
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
@Deprecated("This constructor is deprecated.")
@@ -565,6 +570,7 @@
* @param autoMigrationSpecs The auto migration specs.
*
*/
+ @OptIn(ExperimentalRoomApi::class)
@SuppressLint("LambdaLast")
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
@Deprecated("This constructor is deprecated.")
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/ExperimentalRoomApi.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/ExperimentalRoomApi.android.kt
index 20ed03b..8de193e6 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/ExperimentalRoomApi.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/ExperimentalRoomApi.android.kt
@@ -15,8 +15,6 @@
*/
package androidx.room
-import androidx.annotation.RequiresOptIn
-
/**
* APIs marked with ExperimentalRoomApi are experimental and may change.
*/
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/RoomDatabase.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/RoomDatabase.android.kt
index d178962..353c4cb 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/RoomDatabase.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/RoomDatabase.android.kt
@@ -1135,6 +1135,7 @@
*
* @return This builder instance.
*/
+ @OptIn(ExperimentalRoomApi::class)
@Suppress("UnsafeOptInUsageError")
open fun enableMultiInstanceInvalidation() = apply {
this.multiInstanceInvalidationIntent = if (name != null) {
diff --git a/room/room-rxjava2/build.gradle b/room/room-rxjava2/build.gradle
index 1ed88d2..69ab4da 100644
--- a/room/room-rxjava2/build.gradle
+++ b/room/room-rxjava2/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/room/room-rxjava3/build.gradle b/room/room-rxjava3/build.gradle
index 74a8894..1610f8a 100644
--- a/room/room-rxjava3/build.gradle
+++ b/room/room-rxjava3/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/room/room-testing/build.gradle b/room/room-testing/build.gradle
index a7d0d81..8fbdb36 100644
--- a/room/room-testing/build.gradle
+++ b/room/room-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/safeparcel/safeparcel-processor/build.gradle b/safeparcel/safeparcel-processor/build.gradle
index a9b3651..9b88268 100644
--- a/safeparcel/safeparcel-processor/build.gradle
+++ b/safeparcel/safeparcel-processor/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/safeparcel/safeparcel/build.gradle b/safeparcel/safeparcel/build.gradle
index aedc6bb..572cf67 100644
--- a/safeparcel/safeparcel/build.gradle
+++ b/safeparcel/safeparcel/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/samples/AndroidXDemos/build.gradle b/samples/AndroidXDemos/build.gradle
index 810fd6b..147b863 100644
--- a/samples/AndroidXDemos/build.gradle
+++ b/samples/AndroidXDemos/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
plugins {
id("AndroidXPlugin")
id("com.android.application")
diff --git a/samples/MediaRoutingDemo/build.gradle b/samples/MediaRoutingDemo/build.gradle
index 456800f..108ce24 100644
--- a/samples/MediaRoutingDemo/build.gradle
+++ b/samples/MediaRoutingDemo/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
plugins {
id("AndroidXPlugin")
id("com.android.application")
diff --git a/samples/Support4Demos/build.gradle b/samples/Support4Demos/build.gradle
index 3b84a11..8ae4eda 100644
--- a/samples/Support4Demos/build.gradle
+++ b/samples/Support4Demos/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
plugins {
id("AndroidXPlugin")
id("com.android.application")
diff --git a/samples/SupportAnimationDemos/build.gradle b/samples/SupportAnimationDemos/build.gradle
index c0c6e5f..5143dde 100644
--- a/samples/SupportAnimationDemos/build.gradle
+++ b/samples/SupportAnimationDemos/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
plugins {
id("AndroidXPlugin")
id("com.android.application")
diff --git a/samples/SupportLeanbackDemos/build.gradle b/samples/SupportLeanbackDemos/build.gradle
index 2526092..c929731 100644
--- a/samples/SupportLeanbackDemos/build.gradle
+++ b/samples/SupportLeanbackDemos/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
plugins {
id("AndroidXPlugin")
id("com.android.application")
diff --git a/samples/SupportPreferenceDemos/build.gradle b/samples/SupportPreferenceDemos/build.gradle
index c40e8ce..73d482c 100644
--- a/samples/SupportPreferenceDemos/build.gradle
+++ b/samples/SupportPreferenceDemos/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
plugins {
id("AndroidXPlugin")
id("com.android.application")
diff --git a/samples/SupportTransitionDemos/build.gradle b/samples/SupportTransitionDemos/build.gradle
index c9e585b..6119a42 100644
--- a/samples/SupportTransitionDemos/build.gradle
+++ b/samples/SupportTransitionDemos/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
plugins {
id("AndroidXPlugin")
id("com.android.application")
diff --git a/savedstate/savedstate-ktx/build.gradle b/savedstate/savedstate-ktx/build.gradle
index daba854..915bed4 100644
--- a/savedstate/savedstate-ktx/build.gradle
+++ b/savedstate/savedstate-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/savedstate/savedstate/build.gradle b/savedstate/savedstate/build.gradle
index 6932b10..ec7b4e9 100644
--- a/savedstate/savedstate/build.gradle
+++ b/savedstate/savedstate/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/security/security-app-authenticator-testing/build.gradle b/security/security-app-authenticator-testing/build.gradle
index 601a1897..ea467d0 100644
--- a/security/security-app-authenticator-testing/build.gradle
+++ b/security/security-app-authenticator-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/security/security-app-authenticator/build.gradle b/security/security-app-authenticator/build.gradle
index 28cb85f..5d02e7c 100644
--- a/security/security-app-authenticator/build.gradle
+++ b/security/security-app-authenticator/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/security/security-biometric/build.gradle b/security/security-biometric/build.gradle
index 1adc401..25e8964 100644
--- a/security/security-biometric/build.gradle
+++ b/security/security-biometric/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/security/security-crypto-ktx/build.gradle b/security/security-crypto-ktx/build.gradle
index f859b4d..3ad3bb3 100644
--- a/security/security-crypto-ktx/build.gradle
+++ b/security/security-crypto-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/security/security-crypto/build.gradle b/security/security-crypto/build.gradle
index b166436..8a3c866 100644
--- a/security/security-crypto/build.gradle
+++ b/security/security-crypto/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/security/security-identity-credential/build.gradle b/security/security-identity-credential/build.gradle
index 92a2786..b04125e 100644
--- a/security/security-identity-credential/build.gradle
+++ b/security/security-identity-credential/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/sharetarget/sharetarget/build.gradle b/sharetarget/sharetarget/build.gradle
index 82fd862..d9ea084 100644
--- a/sharetarget/sharetarget/build.gradle
+++ b/sharetarget/sharetarget/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/slice/slice-benchmark/build.gradle b/slice/slice-benchmark/build.gradle
index 889b783..2cb25fe 100644
--- a/slice/slice-benchmark/build.gradle
+++ b/slice/slice-benchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/slice/slice-builders-ktx/build.gradle b/slice/slice-builders-ktx/build.gradle
index 6050969..da1bc13 100644
--- a/slice/slice-builders-ktx/build.gradle
+++ b/slice/slice-builders-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/slice/slice-builders/build.gradle b/slice/slice-builders/build.gradle
index aa91191..b5d3806 100644
--- a/slice/slice-builders/build.gradle
+++ b/slice/slice-builders/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/slice/slice-core/build.gradle b/slice/slice-core/build.gradle
index 0ae161e..63f826f 100644
--- a/slice/slice-core/build.gradle
+++ b/slice/slice-core/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/slice/slice-remotecallback/build.gradle b/slice/slice-remotecallback/build.gradle
index e71b68c..d587921 100644
--- a/slice/slice-remotecallback/build.gradle
+++ b/slice/slice-remotecallback/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/slice/slice-test/build.gradle b/slice/slice-test/build.gradle
index 6913178..1f122dc 100644
--- a/slice/slice-test/build.gradle
+++ b/slice/slice-test/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/slice/slice-view/build.gradle b/slice/slice-view/build.gradle
index 7752f52..cecbb5b 100644
--- a/slice/slice-view/build.gradle
+++ b/slice/slice-view/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/slidingpanelayout/slidingpanelayout-testapp/build.gradle b/slidingpanelayout/slidingpanelayout-testapp/build.gradle
index 7d5ebec..e1057d7 100644
--- a/slidingpanelayout/slidingpanelayout-testapp/build.gradle
+++ b/slidingpanelayout/slidingpanelayout-testapp/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/slidingpanelayout/slidingpanelayout/build.gradle b/slidingpanelayout/slidingpanelayout/build.gradle
index 3a1f464..14b7661 100644
--- a/slidingpanelayout/slidingpanelayout/build.gradle
+++ b/slidingpanelayout/slidingpanelayout/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/sqlite/integration-tests/driver-conformance-test/build.gradle b/sqlite/integration-tests/driver-conformance-test/build.gradle
index cc6b108..ab1abc6 100644
--- a/sqlite/integration-tests/driver-conformance-test/build.gradle
+++ b/sqlite/integration-tests/driver-conformance-test/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
diff --git a/sqlite/sqlite-bundled/build.gradle b/sqlite/sqlite-bundled/build.gradle
index d9c9abd2..a1a6e59 100644
--- a/sqlite/sqlite-bundled/build.gradle
+++ b/sqlite/sqlite-bundled/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.AndroidXConfig
import androidx.build.KmpPlatformsKt
import androidx.build.PlatformIdentifier
diff --git a/sqlite/sqlite-framework/build.gradle b/sqlite/sqlite-framework/build.gradle
index 5dd5b8f..b2ad298 100644
--- a/sqlite/sqlite-framework/build.gradle
+++ b/sqlite/sqlite-framework/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import androidx.build.PlatformIdentifier
import androidx.build.Publish
diff --git a/sqlite/sqlite-inspection/build.gradle b/sqlite/sqlite-inspection/build.gradle
index 3210e2c..950e5c3 100644
--- a/sqlite/sqlite-inspection/build.gradle
+++ b/sqlite/sqlite-inspection/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/sqlite/sqlite-ktx/build.gradle b/sqlite/sqlite-ktx/build.gradle
index 1fa5b0e..ac587d8 100644
--- a/sqlite/sqlite-ktx/build.gradle
+++ b/sqlite/sqlite-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/sqlite/sqlite/build.gradle b/sqlite/sqlite/build.gradle
index df13eee..ce5dd33 100644
--- a/sqlite/sqlite/build.gradle
+++ b/sqlite/sqlite/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.KmpPlatformsKt
import androidx.build.PlatformIdentifier
import androidx.build.Publish
diff --git a/stableaidl/stableaidl-gradle-plugin/build.gradle b/stableaidl/stableaidl-gradle-plugin/build.gradle
index 51bb29b..7c377f8 100644
--- a/stableaidl/stableaidl-gradle-plugin/build.gradle
+++ b/stableaidl/stableaidl-gradle-plugin/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.*
plugins {
diff --git a/startup/startup-runtime-lint/build.gradle b/startup/startup-runtime-lint/build.gradle
index 2ca037c..d3a2172 100644
--- a/startup/startup-runtime-lint/build.gradle
+++ b/startup/startup-runtime-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/startup/startup-runtime/build.gradle b/startup/startup-runtime/build.gradle
index 2a0859a..285ff7e 100644
--- a/startup/startup-runtime/build.gradle
+++ b/startup/startup-runtime/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/swiperefreshlayout/swiperefreshlayout/build.gradle b/swiperefreshlayout/swiperefreshlayout/build.gradle
index 811b678..8e423a1 100644
--- a/swiperefreshlayout/swiperefreshlayout/build.gradle
+++ b/swiperefreshlayout/swiperefreshlayout/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/test/ext/junit-gtest/build.gradle b/test/ext/junit-gtest/build.gradle
index ea12d35..4f5b227 100644
--- a/test/ext/junit-gtest/build.gradle
+++ b/test/ext/junit-gtest/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/test/integration-tests/junit-gtest-test/build.gradle b/test/integration-tests/junit-gtest-test/build.gradle
index 7d9a45d..6bc805a 100644
--- a/test/integration-tests/junit-gtest-test/build.gradle
+++ b/test/integration-tests/junit-gtest-test/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/test/screenshot/screenshot-proto/build.gradle b/test/screenshot/screenshot-proto/build.gradle
index 879e232..7975b0d 100644
--- a/test/screenshot/screenshot-proto/build.gradle
+++ b/test/screenshot/screenshot-proto/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BuildServerConfigurationKt
plugins {
diff --git a/test/screenshot/screenshot/build.gradle b/test/screenshot/screenshot/build.gradle
index 23dbc2b..2803de1 100644
--- a/test/screenshot/screenshot/build.gradle
+++ b/test/screenshot/screenshot/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
diff --git a/test/uiautomator/uiautomator/build.gradle b/test/uiautomator/uiautomator/build.gradle
index aeb61bc..d7ebbba 100644
--- a/test/uiautomator/uiautomator/build.gradle
+++ b/test/uiautomator/uiautomator/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/testutils/testutils-appcompat/build.gradle b/testutils/testutils-appcompat/build.gradle
index ac4b131..a66bd45 100644
--- a/testutils/testutils-appcompat/build.gradle
+++ b/testutils/testutils-appcompat/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/testutils/testutils-common/build.gradle b/testutils/testutils-common/build.gradle
index a73524b..a49f6d2 100644
--- a/testutils/testutils-common/build.gradle
+++ b/testutils/testutils-common/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
/*
@@ -16,6 +23,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/testutils/testutils-datastore/build.gradle b/testutils/testutils-datastore/build.gradle
index 3bb4fcf..ef661f7 100644
--- a/testutils/testutils-datastore/build.gradle
+++ b/testutils/testutils-datastore/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/testutils/testutils-espresso/build.gradle b/testutils/testutils-espresso/build.gradle
index 8bdb558..87da559 100644
--- a/testutils/testutils-espresso/build.gradle
+++ b/testutils/testutils-espresso/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/testutils/testutils-fonts/build.gradle b/testutils/testutils-fonts/build.gradle
index f2095aa..2dd302b 100644
--- a/testutils/testutils-fonts/build.gradle
+++ b/testutils/testutils-fonts/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/testutils/testutils-gradle-plugin/build.gradle b/testutils/testutils-gradle-plugin/build.gradle
index b1885a3..fcac202 100644
--- a/testutils/testutils-gradle-plugin/build.gradle
+++ b/testutils/testutils-gradle-plugin/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/testutils/testutils-ktx/build.gradle b/testutils/testutils-ktx/build.gradle
index 21ef343d..fd63ad7 100644
--- a/testutils/testutils-ktx/build.gradle
+++ b/testutils/testutils-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/testutils/testutils-macrobenchmark/build.gradle b/testutils/testutils-macrobenchmark/build.gradle
index 62bf7f3..e07a748 100644
--- a/testutils/testutils-macrobenchmark/build.gradle
+++ b/testutils/testutils-macrobenchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/testutils/testutils-mockito/build.gradle b/testutils/testutils-mockito/build.gradle
index c502a0d..c50d41e 100644
--- a/testutils/testutils-mockito/build.gradle
+++ b/testutils/testutils-mockito/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/testutils/testutils-navigation/build.gradle b/testutils/testutils-navigation/build.gradle
index b4e0204..773ee21 100644
--- a/testutils/testutils-navigation/build.gradle
+++ b/testutils/testutils-navigation/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/testutils/testutils-paging/build.gradle b/testutils/testutils-paging/build.gradle
index a0ed808..8688589 100644
--- a/testutils/testutils-paging/build.gradle
+++ b/testutils/testutils-paging/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/testutils/testutils-paparazzi/build.gradle b/testutils/testutils-paparazzi/build.gradle
index ff3b18a..68d62b0 100644
--- a/testutils/testutils-paparazzi/build.gradle
+++ b/testutils/testutils-paparazzi/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BundleInsideHelper
import androidx.build.LibraryType
diff --git a/testutils/testutils-runtime/build.gradle b/testutils/testutils-runtime/build.gradle
index 8413a90..4d4ce3b 100644
--- a/testutils/testutils-runtime/build.gradle
+++ b/testutils/testutils-runtime/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/testutils/testutils-truth/build.gradle b/testutils/testutils-truth/build.gradle
index 1e46a9e..361293b 100644
--- a/testutils/testutils-truth/build.gradle
+++ b/testutils/testutils-truth/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/text/text/build.gradle b/text/text/build.gradle
index a918d46..a7b4568 100644
--- a/text/text/build.gradle
+++ b/text/text/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/tracing/tracing-ktx/build.gradle b/tracing/tracing-ktx/build.gradle
index e08c118..b764032 100644
--- a/tracing/tracing-ktx/build.gradle
+++ b/tracing/tracing-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/tracing/tracing-perfetto-binary/build.gradle b/tracing/tracing-perfetto-binary/build.gradle
index 8df5469..0a9ab3df 100644
--- a/tracing/tracing-perfetto-binary/build.gradle
+++ b/tracing/tracing-perfetto-binary/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.AndroidXConfig
diff --git a/tracing/tracing-perfetto-handshake/build.gradle b/tracing/tracing-perfetto-handshake/build.gradle
index 9f6adaa..d75c310 100644
--- a/tracing/tracing-perfetto-handshake/build.gradle
+++ b/tracing/tracing-perfetto-handshake/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.BuildServerConfigurationKt
import androidx.build.Publish
@@ -37,4 +44,5 @@
publish = Publish.SNAPSHOT_AND_RELEASE
inceptionYear = "2022"
description = "AndroidX Tracing: Perfetto Handshake"
+ metalavaK2UastEnabled = true
}
diff --git a/tracing/tracing-perfetto/build.gradle b/tracing/tracing-perfetto/build.gradle
index fa31194..a49481d 100644
--- a/tracing/tracing-perfetto/build.gradle
+++ b/tracing/tracing-perfetto/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.AndroidXConfig
diff --git a/tracing/tracing/build.gradle b/tracing/tracing/build.gradle
index 0edefb34..2e1d131 100644
--- a/tracing/tracing/build.gradle
+++ b/tracing/tracing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/transition/transition-ktx/build.gradle b/transition/transition-ktx/build.gradle
index 6d7000c..9ca355f 100644
--- a/transition/transition-ktx/build.gradle
+++ b/transition/transition-ktx/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/transition/transition/build.gradle b/transition/transition/build.gradle
index 6d5daad..dce4a5e 100644
--- a/transition/transition/build.gradle
+++ b/transition/transition/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/tv/integration-tests/playground/build.gradle b/tv/integration-tests/playground/build.gradle
index 0842d00..f0e12a7 100644
--- a/tv/integration-tests/playground/build.gradle
+++ b/tv/integration-tests/playground/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/tv/integration-tests/presentation/build.gradle b/tv/integration-tests/presentation/build.gradle
index 1b3e68c..7606a29 100644
--- a/tv/integration-tests/presentation/build.gradle
+++ b/tv/integration-tests/presentation/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/tv/samples/build.gradle b/tv/samples/build.gradle
index fbf05ce..b47b047 100644
--- a/tv/samples/build.gradle
+++ b/tv/samples/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/tv/tv-foundation/build.gradle b/tv/tv-foundation/build.gradle
index 585c6f5..5aae051 100644
--- a/tv/tv-foundation/build.gradle
+++ b/tv/tv-foundation/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/tv/tv-material/api/current.txt b/tv/tv-material/api/current.txt
index d7cde4f..3837a8d 100644
--- a/tv/tv-material/api/current.txt
+++ b/tv/tv-material/api/current.txt
@@ -60,8 +60,8 @@
}
public final class ButtonKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional androidx.tv.material3.ButtonScale scale, optional androidx.tv.material3.ButtonGlow glow, optional androidx.tv.material3.ButtonShape shape, optional androidx.tv.material3.ButtonColors colors, optional float tonalElevation, optional androidx.tv.material3.ButtonBorder border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void OutlinedButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional androidx.tv.material3.ButtonScale scale, optional androidx.tv.material3.ButtonGlow glow, optional androidx.tv.material3.ButtonShape shape, optional androidx.tv.material3.ButtonColors colors, optional float tonalElevation, optional androidx.tv.material3.ButtonBorder border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional androidx.tv.material3.ButtonScale scale, optional androidx.tv.material3.ButtonGlow glow, optional androidx.tv.material3.ButtonShape shape, optional androidx.tv.material3.ButtonColors colors, optional float tonalElevation, optional androidx.tv.material3.ButtonBorder border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void OutlinedButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional androidx.tv.material3.ButtonScale scale, optional androidx.tv.material3.ButtonGlow glow, optional androidx.tv.material3.ButtonShape shape, optional androidx.tv.material3.ButtonColors colors, optional float tonalElevation, optional androidx.tv.material3.ButtonBorder border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
}
@SuppressCompatibility @androidx.compose.runtime.Immutable @androidx.tv.material3.ExperimentalTvMaterial3Api public final class ButtonScale {
@@ -101,10 +101,10 @@
}
public final class CardKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Card(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional androidx.tv.material3.CardShape shape, optional androidx.tv.material3.CardColors colors, optional androidx.tv.material3.CardScale scale, optional androidx.tv.material3.CardBorder border, optional androidx.tv.material3.CardGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void ClassicCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> image, kotlin.jvm.functions.Function0<kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit> subtitle, optional kotlin.jvm.functions.Function0<kotlin.Unit> description, optional androidx.tv.material3.CardShape shape, optional androidx.tv.material3.CardColors colors, optional androidx.tv.material3.CardScale scale, optional androidx.tv.material3.CardBorder border, optional androidx.tv.material3.CardGlow glow, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void CompactCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> image, kotlin.jvm.functions.Function0<kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit> subtitle, optional kotlin.jvm.functions.Function0<kotlin.Unit> description, optional androidx.tv.material3.CardShape shape, optional androidx.tv.material3.CardColors colors, optional androidx.tv.material3.CardScale scale, optional androidx.tv.material3.CardBorder border, optional androidx.tv.material3.CardGlow glow, optional androidx.compose.ui.graphics.Brush scrimBrush, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void WideClassicCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> image, kotlin.jvm.functions.Function0<kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit> subtitle, optional kotlin.jvm.functions.Function0<kotlin.Unit> description, optional androidx.tv.material3.CardShape shape, optional androidx.tv.material3.CardColors colors, optional androidx.tv.material3.CardScale scale, optional androidx.tv.material3.CardBorder border, optional androidx.tv.material3.CardGlow glow, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Card(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional androidx.tv.material3.CardShape shape, optional androidx.tv.material3.CardColors colors, optional androidx.tv.material3.CardScale scale, optional androidx.tv.material3.CardBorder border, optional androidx.tv.material3.CardGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void ClassicCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> image, kotlin.jvm.functions.Function0<kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit> subtitle, optional kotlin.jvm.functions.Function0<kotlin.Unit> description, optional androidx.tv.material3.CardShape shape, optional androidx.tv.material3.CardColors colors, optional androidx.tv.material3.CardScale scale, optional androidx.tv.material3.CardBorder border, optional androidx.tv.material3.CardGlow glow, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void CompactCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> image, kotlin.jvm.functions.Function0<kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit> subtitle, optional kotlin.jvm.functions.Function0<kotlin.Unit> description, optional androidx.tv.material3.CardShape shape, optional androidx.tv.material3.CardColors colors, optional androidx.tv.material3.CardScale scale, optional androidx.tv.material3.CardBorder border, optional androidx.tv.material3.CardGlow glow, optional androidx.compose.ui.graphics.Brush scrimBrush, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void WideClassicCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> image, kotlin.jvm.functions.Function0<kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit> subtitle, optional kotlin.jvm.functions.Function0<kotlin.Unit> description, optional androidx.tv.material3.CardShape shape, optional androidx.tv.material3.CardColors colors, optional androidx.tv.material3.CardScale scale, optional androidx.tv.material3.CardBorder border, optional androidx.tv.material3.CardGlow glow, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
}
@SuppressCompatibility @androidx.compose.runtime.Immutable @androidx.tv.material3.ExperimentalTvMaterial3Api public final class CardLayoutColors {
@@ -168,15 +168,15 @@
}
public final class CheckboxKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Checkbox(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit>? onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.tv.material3.CheckboxColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void TriStateCheckbox(androidx.compose.ui.state.ToggleableState state, kotlin.jvm.functions.Function0<kotlin.Unit>? onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.tv.material3.CheckboxColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Checkbox(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit>? onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.tv.material3.CheckboxColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void TriStateCheckbox(androidx.compose.ui.state.ToggleableState state, kotlin.jvm.functions.Function0<kotlin.Unit>? onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.tv.material3.CheckboxColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
}
public final class ChipKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void AssistChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? leadingIcon, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingIcon, optional androidx.tv.material3.ClickableChipShape shape, optional androidx.tv.material3.ClickableChipColors colors, optional androidx.tv.material3.ClickableChipScale scale, optional androidx.tv.material3.ClickableChipBorder border, optional androidx.tv.material3.ClickableChipGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void FilterChip(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? leadingIcon, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingIcon, optional androidx.tv.material3.SelectableChipShape shape, optional androidx.tv.material3.SelectableChipColors colors, optional androidx.tv.material3.SelectableChipScale scale, optional androidx.tv.material3.SelectableChipBorder border, optional androidx.tv.material3.SelectableChipGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void InputChip(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? leadingIcon, optional kotlin.jvm.functions.Function0<kotlin.Unit>? avatar, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingIcon, optional androidx.tv.material3.SelectableChipShape shape, optional androidx.tv.material3.SelectableChipColors colors, optional androidx.tv.material3.SelectableChipScale scale, optional androidx.tv.material3.SelectableChipBorder border, optional androidx.tv.material3.SelectableChipGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void SuggestionChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional androidx.tv.material3.ClickableChipShape shape, optional androidx.tv.material3.ClickableChipColors colors, optional androidx.tv.material3.ClickableChipScale scale, optional androidx.tv.material3.ClickableChipBorder border, optional androidx.tv.material3.ClickableChipGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void AssistChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? leadingIcon, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingIcon, optional androidx.tv.material3.ClickableChipShape shape, optional androidx.tv.material3.ClickableChipColors colors, optional androidx.tv.material3.ClickableChipScale scale, optional androidx.tv.material3.ClickableChipBorder border, optional androidx.tv.material3.ClickableChipGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void FilterChip(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? leadingIcon, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingIcon, optional androidx.tv.material3.SelectableChipShape shape, optional androidx.tv.material3.SelectableChipColors colors, optional androidx.tv.material3.SelectableChipScale scale, optional androidx.tv.material3.SelectableChipBorder border, optional androidx.tv.material3.SelectableChipGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void InputChip(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? leadingIcon, optional kotlin.jvm.functions.Function0<kotlin.Unit>? avatar, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingIcon, optional androidx.tv.material3.SelectableChipShape shape, optional androidx.tv.material3.SelectableChipColors colors, optional androidx.tv.material3.SelectableChipScale scale, optional androidx.tv.material3.SelectableChipBorder border, optional androidx.tv.material3.SelectableChipGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void SuggestionChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional androidx.tv.material3.ClickableChipShape shape, optional androidx.tv.material3.ClickableChipColors colors, optional androidx.tv.material3.ClickableChipScale scale, optional androidx.tv.material3.ClickableChipBorder border, optional androidx.tv.material3.ClickableChipGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
}
@SuppressCompatibility @androidx.compose.runtime.Immutable @androidx.tv.material3.ExperimentalTvMaterial3Api public final class ClickableChipBorder {
@@ -381,8 +381,8 @@
}
public final class IconButtonKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void IconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional androidx.tv.material3.ButtonScale scale, optional androidx.tv.material3.ButtonGlow glow, optional androidx.tv.material3.ButtonShape shape, optional androidx.tv.material3.ButtonColors colors, optional androidx.tv.material3.ButtonBorder border, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void OutlinedIconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional androidx.tv.material3.ButtonScale scale, optional androidx.tv.material3.ButtonGlow glow, optional androidx.tv.material3.ButtonShape shape, optional androidx.tv.material3.ButtonColors colors, optional androidx.tv.material3.ButtonBorder border, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void IconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional androidx.tv.material3.ButtonScale scale, optional androidx.tv.material3.ButtonGlow glow, optional androidx.tv.material3.ButtonShape shape, optional androidx.tv.material3.ButtonColors colors, optional androidx.tv.material3.ButtonBorder border, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void OutlinedIconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional androidx.tv.material3.ButtonScale scale, optional androidx.tv.material3.ButtonGlow glow, optional androidx.tv.material3.ButtonShape shape, optional androidx.tv.material3.ButtonColors colors, optional androidx.tv.material3.ButtonBorder border, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
}
public final class IconKt {
@@ -520,8 +520,8 @@
}
public final class ListItemKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void DenseListItem(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? overlineContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? supportingContent, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? leadingContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingContent, optional float tonalElevation, optional androidx.tv.material3.ListItemShape shape, optional androidx.tv.material3.ListItemColors colors, optional androidx.tv.material3.ListItemScale scale, optional androidx.tv.material3.ListItemBorder border, optional androidx.tv.material3.ListItemGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> headlineContent);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void ListItem(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? overlineContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? supportingContent, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? leadingContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingContent, optional float tonalElevation, optional androidx.tv.material3.ListItemShape shape, optional androidx.tv.material3.ListItemColors colors, optional androidx.tv.material3.ListItemScale scale, optional androidx.tv.material3.ListItemBorder border, optional androidx.tv.material3.ListItemGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> headlineContent);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void DenseListItem(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? overlineContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? supportingContent, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? leadingContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingContent, optional float tonalElevation, optional androidx.tv.material3.ListItemShape shape, optional androidx.tv.material3.ListItemColors colors, optional androidx.tv.material3.ListItemScale scale, optional androidx.tv.material3.ListItemBorder border, optional androidx.tv.material3.ListItemGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> headlineContent);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void ListItem(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? overlineContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? supportingContent, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? leadingContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingContent, optional float tonalElevation, optional androidx.tv.material3.ListItemShape shape, optional androidx.tv.material3.ListItemColors colors, optional androidx.tv.material3.ListItemScale scale, optional androidx.tv.material3.ListItemBorder border, optional androidx.tv.material3.ListItemGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> headlineContent);
}
@SuppressCompatibility @androidx.compose.runtime.Immutable @androidx.tv.material3.ExperimentalTvMaterial3Api public final class ListItemScale {
@@ -691,7 +691,7 @@
}
public final class NavigationDrawerItemKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void NavigationDrawerItem(androidx.tv.material3.NavigationDrawerScope, boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function0<kotlin.Unit> leadingContent, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? supportingContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingContent, optional float tonalElevation, optional androidx.tv.material3.NavigationDrawerItemShape shape, optional androidx.tv.material3.NavigationDrawerItemColors colors, optional androidx.tv.material3.NavigationDrawerItemScale scale, optional androidx.tv.material3.NavigationDrawerItemBorder border, optional androidx.tv.material3.NavigationDrawerItemGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void NavigationDrawerItem(androidx.tv.material3.NavigationDrawerScope, boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function0<kotlin.Unit> leadingContent, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? supportingContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingContent, optional float tonalElevation, optional androidx.tv.material3.NavigationDrawerItemShape shape, optional androidx.tv.material3.NavigationDrawerItemColors colors, optional androidx.tv.material3.NavigationDrawerItemScale scale, optional androidx.tv.material3.NavigationDrawerItemBorder border, optional androidx.tv.material3.NavigationDrawerItemGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
}
@SuppressCompatibility @androidx.compose.runtime.Immutable @androidx.tv.material3.ExperimentalTvMaterial3Api public final class NavigationDrawerItemScale {
@@ -808,7 +808,7 @@
}
public final class RadioButtonKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void RadioButton(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit>? onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.tv.material3.RadioButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void RadioButton(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit>? onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.tv.material3.RadioButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
}
@SuppressCompatibility @androidx.tv.material3.ExperimentalTvMaterial3Api public sealed interface ScrollPauseHandle {
@@ -880,8 +880,8 @@
public final class SurfaceKt {
method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Surface(optional androidx.compose.ui.Modifier modifier, optional float tonalElevation, optional androidx.compose.ui.graphics.Shape shape, optional androidx.tv.material3.NonInteractiveSurfaceColors colors, optional androidx.tv.material3.Border border, optional androidx.tv.material3.Glow glow, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Surface(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional float tonalElevation, optional androidx.tv.material3.ToggleableSurfaceShape shape, optional androidx.tv.material3.ToggleableSurfaceColors colors, optional androidx.tv.material3.ToggleableSurfaceScale scale, optional androidx.tv.material3.ToggleableSurfaceBorder border, optional androidx.tv.material3.ToggleableSurfaceGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Surface(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional float tonalElevation, optional androidx.tv.material3.ClickableSurfaceShape shape, optional androidx.tv.material3.ClickableSurfaceColors colors, optional androidx.tv.material3.ClickableSurfaceScale scale, optional androidx.tv.material3.ClickableSurfaceBorder border, optional androidx.tv.material3.ClickableSurfaceGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Surface(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional float tonalElevation, optional androidx.tv.material3.ToggleableSurfaceShape shape, optional androidx.tv.material3.ToggleableSurfaceColors colors, optional androidx.tv.material3.ToggleableSurfaceScale scale, optional androidx.tv.material3.ToggleableSurfaceBorder border, optional androidx.tv.material3.ToggleableSurfaceGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Surface(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional float tonalElevation, optional androidx.tv.material3.ClickableSurfaceShape shape, optional androidx.tv.material3.ClickableSurfaceColors colors, optional androidx.tv.material3.ClickableSurfaceScale scale, optional androidx.tv.material3.ClickableSurfaceBorder border, optional androidx.tv.material3.ClickableSurfaceGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
method @SuppressCompatibility @androidx.tv.material3.ExperimentalTvMaterial3Api public static androidx.compose.runtime.ProvidableCompositionLocal<androidx.compose.ui.unit.Dp> getLocalAbsoluteTonalElevation();
property @SuppressCompatibility @androidx.tv.material3.ExperimentalTvMaterial3Api public static final androidx.compose.runtime.ProvidableCompositionLocal<androidx.compose.ui.unit.Dp> LocalAbsoluteTonalElevation;
}
@@ -897,7 +897,7 @@
}
public final class SwitchKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Switch(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit>? onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? thumbContent, optional boolean enabled, optional androidx.tv.material3.SwitchColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Switch(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit>? onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? thumbContent, optional boolean enabled, optional androidx.tv.material3.SwitchColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
}
@SuppressCompatibility @androidx.tv.material3.ExperimentalTvMaterial3Api public final class TabColors {
@@ -910,7 +910,7 @@
}
public final class TabKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Tab(androidx.tv.material3.TabRowScope, boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onFocus, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional boolean enabled, optional androidx.tv.material3.TabColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Tab(androidx.tv.material3.TabRowScope, boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onFocus, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional boolean enabled, optional androidx.tv.material3.TabColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
}
@SuppressCompatibility @androidx.tv.material3.ExperimentalTvMaterial3Api public final class TabRowDefaults {
diff --git a/tv/tv-material/api/restricted_current.txt b/tv/tv-material/api/restricted_current.txt
index d7cde4f..3837a8d 100644
--- a/tv/tv-material/api/restricted_current.txt
+++ b/tv/tv-material/api/restricted_current.txt
@@ -60,8 +60,8 @@
}
public final class ButtonKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional androidx.tv.material3.ButtonScale scale, optional androidx.tv.material3.ButtonGlow glow, optional androidx.tv.material3.ButtonShape shape, optional androidx.tv.material3.ButtonColors colors, optional float tonalElevation, optional androidx.tv.material3.ButtonBorder border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void OutlinedButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional androidx.tv.material3.ButtonScale scale, optional androidx.tv.material3.ButtonGlow glow, optional androidx.tv.material3.ButtonShape shape, optional androidx.tv.material3.ButtonColors colors, optional float tonalElevation, optional androidx.tv.material3.ButtonBorder border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional androidx.tv.material3.ButtonScale scale, optional androidx.tv.material3.ButtonGlow glow, optional androidx.tv.material3.ButtonShape shape, optional androidx.tv.material3.ButtonColors colors, optional float tonalElevation, optional androidx.tv.material3.ButtonBorder border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void OutlinedButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional androidx.tv.material3.ButtonScale scale, optional androidx.tv.material3.ButtonGlow glow, optional androidx.tv.material3.ButtonShape shape, optional androidx.tv.material3.ButtonColors colors, optional float tonalElevation, optional androidx.tv.material3.ButtonBorder border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
}
@SuppressCompatibility @androidx.compose.runtime.Immutable @androidx.tv.material3.ExperimentalTvMaterial3Api public final class ButtonScale {
@@ -101,10 +101,10 @@
}
public final class CardKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Card(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional androidx.tv.material3.CardShape shape, optional androidx.tv.material3.CardColors colors, optional androidx.tv.material3.CardScale scale, optional androidx.tv.material3.CardBorder border, optional androidx.tv.material3.CardGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void ClassicCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> image, kotlin.jvm.functions.Function0<kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit> subtitle, optional kotlin.jvm.functions.Function0<kotlin.Unit> description, optional androidx.tv.material3.CardShape shape, optional androidx.tv.material3.CardColors colors, optional androidx.tv.material3.CardScale scale, optional androidx.tv.material3.CardBorder border, optional androidx.tv.material3.CardGlow glow, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void CompactCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> image, kotlin.jvm.functions.Function0<kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit> subtitle, optional kotlin.jvm.functions.Function0<kotlin.Unit> description, optional androidx.tv.material3.CardShape shape, optional androidx.tv.material3.CardColors colors, optional androidx.tv.material3.CardScale scale, optional androidx.tv.material3.CardBorder border, optional androidx.tv.material3.CardGlow glow, optional androidx.compose.ui.graphics.Brush scrimBrush, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void WideClassicCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> image, kotlin.jvm.functions.Function0<kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit> subtitle, optional kotlin.jvm.functions.Function0<kotlin.Unit> description, optional androidx.tv.material3.CardShape shape, optional androidx.tv.material3.CardColors colors, optional androidx.tv.material3.CardScale scale, optional androidx.tv.material3.CardBorder border, optional androidx.tv.material3.CardGlow glow, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Card(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional androidx.tv.material3.CardShape shape, optional androidx.tv.material3.CardColors colors, optional androidx.tv.material3.CardScale scale, optional androidx.tv.material3.CardBorder border, optional androidx.tv.material3.CardGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void ClassicCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> image, kotlin.jvm.functions.Function0<kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit> subtitle, optional kotlin.jvm.functions.Function0<kotlin.Unit> description, optional androidx.tv.material3.CardShape shape, optional androidx.tv.material3.CardColors colors, optional androidx.tv.material3.CardScale scale, optional androidx.tv.material3.CardBorder border, optional androidx.tv.material3.CardGlow glow, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void CompactCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> image, kotlin.jvm.functions.Function0<kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit> subtitle, optional kotlin.jvm.functions.Function0<kotlin.Unit> description, optional androidx.tv.material3.CardShape shape, optional androidx.tv.material3.CardColors colors, optional androidx.tv.material3.CardScale scale, optional androidx.tv.material3.CardBorder border, optional androidx.tv.material3.CardGlow glow, optional androidx.compose.ui.graphics.Brush scrimBrush, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void WideClassicCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> image, kotlin.jvm.functions.Function0<kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit> subtitle, optional kotlin.jvm.functions.Function0<kotlin.Unit> description, optional androidx.tv.material3.CardShape shape, optional androidx.tv.material3.CardColors colors, optional androidx.tv.material3.CardScale scale, optional androidx.tv.material3.CardBorder border, optional androidx.tv.material3.CardGlow glow, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
}
@SuppressCompatibility @androidx.compose.runtime.Immutable @androidx.tv.material3.ExperimentalTvMaterial3Api public final class CardLayoutColors {
@@ -168,15 +168,15 @@
}
public final class CheckboxKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Checkbox(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit>? onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.tv.material3.CheckboxColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void TriStateCheckbox(androidx.compose.ui.state.ToggleableState state, kotlin.jvm.functions.Function0<kotlin.Unit>? onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.tv.material3.CheckboxColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Checkbox(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit>? onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.tv.material3.CheckboxColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void TriStateCheckbox(androidx.compose.ui.state.ToggleableState state, kotlin.jvm.functions.Function0<kotlin.Unit>? onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.tv.material3.CheckboxColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
}
public final class ChipKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void AssistChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? leadingIcon, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingIcon, optional androidx.tv.material3.ClickableChipShape shape, optional androidx.tv.material3.ClickableChipColors colors, optional androidx.tv.material3.ClickableChipScale scale, optional androidx.tv.material3.ClickableChipBorder border, optional androidx.tv.material3.ClickableChipGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void FilterChip(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? leadingIcon, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingIcon, optional androidx.tv.material3.SelectableChipShape shape, optional androidx.tv.material3.SelectableChipColors colors, optional androidx.tv.material3.SelectableChipScale scale, optional androidx.tv.material3.SelectableChipBorder border, optional androidx.tv.material3.SelectableChipGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void InputChip(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? leadingIcon, optional kotlin.jvm.functions.Function0<kotlin.Unit>? avatar, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingIcon, optional androidx.tv.material3.SelectableChipShape shape, optional androidx.tv.material3.SelectableChipColors colors, optional androidx.tv.material3.SelectableChipScale scale, optional androidx.tv.material3.SelectableChipBorder border, optional androidx.tv.material3.SelectableChipGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void SuggestionChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional androidx.tv.material3.ClickableChipShape shape, optional androidx.tv.material3.ClickableChipColors colors, optional androidx.tv.material3.ClickableChipScale scale, optional androidx.tv.material3.ClickableChipBorder border, optional androidx.tv.material3.ClickableChipGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void AssistChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? leadingIcon, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingIcon, optional androidx.tv.material3.ClickableChipShape shape, optional androidx.tv.material3.ClickableChipColors colors, optional androidx.tv.material3.ClickableChipScale scale, optional androidx.tv.material3.ClickableChipBorder border, optional androidx.tv.material3.ClickableChipGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void FilterChip(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? leadingIcon, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingIcon, optional androidx.tv.material3.SelectableChipShape shape, optional androidx.tv.material3.SelectableChipColors colors, optional androidx.tv.material3.SelectableChipScale scale, optional androidx.tv.material3.SelectableChipBorder border, optional androidx.tv.material3.SelectableChipGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void InputChip(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? leadingIcon, optional kotlin.jvm.functions.Function0<kotlin.Unit>? avatar, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingIcon, optional androidx.tv.material3.SelectableChipShape shape, optional androidx.tv.material3.SelectableChipColors colors, optional androidx.tv.material3.SelectableChipScale scale, optional androidx.tv.material3.SelectableChipBorder border, optional androidx.tv.material3.SelectableChipGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void SuggestionChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional androidx.tv.material3.ClickableChipShape shape, optional androidx.tv.material3.ClickableChipColors colors, optional androidx.tv.material3.ClickableChipScale scale, optional androidx.tv.material3.ClickableChipBorder border, optional androidx.tv.material3.ClickableChipGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
}
@SuppressCompatibility @androidx.compose.runtime.Immutable @androidx.tv.material3.ExperimentalTvMaterial3Api public final class ClickableChipBorder {
@@ -381,8 +381,8 @@
}
public final class IconButtonKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void IconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional androidx.tv.material3.ButtonScale scale, optional androidx.tv.material3.ButtonGlow glow, optional androidx.tv.material3.ButtonShape shape, optional androidx.tv.material3.ButtonColors colors, optional androidx.tv.material3.ButtonBorder border, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void OutlinedIconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional androidx.tv.material3.ButtonScale scale, optional androidx.tv.material3.ButtonGlow glow, optional androidx.tv.material3.ButtonShape shape, optional androidx.tv.material3.ButtonColors colors, optional androidx.tv.material3.ButtonBorder border, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void IconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional androidx.tv.material3.ButtonScale scale, optional androidx.tv.material3.ButtonGlow glow, optional androidx.tv.material3.ButtonShape shape, optional androidx.tv.material3.ButtonColors colors, optional androidx.tv.material3.ButtonBorder border, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void OutlinedIconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional androidx.tv.material3.ButtonScale scale, optional androidx.tv.material3.ButtonGlow glow, optional androidx.tv.material3.ButtonShape shape, optional androidx.tv.material3.ButtonColors colors, optional androidx.tv.material3.ButtonBorder border, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
}
public final class IconKt {
@@ -520,8 +520,8 @@
}
public final class ListItemKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void DenseListItem(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? overlineContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? supportingContent, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? leadingContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingContent, optional float tonalElevation, optional androidx.tv.material3.ListItemShape shape, optional androidx.tv.material3.ListItemColors colors, optional androidx.tv.material3.ListItemScale scale, optional androidx.tv.material3.ListItemBorder border, optional androidx.tv.material3.ListItemGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> headlineContent);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void ListItem(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? overlineContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? supportingContent, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? leadingContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingContent, optional float tonalElevation, optional androidx.tv.material3.ListItemShape shape, optional androidx.tv.material3.ListItemColors colors, optional androidx.tv.material3.ListItemScale scale, optional androidx.tv.material3.ListItemBorder border, optional androidx.tv.material3.ListItemGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> headlineContent);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void DenseListItem(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? overlineContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? supportingContent, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? leadingContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingContent, optional float tonalElevation, optional androidx.tv.material3.ListItemShape shape, optional androidx.tv.material3.ListItemColors colors, optional androidx.tv.material3.ListItemScale scale, optional androidx.tv.material3.ListItemBorder border, optional androidx.tv.material3.ListItemGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> headlineContent);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void ListItem(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? overlineContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? supportingContent, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? leadingContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingContent, optional float tonalElevation, optional androidx.tv.material3.ListItemShape shape, optional androidx.tv.material3.ListItemColors colors, optional androidx.tv.material3.ListItemScale scale, optional androidx.tv.material3.ListItemBorder border, optional androidx.tv.material3.ListItemGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> headlineContent);
}
@SuppressCompatibility @androidx.compose.runtime.Immutable @androidx.tv.material3.ExperimentalTvMaterial3Api public final class ListItemScale {
@@ -691,7 +691,7 @@
}
public final class NavigationDrawerItemKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void NavigationDrawerItem(androidx.tv.material3.NavigationDrawerScope, boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function0<kotlin.Unit> leadingContent, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? supportingContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingContent, optional float tonalElevation, optional androidx.tv.material3.NavigationDrawerItemShape shape, optional androidx.tv.material3.NavigationDrawerItemColors colors, optional androidx.tv.material3.NavigationDrawerItemScale scale, optional androidx.tv.material3.NavigationDrawerItemBorder border, optional androidx.tv.material3.NavigationDrawerItemGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void NavigationDrawerItem(androidx.tv.material3.NavigationDrawerScope, boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function0<kotlin.Unit> leadingContent, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional kotlin.jvm.functions.Function0<kotlin.Unit>? supportingContent, optional kotlin.jvm.functions.Function0<kotlin.Unit>? trailingContent, optional float tonalElevation, optional androidx.tv.material3.NavigationDrawerItemShape shape, optional androidx.tv.material3.NavigationDrawerItemColors colors, optional androidx.tv.material3.NavigationDrawerItemScale scale, optional androidx.tv.material3.NavigationDrawerItemBorder border, optional androidx.tv.material3.NavigationDrawerItemGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
}
@SuppressCompatibility @androidx.compose.runtime.Immutable @androidx.tv.material3.ExperimentalTvMaterial3Api public final class NavigationDrawerItemScale {
@@ -808,7 +808,7 @@
}
public final class RadioButtonKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void RadioButton(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit>? onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.tv.material3.RadioButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void RadioButton(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit>? onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.tv.material3.RadioButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
}
@SuppressCompatibility @androidx.tv.material3.ExperimentalTvMaterial3Api public sealed interface ScrollPauseHandle {
@@ -880,8 +880,8 @@
public final class SurfaceKt {
method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Surface(optional androidx.compose.ui.Modifier modifier, optional float tonalElevation, optional androidx.compose.ui.graphics.Shape shape, optional androidx.tv.material3.NonInteractiveSurfaceColors colors, optional androidx.tv.material3.Border border, optional androidx.tv.material3.Glow glow, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Surface(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional float tonalElevation, optional androidx.tv.material3.ToggleableSurfaceShape shape, optional androidx.tv.material3.ToggleableSurfaceColors colors, optional androidx.tv.material3.ToggleableSurfaceScale scale, optional androidx.tv.material3.ToggleableSurfaceBorder border, optional androidx.tv.material3.ToggleableSurfaceGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Surface(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional float tonalElevation, optional androidx.tv.material3.ClickableSurfaceShape shape, optional androidx.tv.material3.ClickableSurfaceColors colors, optional androidx.tv.material3.ClickableSurfaceScale scale, optional androidx.tv.material3.ClickableSurfaceBorder border, optional androidx.tv.material3.ClickableSurfaceGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Surface(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional float tonalElevation, optional androidx.tv.material3.ToggleableSurfaceShape shape, optional androidx.tv.material3.ToggleableSurfaceColors colors, optional androidx.tv.material3.ToggleableSurfaceScale scale, optional androidx.tv.material3.ToggleableSurfaceBorder border, optional androidx.tv.material3.ToggleableSurfaceGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Surface(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onLongClick, optional boolean enabled, optional float tonalElevation, optional androidx.tv.material3.ClickableSurfaceShape shape, optional androidx.tv.material3.ClickableSurfaceColors colors, optional androidx.tv.material3.ClickableSurfaceScale scale, optional androidx.tv.material3.ClickableSurfaceBorder border, optional androidx.tv.material3.ClickableSurfaceGlow glow, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
method @SuppressCompatibility @androidx.tv.material3.ExperimentalTvMaterial3Api public static androidx.compose.runtime.ProvidableCompositionLocal<androidx.compose.ui.unit.Dp> getLocalAbsoluteTonalElevation();
property @SuppressCompatibility @androidx.tv.material3.ExperimentalTvMaterial3Api public static final androidx.compose.runtime.ProvidableCompositionLocal<androidx.compose.ui.unit.Dp> LocalAbsoluteTonalElevation;
}
@@ -897,7 +897,7 @@
}
public final class SwitchKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Switch(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit>? onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? thumbContent, optional boolean enabled, optional androidx.tv.material3.SwitchColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Switch(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit>? onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? thumbContent, optional boolean enabled, optional androidx.tv.material3.SwitchColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
}
@SuppressCompatibility @androidx.tv.material3.ExperimentalTvMaterial3Api public final class TabColors {
@@ -910,7 +910,7 @@
}
public final class TabKt {
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Tab(androidx.tv.material3.TabRowScope, boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onFocus, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional boolean enabled, optional androidx.tv.material3.TabColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.tv.material3.ExperimentalTvMaterial3Api public static void Tab(androidx.tv.material3.TabRowScope, boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onFocus, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional boolean enabled, optional androidx.tv.material3.TabColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
}
@SuppressCompatibility @androidx.tv.material3.ExperimentalTvMaterial3Api public final class TabRowDefaults {
diff --git a/tv/tv-material/build.gradle b/tv/tv-material/build.gradle
index c982834..95c3c1b 100644
--- a/tv/tv-material/build.gradle
+++ b/tv/tv-material/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/tv/tv-material/src/main/java/androidx/tv/material3/Button.kt b/tv/tv-material/src/main/java/androidx/tv/material3/Button.kt
index 19b95d4..2cb945f 100644
--- a/tv/tv-material/src/main/java/androidx/tv/material3/Button.kt
+++ b/tv/tv-material/src/main/java/androidx/tv/material3/Button.kt
@@ -26,7 +26,6 @@
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
-import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.Role
@@ -67,9 +66,10 @@
* @param border Defines a border around the Button.
* @param contentPadding the spacing values to apply internally between the container and the
* content
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this button. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this button in different states.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content the content of the button
*/
@ExperimentalTvMaterial3Api
@@ -87,7 +87,7 @@
tonalElevation: Dp = Elevation.Level0,
border: ButtonBorder = ButtonDefaults.border(),
contentPadding: PaddingValues = ButtonDefaults.ContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable RowScope.() -> Unit
) {
ButtonImpl(
@@ -140,9 +140,10 @@
* @param border Defines a border around the Button.
* @param contentPadding the spacing values to apply internally between the container and the
* content
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this button. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this button in different states.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content the content of the button
*/
@ExperimentalTvMaterial3Api
@@ -160,7 +161,7 @@
tonalElevation: Dp = Elevation.Level0,
border: ButtonBorder = OutlinedButtonDefaults.border(),
contentPadding: PaddingValues = OutlinedButtonDefaults.ContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable RowScope.() -> Unit
) {
ButtonImpl(
@@ -194,7 +195,7 @@
tonalElevation: Dp,
border: ButtonBorder,
contentPadding: PaddingValues,
- interactionSource: MutableInteractionSource,
+ interactionSource: MutableInteractionSource?,
content: @Composable RowScope.() -> Unit
) {
Surface(
diff --git a/tv/tv-material/src/main/java/androidx/tv/material3/Card.kt b/tv/tv-material/src/main/java/androidx/tv/material3/Card.kt
index 860008d..8d3c3d8 100644
--- a/tv/tv-material/src/main/java/androidx/tv/material3/Card.kt
+++ b/tv/tv-material/src/main/java/androidx/tv/material3/Card.kt
@@ -31,7 +31,6 @@
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
-import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawWithCache
@@ -61,9 +60,10 @@
* See [CardDefaults.border].
* @param glow [CardGlow] defines a shadow to be shown behind the card for different interaction
* states. See [CardDefaults.glow].
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this card. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this card in different states.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this card. You can use this to change the card's appearance
+ * or preview the card in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content defines the [Composable] content inside the Card.
*/
@ExperimentalTvMaterial3Api
@@ -77,7 +77,7 @@
scale: CardScale = CardDefaults.scale(),
border: CardBorder = CardDefaults.border(),
glow: CardGlow = CardDefaults.glow(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable ColumnScope.() -> Unit
) {
Surface(
@@ -124,9 +124,10 @@
* @param glow [CardGlow] defines a shadow to be shown behind the card for different interaction
* states. See [CardDefaults.glow].
* @param contentPadding [PaddingValues] defines the inner padding applied to the card's content.
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this card. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this card in different states.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this card. You can use this to change the card's appearance
+ * or preview the card in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
*/
@ExperimentalTvMaterial3Api
@Composable
@@ -144,7 +145,7 @@
border: CardBorder = CardDefaults.border(),
glow: CardGlow = CardDefaults.glow(),
contentPadding: PaddingValues = PaddingValues(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }
+ interactionSource: MutableInteractionSource? = null
) {
Card(
onClick = onClick,
@@ -206,9 +207,10 @@
* states. See [CardDefaults.glow].
* @param scrimBrush [Brush] defines a brush/gradient to be used to draw the scrim over the image
* in the background. See [CardDefaults.ContainerGradient].
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this card. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this card in different states.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this card. You can use this to change the card's appearance
+ * or preview the card in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
*/
@ExperimentalTvMaterial3Api
@Composable
@@ -226,7 +228,7 @@
border: CardBorder = CardDefaults.border(),
glow: CardGlow = CardDefaults.glow(),
scrimBrush: Brush = CardDefaults.ContainerGradient,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }
+ interactionSource: MutableInteractionSource? = null
) {
Card(
onClick = onClick,
@@ -291,9 +293,10 @@
* @param glow [CardGlow] defines a shadow to be shown behind the card for different interaction
* states. See [CardDefaults.glow].
* @param contentPadding [PaddingValues] defines the inner padding applied to the card's content.
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this card. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this card in different states.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this card. You can use this to change the card's appearance
+ * or preview the card in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
*/
@ExperimentalTvMaterial3Api
@Composable
@@ -311,7 +314,7 @@
border: CardBorder = CardDefaults.border(),
glow: CardGlow = CardDefaults.glow(),
contentPadding: PaddingValues = PaddingValues(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }
+ interactionSource: MutableInteractionSource? = null
) {
Card(
onClick = onClick,
diff --git a/tv/tv-material/src/main/java/androidx/tv/material3/CardLayout.kt b/tv/tv-material/src/main/java/androidx/tv/material3/CardLayout.kt
index e1cab78..e1f8c7b 100644
--- a/tv/tv-material/src/main/java/androidx/tv/material3/CardLayout.kt
+++ b/tv/tv-material/src/main/java/androidx/tv/material3/CardLayout.kt
@@ -51,9 +51,8 @@
* @param description defines the [Composable] description placed below the subtitle in CardLayout.
* @param contentColor [CardLayoutColors] defines the content color used in the CardLayout
* for different interaction states. See [CardLayoutDefaults.contentColor].
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this CardLayout. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this card layout in different states.
+ * @param interactionSource a hoisted [MutableInteractionSource] for observing and emitting
+ * [Interaction]s for this CardLayout.
* This interaction source param would also be forwarded to be used with the `imageCard` composable.
*/
@ExperimentalTvMaterial3Api
@@ -114,9 +113,8 @@
* @param description defines the [Composable] description placed below the subtitle in CardLayout.
* @param contentColor [CardLayoutColors] defines the content color used in the CardLayout
* for different interaction states. See [CardLayoutDefaults.contentColor].
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this CardLayout. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this card layout in different states.
+ * @param interactionSource a hoisted [MutableInteractionSource] for observing and emitting
+ * [Interaction]s for this CardLayout.
* This interaction source param would also be forwarded to be used with the `imageCard` composable.
*/
@ExperimentalTvMaterial3Api
@@ -197,9 +195,9 @@
* This Card handles click events, calling its [onClick] lambda.
*
* @param onClick called when this card is clicked.
- * @param interactionSource the [MutableInteractionSource] representing the stream of
- * [Interaction]s for this card. When using with the CardLayout(s), it is recommended to
- * pass in the interaction state obtained from the parent lambda.
+ * @param interactionSource a hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this card. When using with the CardLayout(s), it is recommended
+ * to pass in the interaction state obtained from the parent lambda.
* @param modifier the [Modifier] to be applied to this card.
* @param onLongClick called when this card is long clicked (long-pressed).
* @param shape [CardShape] defines the shape of this card's container in different interaction
diff --git a/tv/tv-material/src/main/java/androidx/tv/material3/Checkbox.kt b/tv/tv-material/src/main/java/androidx/tv/material3/Checkbox.kt
index d6900dd..437c46d 100644
--- a/tv/tv-material/src/main/java/androidx/tv/material3/Checkbox.kt
+++ b/tv/tv-material/src/main/java/androidx/tv/material3/Checkbox.kt
@@ -75,9 +75,10 @@
* services.
* @param colors [CheckboxColors] that will be used to resolve the colors used for this checkbox in
* different states. See [CheckboxDefaults.colors].
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this checkbox. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this checkbox in different states.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this checkbox. You can use this to change the checkbox's appearance
+ * or preview the checkbox in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
*/
@ExperimentalTvMaterial3Api
@Composable
@@ -87,7 +88,7 @@
modifier: Modifier = Modifier,
enabled: Boolean = true,
colors: CheckboxColors = CheckboxDefaults.colors(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }
+ interactionSource: MutableInteractionSource? = null
) {
TriStateCheckbox(
state = ToggleableState(checked),
@@ -124,9 +125,10 @@
* services.
* @param colors [CheckboxColors] that will be used to resolve the colors used for this checkbox in
* different states. See [CheckboxDefaults.colors].
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this checkbox. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this checkbox in different states.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this checkbox. You can use this to change the checkbox's appearance
+ * or preview the checkbox in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
*/
@ExperimentalTvMaterial3Api
@Composable
@@ -136,7 +138,7 @@
modifier: Modifier = Modifier,
enabled: Boolean = true,
colors: CheckboxColors = CheckboxDefaults.colors(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }
+ interactionSource: MutableInteractionSource? = null
) {
val toggleableModifier =
if (onClick != null) {
diff --git a/tv/tv-material/src/main/java/androidx/tv/material3/Chip.kt b/tv/tv-material/src/main/java/androidx/tv/material3/Chip.kt
index 82ca1d2..7de0490 100644
--- a/tv/tv-material/src/main/java/androidx/tv/material3/Chip.kt
+++ b/tv/tv-material/src/main/java/androidx/tv/material3/Chip.kt
@@ -32,7 +32,6 @@
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
-import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
@@ -68,9 +67,10 @@
* @param scale Defines size of the chip relative to its original size
* @param border Defines a border around the chip
* @param glow Shadow to be shown behind the chip
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this chip. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this chip in different states
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this chip. You can use this to change the chip's appearance
+ * or preview the chip in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content for this chip, ideally a Text composable
*/
@ExperimentalTvMaterial3Api
@@ -88,7 +88,7 @@
scale: ClickableChipScale = AssistChipDefaults.scale(),
border: ClickableChipBorder = AssistChipDefaults.border(),
glow: ClickableChipGlow = AssistChipDefaults.glow(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable () -> Unit
) {
ClickableChip(
@@ -142,9 +142,10 @@
* @param scale Defines size of the chip relative to its original size
* @param border Defines a border around the chip
* @param glow Shadow to be shown behind the chip
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this chip. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this chip in different states
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this chip. You can use this to change the chip's appearance
+ * or preview the chip in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content for this chip, ideally a Text composable
*/
@ExperimentalTvMaterial3Api
@@ -163,7 +164,7 @@
scale: SelectableChipScale = FilterChipDefaults.scale(),
border: SelectableChipBorder = FilterChipDefaults.border(),
glow: SelectableChipGlow = FilterChipDefaults.glow(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable () -> Unit
) {
SelectableChip(
@@ -217,9 +218,10 @@
* @param scale Defines size of the chip relative to its original size
* @param border Defines a border around the chip
* @param glow Shadow to be shown behind the chip
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this chip. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this chip in different states
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this chip. You can use this to change the chip's appearance
+ * or preview the chip in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content for this chip, ideally a Text composable
*/
@ExperimentalTvMaterial3Api
@@ -239,7 +241,7 @@
scale: SelectableChipScale = InputChipDefaults.scale(),
border: SelectableChipBorder = InputChipDefaults.border(hasAvatar = avatar != null),
glow: SelectableChipGlow = InputChipDefaults.glow(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable () -> Unit
) {
SelectableChip(
@@ -289,9 +291,10 @@
* @param scale Defines size of the chip relative to its original size
* @param border Defines a border around the chip
* @param glow Shadow to be shown behind the chip
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this chip. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this chip in different states
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this chip. You can use this to change the chip's appearance
+ * or preview the chip in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content content for this chip, ideally a Text composable
*/
@ExperimentalTvMaterial3Api
@@ -307,7 +310,7 @@
scale: ClickableChipScale = SuggestionChipDefaults.scale(),
border: ClickableChipBorder = SuggestionChipDefaults.border(),
glow: ClickableChipGlow = SuggestionChipDefaults.glow(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable () -> Unit
) {
ClickableChip(
@@ -353,7 +356,7 @@
glow: ClickableChipGlow,
minHeight: Dp,
paddingValues: PaddingValues,
- interactionSource: MutableInteractionSource
+ interactionSource: MutableInteractionSource?
) {
Surface(
modifier = modifier.semantics { role = Role.Button },
@@ -400,7 +403,7 @@
glow: SelectableChipGlow,
minHeight: Dp,
paddingValues: PaddingValues,
- interactionSource: MutableInteractionSource
+ interactionSource: MutableInteractionSource?
) {
Surface(
checked = selected,
diff --git a/tv/tv-material/src/main/java/androidx/tv/material3/IconButton.kt b/tv/tv-material/src/main/java/androidx/tv/material3/IconButton.kt
index b5c27f2..790d79b 100644
--- a/tv/tv-material/src/main/java/androidx/tv/material3/IconButton.kt
+++ b/tv/tv-material/src/main/java/androidx/tv/material3/IconButton.kt
@@ -24,7 +24,6 @@
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
-import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.Role
@@ -55,9 +54,10 @@
* @param shape Defines the Button's shape.
* @param colors Color to be used for background and content of the Button
* @param border Defines a border around the Button.
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this button. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this button in different states.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content the content of the button, typically an [Icon]
*/
@ExperimentalTvMaterial3Api
@@ -73,7 +73,7 @@
shape: ButtonShape = IconButtonDefaults.shape(),
colors: ButtonColors = IconButtonDefaults.colors(),
border: ButtonBorder = IconButtonDefaults.border(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable BoxScope.() -> Unit
) {
Surface(
@@ -124,9 +124,10 @@
* @param shape Defines the Button's shape.
* @param colors Color to be used for background and content of the Button
* @param border Defines a border around the Button.
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this button. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this button in different states.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content the content of the button, typically an [Icon]
*/
@ExperimentalTvMaterial3Api
@@ -142,7 +143,7 @@
shape: ButtonShape = OutlinedIconButtonDefaults.shape(),
colors: ButtonColors = OutlinedIconButtonDefaults.colors(),
border: ButtonBorder = OutlinedIconButtonDefaults.border(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable BoxScope.() -> Unit
) {
Surface(
diff --git a/tv/tv-material/src/main/java/androidx/tv/material3/ListItem.kt b/tv/tv-material/src/main/java/androidx/tv/material3/ListItem.kt
index 83bea78..a910d84 100644
--- a/tv/tv-material/src/main/java/androidx/tv/material3/ListItem.kt
+++ b/tv/tv-material/src/main/java/androidx/tv/material3/ListItem.kt
@@ -28,7 +28,6 @@
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
-import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.graphicsLayer
@@ -70,10 +69,10 @@
* states. See [ListItemDefaults.border]
* @param glow [ListItemGlow] defines a shadow to be shown behind the list item for different
* interaction states. See [ListItemDefaults.glow]
- * @param interactionSource the [MutableInteractionSource] representing the stream of
- * [Interaction]s for this component. You can create and pass in your own [remember]ed instance
- * to observe [Interaction]s and customize the appearance / behavior of this list item in different
- * states.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this list item. You can use this to change the list item's appearance
+ * or preview the list item in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param headlineContent the [Composable] headline content of the list item
*/
@ExperimentalTvMaterial3Api
@@ -94,7 +93,7 @@
scale: ListItemScale = ListItemDefaults.scale(),
border: ListItemBorder = ListItemDefaults.border(),
glow: ListItemGlow = ListItemDefaults.glow(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
headlineContent: @Composable () -> Unit
) {
BaseListItem(
@@ -162,10 +161,10 @@
* states. See [ListItemDefaults.border]
* @param glow [ListItemGlow] defines a shadow to be shown behind the list item for different
* interaction states. See [ListItemDefaults.glow]
- * @param interactionSource the [MutableInteractionSource] representing the stream of
- * [Interaction]s for this component. You can create and pass in your own [remember]ed instance
- * to observe [Interaction]s and customize the appearance / behavior of this list item in different
- * states.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this list item. You can use this to change the list item's appearance
+ * or preview the list item in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param headlineContent the [Composable] headline content of the list item
*/
@ExperimentalTvMaterial3Api
@@ -186,7 +185,7 @@
scale: ListItemScale = ListItemDefaults.scale(),
border: ListItemBorder = ListItemDefaults.border(),
glow: ListItemGlow = ListItemDefaults.glow(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
headlineContent: @Composable () -> Unit
) {
BaseListItem(
@@ -251,10 +250,10 @@
* @param minIconSize defines the minimum icon size [Dp] to be used in leading content.
* @param headlineTextStyle defines the [TextStyle] for the headline content.
* @param trailingTextStyle defines the [TextStyle] for the trailing content.
- * @param interactionSource the [MutableInteractionSource] representing the stream of
- * [Interaction]s for this component. You can create and pass in your own [remember]ed instance
- * to observe [Interaction]s and customize the appearance / behavior of this list item in different
- * states.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this list item. You can use this to change the list item's appearance
+ * or preview the list item in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
*/
@OptIn(ExperimentalTvMaterial3Api::class)
@Composable
@@ -280,7 +279,7 @@
minIconSize: Dp,
headlineTextStyle: TextStyle,
trailingTextStyle: TextStyle,
- interactionSource: MutableInteractionSource
+ interactionSource: MutableInteractionSource?
) {
val semanticModifier = Modifier
.semantics(mergeDescendants = true) {
diff --git a/tv/tv-material/src/main/java/androidx/tv/material3/NavigationDrawerItem.kt b/tv/tv-material/src/main/java/androidx/tv/material3/NavigationDrawerItem.kt
index 297d92c..e2f574c 100644
--- a/tv/tv-material/src/main/java/androidx/tv/material3/NavigationDrawerItem.kt
+++ b/tv/tv-material/src/main/java/androidx/tv/material3/NavigationDrawerItem.kt
@@ -24,7 +24,6 @@
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
-import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.layout
import androidx.compose.ui.unit.Dp
@@ -57,10 +56,10 @@
* different interaction states
* @param border defines a border around the composable in different interaction states
* @param glow defines a shadow to be shown behind the composable for different interaction states
- * @param interactionSource the [MutableInteractionSource] representing the stream of
- * [Interaction]s for this component. You can create and pass in your own [remember]ed instance
- * to observe [Interaction]s and customize the appearance / behavior of this composable in different
- * states
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this composable. You can use this to change the composable's
+ * appearance or preview the composable in different states. Note that if `null` is provided,
+ * interactions will still happen internally.
* @param content main content of this composable
*/
@ExperimentalTvMaterial3Api // TODO (b/263353219): Remove this before launching beta
@@ -80,7 +79,7 @@
scale: NavigationDrawerItemScale = NavigationDrawerItemScale.None,
border: NavigationDrawerItemBorder = NavigationDrawerItemDefaults.border(),
glow: NavigationDrawerItemGlow = NavigationDrawerItemDefaults.glow(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable () -> Unit,
) {
val animatedWidth by animateDpAsState(
diff --git a/tv/tv-material/src/main/java/androidx/tv/material3/RadioButton.kt b/tv/tv-material/src/main/java/androidx/tv/material3/RadioButton.kt
index bf6c3fc..2df1207 100644
--- a/tv/tv-material/src/main/java/androidx/tv/material3/RadioButton.kt
+++ b/tv/tv-material/src/main/java/androidx/tv/material3/RadioButton.kt
@@ -29,7 +29,6 @@
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.State
-import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@@ -58,9 +57,10 @@
* services.
* @param colors [RadioButtonColors] that will be used to resolve the color used for this radio
* button in different states. See [RadioButtonDefaults.colors].
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this radio button. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this radio button in different states.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this radio button. You can use this to change the radio button's
+ * appearance or preview the radio button in different states. Note that if `null` is provided,
+ * interactions will still happen internally.
*/
@ExperimentalTvMaterial3Api
@Composable
@@ -70,7 +70,7 @@
modifier: Modifier = Modifier,
enabled: Boolean = true,
colors: RadioButtonColors = RadioButtonDefaults.colors(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }
+ interactionSource: MutableInteractionSource? = null
) {
val dotRadius = animateDpAsState(
targetValue = if (selected) RadioButtonDotSize / 2 else 0.dp,
diff --git a/tv/tv-material/src/main/java/androidx/tv/material3/Surface.kt b/tv/tv-material/src/main/java/androidx/tv/material3/Surface.kt
index 448f261..cf495e2 100644
--- a/tv/tv-material/src/main/java/androidx/tv/material3/Surface.kt
+++ b/tv/tv-material/src/main/java/androidx/tv/material3/Surface.kt
@@ -123,10 +123,10 @@
* @param border Defines a border around the Surface.
* @param glow Diffused shadow to be shown behind the Surface. Note that glow is disabled for API
* levels below 28 as it is not supported by the underlying OS
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this Surface. You can create and pass in your own remembered [MutableInteractionSource] if
- * you want to observe [Interaction]s and customize the appearance / behavior of this Surface in
- * different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this surface. You can use this to change the surface's appearance
+ * or preview the surface in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content defines the [Composable] content inside the surface
*/
@ExperimentalTvMaterial3Api
@@ -142,9 +142,11 @@
scale: ClickableSurfaceScale = ClickableSurfaceDefaults.scale(),
border: ClickableSurfaceBorder = ClickableSurfaceDefaults.border(),
glow: ClickableSurfaceGlow = ClickableSurfaceDefaults.glow(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable (BoxScope.() -> Unit)
) {
+ @Suppress("NAME_SHADOWING")
+ val interactionSource = interactionSource ?: remember { MutableInteractionSource() }
val focused by interactionSource.collectIsFocusedAsState()
val pressed by interactionSource.collectIsPressedAsState()
SurfaceImpl(
@@ -230,10 +232,10 @@
* @param border Defines a border around the Surface.
* @param glow Diffused shadow to be shown behind the Surface. Note that glow is disabled for API
* levels below 28 as it is not supported by the underlying OS
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this Surface. You can create and pass in your own remembered [MutableInteractionSource] if
- * you want to observe [Interaction]s and customize the appearance / behavior of this Surface in
- * different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this surface. You can use this to change the surface's appearance
+ * or preview the surface in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content defines the [Composable] content inside the surface
*/
@ExperimentalTvMaterial3Api
@@ -250,9 +252,11 @@
scale: ToggleableSurfaceScale = ToggleableSurfaceDefaults.scale(),
border: ToggleableSurfaceBorder = ToggleableSurfaceDefaults.border(),
glow: ToggleableSurfaceGlow = ToggleableSurfaceDefaults.glow(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable (BoxScope.() -> Unit)
) {
+ @Suppress("NAME_SHADOWING")
+ val interactionSource = interactionSource ?: remember { MutableInteractionSource() }
val focused by interactionSource.collectIsFocusedAsState()
val pressed by interactionSource.collectIsPressedAsState()
@@ -327,9 +331,11 @@
border: Border,
glow: Glow,
tonalElevation: Dp,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable (BoxScope.() -> Unit)
) {
+ @Suppress("NAME_SHADOWING")
+ val interactionSource = interactionSource ?: remember { MutableInteractionSource() }
val focused by interactionSource.collectIsFocusedAsState()
val pressed by interactionSource.collectIsPressedAsState()
diff --git a/tv/tv-material/src/main/java/androidx/tv/material3/Switch.kt b/tv/tv-material/src/main/java/androidx/tv/material3/Switch.kt
index 61d51b2..016c848 100644
--- a/tv/tv-material/src/main/java/androidx/tv/material3/Switch.kt
+++ b/tv/tv-material/src/main/java/androidx/tv/material3/Switch.kt
@@ -78,9 +78,10 @@
* services.
* @param colors [SwitchColors] that will be used to resolve the colors used for this switch in
* different states. See [SwitchDefaults.colors].
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this switch. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this switch in different states.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this switch. You can use this to change the switch's appearance
+ * or preview the switch in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
*/
@ExperimentalTvMaterial3Api
@Composable
@@ -92,8 +93,10 @@
thumbContent: (@Composable () -> Unit)? = null,
enabled: Boolean = true,
colors: SwitchColors = SwitchDefaults.colors(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
) {
+ @Suppress("NAME_SHADOWING")
+ val interactionSource = interactionSource ?: remember { MutableInteractionSource() }
val uncheckedThumbDiameter = if (thumbContent == null) {
UncheckedThumbDiameter
} else {
diff --git a/tv/tv-material/src/main/java/androidx/tv/material3/Tab.kt b/tv/tv-material/src/main/java/androidx/tv/material3/Tab.kt
index 51a16c8..1108c8c1 100644
--- a/tv/tv-material/src/main/java/androidx/tv/material3/Tab.kt
+++ b/tv/tv-material/src/main/java/androidx/tv/material3/Tab.kt
@@ -22,7 +22,6 @@
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
import androidx.compose.runtime.Composable
-import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.onFocusChanged
@@ -51,9 +50,10 @@
* services.
* @param colors these will be used by the tab when in different states (focused,
* selected, etc.)
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this tab. You can create and pass in your own `remember`ed instance to observe [Interaction]s
- * and customize the appearance / behavior of this tab in different states.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this tab. You can use this to change the tab's appearance
+ * or preview the tab in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content content of the [Tab]
*/
@ExperimentalTvMaterial3Api
@@ -65,7 +65,7 @@
onClick: () -> Unit = { },
enabled: Boolean = true,
colors: TabColors = TabDefaults.pillIndicatorTabColors(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable RowScope.() -> Unit
) {
Surface(
diff --git a/tv/tv-material/src/main/java/androidx/tv/material3/WideButton.kt b/tv/tv-material/src/main/java/androidx/tv/material3/WideButton.kt
index e167c56..e59da65 100644
--- a/tv/tv-material/src/main/java/androidx/tv/material3/WideButton.kt
+++ b/tv/tv-material/src/main/java/androidx/tv/material3/WideButton.kt
@@ -56,9 +56,9 @@
* @param enabled controls the enabled state of this button. When `false`, this component will not
* respond to user input, and it will appear visually disabled and disabled to accessibility
* services.
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this button. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this button in different states.
+ * @param interactionSource a hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states.
* @param background the background to be applied to the [WideButton]
* @param scale Defines size of the Button relative to its original size.
* @param glow Shadow to be shown behind the Button.
@@ -130,9 +130,9 @@
* services.
* @param icon the leading icon content of the button, typically an [Icon]
* @param subtitle the subtitle content of the button, typically a [Text]
- * @param interactionSource the [MutableInteractionSource] representing the stream of [Interaction]s
- * for this button. You can create and pass in your own `remember`ed instance to observe
- * [Interaction]s and customize the appearance / behavior of this button in different states.
+ * @param interactionSource a hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states.
* @param background the background to be applied to the [WideButton]
* @param scale Defines size of the Button relative to its original size.
* @param glow Shadow to be shown behind the Button.
@@ -234,7 +234,7 @@
tonalElevation: Dp,
border: ButtonBorder,
contentPadding: PaddingValues,
- interactionSource: MutableInteractionSource,
+ interactionSource: MutableInteractionSource?,
background: @Composable () -> Unit,
modifier: Modifier = Modifier,
onLongClick: (() -> Unit)? = null,
diff --git a/tvprovider/tvprovider/build.gradle b/tvprovider/tvprovider/build.gradle
index 363ac19..ea4b858 100644
--- a/tvprovider/tvprovider/build.gradle
+++ b/tvprovider/tvprovider/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/vectordrawable/vectordrawable-animated/build.gradle b/vectordrawable/vectordrawable-animated/build.gradle
index 32733ad0..a725897 100644
--- a/vectordrawable/vectordrawable-animated/build.gradle
+++ b/vectordrawable/vectordrawable-animated/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/vectordrawable/vectordrawable-seekable/build.gradle b/vectordrawable/vectordrawable-seekable/build.gradle
index 928385c..4dd5f98 100644
--- a/vectordrawable/vectordrawable-seekable/build.gradle
+++ b/vectordrawable/vectordrawable-seekable/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/vectordrawable/vectordrawable/build.gradle b/vectordrawable/vectordrawable/build.gradle
index edcf674..83e231e 100644
--- a/vectordrawable/vectordrawable/build.gradle
+++ b/vectordrawable/vectordrawable/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/versionedparcelable/versionedparcelable-compiler/build.gradle b/versionedparcelable/versionedparcelable-compiler/build.gradle
index ff5be75..8fc8fba 100644
--- a/versionedparcelable/versionedparcelable-compiler/build.gradle
+++ b/versionedparcelable/versionedparcelable-compiler/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/versionedparcelable/versionedparcelable/build.gradle b/versionedparcelable/versionedparcelable/build.gradle
index 119f9cf..57eca7c 100644
--- a/versionedparcelable/versionedparcelable/build.gradle
+++ b/versionedparcelable/versionedparcelable/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/viewpager/viewpager/build.gradle b/viewpager/viewpager/build.gradle
index 9a8f6d3..d6dabdc 100644
--- a/viewpager/viewpager/build.gradle
+++ b/viewpager/viewpager/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/viewpager2/viewpager2/build.gradle b/viewpager2/viewpager2/build.gradle
index 5a99719..aeb25ad 100644
--- a/viewpager2/viewpager2/build.gradle
+++ b/viewpager2/viewpager2/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
@@ -24,7 +31,7 @@
dependencies {
api("androidx.annotation:annotation:1.1.0")
- api("androidx.annotation:annotation-experimental:1.3.0")
+ api(project(":annotation:annotation-experimental"))
implementation("androidx.core:core:1.3.2")
api("androidx.fragment:fragment:1.1.0")
api("androidx.recyclerview:recyclerview:1.3.1")
diff --git a/wear/benchmark/integration-tests/macrobenchmark/src/main/java/androidx/wear/benchmark/integration/macrobenchmark/SwipeBenchmark.kt b/wear/benchmark/integration-tests/macrobenchmark/src/main/java/androidx/wear/benchmark/integration/macrobenchmark/SwipeBenchmark.kt
index 5a47931..723969a 100644
--- a/wear/benchmark/integration-tests/macrobenchmark/src/main/java/androidx/wear/benchmark/integration/macrobenchmark/SwipeBenchmark.kt
+++ b/wear/benchmark/integration-tests/macrobenchmark/src/main/java/androidx/wear/benchmark/integration/macrobenchmark/SwipeBenchmark.kt
@@ -21,13 +21,9 @@
import androidx.benchmark.macro.FrameTimingMetric
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
import androidx.test.filters.LargeTest
-import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.By
import androidx.test.uiautomator.Direction
-import androidx.test.uiautomator.UiDevice
import androidx.testutils.createCompilationParams
-import org.junit.Before
-import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@@ -35,21 +31,12 @@
@LargeTest
@RunWith(Parameterized::class)
-@Ignore("b/315170517")
class SwipeBenchmark(
private val compilationMode: CompilationMode
) {
@get:Rule
val benchmarkRule = MacrobenchmarkRule()
- private lateinit var device: UiDevice
-
- @Before
- fun setUp() {
- val instrumentation = InstrumentationRegistry.getInstrumentation()
- device = UiDevice.getInstance(instrumentation)
- }
-
@Test
fun start() {
benchmarkRule.measureRepeated(
@@ -66,7 +53,7 @@
val swipeToDismissBox = device.findObject(By.res(PACKAGE_NAME, RESOURCE_ID))
swipeToDismissBox.setGestureMargin(device.displayWidth / 5)
repeat(10) {
- swipeToDismissBox.swipe(Direction.RIGHT, 0.75f)
+ swipeToDismissBox.swipe(Direction.RIGHT, 0.75f, SWIPE_SPEED)
device.waitForIdle()
}
}
@@ -82,4 +69,5 @@
@JvmStatic
fun parameters() = createCompilationParams()
}
+ private val SWIPE_SPEED = 500
}
diff --git a/wear/compose/compose-foundation/benchmark/build.gradle b/wear/compose/compose-foundation/benchmark/build.gradle
index 516348d..4d5d0b7 100644
--- a/wear/compose/compose-foundation/benchmark/build.gradle
+++ b/wear/compose/compose-foundation/benchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/compose/compose-foundation/build.gradle b/wear/compose/compose-foundation/build.gradle
index 214a3f6..9625da5 100644
--- a/wear/compose/compose-foundation/build.gradle
+++ b/wear/compose/compose-foundation/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.AndroidXComposePlugin
diff --git a/wear/compose/compose-foundation/samples/build.gradle b/wear/compose/compose-foundation/samples/build.gradle
index 624f945..ffe6c86 100644
--- a/wear/compose/compose-foundation/samples/build.gradle
+++ b/wear/compose/compose-foundation/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/compose/compose-material-core/build.gradle b/wear/compose/compose-material-core/build.gradle
index 2d3a058..d11b75d 100644
--- a/wear/compose/compose-material-core/build.gradle
+++ b/wear/compose/compose-material-core/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.AndroidXComposePlugin
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/wear/compose/compose-material-core/src/androidTest/kotlin/androidx/wear/compose/materialcore/ButtonTest.kt b/wear/compose/compose-material-core/src/androidTest/kotlin/androidx/wear/compose/materialcore/ButtonTest.kt
index d16609a..58caf1d 100644
--- a/wear/compose/compose-material-core/src/androidTest/kotlin/androidx/wear/compose/materialcore/ButtonTest.kt
+++ b/wear/compose/compose-material-core/src/androidTest/kotlin/androidx/wear/compose/materialcore/ButtonTest.kt
@@ -32,7 +32,6 @@
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.State
-import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
@@ -405,7 +404,7 @@
backgroundColor: @Composable (enabled: Boolean) -> State<Color> = {
rememberUpdatedState(DEFAULT_SHAPE_COLOR)
},
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
shape: Shape = CircleShape,
border: @Composable (enabled: Boolean) -> State<BorderStroke?>? = { null },
content: @Composable BoxScope.() -> Unit
diff --git a/wear/compose/compose-material-core/src/androidTest/kotlin/androidx/wear/compose/materialcore/SelectionControlsTest.kt b/wear/compose/compose-material-core/src/androidTest/kotlin/androidx/wear/compose/materialcore/SelectionControlsTest.kt
index ece305c..50772ba 100644
--- a/wear/compose/compose-material-core/src/androidTest/kotlin/androidx/wear/compose/materialcore/SelectionControlsTest.kt
+++ b/wear/compose/compose-material-core/src/androidTest/kotlin/androidx/wear/compose/materialcore/SelectionControlsTest.kt
@@ -851,7 +851,7 @@
},
enabled: Boolean = true,
onCheckedChange: ((Boolean) -> Unit)? = null,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
drawBox: FunctionDrawBox = FunctionDrawBox { _, _, _, _ -> },
width: Dp = 24.dp,
height: Dp = 24.dp
@@ -877,9 +877,7 @@
checked: Boolean = true,
enabled: Boolean = true,
onCheckedChange: ((Boolean) -> Unit)? = null,
- interactionSource: MutableInteractionSource = remember {
- MutableInteractionSource()
- },
+ interactionSource: MutableInteractionSource? = null,
trackFillColor: @Composable (enabled: Boolean, checked: Boolean) -> State<Color> =
{ isEnabled, isChecked ->
selectionControlColor(
@@ -953,9 +951,7 @@
)
},
onClick: (() -> Unit)? = null,
- interactionSource: MutableInteractionSource = remember {
- MutableInteractionSource()
- },
+ interactionSource: MutableInteractionSource? = null,
dotRadiusProgressDuration: FunctionDotRadiusProgressDuration =
FunctionDotRadiusProgressDuration { _ -> 200 },
dotAlphaProgressDuration: Int = 200,
diff --git a/wear/compose/compose-material-core/src/androidTest/kotlin/androidx/wear/compose/materialcore/ToggleButtonTest.kt b/wear/compose/compose-material-core/src/androidTest/kotlin/androidx/wear/compose/materialcore/ToggleButtonTest.kt
index 42af6f6..af4e346 100644
--- a/wear/compose/compose-material-core/src/androidTest/kotlin/androidx/wear/compose/materialcore/ToggleButtonTest.kt
+++ b/wear/compose/compose-material-core/src/androidTest/kotlin/androidx/wear/compose/materialcore/ToggleButtonTest.kt
@@ -1006,7 +1006,7 @@
border: @Composable (enabled: Boolean, checked: Boolean) -> State<BorderStroke?>? =
{ _, _ -> null },
toggleButtonSize: Dp = 52.dp,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
shape: Shape = CircleShape,
content: @Composable BoxScope.() -> Unit = {
TestText(text = "Label")
@@ -1044,7 +1044,7 @@
Modifier.background(BACKGROUND_COLOR)
},
enabled: Boolean = true,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
contentPadding: PaddingValues = PaddingValues(
start = CHIP_HORIZONTAL_PADDING,
top = CHIP_VERTICAL_PADDING,
@@ -1093,8 +1093,8 @@
remember { mutableStateOf(SPLIT_BACKGROUND_OVERLAY) }
},
enabled: Boolean = true,
- checkedInteractionSource: MutableInteractionSource = remember { MutableInteractionSource() },
- clickInteractionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ checkedInteractionSource: MutableInteractionSource? = null,
+ clickInteractionSource: MutableInteractionSource? = null,
contentPadding: PaddingValues = PaddingValues(
start = CHIP_HORIZONTAL_PADDING,
top = CHIP_VERTICAL_PADDING,
diff --git a/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/Button.kt b/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/Button.kt
index 2933651..de88c13 100644
--- a/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/Button.kt
+++ b/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/Button.kt
@@ -52,10 +52,10 @@
* @param enabled Controls the enabled state of the button. When `false`, this button will not
* be clickable.
* @param backgroundColor Resolves the background for this button in different states.
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param shape Defines the button's shape.
* @param border Resolves the border for this button in different states.
* @param buttonSize The default size of the button unless overridden by Modifier.size.
@@ -69,7 +69,7 @@
modifier: Modifier,
enabled: Boolean,
backgroundColor: @Composable (enabled: Boolean) -> State<Color>,
- interactionSource: MutableInteractionSource,
+ interactionSource: MutableInteractionSource?,
shape: Shape,
border: @Composable (enabled: Boolean) -> State<BorderStroke?>?,
buttonSize: Dp,
diff --git a/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/Card.kt b/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/Card.kt
index c2dc1fb..3285a6fb 100644
--- a/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/Card.kt
+++ b/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/Card.kt
@@ -73,10 +73,10 @@
* content
* @param shape Defines the card's shape. It is strongly recommended to use the default as this
* shape is a key characteristic of the Wear Material Theme
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this card. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this card in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this card. You can use this to change the card's appearance
+ * or preview the card in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param role The type of user interface element. Accessibility services might use this
* to describe the element or do customizations
* @param ripple Ripple used for this card
@@ -92,7 +92,7 @@
enabled: Boolean,
contentPadding: PaddingValues,
shape: Shape,
- interactionSource: MutableInteractionSource,
+ interactionSource: MutableInteractionSource?,
role: Role?,
ripple: Indication,
content: @Composable ColumnScope.() -> Unit,
@@ -157,10 +157,10 @@
* @param contentPadding The spacing values to apply internally between the container and the
* content
* @param containerPainter A Painter which is used for background drawing.
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this card. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this card in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this card. You can use this to change the card's appearance
+ * or preview the card in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param shape Defines the card's shape. It is strongly recommended to use the default as this
* shape is a key characteristic of the Wear Material Theme
* @param ripple Ripple used for this card
@@ -182,7 +182,7 @@
border: BorderStroke?,
contentPadding: PaddingValues,
containerPainter: Painter,
- interactionSource: MutableInteractionSource,
+ interactionSource: MutableInteractionSource?,
shape: Shape,
ripple: Indication,
appImage: @Composable (RowScope.() -> Unit)?,
diff --git a/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/RepeatableClickable.kt b/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/RepeatableClickable.kt
index b5ac77f..8ad068a 100644
--- a/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/RepeatableClickable.kt
+++ b/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/RepeatableClickable.kt
@@ -50,8 +50,8 @@
* than [initialDelay] with [incrementalDelay] intervals.
*
* @param interactionSource [MutableInteractionSource] that will be used to dispatch
- * [PressInteraction.Press] when this clickable is pressed. Only the initial (first) press will be
- * recorded and dispatched with [MutableInteractionSource].
+ * [PressInteraction.Press] when this clickable is pressed. If `null`, an internal
+ * [MutableInteractionSource] will be created when needed.
* @param indication indication to be shown when modified element is pressed. By default,
* indication from [LocalIndication] will be used. Pass `null` to show no indication, or
* current value from [LocalIndication] to show theme default
@@ -68,7 +68,7 @@
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
fun Modifier.repeatableClickable(
- interactionSource: MutableInteractionSource,
+ interactionSource: MutableInteractionSource?,
indication: Indication?,
enabled: Boolean = true,
onClickLabel: String? = null,
diff --git a/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/SelectionControls.kt b/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/SelectionControls.kt
index 82c880b..d1e577c 100644
--- a/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/SelectionControls.kt
+++ b/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/SelectionControls.kt
@@ -434,7 +434,7 @@
.wrapContentSize(Alignment.CenterEnd)
.requiredSize(canvasWidth, canvasHeight)
- return if (onCheckedChange == null || interactionSource == null) {
+ return if (onCheckedChange == null) {
standardModifier
} else {
standardModifier.then(
@@ -462,7 +462,7 @@
.wrapContentSize(Alignment.Center)
.requiredSize(canvasWidth, canvasHeight)
- return if (onClick == null || interactionSource == null) {
+ return if (onClick == null) {
standardModifier
} else {
standardModifier.then(
diff --git a/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/Slider.kt b/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/Slider.kt
index 637a82c..d88aaa0 100644
--- a/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/Slider.kt
+++ b/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/Slider.kt
@@ -18,13 +18,11 @@
import androidx.annotation.RestrictTo
import androidx.compose.foundation.LocalIndication
-import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.width
import androidx.compose.runtime.Composable
import androidx.compose.runtime.State
-import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawWithContent
@@ -50,7 +48,7 @@
.repeatableClickable(
enabled = enabled,
onClick = onClick,
- interactionSource = remember { MutableInteractionSource() },
+ interactionSource = null,
indication = LocalIndication.current
)
.then(modifier),
diff --git a/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/ToggleButton.kt b/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/ToggleButton.kt
index d3e34a4..3dca20c 100644
--- a/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/ToggleButton.kt
+++ b/wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/ToggleButton.kt
@@ -77,10 +77,10 @@
* @param border Resolves the border for this toggle button in different states.
* @param toggleButtonSize The default size of the toggle button unless overridden by
* [Modifier.size].
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this toggle button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this ToggleButton in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this toggle button. You can use this to change the toggle button's
+ * appearance or preview the toggle button in different states. Note that if `null` is provided,
+ * interactions will still happen internally.
* @param shape Defines the shape for this toggle button. It is strongly recommended to use the
* default as this shape is a key characteristic of the Wear Material Theme.
* @param ripple Ripple used for this toggle button
@@ -96,7 +96,7 @@
backgroundColor: @Composable (enabled: Boolean, checked: Boolean) -> State<Color>,
border: @Composable (enabled: Boolean, checked: Boolean) -> State<BorderStroke?>?,
toggleButtonSize: Dp,
- interactionSource: MutableInteractionSource,
+ interactionSource: MutableInteractionSource?,
shape: Shape,
ripple: Indication,
content: @Composable BoxScope.() -> Unit,
@@ -155,10 +155,10 @@
* This expects to return Modifier.paint or Modifier.background for the background treatment.
* @param enabled Controls the enabled state of the ToggleButton. When `false`,
* this ToggleButton will not be clickable
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this ToggleButton's "toggleable" tap area. You can create and pass in
- * your own remembered [MutableInteractionSource] if you want to observe [Interaction]s
- * and customize the appearance / behavior of this ToggleButton in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this toggle button. You can use this to change the toggle button's
+ * appearance or preview the toggle button in different states. Note that if `null` is provided,
+ * interactions will still happen internally.
* @param contentPadding The spacing values to apply internally between the container and the
* content
* @param shape Defines the ToggleButton's shape. It is strongly recommended to use the
@@ -179,7 +179,7 @@
secondaryLabel: @Composable (RowScope.() -> Unit)?,
background: @Composable (enabled: Boolean, checked: Boolean) -> Modifier,
enabled: Boolean,
- interactionSource: MutableInteractionSource,
+ interactionSource: MutableInteractionSource?,
contentPadding: PaddingValues,
shape: Shape,
toggleControlWidth: Dp,
@@ -255,14 +255,14 @@
* obtained.
* @param enabled Controls the enabled state of the SplitToggleButton. When `false`,
* this SplitToggleButton will not be clickable
- * @param checkedInteractionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this SplitToggleButton's "toggleable" tap area. You can create and pass
- * in your own remembered [MutableInteractionSource] if you want to observe [Interaction]s and
- * customize the appearance / behavior of this SplitToggleButton in different [Interaction]s.
- * @param clickInteractionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this SplitToggleButton's "clickable" tap area. You can create and pass
- * in your own remembered [MutableInteractionSource] if you want to observe [Interaction]s and
- * customize the appearance / behavior of this SplitToggleButton in different [Interaction]s.
+ * @param checkedInteractionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button's "toggleable" tap area. You can use this to change the
+ * button's appearance or preview the button in different states. Note that if `null` is provided,
+ * interactions will still happen internally.
+ * @param clickInteractionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button's "clickable" tap area. You can use this to change the
+ * button's appearance or preview the button in different states. Note that if `null` is provided,
+ * interactions will still happen internally.
* @param contentPadding The spacing values to apply internally between the container and the
* content
* @param shape Defines the SplitToggleButton's shape. It is strongly recommended to use the
@@ -282,8 +282,8 @@
backgroundColor: @Composable (enabled: Boolean, checked: Boolean) -> State<Color>,
splitBackgroundColor: @Composable (enabled: Boolean, checked: Boolean) -> State<Color>,
enabled: Boolean,
- checkedInteractionSource: MutableInteractionSource,
- clickInteractionSource: MutableInteractionSource,
+ checkedInteractionSource: MutableInteractionSource?,
+ clickInteractionSource: MutableInteractionSource?,
contentPadding: PaddingValues,
shape: Shape,
ripple: Indication
diff --git a/wear/compose/compose-material/api/current.txt b/wear/compose/compose-material/api/current.txt
index 720f9e0..2a95d95 100644
--- a/wear/compose/compose-material/api/current.txt
+++ b/wear/compose/compose-material/api/current.txt
@@ -42,12 +42,12 @@
}
public final class ButtonKt {
- method @androidx.compose.runtime.Composable public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ButtonBorder border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ButtonBorder border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
method @Deprecated @androidx.compose.runtime.Composable public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void CompactButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional float backgroundPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ButtonBorder border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void CompactButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional float backgroundPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ButtonBorder border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
method @Deprecated @androidx.compose.runtime.Composable public static void CompactButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional float backgroundPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void OutlinedButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ButtonBorder border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void OutlinedCompactButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional float backgroundPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ButtonBorder border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void OutlinedButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ButtonBorder border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void OutlinedCompactButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional float backgroundPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ButtonBorder border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
}
public final class CardDefaults {
@@ -62,7 +62,7 @@
public final class CardKt {
method @androidx.compose.runtime.Composable public static void AppCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> appName, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> time, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? appImage, optional androidx.compose.ui.graphics.painter.Painter backgroundPainter, optional long contentColor, optional long appColor, optional long timeColor, optional long titleColor, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void Card(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.ui.graphics.painter.Painter backgroundPainter, optional long contentColor, optional boolean enabled, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.semantics.Role? role, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void Card(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.ui.graphics.painter.Painter backgroundPainter, optional long contentColor, optional boolean enabled, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.semantics.Role? role, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
method @androidx.compose.runtime.Composable public static void TitleCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? time, optional androidx.compose.ui.graphics.painter.Painter backgroundPainter, optional long contentColor, optional long titleColor, optional long timeColor, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
}
@@ -127,13 +127,13 @@
public final class ChipKt {
method @Deprecated @androidx.compose.runtime.Composable public static void Chip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, androidx.wear.compose.material.ChipColors colors, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.semantics.Role? role, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void Chip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, androidx.wear.compose.material.ChipColors colors, androidx.wear.compose.material.ChipBorder border, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.semantics.Role? role, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void Chip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, androidx.wear.compose.material.ChipColors colors, androidx.wear.compose.material.ChipBorder border, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.semantics.Role? role, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
method @Deprecated @androidx.compose.runtime.Composable public static void Chip(kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding);
- method @androidx.compose.runtime.Composable public static void Chip(kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ChipBorder border);
+ method @androidx.compose.runtime.Composable public static void Chip(kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ChipBorder border);
method @Deprecated @androidx.compose.runtime.Composable public static void CompactChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? label, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding);
- method @androidx.compose.runtime.Composable public static void CompactChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? label, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ChipBorder border);
- method @androidx.compose.runtime.Composable public static void OutlinedChip(kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ChipBorder border);
- method @androidx.compose.runtime.Composable public static void OutlinedCompactChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? label, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ChipBorder border);
+ method @androidx.compose.runtime.Composable public static void CompactChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? label, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ChipBorder border);
+ method @androidx.compose.runtime.Composable public static void OutlinedChip(kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ChipBorder border);
+ method @androidx.compose.runtime.Composable public static void OutlinedCompactChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? label, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ChipBorder border);
}
@androidx.compose.runtime.Stable public final class Colors {
@@ -746,9 +746,9 @@
public final class SwipeToRevealKt {
method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material.ExperimentalWearMaterialApi public static void SwipeToRevealCard(kotlin.jvm.functions.Function1<? super androidx.wear.compose.foundation.RevealScope,kotlin.Unit> primaryAction, androidx.wear.compose.foundation.RevealState revealState, kotlin.jvm.functions.Function0<kotlin.Unit> onFullSwipe, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.foundation.RevealScope,kotlin.Unit>? secondaryAction, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.foundation.RevealScope,kotlin.Unit>? undoPrimaryAction, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.foundation.RevealScope,kotlin.Unit>? undoSecondaryAction, optional androidx.wear.compose.material.SwipeToRevealActionColors colors, optional androidx.compose.ui.graphics.Shape shape, kotlin.jvm.functions.Function0<kotlin.Unit> content);
method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material.ExperimentalWearMaterialApi public static void SwipeToRevealChip(kotlin.jvm.functions.Function1<? super androidx.wear.compose.foundation.RevealScope,kotlin.Unit> primaryAction, androidx.wear.compose.foundation.RevealState revealState, kotlin.jvm.functions.Function0<kotlin.Unit> onFullSwipe, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.foundation.RevealScope,kotlin.Unit>? secondaryAction, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.foundation.RevealScope,kotlin.Unit>? undoPrimaryAction, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.foundation.RevealScope,kotlin.Unit>? undoSecondaryAction, optional androidx.wear.compose.material.SwipeToRevealActionColors colors, optional androidx.compose.ui.graphics.Shape shape, kotlin.jvm.functions.Function0<kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material.ExperimentalWearMaterialApi public static void SwipeToRevealPrimaryAction(androidx.wear.compose.foundation.RevealScope, androidx.wear.compose.foundation.RevealState revealState, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function0<kotlin.Unit> icon, kotlin.jvm.functions.Function0<kotlin.Unit> label, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material.ExperimentalWearMaterialApi public static void SwipeToRevealSecondaryAction(androidx.wear.compose.foundation.RevealScope, androidx.wear.compose.foundation.RevealState revealState, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material.ExperimentalWearMaterialApi public static void SwipeToRevealUndoAction(androidx.wear.compose.foundation.RevealScope, androidx.wear.compose.foundation.RevealState revealState, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional kotlin.jvm.functions.Function0<kotlin.Unit>? icon, optional kotlin.jvm.functions.Function0<kotlin.Unit>? label);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material.ExperimentalWearMaterialApi public static void SwipeToRevealPrimaryAction(androidx.wear.compose.foundation.RevealScope, androidx.wear.compose.foundation.RevealState revealState, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function0<kotlin.Unit> icon, kotlin.jvm.functions.Function0<kotlin.Unit> label, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material.ExperimentalWearMaterialApi public static void SwipeToRevealSecondaryAction(androidx.wear.compose.foundation.RevealScope, androidx.wear.compose.foundation.RevealState revealState, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material.ExperimentalWearMaterialApi public static void SwipeToRevealUndoAction(androidx.wear.compose.foundation.RevealScope, androidx.wear.compose.foundation.RevealState revealState, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional kotlin.jvm.functions.Function0<kotlin.Unit>? icon, optional kotlin.jvm.functions.Function0<kotlin.Unit>? label);
}
@SuppressCompatibility @androidx.wear.compose.material.ExperimentalWearMaterialApi public final class SwipeableDefaults {
@@ -860,7 +860,7 @@
}
public final class ToggleButtonKt {
- method @androidx.compose.runtime.Composable public static void ToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional int role, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void ToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional int role, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
method @Deprecated @androidx.compose.runtime.Composable public static void ToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.graphics.Shape shape, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
method @Deprecated @androidx.compose.runtime.Composable public static void ToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
}
@@ -896,14 +896,14 @@
}
public final class ToggleChipKt {
- method @androidx.compose.runtime.Composable public static void SplitToggleChip(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> toggleControl, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional androidx.wear.compose.material.SplitToggleChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource checkedInteractionSource, optional androidx.compose.foundation.interaction.MutableInteractionSource clickInteractionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape);
- method @androidx.compose.runtime.Composable public static void ToggleChip(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> toggleControl, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? appIcon, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional androidx.wear.compose.material.ToggleChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape);
+ method @androidx.compose.runtime.Composable public static void SplitToggleChip(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> toggleControl, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional androidx.wear.compose.material.SplitToggleChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource? checkedInteractionSource, optional androidx.compose.foundation.interaction.MutableInteractionSource? clickInteractionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape);
+ method @androidx.compose.runtime.Composable public static void ToggleChip(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> toggleControl, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? appIcon, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional androidx.wear.compose.material.ToggleChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape);
}
public final class ToggleControlKt {
- method @androidx.compose.runtime.Composable public static void Checkbox(boolean checked, optional androidx.compose.ui.Modifier modifier, optional androidx.wear.compose.material.CheckboxColors colors, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit>? onCheckedChange, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
- method @androidx.compose.runtime.Composable public static void RadioButton(boolean selected, optional androidx.compose.ui.Modifier modifier, optional androidx.wear.compose.material.RadioButtonColors colors, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onClick, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
- method @androidx.compose.runtime.Composable public static void Switch(boolean checked, optional androidx.compose.ui.Modifier modifier, optional androidx.wear.compose.material.SwitchColors colors, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit>? onCheckedChange, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
+ method @androidx.compose.runtime.Composable public static void Checkbox(boolean checked, optional androidx.compose.ui.Modifier modifier, optional androidx.wear.compose.material.CheckboxColors colors, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit>? onCheckedChange, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
+ method @androidx.compose.runtime.Composable public static void RadioButton(boolean selected, optional androidx.compose.ui.Modifier modifier, optional androidx.wear.compose.material.RadioButtonColors colors, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onClick, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
+ method @androidx.compose.runtime.Composable public static void Switch(boolean checked, optional androidx.compose.ui.Modifier modifier, optional androidx.wear.compose.material.SwitchColors colors, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit>? onCheckedChange, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
}
public fun interface TouchExplorationStateProvider {
diff --git a/wear/compose/compose-material/api/restricted_current.txt b/wear/compose/compose-material/api/restricted_current.txt
index 720f9e0..2a95d95 100644
--- a/wear/compose/compose-material/api/restricted_current.txt
+++ b/wear/compose/compose-material/api/restricted_current.txt
@@ -42,12 +42,12 @@
}
public final class ButtonKt {
- method @androidx.compose.runtime.Composable public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ButtonBorder border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ButtonBorder border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
method @Deprecated @androidx.compose.runtime.Composable public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void CompactButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional float backgroundPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ButtonBorder border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void CompactButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional float backgroundPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ButtonBorder border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
method @Deprecated @androidx.compose.runtime.Composable public static void CompactButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional float backgroundPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void OutlinedButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ButtonBorder border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void OutlinedCompactButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional float backgroundPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ButtonBorder border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void OutlinedButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ButtonBorder border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void OutlinedCompactButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ButtonColors colors, optional float backgroundPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ButtonBorder border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
}
public final class CardDefaults {
@@ -62,7 +62,7 @@
public final class CardKt {
method @androidx.compose.runtime.Composable public static void AppCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> appName, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> time, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? appImage, optional androidx.compose.ui.graphics.painter.Painter backgroundPainter, optional long contentColor, optional long appColor, optional long timeColor, optional long titleColor, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void Card(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.ui.graphics.painter.Painter backgroundPainter, optional long contentColor, optional boolean enabled, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.semantics.Role? role, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void Card(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.ui.graphics.painter.Painter backgroundPainter, optional long contentColor, optional boolean enabled, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.semantics.Role? role, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
method @androidx.compose.runtime.Composable public static void TitleCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? time, optional androidx.compose.ui.graphics.painter.Painter backgroundPainter, optional long contentColor, optional long titleColor, optional long timeColor, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
}
@@ -127,13 +127,13 @@
public final class ChipKt {
method @Deprecated @androidx.compose.runtime.Composable public static void Chip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, androidx.wear.compose.material.ChipColors colors, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.semantics.Role? role, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void Chip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, androidx.wear.compose.material.ChipColors colors, androidx.wear.compose.material.ChipBorder border, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.semantics.Role? role, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void Chip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, androidx.wear.compose.material.ChipColors colors, androidx.wear.compose.material.ChipBorder border, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.semantics.Role? role, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
method @Deprecated @androidx.compose.runtime.Composable public static void Chip(kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding);
- method @androidx.compose.runtime.Composable public static void Chip(kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ChipBorder border);
+ method @androidx.compose.runtime.Composable public static void Chip(kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ChipBorder border);
method @Deprecated @androidx.compose.runtime.Composable public static void CompactChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? label, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding);
- method @androidx.compose.runtime.Composable public static void CompactChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? label, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ChipBorder border);
- method @androidx.compose.runtime.Composable public static void OutlinedChip(kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ChipBorder border);
- method @androidx.compose.runtime.Composable public static void OutlinedCompactChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? label, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ChipBorder border);
+ method @androidx.compose.runtime.Composable public static void CompactChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? label, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ChipBorder border);
+ method @androidx.compose.runtime.Composable public static void OutlinedChip(kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ChipBorder border);
+ method @androidx.compose.runtime.Composable public static void OutlinedCompactChip(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? label, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional androidx.wear.compose.material.ChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material.ChipBorder border);
}
@androidx.compose.runtime.Stable public final class Colors {
@@ -746,9 +746,9 @@
public final class SwipeToRevealKt {
method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material.ExperimentalWearMaterialApi public static void SwipeToRevealCard(kotlin.jvm.functions.Function1<? super androidx.wear.compose.foundation.RevealScope,kotlin.Unit> primaryAction, androidx.wear.compose.foundation.RevealState revealState, kotlin.jvm.functions.Function0<kotlin.Unit> onFullSwipe, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.foundation.RevealScope,kotlin.Unit>? secondaryAction, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.foundation.RevealScope,kotlin.Unit>? undoPrimaryAction, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.foundation.RevealScope,kotlin.Unit>? undoSecondaryAction, optional androidx.wear.compose.material.SwipeToRevealActionColors colors, optional androidx.compose.ui.graphics.Shape shape, kotlin.jvm.functions.Function0<kotlin.Unit> content);
method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material.ExperimentalWearMaterialApi public static void SwipeToRevealChip(kotlin.jvm.functions.Function1<? super androidx.wear.compose.foundation.RevealScope,kotlin.Unit> primaryAction, androidx.wear.compose.foundation.RevealState revealState, kotlin.jvm.functions.Function0<kotlin.Unit> onFullSwipe, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.foundation.RevealScope,kotlin.Unit>? secondaryAction, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.foundation.RevealScope,kotlin.Unit>? undoPrimaryAction, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.foundation.RevealScope,kotlin.Unit>? undoSecondaryAction, optional androidx.wear.compose.material.SwipeToRevealActionColors colors, optional androidx.compose.ui.graphics.Shape shape, kotlin.jvm.functions.Function0<kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material.ExperimentalWearMaterialApi public static void SwipeToRevealPrimaryAction(androidx.wear.compose.foundation.RevealScope, androidx.wear.compose.foundation.RevealState revealState, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function0<kotlin.Unit> icon, kotlin.jvm.functions.Function0<kotlin.Unit> label, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material.ExperimentalWearMaterialApi public static void SwipeToRevealSecondaryAction(androidx.wear.compose.foundation.RevealScope, androidx.wear.compose.foundation.RevealState revealState, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material.ExperimentalWearMaterialApi public static void SwipeToRevealUndoAction(androidx.wear.compose.foundation.RevealScope, androidx.wear.compose.foundation.RevealState revealState, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional kotlin.jvm.functions.Function0<kotlin.Unit>? icon, optional kotlin.jvm.functions.Function0<kotlin.Unit>? label);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material.ExperimentalWearMaterialApi public static void SwipeToRevealPrimaryAction(androidx.wear.compose.foundation.RevealScope, androidx.wear.compose.foundation.RevealState revealState, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function0<kotlin.Unit> icon, kotlin.jvm.functions.Function0<kotlin.Unit> label, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material.ExperimentalWearMaterialApi public static void SwipeToRevealSecondaryAction(androidx.wear.compose.foundation.RevealScope, androidx.wear.compose.foundation.RevealState revealState, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material.ExperimentalWearMaterialApi public static void SwipeToRevealUndoAction(androidx.wear.compose.foundation.RevealScope, androidx.wear.compose.foundation.RevealState revealState, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional kotlin.jvm.functions.Function0<kotlin.Unit>? icon, optional kotlin.jvm.functions.Function0<kotlin.Unit>? label);
}
@SuppressCompatibility @androidx.wear.compose.material.ExperimentalWearMaterialApi public final class SwipeableDefaults {
@@ -860,7 +860,7 @@
}
public final class ToggleButtonKt {
- method @androidx.compose.runtime.Composable public static void ToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional int role, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void ToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional int role, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
method @Deprecated @androidx.compose.runtime.Composable public static void ToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.graphics.Shape shape, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
method @Deprecated @androidx.compose.runtime.Composable public static void ToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material.ToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
}
@@ -896,14 +896,14 @@
}
public final class ToggleChipKt {
- method @androidx.compose.runtime.Composable public static void SplitToggleChip(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> toggleControl, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional androidx.wear.compose.material.SplitToggleChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource checkedInteractionSource, optional androidx.compose.foundation.interaction.MutableInteractionSource clickInteractionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape);
- method @androidx.compose.runtime.Composable public static void ToggleChip(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> toggleControl, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? appIcon, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional androidx.wear.compose.material.ToggleChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape);
+ method @androidx.compose.runtime.Composable public static void SplitToggleChip(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> toggleControl, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional androidx.wear.compose.material.SplitToggleChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource? checkedInteractionSource, optional androidx.compose.foundation.interaction.MutableInteractionSource? clickInteractionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape);
+ method @androidx.compose.runtime.Composable public static void ToggleChip(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label, kotlin.jvm.functions.Function0<kotlin.Unit> toggleControl, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? appIcon, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional androidx.wear.compose.material.ToggleChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.ui.graphics.Shape shape);
}
public final class ToggleControlKt {
- method @androidx.compose.runtime.Composable public static void Checkbox(boolean checked, optional androidx.compose.ui.Modifier modifier, optional androidx.wear.compose.material.CheckboxColors colors, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit>? onCheckedChange, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
- method @androidx.compose.runtime.Composable public static void RadioButton(boolean selected, optional androidx.compose.ui.Modifier modifier, optional androidx.wear.compose.material.RadioButtonColors colors, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onClick, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
- method @androidx.compose.runtime.Composable public static void Switch(boolean checked, optional androidx.compose.ui.Modifier modifier, optional androidx.wear.compose.material.SwitchColors colors, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit>? onCheckedChange, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource);
+ method @androidx.compose.runtime.Composable public static void Checkbox(boolean checked, optional androidx.compose.ui.Modifier modifier, optional androidx.wear.compose.material.CheckboxColors colors, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit>? onCheckedChange, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
+ method @androidx.compose.runtime.Composable public static void RadioButton(boolean selected, optional androidx.compose.ui.Modifier modifier, optional androidx.wear.compose.material.RadioButtonColors colors, optional boolean enabled, optional kotlin.jvm.functions.Function0<kotlin.Unit>? onClick, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
+ method @androidx.compose.runtime.Composable public static void Switch(boolean checked, optional androidx.compose.ui.Modifier modifier, optional androidx.wear.compose.material.SwitchColors colors, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit>? onCheckedChange, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource);
}
public fun interface TouchExplorationStateProvider {
diff --git a/wear/compose/compose-material/benchmark/build.gradle b/wear/compose/compose-material/benchmark/build.gradle
index 55879b0..e99d31e 100644
--- a/wear/compose/compose-material/benchmark/build.gradle
+++ b/wear/compose/compose-material/benchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/compose/compose-material/build.gradle b/wear/compose/compose-material/build.gradle
index 75f85b7..d5cc186 100644
--- a/wear/compose/compose-material/build.gradle
+++ b/wear/compose/compose-material/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/compose/compose-material/samples/build.gradle b/wear/compose/compose-material/samples/build.gradle
index bd81624..fb672d1 100644
--- a/wear/compose/compose-material/samples/build.gradle
+++ b/wear/compose/compose-material/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/Button.kt b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/Button.kt
index 49355d6..b9a8cb2 100644
--- a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/Button.kt
+++ b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/Button.kt
@@ -133,10 +133,10 @@
* be clickable.
* @param colors [ButtonColors] that will be used to resolve the background and content color for
* this button in different states. See [ButtonDefaults.buttonColors].
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param shape Defines the button's shape. It is strongly recommended to use the default as this
* shape is a key characteristic of the Wear Material Theme.
* @param border [ButtonBorder] that will be used to resolve the button border in different states.
@@ -149,7 +149,7 @@
modifier: Modifier = Modifier,
enabled: Boolean = true,
colors: ButtonColors = ButtonDefaults.primaryButtonColors(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
shape: Shape = CircleShape,
border: ButtonBorder = ButtonDefaults.buttonBorder(),
content: @Composable BoxScope.() -> Unit,
@@ -200,10 +200,10 @@
* be clickable.
* @param colors [ButtonColors] that will be used to resolve the background and content color for
* this button in different states. See [ButtonDefaults.outlinedButtonColors].
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param shape Defines the button's shape. It is strongly recommended to use the default as this
* shape is a key characteristic of the Wear Material Theme.
* @param border [ButtonBorder] that will be used to resolve the button border in different states.
@@ -216,7 +216,7 @@
modifier: Modifier = Modifier,
enabled: Boolean = true,
colors: ButtonColors = ButtonDefaults.outlinedButtonColors(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
shape: Shape = CircleShape,
border: ButtonBorder = ButtonDefaults.outlinedButtonBorder(),
content: @Composable BoxScope.() -> Unit,
@@ -313,10 +313,10 @@
* this button in different states. See [ButtonDefaults.buttonColors].
* @param backgroundPadding Increases the transparent clickable area around the background,
* defaults to [ButtonDefaults.CompactButtonBackgroundPadding]
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param shape Defines the button's shape. It is strongly recommended to use the default as this
* shape is a key characteristic of the Wear Material Theme.
* @param border [ButtonBorder] that will be used to resolve the button border in different states.
@@ -330,7 +330,7 @@
enabled: Boolean = true,
colors: ButtonColors = ButtonDefaults.primaryButtonColors(),
backgroundPadding: Dp = ButtonDefaults.CompactButtonBackgroundPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
shape: Shape = CircleShape,
border: ButtonBorder = ButtonDefaults.buttonBorder(),
content: @Composable BoxScope.() -> Unit,
@@ -385,10 +385,10 @@
* this button in different states. See [ButtonDefaults.outlinedButtonColors].
* @param backgroundPadding Increases the transparent clickable area around the background,
* defaults to [ButtonDefaults.CompactButtonBackgroundPadding]
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param shape Defines the button's shape. It is strongly recommended to use the default as this
* shape is a key characteristic of the Wear Material Theme.
* @param border [ButtonBorder] that will be used to resolve the button border in different states.
@@ -402,7 +402,7 @@
enabled: Boolean = true,
colors: ButtonColors = ButtonDefaults.outlinedButtonColors(),
backgroundPadding: Dp = ButtonDefaults.CompactButtonBackgroundPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
shape: Shape = CircleShape,
border: ButtonBorder = ButtonDefaults.outlinedButtonBorder(),
content: @Composable BoxScope.() -> Unit,
diff --git a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/Card.kt b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/Card.kt
index f480fec..b75c291 100644
--- a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/Card.kt
+++ b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/Card.kt
@@ -30,7 +30,6 @@
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.Immutable
-import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
@@ -85,10 +84,10 @@
* content
* @param shape Defines the card's shape. It is strongly recommended to use the default as this
* shape is a key characteristic of the Wear Material Theme
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this card. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this card in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this card. You can use this to change the card's appearance
+ * or preview the card in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param role The type of user interface element. Accessibility services might use this
* to describe the element or do customizations
*/
@@ -101,7 +100,7 @@
enabled: Boolean = true,
contentPadding: PaddingValues = CardDefaults.ContentPadding,
shape: Shape = MaterialTheme.shapes.large,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
role: Role? = null,
content: @Composable ColumnScope.() -> Unit,
) {
@@ -201,7 +200,7 @@
border = null,
contentPadding = CardDefaults.ContentPadding,
containerPainter = backgroundPainter,
- interactionSource = remember { MutableInteractionSource() },
+ interactionSource = null,
shape = MaterialTheme.shapes.large,
ripple = rippleOrFallbackImplementation(),
appImage = appImage?.let { { appImage() } },
@@ -308,7 +307,7 @@
containerPainter = backgroundPainter,
border = null,
contentPadding = CardDefaults.ContentPadding,
- interactionSource = remember { MutableInteractionSource() },
+ interactionSource = null,
role = null,
shape = MaterialTheme.shapes.large,
ripple = rippleOrFallbackImplementation(),
diff --git a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/Chip.kt b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/Chip.kt
index 5b91065..d80d069 100644
--- a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/Chip.kt
+++ b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/Chip.kt
@@ -166,10 +166,10 @@
* content
* @param shape Defines the chip's shape. It is strongly recommended to use the default as this
* shape is a key characteristic of the Wear Material Theme
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Chip. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Chip in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this chip. You can use this to change the chip's appearance
+ * or preview the chip in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param role The type of user interface element. Accessibility services might use this
* to describe the element or do customizations
*/
@@ -182,7 +182,7 @@
enabled: Boolean = true,
contentPadding: PaddingValues = ChipDefaults.ContentPadding,
shape: Shape = MaterialTheme.shapes.large,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
role: Role? = Role.Button,
content: @Composable RowScope.() -> Unit,
) {
@@ -335,10 +335,10 @@
* [ChipDefaults.primaryChipColors]
* @param enabled Controls the enabled state of the chip. When `false`, this chip will not
* be clickable
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Chip. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Chip in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this chip. You can use this to change the chip's appearance
+ * or preview the chip in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param contentPadding The spacing values to apply internally between the container and the
* content
* @param shape Defines the chip's shape. It is strongly recommended to use the default as this
@@ -355,7 +355,7 @@
icon: (@Composable BoxScope.() -> Unit)? = null,
colors: ChipColors = ChipDefaults.primaryChipColors(),
enabled: Boolean = true,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
contentPadding: PaddingValues = ChipDefaults.ContentPadding,
shape: Shape = MaterialTheme.shapes.large,
border: ChipBorder = ChipDefaults.chipBorder()
@@ -419,10 +419,10 @@
* this chip in different states.
* @param enabled Controls the enabled state of the chip. When `false`, this chip will not
* be clickable
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Chip. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Chip in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this chip. You can use this to change the chip's appearance
+ * or preview the chip in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param contentPadding The spacing values to apply internally between the container and the
* content
* @param shape Defines the chip's shape. It is strongly recommended to use the default as this
@@ -438,7 +438,7 @@
icon: (@Composable BoxScope.() -> Unit)? = null,
colors: ChipColors = ChipDefaults.outlinedChipColors(),
enabled: Boolean = true,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
contentPadding: PaddingValues = ChipDefaults.ContentPadding,
shape: Shape = MaterialTheme.shapes.large,
border: ChipBorder = ChipDefaults.outlinedChipBorder()
@@ -614,10 +614,10 @@
* [ChipDefaults.primaryChipColors]
* @param enabled Controls the enabled state of the chip. When `false`, this chip will not
* be clickable
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Chip. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Chip in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this chip. You can use this to change the chip's appearance
+ * or preview the chip in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param contentPadding The spacing values to apply internally between the container and the
* content
* @param shape Defines the chip's shape. It is strongly recommended to use the default as this
@@ -633,7 +633,7 @@
icon: (@Composable BoxScope.() -> Unit)? = null,
colors: ChipColors = ChipDefaults.primaryChipColors(),
enabled: Boolean = true,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
contentPadding: PaddingValues = ChipDefaults.CompactChipContentPadding,
shape: Shape = MaterialTheme.shapes.large,
border: ChipBorder = ChipDefaults.chipBorder()
@@ -738,10 +738,10 @@
* [ChipDefaults.primaryChipColors]
* @param enabled Controls the enabled state of the chip. When `false`, this chip will not
* be clickable
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Chip. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Chip in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this chip. You can use this to change the chip's appearance
+ * or preview the chip in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param contentPadding The spacing values to apply internally between the container and the
* content
* @param shape Defines the chip's shape. It is strongly recommended to use the default as this
@@ -757,7 +757,7 @@
icon: (@Composable BoxScope.() -> Unit)? = null,
colors: ChipColors = ChipDefaults.outlinedChipColors(),
enabled: Boolean = true,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
contentPadding: PaddingValues = ChipDefaults.CompactChipContentPadding,
shape: Shape = MaterialTheme.shapes.large,
border: ChipBorder = ChipDefaults.outlinedChipBorder()
@@ -1404,7 +1404,7 @@
enabled: Boolean,
contentPadding: PaddingValues,
shape: Shape,
- interactionSource: MutableInteractionSource,
+ interactionSource: MutableInteractionSource?,
role: Role? = Role.Button,
content: @Composable RowScope.() -> Unit,
) {
@@ -1447,7 +1447,7 @@
icon: (@Composable BoxScope.() -> Unit)?,
colors: ChipColors,
enabled: Boolean,
- interactionSource: MutableInteractionSource,
+ interactionSource: MutableInteractionSource?,
contentPadding: PaddingValues,
shape: Shape,
border: ChipBorder?,
diff --git a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/SwipeToReveal.kt b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/SwipeToReveal.kt
index 4c130f0..d1fc9b3 100644
--- a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/SwipeToReveal.kt
+++ b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/SwipeToReveal.kt
@@ -39,7 +39,6 @@
import androidx.compose.material.icons.outlined.MoreVert
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
-import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
@@ -206,7 +205,7 @@
icon: @Composable () -> Unit,
label: @Composable () -> Unit,
modifier: Modifier = Modifier,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
) = ActionCommon(
revealState = revealState,
actionType = RevealActionType.PrimaryAction,
@@ -236,7 +235,7 @@
revealState: RevealState,
onClick: () -> Unit,
modifier: Modifier = Modifier,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable () -> Unit,
) = ActionCommon(
revealState = revealState,
@@ -268,7 +267,7 @@
revealState: RevealState,
onClick: () -> Unit,
modifier: Modifier = Modifier,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
icon: (@Composable () -> Unit)? = null,
label: (@Composable () -> Unit)? = null,
) {
@@ -536,7 +535,7 @@
onClick: () -> Unit,
modifier: Modifier = Modifier,
actionType: RevealActionType = RevealActionType.UndoAction,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
icon: (@Composable () -> Unit)? = null,
label: (@Composable () -> Unit)? = null,
) {
diff --git a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/ToggleButton.kt b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/ToggleButton.kt
index 814f9e3..a7c289a 100644
--- a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/ToggleButton.kt
+++ b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/ToggleButton.kt
@@ -191,10 +191,10 @@
* this toggle button will not be clickable.
* @param colors [ToggleButtonColors] that will be used to resolve the background and
* content color for this toggle button. See [ToggleButtonDefaults.toggleButtonColors].
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this toggle button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this ToggleButton in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this toggle button. You can use this to change the toggle button's
+ * appearance or preview the toggle button in different states. Note that if `null` is provided,
+ * interactions will still happen internally.
* @param shape Defines the shape for this toggle button. It is strongly recommended to use the
* default as this shape is a key characteristic of the Wear Material Theme.
* @param role Role semantics that accessibility services can use to provide more
@@ -208,7 +208,7 @@
modifier: Modifier = Modifier,
enabled: Boolean = true,
colors: ToggleButtonColors = ToggleButtonDefaults.toggleButtonColors(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
shape: Shape = CircleShape,
role: Role = ToggleButtonDefaults.DefaultRole,
content: @Composable BoxScope.() -> Unit,
diff --git a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/ToggleChip.kt b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/ToggleChip.kt
index 9c19bf7..bd6193c 100644
--- a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/ToggleChip.kt
+++ b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/ToggleChip.kt
@@ -29,7 +29,6 @@
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.Stable
import androidx.compose.runtime.State
-import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.paint
@@ -96,10 +95,10 @@
* [ToggleChipDefaults.toggleChipColors].
* @param enabled Controls the enabled state of the chip. When `false`, this chip will not
* be clickable
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this chip's "toggleable" tap area. You can create and pass in your own
- * remembered [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Chip in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this chip's "toggleable" tap area. You can use this to change the
+ * chip's appearance or preview the chip in different states. Note that if `null` is provided,
+ * interactions will still happen internally.
* @param contentPadding The spacing values to apply internally between the container and the
* content
* @param shape Defines the chip's shape. It is strongly recommended to use the default as this
@@ -116,7 +115,7 @@
secondaryLabel: @Composable (RowScope.() -> Unit)? = null,
colors: ToggleChipColors = ToggleChipDefaults.toggleChipColors(),
enabled: Boolean = true,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
contentPadding: PaddingValues = ToggleChipDefaults.ContentPadding,
shape: Shape = MaterialTheme.shapes.large,
) = androidx.wear.compose.materialcore.ToggleButton(
@@ -216,14 +215,14 @@
* [ToggleChipDefaults.splitToggleChipColors].
* @param enabled Controls the enabled state of the chip. When `false`, this chip will not
* be clickable
- * @param checkedInteractionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this chip's "toggleable" tap area. You can create and pass in your own
- * remembered [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Chip in different [Interaction]s.
- * @param clickInteractionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this chip's "clickable" tap area. You can create and pass in your own
- * remembered [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Chip in different [Interaction]s.
+ * @param checkedInteractionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this chip's "toggleable" tap area. You can use this to change the
+ * chip's appearance or preview the chip in different states. Note that if `null` is provided,
+ * interactions will still happen internally.
+ * @param clickInteractionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this chip's "clickable" tap area. You can use this to change the
+ * chip's appearance or preview the chip in different states. Note that if `null` is provided,
+ * interactions will still happen internally.
* @param contentPadding The spacing values to apply internally between the container and the
* content
* @param shape Defines the chip's shape. It is strongly recommended to use the default as this
@@ -240,8 +239,8 @@
secondaryLabel: @Composable (RowScope.() -> Unit)? = null,
colors: SplitToggleChipColors = ToggleChipDefaults.splitToggleChipColors(),
enabled: Boolean = true,
- checkedInteractionSource: MutableInteractionSource = remember { MutableInteractionSource() },
- clickInteractionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ checkedInteractionSource: MutableInteractionSource? = null,
+ clickInteractionSource: MutableInteractionSource? = null,
contentPadding: PaddingValues = ToggleChipDefaults.ContentPadding,
shape: Shape = MaterialTheme.shapes.large,
) = androidx.wear.compose.materialcore.SplitToggleButton(
diff --git a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/ToggleControl.kt b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/ToggleControl.kt
index 0194f26..b0b1b93 100644
--- a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/ToggleControl.kt
+++ b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/ToggleControl.kt
@@ -24,7 +24,6 @@
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.Stable
import androidx.compose.runtime.State
-import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.CornerRadius
import androidx.compose.ui.geometry.Offset
@@ -54,9 +53,10 @@
* @param onCheckedChange Callback to be invoked when Checkbox is clicked. If null, then this is
* passive and relies entirely on a higher-level component to control the state
* (such as [ToggleChip] or [SplitToggleChip]).
- * @param interactionSource When also providing [onCheckedChange], the [MutableInteractionSource]
- * representing the stream of [Interaction]s for the "toggleable" tap area -
- * can be used to customise the appearance / behavior of the Checkbox.
+ * @param interactionSource When also providing [onCheckedChange], an optional hoisted
+ * [MutableInteractionSource] for observing and emitting [Interaction]s for this checkbox.
+ * You can use this to change the checkbox's appearance or preview the checkbox in different states.
+ * Note that if `null` is provided, interactions will still happen internally.
*/
@Composable
public fun Checkbox(
@@ -65,7 +65,7 @@
colors: CheckboxColors = CheckboxDefaults.colors(),
enabled: Boolean = true,
onCheckedChange: ((Boolean) -> Unit)? = null,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
) = androidx.wear.compose.materialcore.Checkbox(
checked = checked,
modifier = modifier,
@@ -107,9 +107,10 @@
* @param onCheckedChange Callback to be invoked when Switch is clicked. If null, then this is
* passive and relies entirely on a higher-level component to control the state
* (such as [ToggleChip] or [SplitToggleChip]).
- * @param interactionSource When also providing [onCheckedChange], the [MutableInteractionSource]
- * representing the stream of [Interaction]s for the "toggleable" tap area -
- * can be used to customise the appearance / behavior of the Switch.
+ * @param interactionSource When also providing [onCheckedChange], an optional hoisted
+ * [MutableInteractionSource] for observing and emitting [Interaction]s for this switch.
+ * You can use this to change the switch's appearance or preview the switch in different states.
+ * Note that if `null` is provided, interactions will still happen internally.
*/
@Composable
public fun Switch(
@@ -118,7 +119,7 @@
colors: SwitchColors = SwitchDefaults.colors(),
enabled: Boolean = true,
onCheckedChange: ((Boolean) -> Unit)? = null,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
) = androidx.wear.compose.materialcore.Switch(
modifier = modifier,
checked = checked,
@@ -176,9 +177,10 @@
* @param onClick Callback to be invoked when RadioButton is clicked. If null, then this is
* passive and relies entirely on a higher-level component to control the state
* (such as [ToggleChip] or [SplitToggleChip]).
- * @param interactionSource When also providing [onClick], the [MutableInteractionSource]
- * representing the stream of [Interaction]s for the "toggleable" tap area -
- * can be used to customise the appearance / behavior of the RadioButton.
+ * @param interactionSource When also providing [onCheckedChange], an optional hoisted
+ * [MutableInteractionSource] for observing and emitting [Interaction]s for this radio button.
+ * You can use this to change the radio button's appearance or preview the radio button in
+ * different states. Note that if `null` is provided, interactions will still happen internally.
*/
@Composable
public fun RadioButton(
@@ -187,7 +189,7 @@
colors: RadioButtonColors = RadioButtonDefaults.colors(),
enabled: Boolean = true,
onClick: (() -> Unit)? = null,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
) = androidx.wear.compose.materialcore.RadioButton(
modifier = modifier,
selected = selected,
diff --git a/wear/compose/compose-material3/api/current.txt b/wear/compose/compose-material3/api/current.txt
index 9e11015..40030513 100644
--- a/wear/compose/compose-material3/api/current.txt
+++ b/wear/compose/compose-material3/api/current.txt
@@ -58,15 +58,15 @@
}
public final class ButtonKt {
- method @androidx.compose.runtime.Composable public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
- method @androidx.compose.runtime.Composable public static void ChildButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void ChildButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
- method @androidx.compose.runtime.Composable public static void CompactButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? label);
- method @androidx.compose.runtime.Composable public static void FilledTonalButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void FilledTonalButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
- method @androidx.compose.runtime.Composable public static void OutlinedButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void OutlinedButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
+ method @androidx.compose.runtime.Composable public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
+ method @androidx.compose.runtime.Composable public static void ChildButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void ChildButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
+ method @androidx.compose.runtime.Composable public static void CompactButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? label);
+ method @androidx.compose.runtime.Composable public static void FilledTonalButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void FilledTonalButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
+ method @androidx.compose.runtime.Composable public static void OutlinedButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void OutlinedButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
}
@androidx.compose.runtime.Immutable public final class CardColors {
@@ -99,10 +99,10 @@
}
public final class CardKt {
- method @androidx.compose.runtime.Composable public static void AppCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> appName, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.CardColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? appImage, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? time, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void Card(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.CardColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void OutlinedCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.CardColors colors, optional androidx.compose.foundation.BorderStroke border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void TitleCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? time, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit>? subtitle, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.CardColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional kotlin.jvm.functions.Function0<kotlin.Unit>? content);
+ method @androidx.compose.runtime.Composable public static void AppCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> appName, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.CardColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? appImage, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? time, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void Card(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.CardColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void OutlinedCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.CardColors colors, optional androidx.compose.foundation.BorderStroke border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void TitleCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? time, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit>? subtitle, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.CardColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional kotlin.jvm.functions.Function0<kotlin.Unit>? content);
}
@androidx.compose.runtime.Immutable public final class CheckboxColors {
@@ -248,11 +248,11 @@
}
public final class IconButtonKt {
- method @androidx.compose.runtime.Composable public static void FilledIconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.IconButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void FilledTonalIconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.IconButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void IconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.IconButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void IconToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material3.ToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.BorderStroke? border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void OutlinedIconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.IconButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void FilledIconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.IconButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void FilledTonalIconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.IconButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void IconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.IconButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void IconToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material3.ToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.BorderStroke? border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void OutlinedIconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.IconButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
}
public final class IconKt {
@@ -385,8 +385,8 @@
}
public final class RadioButtonKt {
- method @androidx.compose.runtime.Composable public static void RadioButton(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onSelected, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.material3.SelectionControlScope,kotlin.Unit> selectionControl, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.RadioButtonColors colors, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
- method @androidx.compose.runtime.Composable public static void SplitRadioButton(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onSelected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.material3.SelectionControlScope,kotlin.Unit> selectionControl, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.SplitRadioButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource selectionInteractionSource, optional androidx.compose.foundation.interaction.MutableInteractionSource clickInteractionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
+ method @androidx.compose.runtime.Composable public static void RadioButton(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onSelected, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.material3.SelectionControlScope,kotlin.Unit> selectionControl, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.RadioButtonColors colors, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
+ method @androidx.compose.runtime.Composable public static void SplitRadioButton(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onSelected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.material3.SelectionControlScope,kotlin.Unit> selectionControl, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.SplitRadioButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? selectionInteractionSource, optional androidx.compose.foundation.interaction.MutableInteractionSource? clickInteractionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
}
@androidx.compose.runtime.Immutable public final class RadioColors {
@@ -626,8 +626,8 @@
}
public final class TextButtonKt {
- method @androidx.compose.runtime.Composable public static void TextButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.TextButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void TextToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material3.ToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.BorderStroke? border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void TextButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.TextButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void TextToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material3.ToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.BorderStroke? border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
}
public final class TextKt {
@@ -688,8 +688,8 @@
}
public final class ToggleButtonKt {
- method @androidx.compose.runtime.Composable public static void SplitToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.wear.compose.material3.ToggleControlScope,kotlin.Unit> toggleControl, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.SplitToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource checkedInteractionSource, optional androidx.compose.foundation.interaction.MutableInteractionSource clickInteractionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
- method @androidx.compose.runtime.Composable public static void ToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, kotlin.jvm.functions.Function1<? super androidx.wear.compose.material3.ToggleControlScope,kotlin.Unit> toggleControl, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ToggleButtonColors colors, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
+ method @androidx.compose.runtime.Composable public static void SplitToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.wear.compose.material3.ToggleControlScope,kotlin.Unit> toggleControl, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.SplitToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? checkedInteractionSource, optional androidx.compose.foundation.interaction.MutableInteractionSource? clickInteractionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
+ method @androidx.compose.runtime.Composable public static void ToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, kotlin.jvm.functions.Function1<? super androidx.wear.compose.material3.ToggleControlScope,kotlin.Unit> toggleControl, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ToggleButtonColors colors, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
}
public final class ToggleControlScope {
diff --git a/wear/compose/compose-material3/api/restricted_current.txt b/wear/compose/compose-material3/api/restricted_current.txt
index 9e11015..40030513 100644
--- a/wear/compose/compose-material3/api/restricted_current.txt
+++ b/wear/compose/compose-material3/api/restricted_current.txt
@@ -58,15 +58,15 @@
}
public final class ButtonKt {
- method @androidx.compose.runtime.Composable public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
- method @androidx.compose.runtime.Composable public static void ChildButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void ChildButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
- method @androidx.compose.runtime.Composable public static void CompactButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? label);
- method @androidx.compose.runtime.Composable public static void FilledTonalButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void FilledTonalButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
- method @androidx.compose.runtime.Composable public static void OutlinedButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void OutlinedButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
+ method @androidx.compose.runtime.Composable public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void Button(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
+ method @androidx.compose.runtime.Composable public static void ChildButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void ChildButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
+ method @androidx.compose.runtime.Composable public static void CompactButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? label);
+ method @androidx.compose.runtime.Composable public static void FilledTonalButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void FilledTonalButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
+ method @androidx.compose.runtime.Composable public static void OutlinedButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void OutlinedButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
}
@androidx.compose.runtime.Immutable public final class CardColors {
@@ -99,10 +99,10 @@
}
public final class CardKt {
- method @androidx.compose.runtime.Composable public static void AppCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> appName, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.CardColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? appImage, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? time, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void Card(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.CardColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void OutlinedCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.CardColors colors, optional androidx.compose.foundation.BorderStroke border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void TitleCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? time, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit>? subtitle, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.CardColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional kotlin.jvm.functions.Function0<kotlin.Unit>? content);
+ method @androidx.compose.runtime.Composable public static void AppCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> appName, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.CardColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? appImage, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? time, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void Card(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.CardColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void OutlinedCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.CardColors colors, optional androidx.compose.foundation.BorderStroke border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void TitleCard(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? time, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit>? subtitle, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.CardColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional kotlin.jvm.functions.Function0<kotlin.Unit>? content);
}
@androidx.compose.runtime.Immutable public final class CheckboxColors {
@@ -248,11 +248,11 @@
}
public final class IconButtonKt {
- method @androidx.compose.runtime.Composable public static void FilledIconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.IconButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void FilledTonalIconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.IconButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void IconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.IconButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void IconToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material3.ToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.BorderStroke? border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void OutlinedIconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.IconButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void FilledIconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.IconButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void FilledTonalIconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.IconButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void IconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.IconButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void IconToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material3.ToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.BorderStroke? border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void OutlinedIconButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.IconButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
}
public final class IconKt {
@@ -385,8 +385,8 @@
}
public final class RadioButtonKt {
- method @androidx.compose.runtime.Composable public static void RadioButton(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onSelected, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.material3.SelectionControlScope,kotlin.Unit> selectionControl, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.RadioButtonColors colors, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
- method @androidx.compose.runtime.Composable public static void SplitRadioButton(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onSelected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.material3.SelectionControlScope,kotlin.Unit> selectionControl, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.SplitRadioButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource selectionInteractionSource, optional androidx.compose.foundation.interaction.MutableInteractionSource clickInteractionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
+ method @androidx.compose.runtime.Composable public static void RadioButton(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onSelected, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.material3.SelectionControlScope,kotlin.Unit> selectionControl, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.RadioButtonColors colors, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
+ method @androidx.compose.runtime.Composable public static void SplitRadioButton(boolean selected, kotlin.jvm.functions.Function0<kotlin.Unit> onSelected, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional kotlin.jvm.functions.Function1<? super androidx.wear.compose.material3.SelectionControlScope,kotlin.Unit> selectionControl, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.SplitRadioButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? selectionInteractionSource, optional androidx.compose.foundation.interaction.MutableInteractionSource? clickInteractionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
}
@androidx.compose.runtime.Immutable public final class RadioColors {
@@ -626,8 +626,8 @@
}
public final class TextButtonKt {
- method @androidx.compose.runtime.Composable public static void TextButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.TextButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void TextToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material3.ToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.BorderStroke? border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void TextButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.TextButtonColors colors, optional androidx.compose.foundation.BorderStroke? border, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static void TextToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.wear.compose.material3.ToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional androidx.compose.ui.graphics.Shape shape, optional androidx.compose.foundation.BorderStroke? border, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit> content);
}
public final class TextKt {
@@ -688,8 +688,8 @@
}
public final class ToggleButtonKt {
- method @androidx.compose.runtime.Composable public static void SplitToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.wear.compose.material3.ToggleControlScope,kotlin.Unit> toggleControl, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.SplitToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource checkedInteractionSource, optional androidx.compose.foundation.interaction.MutableInteractionSource clickInteractionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
- method @androidx.compose.runtime.Composable public static void ToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, kotlin.jvm.functions.Function1<? super androidx.wear.compose.material3.ToggleControlScope,kotlin.Unit> toggleControl, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ToggleButtonColors colors, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource interactionSource, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
+ method @androidx.compose.runtime.Composable public static void SplitToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, kotlin.jvm.functions.Function0<kotlin.Unit> onClick, kotlin.jvm.functions.Function1<? super androidx.wear.compose.material3.ToggleControlScope,kotlin.Unit> toggleControl, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.SplitToggleButtonColors colors, optional androidx.compose.foundation.interaction.MutableInteractionSource? checkedInteractionSource, optional androidx.compose.foundation.interaction.MutableInteractionSource? clickInteractionSource, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
+ method @androidx.compose.runtime.Composable public static void ToggleButton(boolean checked, kotlin.jvm.functions.Function1<? super java.lang.Boolean,kotlin.Unit> onCheckedChange, kotlin.jvm.functions.Function1<? super androidx.wear.compose.material3.ToggleControlScope,kotlin.Unit> toggleControl, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional androidx.compose.ui.graphics.Shape shape, optional androidx.wear.compose.material3.ToggleButtonColors colors, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional androidx.compose.foundation.interaction.MutableInteractionSource? interactionSource, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.BoxScope,kotlin.Unit>? icon, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>? secondaryLabel, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> label);
}
public final class ToggleControlScope {
diff --git a/wear/compose/compose-material3/benchmark/build.gradle b/wear/compose/compose-material3/benchmark/build.gradle
index 1fcfc80..1d173cc 100644
--- a/wear/compose/compose-material3/benchmark/build.gradle
+++ b/wear/compose/compose-material3/benchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/compose/compose-material3/build.gradle b/wear/compose/compose-material3/build.gradle
index 1d3888f..6114059 100644
--- a/wear/compose/compose-material3/build.gradle
+++ b/wear/compose/compose-material3/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/wear/compose/compose-material3/integration-tests/build.gradle b/wear/compose/compose-material3/integration-tests/build.gradle
index 93bbd98..3aa8b91 100644
--- a/wear/compose/compose-material3/integration-tests/build.gradle
+++ b/wear/compose/compose-material3/integration-tests/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/wear/compose/compose-material3/samples/build.gradle b/wear/compose/compose-material3/samples/build.gradle
index df3d49c..94ca565 100644
--- a/wear/compose/compose-material3/samples/build.gradle
+++ b/wear/compose/compose-material3/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/Button.kt b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/Button.kt
index ef7d6d4..11f1bfe 100644
--- a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/Button.kt
+++ b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/Button.kt
@@ -102,10 +102,10 @@
* button in different states.
* @param contentPadding The spacing values to apply internally between the container and the
* content
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
*/
@Composable
fun Button(
@@ -116,7 +116,7 @@
colors: ButtonColors = ButtonDefaults.filledButtonColors(),
border: BorderStroke? = null,
contentPadding: PaddingValues = ButtonDefaults.ContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable RowScope.() -> Unit,
) = ButtonImpl(
onClick = onClick,
@@ -172,10 +172,10 @@
* button in different states.
* @param contentPadding The spacing values to apply internally between the container and the
* content
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
*/
@Composable
fun FilledTonalButton(
@@ -186,7 +186,7 @@
colors: ButtonColors = ButtonDefaults.filledTonalButtonColors(),
border: BorderStroke? = null,
contentPadding: PaddingValues = ButtonDefaults.ContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable RowScope.() -> Unit,
) = ButtonImpl(
onClick = onClick,
@@ -241,10 +241,10 @@
* button in different states. See [ButtonDefaults.outlinedButtonBorder].
* @param contentPadding The spacing values to apply internally between the container and the
* content
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
*/
@Composable
fun OutlinedButton(
@@ -255,7 +255,7 @@
colors: ButtonColors = ButtonDefaults.outlinedButtonColors(),
border: BorderStroke? = ButtonDefaults.outlinedButtonBorder(enabled),
contentPadding: PaddingValues = ButtonDefaults.ContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable RowScope.() -> Unit,
) = ButtonImpl(
onClick = onClick,
@@ -310,10 +310,10 @@
* button in different states.
* @param contentPadding The spacing values to apply internally between the container and the
* content
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
*/
@Composable
fun ChildButton(
@@ -324,7 +324,7 @@
colors: ButtonColors = ButtonDefaults.childButtonColors(),
border: BorderStroke? = null,
contentPadding: PaddingValues = ButtonDefaults.ContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable RowScope.() -> Unit,
) = ButtonImpl(
onClick = onClick,
@@ -392,10 +392,10 @@
* different states.
* @param contentPadding The spacing values to apply internally between the container and the
* content
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param label A slot for providing the button's main label. The contents are expected to be text
* which is "start" aligned if there is an icon preset and "start" or "center" aligned if not.
*/
@@ -410,7 +410,7 @@
colors: ButtonColors = ButtonDefaults.filledButtonColors(),
border: BorderStroke? = null,
contentPadding: PaddingValues = ButtonDefaults.ContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
label: @Composable RowScope.() -> Unit,
) = ButtonImpl(
onClick = onClick,
@@ -485,10 +485,10 @@
* different states.
* @param contentPadding The spacing values to apply internally between the container and the
* content
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param label A slot for providing the button's main label. The contents are expected to be text
* which is "start" aligned if there is an icon preset and "start" or "center" aligned if not.
*/
@@ -503,7 +503,7 @@
colors: ButtonColors = ButtonDefaults.filledTonalButtonColors(),
border: BorderStroke? = null,
contentPadding: PaddingValues = ButtonDefaults.ContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
label: @Composable RowScope.() -> Unit,
) = ButtonImpl(
onClick = onClick,
@@ -573,10 +573,10 @@
* different states. See [ButtonDefaults.outlinedButtonBorder].
* @param contentPadding The spacing values to apply internally between the container and the
* content
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param label A slot for providing the button's main label. The contents are expected to be text
* which is "start" aligned if there is an icon preset and "start" or "center" aligned if not.
*/
@@ -591,7 +591,7 @@
colors: ButtonColors = ButtonDefaults.outlinedButtonColors(),
border: BorderStroke? = ButtonDefaults.outlinedButtonBorder(enabled),
contentPadding: PaddingValues = ButtonDefaults.ContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
label: @Composable RowScope.() -> Unit,
) = ButtonImpl(
onClick = onClick,
@@ -660,10 +660,10 @@
* different states.
* @param contentPadding The spacing values to apply internally between the container and the
* content
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param label A slot for providing the button's main label. The contents are expected to be text
* which is "start" aligned if there is an icon preset and "start" or "center" aligned if not.
*/
@@ -678,7 +678,7 @@
colors: ButtonColors = ButtonDefaults.childButtonColors(),
border: BorderStroke? = null,
contentPadding: PaddingValues = ButtonDefaults.ContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
label: @Composable RowScope.() -> Unit,
) = ButtonImpl(
onClick = onClick,
@@ -761,10 +761,10 @@
* this button in different states. See [ButtonDefaults.filledButtonColors].
* @param enabled Controls the enabled state of the button. When `false`, this button will not
* be clickable
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param contentPadding The spacing values to apply internally between the container and the
* content
* @param shape Defines the button's shape. It is strongly recommended to use the default as this
@@ -782,7 +782,7 @@
colors: ButtonColors = ButtonDefaults.filledButtonColors(),
border: BorderStroke? = null,
contentPadding: PaddingValues = ButtonDefaults.CompactButtonContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
label: (@Composable RowScope.() -> Unit)? = null,
) {
if (label != null) {
@@ -1407,7 +1407,7 @@
colors: ButtonColors,
border: BorderStroke?,
contentPadding: PaddingValues,
- interactionSource: MutableInteractionSource,
+ interactionSource: MutableInteractionSource?,
content: @Composable RowScope.() -> Unit
) {
val borderModifier = if (border != null)
@@ -1456,7 +1456,7 @@
colors: ButtonColors,
border: BorderStroke?,
contentPadding: PaddingValues,
- interactionSource: MutableInteractionSource,
+ interactionSource: MutableInteractionSource?,
label: @Composable RowScope.() -> Unit
) {
ButtonImpl(
diff --git a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/Card.kt b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/Card.kt
index bea5798..78fc98f 100644
--- a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/Card.kt
+++ b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/Card.kt
@@ -78,10 +78,10 @@
* @param border A BorderStroke object which is used for drawing outlines.
* @param contentPadding The spacing values to apply internally between the container and the
* content
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this card. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this card in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this card. You can use this to change the card's appearance
+ * or preview the card in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content The main slot for a content of this card
*/
@Composable
@@ -93,7 +93,7 @@
colors: CardColors = CardDefaults.cardColors(),
border: BorderStroke? = null,
contentPadding: PaddingValues = CardDefaults.ContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable ColumnScope.() -> Unit,
) {
CardImpl(
@@ -162,10 +162,10 @@
* @param border A BorderStroke object which is used for drawing outlines.
* @param contentPadding The spacing values to apply internally between the container and the
* content
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this card. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this card in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this card. You can use this to change the card's appearance
+ * or preview the card in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param appImage A slot for a small ([CardDefaults.AppImageSize]x[CardDefaults.AppImageSize] )
* [Image] associated with the application.
* @param time A slot for displaying the time relevant to the contents of the card, expected to be a
@@ -183,7 +183,7 @@
colors: CardColors = CardDefaults.cardColors(),
border: BorderStroke? = null,
contentPadding: PaddingValues = CardDefaults.ContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
appImage: @Composable (RowScope.() -> Unit)? = null,
time: @Composable (RowScope.() -> Unit)? = null,
content: @Composable ColumnScope.() -> Unit,
@@ -288,10 +288,10 @@
* @param border A BorderStroke object which is used for drawing outlines.
* @param contentPadding The spacing values to apply internally between the container and the
* content
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this card. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this card in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this card. You can use this to change the card's appearance
+ * or preview the card in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content The optional body content of the card. If not provided then title
* and subtitle are expected to be provided
*/
@@ -307,7 +307,7 @@
colors: CardColors = CardDefaults.cardColors(),
border: BorderStroke? = null,
contentPadding: PaddingValues = CardDefaults.ContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable (() -> Unit)? = null,
) {
val timeWithTextStyle: @Composable () -> Unit = {
@@ -406,10 +406,10 @@
* @param border A BorderStroke object which is used for the outline drawing.
* @param contentPadding The spacing values to apply internally between the container and the
* content
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this card. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this card in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this card. You can use this to change the card's appearance
+ * or preview the card in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content The main slot for a content of this card
*/
@Composable
@@ -421,7 +421,7 @@
colors: CardColors = CardDefaults.outlinedCardColors(),
border: BorderStroke = CardDefaults.outlinedCardBorder(),
contentPadding: PaddingValues = CardDefaults.ContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable ColumnScope.() -> Unit,
) {
CardImpl(
@@ -638,7 +638,7 @@
colors: CardColors,
border: BorderStroke?,
contentPadding: PaddingValues,
- interactionSource: MutableInteractionSource,
+ interactionSource: MutableInteractionSource?,
content: @Composable ColumnScope.() -> Unit,
) {
androidx.wear.compose.materialcore.Card(
diff --git a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/IconButton.kt b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/IconButton.kt
index 5698de2..5a9f0e2 100644
--- a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/IconButton.kt
+++ b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/IconButton.kt
@@ -23,7 +23,6 @@
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.State
-import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
@@ -67,10 +66,10 @@
* @param colors [IconButtonColors] that will be used to resolve the background and icon color for
* this button in different states.
* @param border Optional [BorderStroke] for the icon button border.
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content The content displayed on the icon button, expected to be icon or image.
*/
@Composable
@@ -81,7 +80,7 @@
shape: Shape = IconButtonDefaults.shape,
colors: IconButtonColors = IconButtonDefaults.iconButtonColors(),
border: BorderStroke? = null,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable BoxScope.() -> Unit,
) {
androidx.wear.compose.materialcore.Button(
@@ -133,10 +132,10 @@
* @param colors [IconButtonColors] that will be used to resolve the container and content color for
* this icon button in different states.
* @param border Optional [BorderStroke] for the icon button border.
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content The content displayed on the icon button, expected to be icon or image.
*/
@Composable
@@ -147,7 +146,7 @@
shape: Shape = IconButtonDefaults.shape,
colors: IconButtonColors = IconButtonDefaults.filledIconButtonColors(),
border: BorderStroke? = null,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable BoxScope.() -> Unit,
) = IconButton(onClick, modifier, enabled, shape, colors, border, interactionSource, content)
@@ -183,10 +182,10 @@
* @param colors [IconButtonColors] that will be used to resolve the background and icon color for
* this button in different states.
* @param border Optional [BorderStroke] for the icon button border.
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content The content displayed on the icon button, expected to be icon or image.
*/
@Composable
@@ -197,7 +196,7 @@
shape: Shape = IconButtonDefaults.shape,
colors: IconButtonColors = IconButtonDefaults.filledTonalIconButtonColors(),
border: BorderStroke? = null,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable BoxScope.() -> Unit,
) = IconButton(onClick, modifier, enabled, shape, colors, border, interactionSource, content)
@@ -237,10 +236,10 @@
* this button in different states. See [IconButtonDefaults.outlinedIconButtonColors].
* @param border Optional [BorderStroke] for the icon button border -
* [ButtonDefaults.outlinedButtonBorder] by default.
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content The content displayed on the icon button, expected to be icon or image.
*/
@Composable
@@ -251,7 +250,7 @@
shape: Shape = IconButtonDefaults.shape,
colors: IconButtonColors = IconButtonDefaults.outlinedIconButtonColors(),
border: BorderStroke? = ButtonDefaults.outlinedButtonBorder(enabled),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable BoxScope.() -> Unit,
) = IconButton(onClick, modifier, enabled, shape, colors, border, interactionSource, content)
@@ -284,10 +283,10 @@
* this toggle button will not be clickable.
* @param colors [ToggleButtonColors] that will be used to resolve the container and
* content color for this toggle button.
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this toggle button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this ToggleButton in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param shape Defines the shape for this toggle button. It is strongly recommended to use the
* default as this shape is a key characteristic of the Wear Material 3 Theme.
* @param border Optional [BorderStroke] for the [IconToggleButton].
@@ -300,7 +299,7 @@
modifier: Modifier = Modifier,
enabled: Boolean = true,
colors: ToggleButtonColors = IconButtonDefaults.iconToggleButtonColors(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
shape: Shape = IconButtonDefaults.shape,
border: BorderStroke? = null,
content: @Composable BoxScope.() -> Unit,
diff --git a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/RadioButton.kt b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/RadioButton.kt
index 62e53ca..b0f3b79 100644
--- a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/RadioButton.kt
+++ b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/RadioButton.kt
@@ -96,10 +96,10 @@
* content color for this button in different states.
* @param contentPadding The spacing values to apply internally between the container and the
* content.
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this button's "selectable" tap area. You can create and pass in your own
- * remembered [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this radio button. You can use this to change the radio button's
+ * appearance or preview the radio button in different states. Note that if `null` is provided,
+ * interactions will still happen internally.
* @param icon An optional slot for providing an icon to indicate the purpose of the button.
* The contents are expected to be center-aligned, both horizontally and vertically, and should be
* an icon of size 24.dp. In order to correctly render when the Button is not enabled the
@@ -121,7 +121,7 @@
shape: Shape = MaterialTheme.shapes.large,
colors: RadioButtonColors = RadioButtonDefaults.radioButtonColors(),
contentPadding: PaddingValues = RadioButtonDefaults.ContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
icon: @Composable (BoxScope.() -> Unit)? = null,
secondaryLabel: @Composable (RowScope.() -> Unit)? = null,
label: @Composable RowScope.() -> Unit
@@ -227,14 +227,14 @@
* content color for this button in different states.
* @param contentPadding The spacing values to apply internally between the container and the
* content.
- * @param selectionInteractionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this button's "selectable" tap area. You can create and pass in your own
- * remembered [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this button in different [Interaction]s.
- * @param clickInteractionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this button's "clickable" tap area. You can create and pass in your own
- * remembered [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this button in different [Interaction]s.
+ * @param selectionInteractionSource an optional hoisted [MutableInteractionSource] for observing
+ * and emitting [Interaction]s for this button's "selectable" tap area. You can use this to change
+ * the button's appearance or preview the button in different states. Note that if `null` is
+ * provided, interactions will still happen internally.
+ * @param clickInteractionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button's "clickable" tap area. You can use this to change the
+ * button's appearance or preview the button in different states. Note that if `null` is provided,
+ * interactions will still happen internally.
* @param secondaryLabel A slot for providing the button's secondary label. The contents are
* expected to be "start" aligned.
* @param label A slot for providing the button's main label. The contents are expected to be text
@@ -252,8 +252,8 @@
},
shape: Shape = MaterialTheme.shapes.large,
colors: SplitRadioButtonColors = RadioButtonDefaults.splitRadioButtonColors(),
- selectionInteractionSource: MutableInteractionSource = remember { MutableInteractionSource() },
- clickInteractionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ selectionInteractionSource: MutableInteractionSource? = null,
+ clickInteractionSource: MutableInteractionSource? = null,
contentPadding: PaddingValues = RadioButtonDefaults.ContentPadding,
secondaryLabel: @Composable (RowScope.() -> Unit)? = null,
label: @Composable RowScope.() -> Unit
diff --git a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/TextButton.kt b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/TextButton.kt
index dc7b922..15373eb 100644
--- a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/TextButton.kt
+++ b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/TextButton.kt
@@ -23,7 +23,6 @@
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.State
-import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
@@ -73,10 +72,10 @@
* for this button in different states.
* @param border Optional [BorderStroke] that will be used to resolve the text button border in
* different states. See [ButtonDefaults.outlinedButtonBorder].
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this Button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Button in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button. You can use this to change the button's appearance
+ * or preview the button in different states. Note that if `null` is provided, interactions will
+ * still happen internally.
* @param content The content displayed on the text button, expected to be text or image.
*/
@Composable
@@ -87,7 +86,7 @@
shape: Shape = TextButtonDefaults.shape,
colors: TextButtonColors = TextButtonDefaults.textButtonColors(),
border: BorderStroke? = null,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
content: @Composable BoxScope.() -> Unit,
) {
androidx.wear.compose.materialcore.Button(
@@ -136,10 +135,10 @@
* this toggle button will not be clickable.
* @param colors [ToggleButtonColors] that will be used to resolve the container and
* content color for this toggle button.
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this toggle button. You can create and pass in your own remembered
- * [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this ToggleButton in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this toggle button. You can use this to change the toggle button's
+ * appearance or preview the toggle button in different states. Note that if `null` is provided,
+ * interactions will still happen internally.
* @param shape Defines the shape for this toggle button. It is strongly recommended to use the
* default as this shape is a key characteristic of the Wear Material 3 Theme.
* @param border Optional [BorderStroke] for the [TextToggleButton].
@@ -152,7 +151,7 @@
modifier: Modifier = Modifier,
enabled: Boolean = true,
colors: ToggleButtonColors = TextButtonDefaults.textToggleButtonColors(),
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
shape: Shape = TextButtonDefaults.shape,
border: BorderStroke? = null,
content: @Composable BoxScope.() -> Unit,
diff --git a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/ToggleButton.kt b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/ToggleButton.kt
index f2bd13d..d65e813 100644
--- a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/ToggleButton.kt
+++ b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/ToggleButton.kt
@@ -74,10 +74,10 @@
* content color for this button in different states.
* @param contentPadding The spacing values to apply internally between the container and the
* content.
- * @param interactionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this button's "toggleable" tap area. You can create and pass in your own
- * remembered [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this Chip in different [Interaction]s.
+ * @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button's "toggleable" tap area. You can use this to change the
+ * button's appearance or preview the button in different states. Note that if `null` is provided,
+ * interactions will still happen internally.
* @param icon An optional slot for providing an icon to indicate the purpose of the button. The
* contents are expected to be a horizontally and vertically center aligned icon of size
* 24.dp. In order to correctly render when the Chip is not enabled the
@@ -97,7 +97,7 @@
shape: Shape = MaterialTheme.shapes.large,
colors: ToggleButtonColors = ToggleButtonDefaults.toggleButtonColors(),
contentPadding: PaddingValues = ToggleButtonDefaults.ContentPadding,
- interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ interactionSource: MutableInteractionSource? = null,
icon: @Composable (BoxScope.() -> Unit)? = null,
secondaryLabel: @Composable (RowScope.() -> Unit)? = null,
label: @Composable RowScope.() -> Unit
@@ -188,14 +188,14 @@
* content color for this button in different states.
* @param contentPadding The spacing values to apply internally between the container and the
* content.
- * @param checkedInteractionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this button's "toggleable" tap area. You can create and pass in your own
- * remembered [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this button in different [Interaction]s.
- * @param clickInteractionSource The [MutableInteractionSource] representing the stream of
- * [Interaction]s for this button's "clickable" tap area. You can create and pass in your own
- * remembered [MutableInteractionSource] if you want to observe [Interaction]s and customize the
- * appearance / behavior of this button in different [Interaction]s.
+ * @param checkedInteractionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button's "toggleable" tap area. You can use this to change the
+ * button's appearance or preview the button in different states. Note that if `null` is provided,
+ * interactions will still happen internally.
+ * @param clickInteractionSource an optional hoisted [MutableInteractionSource] for observing and
+ * emitting [Interaction]s for this button's "clickable" tap area. You can use this to change the
+ * button's appearance or preview the button in different states. Note that if `null` is provided,
+ * interactions will still happen internally.
* @param secondaryLabel A slot for providing the button's secondary label. The contents are
* expected to be "start" aligned.
* @param label A slot for providing the button's main label. The contents are expected to be text
@@ -211,8 +211,8 @@
enabled: Boolean = true,
shape: Shape = MaterialTheme.shapes.large,
colors: SplitToggleButtonColors = ToggleButtonDefaults.splitToggleButtonColors(),
- checkedInteractionSource: MutableInteractionSource = remember { MutableInteractionSource() },
- clickInteractionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ checkedInteractionSource: MutableInteractionSource? = null,
+ clickInteractionSource: MutableInteractionSource? = null,
contentPadding: PaddingValues = ToggleButtonDefaults.ContentPadding,
secondaryLabel: @Composable (RowScope.() -> Unit)? = null,
label: @Composable RowScope.() -> Unit
diff --git a/wear/compose/compose-navigation/build.gradle b/wear/compose/compose-navigation/build.gradle
index 651ab99..653dcf4 100644
--- a/wear/compose/compose-navigation/build.gradle
+++ b/wear/compose/compose-navigation/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/compose/compose-navigation/samples/build.gradle b/wear/compose/compose-navigation/samples/build.gradle
index 1a69b7a..9ee6695 100644
--- a/wear/compose/compose-navigation/samples/build.gradle
+++ b/wear/compose/compose-navigation/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/compose/compose-ui-tooling/build.gradle b/wear/compose/compose-ui-tooling/build.gradle
index 4d68f5b..799209c 100644
--- a/wear/compose/compose-ui-tooling/build.gradle
+++ b/wear/compose/compose-ui-tooling/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/protolayout/protolayout-expression-pipeline/build.gradle b/wear/protolayout/protolayout-expression-pipeline/build.gradle
index f3cf0a3..af85399 100644
--- a/wear/protolayout/protolayout-expression-pipeline/build.gradle
+++ b/wear/protolayout/protolayout-expression-pipeline/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
@@ -28,7 +35,7 @@
implementation("androidx.core:core:1.7.0")
implementation("androidx.concurrent:concurrent-futures:1.1.0")
- implementation("androidx.annotation:annotation-experimental:1.3.1")
+ implementation(project(":annotation:annotation-experimental"))
implementation(project(path: ":wear:protolayout:protolayout-proto", configuration: "shadow"))
implementation(project(":wear:protolayout:protolayout-expression"))
diff --git a/wear/protolayout/protolayout-expression/build.gradle b/wear/protolayout/protolayout-expression/build.gradle
index 909c7ee..c7124fa 100644
--- a/wear/protolayout/protolayout-expression/build.gradle
+++ b/wear/protolayout/protolayout-expression/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
@@ -25,7 +32,7 @@
annotationProcessor(libs.nullaway)
api("androidx.annotation:annotation:1.2.0")
- implementation("androidx.annotation:annotation-experimental:1.3.1")
+ implementation(project(":annotation:annotation-experimental"))
implementation("androidx.collection:collection:1.2.0")
implementation(project(path: ":wear:protolayout:protolayout-proto", configuration: "shadow"))
diff --git a/wear/protolayout/protolayout-lint/build.gradle b/wear/protolayout/protolayout-lint/build.gradle
index dbe2777..dfb3ae5 100644
--- a/wear/protolayout/protolayout-lint/build.gradle
+++ b/wear/protolayout/protolayout-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/protolayout/protolayout-material-core/build.gradle b/wear/protolayout/protolayout-material-core/build.gradle
index e185149..dcf081a 100644
--- a/wear/protolayout/protolayout-material-core/build.gradle
+++ b/wear/protolayout/protolayout-material-core/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/protolayout/protolayout-material/build.gradle b/wear/protolayout/protolayout-material/build.gradle
index 796af7d..a09bf05 100644
--- a/wear/protolayout/protolayout-material/build.gradle
+++ b/wear/protolayout/protolayout-material/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
@@ -28,7 +35,7 @@
api(project(":wear:protolayout:protolayout"))
implementation(project(":wear:protolayout:protolayout-material-core"))
implementation(project(":wear:protolayout:protolayout-proto"))
- implementation("androidx.annotation:annotation-experimental:1.3.0")
+ implementation(project(":annotation:annotation-experimental"))
androidTestImplementation(libs.junit)
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testExtJunit)
diff --git a/wear/protolayout/protolayout-renderer/build.gradle b/wear/protolayout/protolayout-renderer/build.gradle
index ab96dd5..5b4f8d4 100644
--- a/wear/protolayout/protolayout-renderer/build.gradle
+++ b/wear/protolayout/protolayout-renderer/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/protolayout/protolayout/build.gradle b/wear/protolayout/protolayout/build.gradle
index 8459d38..d6a862c 100644
--- a/wear/protolayout/protolayout/build.gradle
+++ b/wear/protolayout/protolayout/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
@@ -25,7 +32,7 @@
annotationProcessor(libs.nullaway)
api("androidx.annotation:annotation:1.2.0")
- implementation("androidx.annotation:annotation-experimental:1.3.1")
+ implementation(project(":annotation:annotation-experimental"))
implementation(project(path: ":wear:protolayout:protolayout-proto", configuration: "shadow"))
api(project(":wear:protolayout:protolayout-expression"))
diff --git a/wear/tiles/tiles-material/build.gradle b/wear/tiles/tiles-material/build.gradle
index 8275b3e..e7b5bd2 100644
--- a/wear/tiles/tiles-material/build.gradle
+++ b/wear/tiles/tiles-material/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.LibraryType
diff --git a/wear/tiles/tiles-renderer/build.gradle b/wear/tiles/tiles-renderer/build.gradle
index 0181fdd..35f449f 100644
--- a/wear/tiles/tiles-renderer/build.gradle
+++ b/wear/tiles/tiles-renderer/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import androidx.build.Publish
diff --git a/wear/tiles/tiles-testing/build.gradle b/wear/tiles/tiles-testing/build.gradle
index 0bc8344..a85c803f 100644
--- a/wear/tiles/tiles-testing/build.gradle
+++ b/wear/tiles/tiles-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.LibraryType
diff --git a/wear/tiles/tiles-tooling-preview/build.gradle b/wear/tiles/tiles-tooling-preview/build.gradle
index 8e93c514..463b22e 100644
--- a/wear/tiles/tiles-tooling-preview/build.gradle
+++ b/wear/tiles/tiles-tooling-preview/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/wear/tiles/tiles-tooling/build.gradle b/wear/tiles/tiles-tooling/build.gradle
index 668c069..3ad6fab 100644
--- a/wear/tiles/tiles-tooling/build.gradle
+++ b/wear/tiles/tiles-tooling/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/wear/tiles/tiles/build.gradle b/wear/tiles/tiles/build.gradle
index 8e99fe5..4afba58 100644
--- a/wear/tiles/tiles/build.gradle
+++ b/wear/tiles/tiles/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.LibraryType
@@ -28,7 +35,7 @@
api(project(":wear:protolayout:protolayout-expression"))
api(libs.guavaListenableFuture)
- implementation("androidx.annotation:annotation-experimental:1.3.1")
+ implementation(project(":annotation:annotation-experimental"))
implementation("androidx.concurrent:concurrent-futures:1.1.0")
implementation(project(path: ":wear:tiles:tiles-proto"))
diff --git a/wear/watchface/watchface-client-guava/build.gradle b/wear/watchface/watchface-client-guava/build.gradle
index e3e6940..6b66845 100644
--- a/wear/watchface/watchface-client-guava/build.gradle
+++ b/wear/watchface/watchface-client-guava/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/wear/watchface/watchface-client/build.gradle b/wear/watchface/watchface-client/build.gradle
index a268b00..ad5d312 100644
--- a/wear/watchface/watchface-client/build.gradle
+++ b/wear/watchface/watchface-client/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/wear/watchface/watchface-complications-data-source/build.gradle b/wear/watchface/watchface-complications-data-source/build.gradle
index c4c006f..848bad5 100644
--- a/wear/watchface/watchface-complications-data-source/build.gradle
+++ b/wear/watchface/watchface-complications-data-source/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/wear/watchface/watchface-complications-data/build.gradle b/wear/watchface/watchface-complications-data/build.gradle
index 4e7408d..3e8e7bd 100644
--- a/wear/watchface/watchface-complications-data/build.gradle
+++ b/wear/watchface/watchface-complications-data/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.RunApiTasks
import androidx.build.Publish
diff --git a/wear/watchface/watchface-complications-permission-dialogs-sample/build.gradle b/wear/watchface/watchface-complications-permission-dialogs-sample/build.gradle
index 2cad372..1ef5703 100644
--- a/wear/watchface/watchface-complications-permission-dialogs-sample/build.gradle
+++ b/wear/watchface/watchface-complications-permission-dialogs-sample/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/watchface/watchface-complications-rendering/build.gradle b/wear/watchface/watchface-complications-rendering/build.gradle
index 05fc82f..21d92cf 100644
--- a/wear/watchface/watchface-complications-rendering/build.gradle
+++ b/wear/watchface/watchface-complications-rendering/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.RunApiTasks
import androidx.build.Publish
diff --git a/wear/watchface/watchface-complications/build.gradle b/wear/watchface/watchface-complications/build.gradle
index 65afe42..1ee658c 100644
--- a/wear/watchface/watchface-complications/build.gradle
+++ b/wear/watchface/watchface-complications/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.RunApiTasks
import androidx.build.Publish
diff --git a/wear/watchface/watchface-data/build.gradle b/wear/watchface/watchface-data/build.gradle
index cc33a28..b8e6667 100644
--- a/wear/watchface/watchface-data/build.gradle
+++ b/wear/watchface/watchface-data/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/wear/watchface/watchface-editor-guava/build.gradle b/wear/watchface/watchface-editor-guava/build.gradle
index e8f298d..3234cf6 100644
--- a/wear/watchface/watchface-editor-guava/build.gradle
+++ b/wear/watchface/watchface-editor-guava/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/wear/watchface/watchface-editor/build.gradle b/wear/watchface/watchface-editor/build.gradle
index 6b71dbd..8b69535 100644
--- a/wear/watchface/watchface-editor/build.gradle
+++ b/wear/watchface/watchface-editor/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/wear/watchface/watchface-editor/samples/build.gradle b/wear/watchface/watchface-editor/samples/build.gradle
index 03b1185..9cd724a 100644
--- a/wear/watchface/watchface-editor/samples/build.gradle
+++ b/wear/watchface/watchface-editor/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/wear/watchface/watchface-guava/build.gradle b/wear/watchface/watchface-guava/build.gradle
index b309a46..f15c90c 100644
--- a/wear/watchface/watchface-guava/build.gradle
+++ b/wear/watchface/watchface-guava/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
diff --git a/wear/watchface/watchface-style/build.gradle b/wear/watchface/watchface-style/build.gradle
index 7ab745c..23d2b84 100644
--- a/wear/watchface/watchface-style/build.gradle
+++ b/wear/watchface/watchface-style/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/wear/watchface/watchface-style/old-api-test-service/build.gradle b/wear/watchface/watchface-style/old-api-test-service/build.gradle
index 905cc31..441f679 100644
--- a/wear/watchface/watchface-style/old-api-test-service/build.gradle
+++ b/wear/watchface/watchface-style/old-api-test-service/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import com.android.build.api.artifact.SingleArtifact
diff --git a/wear/watchface/watchface-style/old-api-test-stub/build.gradle b/wear/watchface/watchface-style/old-api-test-stub/build.gradle
index aa784be..0d17e5a 100644
--- a/wear/watchface/watchface-style/old-api-test-stub/build.gradle
+++ b/wear/watchface/watchface-style/old-api-test-stub/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/wear/watchface/watchface/api/current.txt b/wear/watchface/watchface/api/current.txt
index 4889a67..57a1352 100644
--- a/wear/watchface/watchface/api/current.txt
+++ b/wear/watchface/watchface/api/current.txt
@@ -347,7 +347,6 @@
method public androidx.wear.watchface.WatchFace setTapListener(androidx.wear.watchface.WatchFace.TapListener? tapListener);
method public void setWatchFaceType(int);
property public final androidx.wear.watchface.WatchFace.LegacyWatchFaceOverlayStyle legacyWatchFaceStyle;
- property @Deprecated public final androidx.wear.watchface.WatchFace.OverlayStyle overlayStyle;
property public final java.time.Instant? overridePreviewReferenceInstant;
property public final androidx.wear.watchface.Renderer renderer;
property public final int watchFaceType;
diff --git a/wear/watchface/watchface/api/restricted_current.txt b/wear/watchface/watchface/api/restricted_current.txt
index 4889a67..57a1352 100644
--- a/wear/watchface/watchface/api/restricted_current.txt
+++ b/wear/watchface/watchface/api/restricted_current.txt
@@ -347,7 +347,6 @@
method public androidx.wear.watchface.WatchFace setTapListener(androidx.wear.watchface.WatchFace.TapListener? tapListener);
method public void setWatchFaceType(int);
property public final androidx.wear.watchface.WatchFace.LegacyWatchFaceOverlayStyle legacyWatchFaceStyle;
- property @Deprecated public final androidx.wear.watchface.WatchFace.OverlayStyle overlayStyle;
property public final java.time.Instant? overridePreviewReferenceInstant;
property public final androidx.wear.watchface.Renderer renderer;
property public final int watchFaceType;
diff --git a/wear/watchface/watchface/build.gradle b/wear/watchface/watchface/build.gradle
index afaabe8..218c5a5 100644
--- a/wear/watchface/watchface/build.gradle
+++ b/wear/watchface/watchface/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/wear/watchface/watchface/samples/build.gradle b/wear/watchface/watchface/samples/build.gradle
index f7b78e9..ee1d2ce 100644
--- a/wear/watchface/watchface/samples/build.gradle
+++ b/wear/watchface/watchface/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/wear/watchface/watchface/samples/minimal/build.gradle b/wear/watchface/watchface/samples/minimal/build.gradle
index c8e5139..1c78a40 100644
--- a/wear/watchface/watchface/samples/minimal/build.gradle
+++ b/wear/watchface/watchface/samples/minimal/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/control/InteractiveInstanceManager.kt b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/control/InteractiveInstanceManager.kt
index 9381afd..2952487 100644
--- a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/control/InteractiveInstanceManager.kt
+++ b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/control/InteractiveInstanceManager.kt
@@ -16,6 +16,7 @@
package androidx.wear.watchface.control
+import android.os.Build
import android.util.Log
import androidx.annotation.UiThread
import androidx.annotation.VisibleForTesting
@@ -198,7 +199,10 @@
val engine = impl.engine!!
engine.setUserStyle(value.params.userStyle)
- if (engine.resourceOnlyWatchFacePackageName !=
+ // Note prior to android U, auxiliaryComponentPackageName may be non null for regular
+ // watch faces.
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE &&
+ engine.resourceOnlyWatchFacePackageName !=
value.params.auxiliaryComponentPackageName
) {
val message =
diff --git a/wear/wear-input-testing/build.gradle b/wear/wear-input-testing/build.gradle
index 4e30e44..0db4514 100644
--- a/wear/wear-input-testing/build.gradle
+++ b/wear/wear-input-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/wear/wear-input/build.gradle b/wear/wear-input/build.gradle
index da42d97..29b0e3c 100644
--- a/wear/wear-input/build.gradle
+++ b/wear/wear-input/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/wear/wear-input/samples/build.gradle b/wear/wear-input/samples/build.gradle
index 01f8339..6fcf666 100644
--- a/wear/wear-input/samples/build.gradle
+++ b/wear/wear-input/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/wear-ongoing/build.gradle b/wear/wear-ongoing/build.gradle
index b9f9d8d..325ab9a 100644
--- a/wear/wear-ongoing/build.gradle
+++ b/wear/wear-ongoing/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/wear/wear-phone-interactions/build.gradle b/wear/wear-phone-interactions/build.gradle
index 0403497..1d4c223 100644
--- a/wear/wear-phone-interactions/build.gradle
+++ b/wear/wear-phone-interactions/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
@@ -72,4 +79,5 @@
mavenVersion = LibraryVersions.WEAR_PHONE_INTERACTIONS
inceptionYear = "2021"
description = "Android Wear Phone Interactions"
+ metalavaK2UastEnabled = true
}
diff --git a/wear/wear-phone-interactions/samples/build.gradle b/wear/wear-phone-interactions/samples/build.gradle
index 3d3f23f..0bc144d 100644
--- a/wear/wear-phone-interactions/samples/build.gradle
+++ b/wear/wear-phone-interactions/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/wear-remote-interactions/build.gradle b/wear/wear-remote-interactions/build.gradle
index 06ac5a4..0c21be6 100644
--- a/wear/wear-remote-interactions/build.gradle
+++ b/wear/wear-remote-interactions/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/wear/wear-remote-interactions/samples/build.gradle b/wear/wear-remote-interactions/samples/build.gradle
index 27b52fe..0baf948 100644
--- a/wear/wear-remote-interactions/samples/build.gradle
+++ b/wear/wear-remote-interactions/samples/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/wear-samples-ambient/build.gradle b/wear/wear-samples-ambient/build.gradle
index 29d1b8f..f731c07 100644
--- a/wear/wear-samples-ambient/build.gradle
+++ b/wear/wear-samples-ambient/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/wear/wear-tooling-preview/build.gradle b/wear/wear-tooling-preview/build.gradle
index f90f251..43715bf 100644
--- a/wear/wear-tooling-preview/build.gradle
+++ b/wear/wear-tooling-preview/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/wear/wear/build.gradle b/wear/wear/build.gradle
index 4db7c84..daa8ec8 100644
--- a/wear/wear/build.gradle
+++ b/wear/wear/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/webkit/integration-tests/instrumentation/build.gradle b/webkit/integration-tests/instrumentation/build.gradle
index 3c0f930..683d7ee 100644
--- a/webkit/integration-tests/instrumentation/build.gradle
+++ b/webkit/integration-tests/instrumentation/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.LibraryType
diff --git a/webkit/integration-tests/instrumentation/src/androidTest/java/androidx/webkit/URLUtilCompatTest.java b/webkit/integration-tests/instrumentation/src/androidTest/java/androidx/webkit/URLUtilCompatTest.java
new file mode 100644
index 0000000..23e7a94
--- /dev/null
+++ b/webkit/integration-tests/instrumentation/src/androidTest/java/androidx/webkit/URLUtilCompatTest.java
@@ -0,0 +1,298 @@
+/*
+ * Copyright 2023 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.webkit;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Tests for {@link URLUtilCompat}.
+ */
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class URLUtilCompatTest {
+
+ @Test
+ public void guessFileName_ctsTest() {
+ // This test mirrors the test in
+ // cts/tests/tests/webkit/src/android/webkit/cts/URLUtilTest.java for completeness.
+ String url = "ftp://example.url/test";
+ assertEquals("test.jpg", URLUtilCompat.guessFileName(url, null, "image/jpeg"));
+ assertEquals("test.bin",
+ URLUtilCompat.guessFileName(url, null, "application/octet-stream"));
+ }
+
+ @Test
+ public void guessFileName_extractPathSegmentFromUrl() {
+ String url = "https://example.com/resources/image?size=large";
+ assertEquals("image.jpg", URLUtilCompat.guessFileName(url, null, "image/jpeg"));
+ }
+
+ @Test
+ public void guessFileName_existingExtesionsNotReplacedIfMatchingMimeType() {
+ String url = "https://example.com/resources/image.jepg?size=large";
+ assertEquals("image.jepg", URLUtilCompat.guessFileName(url, null, "image/jpeg"));
+ }
+
+ @Test
+ public void guessFileName_extensionAppendedIfNotMatchingMimetype() {
+ String url = "https://example.com/resources/image.png?size=large";
+ assertEquals("image.png.jpg", URLUtilCompat.guessFileName(url, null, "image/jpeg"));
+ }
+
+ @Test
+ public void guessFileName_htmlExtensionForTextHtml() {
+ String url = "https://example.com/index";
+ assertEquals("index.html", URLUtilCompat.guessFileName(url, null, "text/html"));
+ }
+
+ @Test
+ public void guessFileName_txtExtensionForUnknownTxtType() {
+ String url = "https://example.com/index";
+ assertEquals("index.txt", URLUtilCompat.guessFileName(url, null, "text/fantasy"));
+ }
+
+ @Test
+ public void guessFileName_fallbackIfNoFilenamesAvailable() {
+ String url = "https://example.com/";
+ assertEquals("downloadfile.bin", URLUtilCompat.guessFileName(url, null, null));
+ }
+
+ @Test
+ public void guessFileName_contentDispositionUsedIfAvailable() {
+ String url = "https://example.com/wrong";
+ String contentDisposition = "attachment; filename=Test.png";
+ assertEquals("Test.png", URLUtilCompat.guessFileName(url, contentDisposition, "image/png"));
+ }
+
+ @Test
+ public void guessFileName_contentDispositionNameGetsAppendedMimeType() {
+ String url = "https://example.com/wrong";
+ String contentDisposition = "attachment; filename=Test.png";
+ assertEquals("Test.png.jpg",
+ URLUtilCompat.guessFileName(url, contentDisposition, "image/jpeg"));
+ }
+
+ @Test
+ public void guessFileName_contentDispositionNameReplacesSlashWithUnderscore() {
+ String url = "https://example.com/wrong";
+ String contentDisposition = "attachment; filename=Test/Test.png";
+ assertEquals("Test_Test.png", URLUtilCompat.guessFileName(url, contentDisposition, null));
+ }
+
+ @Test
+ public void guessFileName_contentDispositionNameReplacesSlashWithUnderscore_WithEscape() {
+ String url = "https://example.com/wrong";
+ String contentDisposition = "attachment; filename=\"Test\\/Test.png\"";
+ assertEquals("Test_Test.png", URLUtilCompat.guessFileName(url, contentDisposition, null));
+ }
+
+ @Test
+ public void guessFileName_contentDispositionUsesExtNameIfAvailable() {
+ String url = "https://example.com/wrong";
+ String contentDisposition = "attachment; filename=\"Wrong.png\"; filename*=utf-8''Test.png";
+ assertEquals("Test.png", URLUtilCompat.guessFileName(url, contentDisposition, null));
+ }
+
+
+ @Test
+ public void parseContentDisposition_nullIfDispositionIsInline() {
+ assertNull(URLUtilCompat.getFilenameFromContentDisposition("inline; filename=Test.png"));
+ }
+
+
+ @Test
+ public void parseContentDisposition_ignoreUnknownDisposition() {
+ assertEquals("Test.png",
+ URLUtilCompat.getFilenameFromContentDisposition("unknowndisposition; filename=Test"
+ + ".png"));
+ }
+
+ @Test
+ public void parseContentDisposition_caseInsensitiveAttrName() {
+ assertEquals("Test.png",
+ URLUtilCompat.getFilenameFromContentDisposition("attachment; fIlEnAmE=Test.png"));
+ }
+
+ @Test
+ public void parseContentDisposition_unQuotedString() {
+ assertEquals("Test.png",
+ URLUtilCompat.getFilenameFromContentDisposition("attachment; filename=Test.png"));
+ }
+
+
+ @Test
+ public void parseContentDisposition_doubleQuotedString() {
+ assertEquals("Test.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename=\"Test.png\""));
+ }
+
+ @Test
+ public void parseContentDisposition_doubleQuotedString_extraSpaces() {
+ assertEquals("Te st.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment ; filename = \"Te st.png\""));
+ }
+
+ @Test
+ public void parseContentDisposition_singleQuotedString_extraSpaces() {
+ assertEquals("Te st.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment ; filename = 'Te st.png'"));
+ }
+
+ @Test
+ public void parseContentDisposition_unQuotedString_extraSpaces() {
+ assertEquals("Test.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment ; filename = Test.png ;"));
+ }
+
+ @Test
+ public void parseContentDisposition_doubleQuotedStringUppercaseAttachment() {
+ assertEquals("Test.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "Attachment; filename=\"Test.png\""));
+ }
+
+ @Test
+ public void parseContentDisposition_singleQuotedString() {
+ assertEquals("Test.png",
+ URLUtilCompat.getFilenameFromContentDisposition("attachment; filename='Test.png'"));
+ }
+
+ @Test
+ public void parseContentDisposition_quotedStringExtraSemicolon() {
+ assertEquals("Test.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename=\"Test.png\";"));
+ }
+
+ @Test
+ public void parseContentDisposition_onlyExtUtf8NoSpecialChars() {
+ assertEquals("Test.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename*=UTF-8''Test.png"));
+ }
+
+ @Test
+ public void parseContentDisposition_bothParametersExtFilenameFirst_expectExtFilename() {
+ assertEquals("Test.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename*=UTF-8''Test.png; filename=\"Wrong.png\""));
+ }
+
+ @Test
+ public void parseContentDisposition_bothParametersStandardFirst_expectExtFilename() {
+ assertEquals("Test.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename=\"Wrong.png\"; filename*=utf-8''Test.png"));
+ }
+
+ @Test
+ public void parseContentDisposition_encodedWithLanguageParameter() {
+ assertEquals("£ rates", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename*=iso-8859-1'en'%A3%20rates; filename=\"Wrong.png\""));
+ }
+
+ @Test
+ public void parseContentDisposition_encodedWithUppercaseEncoding() {
+ assertEquals("£ and € rates", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename=\"Wrong.png\" ; "
+ + "filename*=UTF-8''%c2%a3%20and%20%e2%82%ac%20rates"));
+ }
+
+ @Test
+ public void parseContentDisposition_badEncodingIsIgnoredInFavorOfRegular() {
+ assertEquals("Test.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename=\"Test.png\"; " + "filename*=UTF-8''%borked"));
+ }
+
+
+ @Test
+ public void parseContentDisposition_unknownEncodingIsIgnoredInFavorOfRegular() {
+ assertEquals("Test.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename=\"Test.png\"; " + "filename*=UTF-9''Wrong.png"));
+ }
+
+ @Test
+ public void parseContentDisposition_semicolonInQuotedString_singleQuoted() {
+ assertEquals("Test;.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename='Test;.png'"));
+ }
+ @Test
+ public void parseContentDisposition_semicolonInQuotedString_doubleQuoted() {
+ assertEquals("Test;.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename=\"Test;.png\""));
+ }
+ @Test
+ public void parseContentDisposition_semicolonInQuotedString_singeQuotedPlusExt() {
+ assertEquals("Test.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename='Wrong;.png'; filename*=utf-8''Test.png"));
+ }
+ @Test
+ public void parseContentDisposition_semicolonInQuotedString_doubleQuotedPlusExt() {
+ assertEquals("Test.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename='Wrong;.png'; filename*=utf-8''Test.png"));
+ }
+
+ @Test
+ public void parseContentDisposition_equalsInQuotedString_singleQuoted() {
+ assertEquals("Test=.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename='Test=.png'"));
+ }
+
+ @Test
+ public void parseContentDisposition_equalsInQuotedString_doubleQuoted() {
+ assertEquals("Test=.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename=\"Test=.png\""));
+ }
+
+ @Test
+ public void parseContentDisposition_equalsInQuotedString_singleQuotedPlusExt() {
+ assertEquals("Test.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename='Wrong=.png'; filename*=utf-8''Test.png"));
+ }
+
+ @Test
+ public void parseContentDisposition_equalsInQuotedString_doubleQuotedPlusExt() {
+ assertEquals("Test.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename=\"Wrong=.png\"; filename*=utf-8''Test.png"));
+ }
+
+ @Test
+ public void parseContentDisposition_escapedQuote_singleQuoted() {
+ assertEquals("Test'.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename='Test\\'.png'"));
+ }
+
+ @Test
+ public void parseContentDisposition_escapedQuote_doubleQuoted() {
+ assertEquals("Test\".png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename=\"Test\\\".png\""));
+ }
+
+
+ @Test
+ public void parseContentDisposition_escapedTokens_singleQuoted() {
+ assertEquals("Test\\*.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename='Test\\\\\\*.png'"));
+ }
+ @Test
+ public void parseContentDisposition_escapedTokens_doubleQuoted() {
+ assertEquals("Test\\*.png", URLUtilCompat.getFilenameFromContentDisposition(
+ "attachment; filename=\"Test\\\\\\*.png\""));
+ }
+}
diff --git a/webkit/integration-tests/testapp/build.gradle b/webkit/integration-tests/testapp/build.gradle
index 9eb4b5d..97efa1c 100644
--- a/webkit/integration-tests/testapp/build.gradle
+++ b/webkit/integration-tests/testapp/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.ApkCopyHelperKt
import androidx.build.Publish
diff --git a/webkit/webkit/build.gradle b/webkit/webkit/build.gradle
index ad9dfa7..eae85db 100644
--- a/webkit/webkit/build.gradle
+++ b/webkit/webkit/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.AndroidXConfig
diff --git a/webkit/webkit/src/main/java/androidx/webkit/URLUtilCompat.java b/webkit/webkit/src/main/java/androidx/webkit/URLUtilCompat.java
new file mode 100644
index 0000000..483d9d7
--- /dev/null
+++ b/webkit/webkit/src/main/java/androidx/webkit/URLUtilCompat.java
@@ -0,0 +1,309 @@
+/*
+ * Copyright 2023 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.webkit;
+
+import android.net.Uri;
+import android.webkit.MimeTypeMap;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.RestrictTo;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.nio.charset.Charset;
+import java.util.Locale;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Compatibility versions of methods in {@link android.webkit.URLUtil}.
+ */
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+public class URLUtilCompat {
+
+ /**
+ * Guesses canonical filename that a download would have, using the URL and contentDisposition.
+ * <p>
+ * This method differs from
+ * {@link android.webkit.URLUtil#guessFileName(String, String, String)} in the following
+ * ways:
+ * <ul>
+ * <li>This method uses an updated parsing of {@code contentDisposition}, making this
+ * available on older Android versions. See {@link #getFilenameFromContentDisposition(String)}.
+ * <li>If the filename guessed from {@code url} or {@code contentDisposition} already
+ * contains an extension, but this extension differs from the one expected from the
+ * {@code mimeType}, then this method will append the expected extension instead of
+ * replacing the one already present. This is done to preserve filenames that contain a
+ * {@code "."} as part of a filename but where the last part is not meant as an extension.
+ * <li>If the filename guessed from {@code contentDisposition} contains a {@code "/"}
+ * character, it will be replaced with {@code "_"}, unlike
+ * {@link android.webkit.URLUtil#guessFileName(String, String, String)} which will only
+ * return the part after the last {@code "/" character}.
+ * </ul>
+ * <p>
+ * This method will use {@link #getFilenameFromContentDisposition(String)} to parse the
+ * passed {@code contentDisposition}.
+ * <ul>
+ * <li>If not file extension is present in the guessed file name, one will be added based on
+ * the
+ * {@code mimetype} (this will be {@code ".bin"} if {@code mimeType} is {@code null}).
+ * <li>If the guessed file name already contains an extension, but this extension doesn't
+ * match a provided {@code mimeType}, then a new file extension will be added that matches
+ * the {@code mimeType}.
+ * </ul>
+ *
+ * @param url Url to the content. Must not be {@code null}
+ * @param contentDisposition Content-Disposition HTTP header or {@code null}
+ * @param mimeType Mime-type of the content or {@code null}
+ * @return suggested filename
+ * @see android.webkit.URLUtil#guessFileName(String, String, String)
+ * @see #getFilenameFromContentDisposition(String)
+ */
+ @NonNull
+ public static String guessFileName(@NonNull String url, @Nullable String contentDisposition,
+ @Nullable String mimeType) {
+ String filename = getFilenameSuggestion(url, contentDisposition);
+ // Split filename between base and extension
+ // Add an extension if filename does not have one
+ String extensionFromMimeType = suggestExtensionFromMimeType(mimeType);
+
+ if (filename.indexOf('.') < 0) {
+ // Filename does not have an extension, use the suggested one.
+ return filename + extensionFromMimeType;
+ }
+
+ // Filename already contains at least one dot.
+ // Compare the last segment of the extension against the mime type.
+ // If there's a mismatch, add the suggested extension instead.
+ if (mimeType != null && extensionDifferentFromMimeType(filename, mimeType)) {
+ return filename + extensionFromMimeType;
+ }
+ return filename;
+ }
+
+ /**
+ * Get the suggested file name from the {@code contentDisposition} or {@code url}. Will
+ * ensure that the filename contains no path separators by replacing them with the {@code "_"}
+ * character.
+ */
+ @NonNull
+ private static String getFilenameSuggestion(@NonNull String url,
+ @Nullable String contentDisposition) {
+ // First attempt to parse the Content-Disposition header if available
+ if (contentDisposition != null) {
+ String filename = getFilenameFromContentDisposition(contentDisposition);
+ if (filename != null) {
+ return replacePathSeparators(filename);
+ }
+ }
+
+ // Try to generate a filename based on the URL.
+ Uri parsedUri = Uri.parse(url);
+ if (parsedUri != null) {
+ String lastPathSegment = parsedUri.getLastPathSegment();
+ if (lastPathSegment != null) {
+ return replacePathSeparators(lastPathSegment);
+ }
+ }
+
+ // Finally, if couldn't get filename from URI, get a generic filename.
+ return "downloadfile";
+ }
+
+ /**
+ * Replace all instances of {@code "/"} with {@code "_"} to avoid filenames that navigate the
+ * path.
+ */
+ @NonNull
+ private static String replacePathSeparators(@NonNull String raw) {
+ return raw.replaceAll("/", "_");
+ }
+
+
+ /**
+ * Check if the {@code filename} has an extension that is different from the expected one based
+ * on the {@code mimeType}.
+ */
+ private static boolean extensionDifferentFromMimeType(@NonNull String filename,
+ @NonNull String mimeType) {
+ int lastDotIndex = filename.lastIndexOf('.');
+ String typeFromExt = MimeTypeMap.getSingleton().getMimeTypeFromExtension(
+ filename.substring(lastDotIndex + 1));
+ return typeFromExt != null && !typeFromExt.equalsIgnoreCase(mimeType);
+ }
+
+ /**
+ * Get a candidate file extension (including the @{code .}) for the given mimeType.
+ * will return {@code ".bin"} if {@code mimeType} is {@code null}
+ *
+ * @param mimeType Reported mimetype
+ * @return A file extension, including the {@code .}
+ */
+ @NonNull
+ private static String suggestExtensionFromMimeType(@Nullable String mimeType) {
+ if (mimeType == null) {
+ return ".bin";
+ }
+ String extensionFromMimeType = MimeTypeMap.getSingleton().getExtensionFromMimeType(
+ mimeType);
+ if (extensionFromMimeType != null) {
+ return "." + extensionFromMimeType;
+ }
+ if (mimeType.equalsIgnoreCase("text/html")) {
+ return ".html";
+ } else if (mimeType.toLowerCase(Locale.ROOT).startsWith("text/")) {
+ return ".txt";
+ } else {
+ return ".bin";
+ }
+ }
+
+ /**
+ * Pattern for parsing individual content disposition key-value pairs.
+ * <p>
+ * The pattern will attempt to parse the value as either single- double- or unquoted.
+ * For the single- and double-quoted options, the pattern allows escaped quotes as part of
+ * the value, as per https://datatracker.ietf.org/doc/html/rfc2616#section-2.2
+ * @noinspection RegExpRepeatedSpace Spaces are ignored by parser, there for readability.
+ */
+ private static final Pattern DISPOSITION_PATTERN = Pattern.compile(
+ "\\s*"
+ + "(\\S+?) # Group 1: parameter name\n"
+ + "\\s*=\\s* # Match equals sign\n"
+ + "(?: # non-capturing group of options\n"
+ + " '( (?: [^'\\\\] | \\\\. )* )' # Group 2: single-quoted\n"
+ + " | \"( (?: [^\"\\\\] | \\\\. )* )\" # Group 3: double-quoted\n"
+ + " | ( [^'\"][^;\\s]* ) # Group 4: un-quoted parameter\n"
+ + ")\\s*;? # Optional end semicolon",
+ Pattern.COMMENTS);
+
+ /**
+ * Extract filename from a {@code Content-Disposition} header value.
+ * <p>
+ * This method implements the parsing defined in
+ * <a href="https://datatracker.ietf.org/doc/html/rfc6266">RFC 6266</a>,
+ * supporting both the {@code filename} and {@code filename*} disposition parameters.
+ * If the passed header value has the {@code "inline"} disposition type, this method will
+ * return {@code null} to indicate that a download was not intended.
+ * <p>
+ * If both {@code filename*} and {@code filename} is present, the former will be returned, as
+ * per the RFC. Invalid encoded values will be ignored.
+ *
+ * @param contentDisposition Value of {@code Content-Disposition} header.
+ * @return The filename suggested by the header or {@code null} if no filename could be
+ * parsed from the header value.
+ */
+ @Nullable
+ public static String getFilenameFromContentDisposition(@NonNull String contentDisposition) {
+ String[] parts = contentDisposition.trim().split(";", 2);
+ if (parts.length < 2) {
+ // Need at least 2 parts, the `disposition-type` and at least one `disposition-parm`.
+ return null;
+ }
+ String dispositionType = parts[0].trim();
+ if ("inline".equalsIgnoreCase(dispositionType)) {
+ // "inline" should not result in a download.
+ // Unknown disposition types should be handles as "attachment"
+ // https://datatracker.ietf.org/doc/html/rfc6266#section-4.2
+ return null;
+ }
+ String dispositionParameters = parts[1];
+ Matcher matcher = DISPOSITION_PATTERN.matcher(dispositionParameters);
+ String filename = null;
+ String filenameExt = null;
+ while (matcher.find()) {
+ String parameter = matcher.group(1);
+ String value;
+ if (matcher.group(2) != null) {
+ value = removeSlashEscapes(matcher.group(2)); // Value was single-quoted
+ } else if (matcher.group(3) != null) {
+ value = removeSlashEscapes(matcher.group(3)); // Value was double-quoted
+ } else {
+ value = matcher.group(4); // Value was un-quoted
+ }
+
+ if (parameter == null || value == null) {
+ continue;
+ }
+
+ if ("filename*".equalsIgnoreCase(parameter)) {
+ filenameExt = parseExtValueString(value);
+ } else if ("filename".equalsIgnoreCase(parameter)) {
+ filename = value;
+ }
+ }
+
+ // RFC 6266 dictates the filenameExt should be preferred if present.
+ if (filenameExt != null) {
+ return filenameExt;
+ }
+ return filename;
+ }
+
+ /**
+ * Replace escapes of the \X form with X.
+ */
+ private static String removeSlashEscapes(String raw) {
+ if (raw == null) {
+ return null;
+ }
+ return raw.replaceAll("\\\\(.)", "$1");
+ }
+
+ /**
+ * Parse an extended value string which can be percent-encoded. Return {@code} null if unable
+ * to parse the string.
+ */
+ private static String parseExtValueString(String raw) {
+ String[] parts = raw.split("'", 3);
+ if (parts.length < 3) {
+ return null;
+ }
+
+ String encoding = parts[0];
+ // Intentionally ignore parts[1] (language).
+ String valueChars = parts[2];
+
+ try {
+ // The URLDecoder force-decodes + as " "
+ // so preemptively replace all values with the encoded value to preserve them.
+ String valueWithEncodedPlus = encodePlusCharacters(valueChars, encoding);
+ // Use the decode(String, String) version since the Charset version is not available
+ // at the current language level for the library.
+ return URLDecoder.decode(valueWithEncodedPlus, encoding);
+ } catch (RuntimeException | UnsupportedEncodingException ignored) {
+ return null; // Ignoring an un-parsable value is within spec.
+ }
+ }
+
+
+ /**
+ * Replace all instances of {@code "+"} with the percent-encoded equivalent for the given
+ * {@code encoding}.
+ */
+ @NonNull
+ private static String encodePlusCharacters(@NonNull String valueChars,
+ @NonNull String encoding) {
+ Charset charset = Charset.forName(encoding);
+ StringBuilder sb = new StringBuilder();
+ for (byte b : charset.encode("+").array()) {
+ sb.append(String.format("%02x", b));
+ }
+ return valueChars.replaceAll("\\+", sb.toString());
+ }
+}
diff --git a/window/extensions/core/core/build.gradle b/window/extensions/core/core/build.gradle
index b842a7c..70152c7 100644
--- a/window/extensions/core/core/build.gradle
+++ b/window/extensions/core/core/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/window/extensions/extensions/build.gradle b/window/extensions/extensions/build.gradle
index 2fc40d5..991473b 100644
--- a/window/extensions/extensions/build.gradle
+++ b/window/extensions/extensions/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
@@ -24,7 +31,7 @@
dependencies {
implementation("androidx.annotation:annotation:1.6.0")
- implementation("androidx.annotation:annotation-experimental:1.3.1")
+ implementation(project(":annotation:annotation-experimental"))
implementation("androidx.window.extensions.core:core:1.0.0")
testImplementation(libs.robolectric)
diff --git a/window/integration-tests/configuration-change-tests/build.gradle b/window/integration-tests/configuration-change-tests/build.gradle
index 3165fac..d376316 100644
--- a/window/integration-tests/configuration-change-tests/build.gradle
+++ b/window/integration-tests/configuration-change-tests/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
diff --git a/window/sidecar/sidecar/build.gradle b/window/sidecar/sidecar/build.gradle
index 4e5dbea..6fcdb47 100644
--- a/window/sidecar/sidecar/build.gradle
+++ b/window/sidecar/sidecar/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import androidx.build.RunApiTasks
diff --git a/window/window-core/build.gradle b/window/window-core/build.gradle
index 8e33dbf..703cd61 100644
--- a/window/window-core/build.gradle
+++ b/window/window-core/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
diff --git a/window/window-demos/demo/build.gradle b/window/window-demos/demo/build.gradle
index abbe7d0..cb2221e 100644
--- a/window/window-demos/demo/build.gradle
+++ b/window/window-demos/demo/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/window/window-java/build.gradle b/window/window-java/build.gradle
index 9c00e25..9a4a33c 100644
--- a/window/window-java/build.gradle
+++ b/window/window-java/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/window/window-rxjava2/build.gradle b/window/window-rxjava2/build.gradle
index 32360e3..062f54c 100644
--- a/window/window-rxjava2/build.gradle
+++ b/window/window-rxjava2/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/window/window-rxjava3/build.gradle b/window/window-rxjava3/build.gradle
index 6f676d6..96fd6a3 100644
--- a/window/window-rxjava3/build.gradle
+++ b/window/window-rxjava3/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/window/window-testing/build.gradle b/window/window-testing/build.gradle
index 3f3a7a6..b491afc 100644
--- a/window/window-testing/build.gradle
+++ b/window/window-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/window/window/build.gradle b/window/window/build.gradle
index 099eb15..4df8a41 100644
--- a/window/window/build.gradle
+++ b/window/window/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
diff --git a/window/window/samples/build.gradle b/window/window/samples/build.gradle
index 7db715c..eb2557c 100644
--- a/window/window/samples/build.gradle
+++ b/window/window/samples/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/work/work-benchmark/build.gradle b/work/work-benchmark/build.gradle
index cd0c8a6..4e4f926 100644
--- a/work/work-benchmark/build.gradle
+++ b/work/work-benchmark/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/work/work-datatransfer/build.gradle b/work/work-datatransfer/build.gradle
index 076684d..b90d5b32 100644
--- a/work/work-datatransfer/build.gradle
+++ b/work/work-datatransfer/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/work/work-gcm/build.gradle b/work/work-gcm/build.gradle
index f9dd750b..d3b314a 100644
--- a/work/work-gcm/build.gradle
+++ b/work/work-gcm/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/work/work-inspection/build.gradle b/work/work-inspection/build.gradle
index 99506bf..43af2b0 100644
--- a/work/work-inspection/build.gradle
+++ b/work/work-inspection/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/work/work-lint/build.gradle b/work/work-lint/build.gradle
index fb59083..0e7fe99 100644
--- a/work/work-lint/build.gradle
+++ b/work/work-lint/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.LibraryType
plugins {
diff --git a/work/work-multiprocess/build.gradle b/work/work-multiprocess/build.gradle
index da06b4d..021178b 100644
--- a/work/work-multiprocess/build.gradle
+++ b/work/work-multiprocess/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/work/work-runtime-ktx/build.gradle b/work/work-runtime-ktx/build.gradle
index 77beaf2..ffc1117 100644
--- a/work/work-runtime-ktx/build.gradle
+++ b/work/work-runtime-ktx/build.gradle
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/work/work-runtime/build.gradle b/work/work-runtime/build.gradle
index ad76c8a..6f9cc9e 100644
--- a/work/work-runtime/build.gradle
+++ b/work/work-runtime/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
import static androidx.inspection.gradle.InspectionPluginKt.packageInspector
@@ -60,7 +67,7 @@
implementation("androidx.core:core:1.12.0")
implementation("androidx.room:room-ktx:2.6.1")
implementation("androidx.concurrent:concurrent-futures:1.1.0")
- api("androidx.annotation:annotation-experimental:1.0.0")
+ api(projectOrArtifact(":annotation:annotation-experimental"))
api(libs.guavaListenableFuture)
api("androidx.lifecycle:lifecycle-livedata:2.6.2")
api("androidx.startup:startup-runtime:1.1.1")
diff --git a/work/work-rxjava2/build.gradle b/work/work-rxjava2/build.gradle
index a6e54d4..5e33680 100644
--- a/work/work-rxjava2/build.gradle
+++ b/work/work-rxjava2/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/work/work-rxjava3/build.gradle b/work/work-rxjava3/build.gradle
index 580b450..4a2b68d 100644
--- a/work/work-rxjava3/build.gradle
+++ b/work/work-rxjava3/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {
diff --git a/work/work-testing/build.gradle b/work/work-testing/build.gradle
index 8b41dc6..cb67331 100644
--- a/work/work-testing/build.gradle
+++ b/work/work-testing/build.gradle
@@ -14,6 +14,13 @@
* limitations under the License.
*/
+/**
+ * This file was created using the `create_project.py` script located in the
+ * `<AndroidX root>/development/project-creator` directory.
+ *
+ * Please use that script when creating a new project, rather than copying an existing project and
+ * modifying its settings.
+ */
import androidx.build.Publish
plugins {