Merge changes I10483fc1,I89acd367,I39fd3602 into androidx-main
* changes:
ReceiveContent Keyboard Integration
Add ReceiveContent modifier
ClipboardManager add support for ClipData
diff --git a/activity/activity/lint-baseline.xml b/activity/activity/lint-baseline.xml
deleted file mode 100644
index bcd3963..0000000
--- a/activity/activity/lint-baseline.xml
+++ /dev/null
@@ -1,139 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/result/contract/ActivityResultContracts.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/result/contract/ActivityResultContracts.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/result/contract/ActivityResultContracts.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/result/contract/ActivityResultContracts.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/result/contract/ActivityResultContracts.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/result/contract/ActivityResultContracts.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/result/contract/ActivityResultContracts.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/ComponentActivity.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (19 <= SDK_INT && SDK_INT <= 23) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/ComponentActivity.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/ComponentActivity.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/ComponentActivity.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/ComponentActivity.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/ImmLeaksCleaner.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/result/PickVisualMediaRequest.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/result/PickVisualMediaRequest.kt"/>
- </issue>
-
-</issues>
diff --git a/activity/activity/src/androidTest/java/androidx/activity/ComponentActivityResultTest.kt b/activity/activity/src/androidTest/java/androidx/activity/ComponentActivityResultTest.kt
index d977458..322f5ec 100644
--- a/activity/activity/src/androidTest/java/androidx/activity/ComponentActivityResultTest.kt
+++ b/activity/activity/src/androidTest/java/androidx/activity/ComponentActivityResultTest.kt
@@ -19,7 +19,6 @@
import android.app.Activity
import android.content.ActivityNotFoundException
import android.content.Intent
-import android.os.Build
import android.os.Bundle
import androidx.activity.result.ActivityResult
import androidx.activity.result.ActivityResultLauncher
@@ -69,12 +68,6 @@
@Test
fun registerBeforeOnCreateTest() {
- // There is a leak in API 30 InputMethodManager that causes this test to be flaky.
- // Once https://github.com/square/leakcanary/issues/2592 is addressed we can upgrade
- // leak canary and remove this.
- if (Build.VERSION.SDK_INT == Build.VERSION_CODES.R) {
- return
- }
ActivityScenario.launch(RegisterBeforeOnCreateActivity::class.java).use { scenario ->
scenario.withActivity {
recreate()
@@ -92,12 +85,6 @@
@Test
fun registerInInitTest() {
- // There is a leak in API 30 InputMethodManager that causes this test to be flaky.
- // Once https://github.com/square/leakcanary/issues/2592 is addressed we can upgrade
- // leak canary and remove this.
- if (Build.VERSION.SDK_INT == Build.VERSION_CODES.R) {
- return
- }
ActivityScenario.launch(RegisterInInitActivity::class.java).use { scenario ->
scenario.withActivity {
recreate()
diff --git a/activity/integration-tests/testapp/lint-baseline.xml b/activity/integration-tests/testapp/lint-baseline.xml
deleted file mode 100644
index b0521cd..0000000
--- a/activity/integration-tests/testapp/lint-baseline.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (android.os.Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/integration/testapp/MainActivity.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (android.os.Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/integration/testapp/MainActivity.kt"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Should explicitly declare type here since implicit type does not specify nullness (ActivityResultLauncher<(Uri or Uri?)>)"
- errorLine1=" val takePicture = registerForActivityResult(TakePicture()) { success ->"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/activity/integration/testapp/MainActivity.kt"/>
- </issue>
-
-</issues>
diff --git a/annotation/annotation-experimental-lint/integration-tests/build.gradle b/annotation/annotation-experimental-lint/integration-tests/build.gradle
index a617bfa..b626e67 100644
--- a/annotation/annotation-experimental-lint/integration-tests/build.gradle
+++ b/annotation/annotation-experimental-lint/integration-tests/build.gradle
@@ -48,7 +48,10 @@
kotlinOptions {
// Ensure that compilation passes in CLI despite opt-in violations in integration tests.
if (!isIdeBuild()) {
- freeCompilerArgs += [ "-opt-in=sample.optin.ExperimentalKotlinAnnotation" ]
+ freeCompilerArgs += [
+ "-opt-in=sample.optin.ExperimentalKotlinAnnotation",
+ "-opt-in=sample.kotlin.ExperimentalJavaAnnotation"
+ ]
}
}
}
diff --git a/annotation/annotation-experimental-lint/integration-tests/lint-baseline.xml b/annotation/annotation-experimental-lint/integration-tests/lint-baseline.xml
index 7d5be820..fc1497a 100644
--- a/annotation/annotation-experimental-lint/integration-tests/lint-baseline.xml
+++ b/annotation/annotation-experimental-lint/integration-tests/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha02" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="ExperimentalAnnotationRetention"
@@ -131,6 +131,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.kotlin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class)`"
errorLine1=" ExperimentalInterface anonymous = new ExperimentalInterface() { // unsafe"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/kotlin/RegressionTestJava192562469.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.kotlin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class)`"
+ errorLine1=" ExperimentalInterface anonymous = new ExperimentalInterface() { // unsafe"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/kotlin/RegressionTestJava192562469.java"/>
@@ -140,6 +149,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
errorLine1=" ExperimentalInterface anonymous = new ExperimentalInterface() { // unsafe"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/optin/RegressionTestJava192562469.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
+ errorLine1=" ExperimentalInterface anonymous = new ExperimentalInterface() { // unsafe"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/optin/RegressionTestJava192562469.java"/>
@@ -167,6 +185,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.kotlin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class)`"
errorLine1=" ExperimentalInterface lambda = () -> {}; // unsafe"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/kotlin/RegressionTestJava192562469.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.kotlin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class)`"
+ errorLine1=" ExperimentalInterface lambda = () -> {}; // unsafe"
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/sample/kotlin/RegressionTestJava192562469.java"/>
@@ -176,6 +203,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
errorLine1=" ExperimentalInterface lambda = () -> {}; // unsafe"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/optin/RegressionTestJava192562469.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
+ errorLine1=" ExperimentalInterface lambda = () -> {}; // unsafe"
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/sample/optin/RegressionTestJava192562469.java"/>
@@ -275,6 +311,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.kotlin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class)`"
errorLine1=" Bar bar = new Bar(); // unsafe"
+ errorLine2=" ~~~">
+ <location
+ file="src/main/java/sample/kotlin/RegressionTestJava193110413.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.kotlin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class)`"
+ errorLine1=" Bar bar = new Bar(); // unsafe"
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/sample/kotlin/RegressionTestJava193110413.java"/>
@@ -284,6 +329,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
errorLine1=" Bar bar = new Bar(); // unsafe"
+ errorLine2=" ~~~">
+ <location
+ file="src/main/java/sample/optin/RegressionTestJava193110413.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
+ errorLine1=" Bar bar = new Bar(); // unsafe"
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/sample/optin/RegressionTestJava193110413.java"/>
@@ -338,6 +392,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.kotlin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class)`"
errorLine1=" AnnotatedJavaClass experimentalObject = new AnnotatedJavaClass();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/kotlin/UseJavaExperimentalClassFromJava.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.kotlin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class)`"
+ errorLine1=" AnnotatedJavaClass experimentalObject = new AnnotatedJavaClass();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/kotlin/UseJavaExperimentalClassFromJava.java"/>
@@ -347,6 +410,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
errorLine1=" AnnotatedJavaClass experimentalObject = new AnnotatedJavaClass();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/optin/UseJavaExperimentalClassFromJava.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
+ errorLine1=" AnnotatedJavaClass experimentalObject = new AnnotatedJavaClass();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/optin/UseJavaExperimentalClassFromJava.java"/>
@@ -374,6 +446,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.kotlin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class)`"
errorLine1=" AnnotatedJavaClass experimentalObject = new AnnotatedJavaClass();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/kotlin/UseJavaExperimentalClassFromJava.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.kotlin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class)`"
+ errorLine1=" AnnotatedJavaClass experimentalObject = new AnnotatedJavaClass();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/kotlin/UseJavaExperimentalClassFromJava.java"/>
@@ -383,6 +464,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
errorLine1=" AnnotatedJavaClass experimentalObject = new AnnotatedJavaClass();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/optin/UseJavaExperimentalClassFromJava.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
+ errorLine1=" AnnotatedJavaClass experimentalObject = new AnnotatedJavaClass();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/optin/UseJavaExperimentalClassFromJava.java"/>
@@ -446,6 +536,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.experimental.ExperimentalDateTime` or `@OptIn(markerClass = sample.experimental.ExperimentalDateTime.class)`"
errorLine1=" DateProvider dateProvider = new DateProvider();"
+ errorLine2=" ~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/experimental/UseJavaExperimentalFromJava.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.experimental.ExperimentalDateTime` or `@OptIn(markerClass = sample.experimental.ExperimentalDateTime.class)`"
+ errorLine1=" DateProvider dateProvider = new DateProvider();"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/experimental/UseJavaExperimentalFromJava.java"/>
@@ -464,6 +563,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.experimental.ExperimentalLocation` or `@OptIn(markerClass = sample.experimental.ExperimentalLocation.class)`"
errorLine1=" LocationProvider locationProvider = new LocationProvider();"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/experimental/UseJavaExperimentalFromJava.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.experimental.ExperimentalLocation` or `@OptIn(markerClass = sample.experimental.ExperimentalLocation.class)`"
+ errorLine1=" LocationProvider locationProvider = new LocationProvider();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/experimental/UseJavaExperimentalFromJava.java"/>
@@ -482,6 +590,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
errorLine1=" val experimentalObject = AnnotatedJavaClass()"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/optin/UseJavaExperimentalFromKt.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
+ errorLine1=" val experimentalObject = AnnotatedJavaClass()"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/optin/UseJavaExperimentalFromKt.kt"/>
@@ -491,6 +608,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.experimental.ExperimentalDateTime` or `@OptIn(markerClass = sample.experimental.ExperimentalDateTime.class)`"
errorLine1=" val dateProvider = DateProvider()"
+ errorLine2=" ~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/experimental/UseJavaExperimentalFromKt.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.experimental.ExperimentalDateTime` or `@OptIn(markerClass = sample.experimental.ExperimentalDateTime.class)`"
+ errorLine1=" val dateProvider = DateProvider()"
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/sample/experimental/UseJavaExperimentalFromKt.kt"/>
@@ -518,6 +644,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
errorLine1=" val experimentalObject = AnnotatedJavaClass()"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/optin/UseJavaExperimentalFromKt.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
+ errorLine1=" val experimentalObject = AnnotatedJavaClass()"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/optin/UseJavaExperimentalFromKt.kt"/>
@@ -554,6 +689,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.experimental.ExperimentalLocation` or `@OptIn(markerClass = sample.experimental.ExperimentalLocation.class)`"
errorLine1=" val locationProvider = LocationProvider()"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/experimental/UseJavaExperimentalFromKt.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.experimental.ExperimentalLocation` or `@OptIn(markerClass = sample.experimental.ExperimentalLocation.class)`"
+ errorLine1=" val locationProvider = LocationProvider()"
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/experimental/UseJavaExperimentalFromKt.kt"/>
@@ -770,6 +914,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.kotlin.ExperimentalJavaAnnotation2` or `@OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation2.class)`"
errorLine1=" AnnotatedJavaClass2 experimentalObject2 = new AnnotatedJavaClass2();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/kotlin/UseJavaExperimentalMultipleMarkersFromJava.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.kotlin.ExperimentalJavaAnnotation2` or `@OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation2.class)`"
+ errorLine1=" AnnotatedJavaClass2 experimentalObject2 = new AnnotatedJavaClass2();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/kotlin/UseJavaExperimentalMultipleMarkersFromJava.java"/>
@@ -779,6 +932,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation2` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation2.class)`"
errorLine1=" AnnotatedJavaClass2 experimentalObject2 = new AnnotatedJavaClass2();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/optin/UseJavaExperimentalMultipleMarkersFromJava.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation2` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation2.class)`"
+ errorLine1=" AnnotatedJavaClass2 experimentalObject2 = new AnnotatedJavaClass2();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/optin/UseJavaExperimentalMultipleMarkersFromJava.java"/>
@@ -806,6 +968,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.experimental.foo.ExperimentalPackage` or `@OptIn(markerClass = sample.experimental.foo.ExperimentalPackage.class)`"
errorLine1=" Bar bar = new Bar();"
+ errorLine2=" ~~~">
+ <location
+ file="src/main/java/sample/experimental/UseJavaPackageFromJava.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.experimental.foo.ExperimentalPackage` or `@OptIn(markerClass = sample.experimental.foo.ExperimentalPackage.class)`"
+ errorLine1=" Bar bar = new Bar();"
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/sample/experimental/UseJavaPackageFromJava.java"/>
@@ -824,6 +995,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.kotlin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class)`"
errorLine1=" AnnotatedJavaPackage experimentalObject = new AnnotatedJavaPackage();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/kotlin/UseJavaPackageFromJava.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.kotlin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class)`"
+ errorLine1=" AnnotatedJavaPackage experimentalObject = new AnnotatedJavaPackage();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/kotlin/UseJavaPackageFromJava.java"/>
@@ -842,6 +1022,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
errorLine1=" AnnotatedJavaPackage experimentalObject = new AnnotatedJavaPackage();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/optin/UseJavaPackageFromJava.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
+ errorLine1=" AnnotatedJavaPackage experimentalObject = new AnnotatedJavaPackage();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/optin/UseJavaPackageFromJava.java"/>
@@ -887,6 +1076,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
errorLine1=" val experimentalObject = AnnotatedJavaPackage()"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/optin/UseJavaPackageFromKt.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalJavaAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class)`"
+ errorLine1=" val experimentalObject = AnnotatedJavaPackage()"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/optin/UseJavaPackageFromKt.kt"/>
@@ -905,6 +1103,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.experimental.foo.ExperimentalPackage` or `@OptIn(markerClass = sample.experimental.foo.ExperimentalPackage.class)`"
errorLine1=" val bar = Bar()"
+ errorLine2=" ~~~">
+ <location
+ file="src/main/java/sample/experimental/UseJavaPackageFromKt.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.experimental.foo.ExperimentalPackage` or `@OptIn(markerClass = sample.experimental.foo.ExperimentalPackage.class)`"
+ errorLine1=" val bar = Bar()"
errorLine2=" ~~~">
<location
file="src/main/java/sample/experimental/UseJavaPackageFromKt.kt"/>
@@ -941,6 +1148,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.experimental.ExperimentalDateTimeKt` or `@OptIn(markerClass = sample.experimental.ExperimentalDateTimeKt.class)`"
errorLine1=" sample.experimental.DateProviderKt dateProvider = new sample.experimental.DateProviderKt();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/experimental/UseKtExperimentalFromJava.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.experimental.ExperimentalDateTimeKt` or `@OptIn(markerClass = sample.experimental.ExperimentalDateTimeKt.class)`"
+ errorLine1=" sample.experimental.DateProviderKt dateProvider = new sample.experimental.DateProviderKt();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/experimental/UseKtExperimentalFromJava.java"/>
@@ -959,6 +1175,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.kotlin.ExperimentalKotlinAnnotation` or `@OptIn(markerClass = sample.kotlin.ExperimentalKotlinAnnotation.class)`"
errorLine1=" AnnotatedKotlinClass experimentalObject = new AnnotatedKotlinClass();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/kotlin/UseKtExperimentalFromJava.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.kotlin.ExperimentalKotlinAnnotation` or `@OptIn(markerClass = sample.kotlin.ExperimentalKotlinAnnotation.class)`"
+ errorLine1=" AnnotatedKotlinClass experimentalObject = new AnnotatedKotlinClass();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/kotlin/UseKtExperimentalFromJava.java"/>
@@ -968,6 +1193,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalKotlinAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalKotlinAnnotation.class)`"
errorLine1=" AnnotatedKotlinClass experimentalObject = new AnnotatedKotlinClass();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/optin/UseKtExperimentalFromJava.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.optin.ExperimentalKotlinAnnotation` or `@OptIn(markerClass = sample.optin.ExperimentalKotlinAnnotation.class)`"
+ errorLine1=" AnnotatedKotlinClass experimentalObject = new AnnotatedKotlinClass();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/optin/UseKtExperimentalFromJava.java"/>
@@ -995,6 +1229,15 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@sample.experimental.ExperimentalLocationKt` or `@OptIn(markerClass = sample.experimental.ExperimentalLocationKt.class)`"
errorLine1=" LocationProviderKt locationProvider = new LocationProviderKt();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/sample/experimental/UseKtExperimentalFromJava.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@sample.experimental.ExperimentalLocationKt` or `@OptIn(markerClass = sample.experimental.ExperimentalLocationKt.class)`"
+ errorLine1=" LocationProviderKt locationProvider = new LocationProviderKt();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/sample/experimental/UseKtExperimentalFromJava.java"/>
diff --git a/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/ExperimentalDetectorTest.kt b/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/ExperimentalDetectorTest.kt
index 3dd3170..c2e7b39 100644
--- a/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/ExperimentalDetectorTest.kt
+++ b/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/ExperimentalDetectorTest.kt
@@ -57,17 +57,23 @@
val expected = """
src/sample/experimental/UseJavaExperimentalFromJava.java:25: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalDateTime or @OptIn(markerClass = sample.experimental.ExperimentalDateTime.class) [UnsafeOptInUsageError]
DateProvider dateProvider = new DateProvider();
+ ~~~~~~~~~~~~
+src/sample/experimental/UseJavaExperimentalFromJava.java:25: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalDateTime or @OptIn(markerClass = sample.experimental.ExperimentalDateTime.class) [UnsafeOptInUsageError]
+ DateProvider dateProvider = new DateProvider();
~~~~~~~~~~~~~~~~~~
src/sample/experimental/UseJavaExperimentalFromJava.java:26: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalDateTime or @OptIn(markerClass = sample.experimental.ExperimentalDateTime.class) [UnsafeOptInUsageError]
return dateProvider.getDate();
~~~~~~~
src/sample/experimental/UseJavaExperimentalFromJava.java:53: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalLocation or @OptIn(markerClass = sample.experimental.ExperimentalLocation.class) [UnsafeOptInUsageError]
LocationProvider locationProvider = new LocationProvider();
+ ~~~~~~~~~~~~~~~~
+src/sample/experimental/UseJavaExperimentalFromJava.java:53: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalLocation or @OptIn(markerClass = sample.experimental.ExperimentalLocation.class) [UnsafeOptInUsageError]
+ LocationProvider locationProvider = new LocationProvider();
~~~~~~~~~~~~~~~~~~~~~~
src/sample/experimental/UseJavaExperimentalFromJava.java:54: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalLocation or @OptIn(markerClass = sample.experimental.ExperimentalLocation.class) [UnsafeOptInUsageError]
return dateProvider.getDate() + locationProvider.getLocation();
~~~~~~~~~~~
-4 errors, 0 warnings
+6 errors, 0 warnings
""".trimIndent()
val expectedFix = """
@@ -77,6 +83,12 @@
Fix for src/sample/experimental/UseJavaExperimentalFromJava.java line 25: Add '@sample.experimental.ExperimentalDateTime' annotation to 'getDateUnsafe':
@@ -24 +24
+ @ExperimentalDateTime
+Fix for src/sample/experimental/UseJavaExperimentalFromJava.java line 25: Add '@androidx.annotation.OptIn(markerClass = sample.experimental.ExperimentalDateTime.class)' annotation to 'getDateUnsafe':
+@@ -24 +24
++ @androidx.annotation.OptIn(markerClass = ExperimentalDateTime.class)
+Fix for src/sample/experimental/UseJavaExperimentalFromJava.java line 25: Add '@sample.experimental.ExperimentalDateTime' annotation to 'getDateUnsafe':
+@@ -24 +24
++ @ExperimentalDateTime
Fix for src/sample/experimental/UseJavaExperimentalFromJava.java line 26: Add '@androidx.annotation.OptIn(markerClass = sample.experimental.ExperimentalDateTime.class)' annotation to 'getDateUnsafe':
@@ -24 +24
+ @androidx.annotation.OptIn(markerClass = ExperimentalDateTime.class)
@@ -89,6 +101,12 @@
Fix for src/sample/experimental/UseJavaExperimentalFromJava.java line 53: Add '@sample.experimental.ExperimentalLocation' annotation to 'getDateExperimentalLocationUnsafe':
@@ -50 +50
+ @ExperimentalLocation
+Fix for src/sample/experimental/UseJavaExperimentalFromJava.java line 53: Add '@androidx.annotation.OptIn(markerClass = sample.experimental.ExperimentalLocation.class)' annotation to 'getDateExperimentalLocationUnsafe':
+@@ -50 +50
++ @androidx.annotation.OptIn(markerClass = ExperimentalLocation.class)
+Fix for src/sample/experimental/UseJavaExperimentalFromJava.java line 53: Add '@sample.experimental.ExperimentalLocation' annotation to 'getDateExperimentalLocationUnsafe':
+@@ -50 +50
++ @ExperimentalLocation
Fix for src/sample/experimental/UseJavaExperimentalFromJava.java line 54: Add '@androidx.annotation.OptIn(markerClass = sample.experimental.ExperimentalLocation.class)' annotation to 'getDateExperimentalLocationUnsafe':
@@ -50 +50
+ @androidx.annotation.OptIn(markerClass = ExperimentalLocation.class)
@@ -126,11 +144,14 @@
val expected = """
src/sample/experimental/UseJavaExperimentalFromJava.java:53: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalLocation or @OptIn(markerClass = sample.experimental.ExperimentalLocation.class) [UnsafeOptInUsageError]
LocationProvider locationProvider = new LocationProvider();
+ ~~~~~~~~~~~~~~~~
+src/sample/experimental/UseJavaExperimentalFromJava.java:53: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalLocation or @OptIn(markerClass = sample.experimental.ExperimentalLocation.class) [UnsafeOptInUsageError]
+ LocationProvider locationProvider = new LocationProvider();
~~~~~~~~~~~~~~~~~~~~~~
src/sample/experimental/UseJavaExperimentalFromJava.java:54: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalLocation or @OptIn(markerClass = sample.experimental.ExperimentalLocation.class) [UnsafeOptInUsageError]
return dateProvider.getDate() + locationProvider.getLocation();
~~~~~~~~~~~
-2 errors, 0 warnings
+3 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
@@ -151,17 +172,23 @@
val expected = """
src/sample/experimental/UseJavaExperimentalFromKt.kt:29: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalDateTime or @OptIn(markerClass = sample.experimental.ExperimentalDateTime.class) [UnsafeOptInUsageError]
val dateProvider = DateProvider()
+ ~~~~~~~~~~~~
+src/sample/experimental/UseJavaExperimentalFromKt.kt:29: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalDateTime or @OptIn(markerClass = sample.experimental.ExperimentalDateTime.class) [UnsafeOptInUsageError]
+ val dateProvider = DateProvider()
~~~~~~~~~~~~
src/sample/experimental/UseJavaExperimentalFromKt.kt:30: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalDateTime or @OptIn(markerClass = sample.experimental.ExperimentalDateTime.class) [UnsafeOptInUsageError]
return dateProvider.date
~~~~
src/sample/experimental/UseJavaExperimentalFromKt.kt:57: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalLocation or @OptIn(markerClass = sample.experimental.ExperimentalLocation.class) [UnsafeOptInUsageError]
val locationProvider = LocationProvider()
+ ~~~~~~~~~~~~~~~~
+src/sample/experimental/UseJavaExperimentalFromKt.kt:57: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalLocation or @OptIn(markerClass = sample.experimental.ExperimentalLocation.class) [UnsafeOptInUsageError]
+ val locationProvider = LocationProvider()
~~~~~~~~~~~~~~~~
src/sample/experimental/UseJavaExperimentalFromKt.kt:58: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalLocation or @OptIn(markerClass = sample.experimental.ExperimentalLocation.class) [UnsafeOptInUsageError]
return dateProvider.date + locationProvider.location
~~~~~~~~
-4 errors, 0 warnings
+6 errors, 0 warnings
""".trimIndent()
val expectedFix = """
@@ -171,6 +198,12 @@
Fix for src/sample/experimental/UseJavaExperimentalFromKt.kt line 29: Add '@sample.experimental.ExperimentalDateTime' annotation to 'getDateUnsafe':
@@ -28 +28
+ @ExperimentalDateTime
+Fix for src/sample/experimental/UseJavaExperimentalFromKt.kt line 29: Add '@androidx.annotation.OptIn(sample.experimental.ExperimentalDateTime::class)' annotation to 'getDateUnsafe':
+@@ -28 +28
++ @androidx.annotation.OptIn(ExperimentalDateTime::class)
+Fix for src/sample/experimental/UseJavaExperimentalFromKt.kt line 29: Add '@sample.experimental.ExperimentalDateTime' annotation to 'getDateUnsafe':
+@@ -28 +28
++ @ExperimentalDateTime
Fix for src/sample/experimental/UseJavaExperimentalFromKt.kt line 30: Add '@androidx.annotation.OptIn(sample.experimental.ExperimentalDateTime::class)' annotation to 'getDateUnsafe':
@@ -28 +28
+ @androidx.annotation.OptIn(ExperimentalDateTime::class)
@@ -183,6 +216,12 @@
Fix for src/sample/experimental/UseJavaExperimentalFromKt.kt line 57: Add '@sample.experimental.ExperimentalLocation' annotation to 'getDateExperimentalLocationUnsafe':
@@ -54 +54
+ @ExperimentalLocation
+Fix for src/sample/experimental/UseJavaExperimentalFromKt.kt line 57: Add '@androidx.annotation.OptIn(sample.experimental.ExperimentalLocation::class)' annotation to 'getDateExperimentalLocationUnsafe':
+@@ -54 +54
++ @androidx.annotation.OptIn(ExperimentalLocation::class)
+Fix for src/sample/experimental/UseJavaExperimentalFromKt.kt line 57: Add '@sample.experimental.ExperimentalLocation' annotation to 'getDateExperimentalLocationUnsafe':
+@@ -54 +54
++ @ExperimentalLocation
Fix for src/sample/experimental/UseJavaExperimentalFromKt.kt line 58: Add '@androidx.annotation.OptIn(sample.experimental.ExperimentalLocation::class)' annotation to 'getDateExperimentalLocationUnsafe':
@@ -54 +54
+ @androidx.annotation.OptIn(ExperimentalLocation::class)
@@ -211,12 +250,18 @@
val expected = """
src/sample/experimental/UseKtExperimentalFromJava.java:25: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalDateTimeKt or @OptIn(markerClass = sample.experimental.ExperimentalDateTimeKt.class) [UnsafeOptInUsageError]
sample.experimental.DateProviderKt dateProvider = new sample.experimental.DateProviderKt();
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src/sample/experimental/UseKtExperimentalFromJava.java:25: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalDateTimeKt or @OptIn(markerClass = sample.experimental.ExperimentalDateTimeKt.class) [UnsafeOptInUsageError]
+ sample.experimental.DateProviderKt dateProvider = new sample.experimental.DateProviderKt();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/sample/experimental/UseKtExperimentalFromJava.java:26: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalDateTimeKt or @OptIn(markerClass = sample.experimental.ExperimentalDateTimeKt.class) [UnsafeOptInUsageError]
return dateProvider.getDate();
~~~~~~~
src/sample/experimental/UseKtExperimentalFromJava.java:54: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalLocationKt or @OptIn(markerClass = sample.experimental.ExperimentalLocationKt.class) [UnsafeOptInUsageError]
LocationProviderKt locationProvider = new LocationProviderKt();
+ ~~~~~~~~~~~~~~~~~~
+src/sample/experimental/UseKtExperimentalFromJava.java:54: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalLocationKt or @OptIn(markerClass = sample.experimental.ExperimentalLocationKt.class) [UnsafeOptInUsageError]
+ LocationProviderKt locationProvider = new LocationProviderKt();
~~~~~~~~~~~~~~~~~~~~~~~~
src/sample/experimental/UseKtExperimentalFromJava.java:55: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalLocationKt or @OptIn(markerClass = sample.experimental.ExperimentalLocationKt.class) [UnsafeOptInUsageError]
return dateProvider.getDate() + locationProvider.getLocation();
@@ -233,7 +278,7 @@
src/sample/experimental/UseKtExperimentalFromJava.java:97: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalDateTime or @OptIn(markerClass = sample.experimental.ExperimentalDateTime.class) [UnsafeOptInUsageError]
new TimeProviderKt().getTimeJava();
~~~~~~~~~~~
-8 errors, 0 warnings
+10 errors, 0 warnings
""".trimIndent()
val expectedFix = """
@@ -243,6 +288,12 @@
Fix for src/sample/experimental/UseKtExperimentalFromJava.java line 25: Add '@sample.experimental.ExperimentalDateTimeKt' annotation to 'getDateUnsafe':
@@ -24 +24
+ @ExperimentalDateTimeKt
+Fix for src/sample/experimental/UseKtExperimentalFromJava.java line 25: Add '@androidx.annotation.OptIn(markerClass = sample.experimental.ExperimentalDateTimeKt.class)' annotation to 'getDateUnsafe':
+@@ -24 +24
++ @androidx.annotation.OptIn(markerClass = ExperimentalDateTimeKt.class)
+Fix for src/sample/experimental/UseKtExperimentalFromJava.java line 25: Add '@sample.experimental.ExperimentalDateTimeKt' annotation to 'getDateUnsafe':
+@@ -24 +24
++ @ExperimentalDateTimeKt
Fix for src/sample/experimental/UseKtExperimentalFromJava.java line 26: Add '@androidx.annotation.OptIn(markerClass = sample.experimental.ExperimentalDateTimeKt.class)' annotation to 'getDateUnsafe':
@@ -24 +24
+ @androidx.annotation.OptIn(markerClass = ExperimentalDateTimeKt.class)
@@ -255,6 +306,12 @@
Fix for src/sample/experimental/UseKtExperimentalFromJava.java line 54: Add '@sample.experimental.ExperimentalLocationKt' annotation to 'getDateExperimentalLocationUnsafe':
@@ -51 +51
+ @ExperimentalLocationKt
+Fix for src/sample/experimental/UseKtExperimentalFromJava.java line 54: Add '@androidx.annotation.OptIn(markerClass = sample.experimental.ExperimentalLocationKt.class)' annotation to 'getDateExperimentalLocationUnsafe':
+@@ -51 +51
++ @androidx.annotation.OptIn(markerClass = ExperimentalLocationKt.class)
+Fix for src/sample/experimental/UseKtExperimentalFromJava.java line 54: Add '@sample.experimental.ExperimentalLocationKt' annotation to 'getDateExperimentalLocationUnsafe':
+@@ -51 +51
++ @ExperimentalLocationKt
Fix for src/sample/experimental/UseKtExperimentalFromJava.java line 55: Add '@androidx.annotation.OptIn(markerClass = sample.experimental.ExperimentalLocationKt.class)' annotation to 'getDateExperimentalLocationUnsafe':
@@ -51 +51
+ @androidx.annotation.OptIn(markerClass = ExperimentalLocationKt.class)
@@ -304,6 +361,9 @@
val expected = """
src/sample/experimental/UseJavaPackageFromJava.java:28: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.foo.ExperimentalPackage or @OptIn(markerClass = sample.experimental.foo.ExperimentalPackage.class) [UnsafeOptInUsageError]
Bar bar = new Bar();
+ ~~~
+src/sample/experimental/UseJavaPackageFromJava.java:28: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.foo.ExperimentalPackage or @OptIn(markerClass = sample.experimental.foo.ExperimentalPackage.class) [UnsafeOptInUsageError]
+ Bar bar = new Bar();
~~~~~~~~~
src/sample/experimental/UseJavaPackageFromJava.java:29: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.foo.ExperimentalPackage or @OptIn(markerClass = sample.experimental.foo.ExperimentalPackage.class) [UnsafeOptInUsageError]
bar.baz();
@@ -311,7 +371,7 @@
src/sample/experimental/UseJavaPackageFromJava.java:52: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.foo.ExperimentalPackage or @OptIn(markerClass = sample.experimental.foo.ExperimentalPackage.class) [UnsafeOptInUsageError]
callPackageExperimental();
~~~~~~~~~~~~~~~~~~~~~~~
-3 errors, 0 warnings
+4 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
@@ -331,6 +391,9 @@
val expected = """
src/sample/experimental/UseJavaPackageFromKt.kt:31: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.foo.ExperimentalPackage or @OptIn(markerClass = sample.experimental.foo.ExperimentalPackage.class) [UnsafeOptInUsageError]
val bar = Bar()
+ ~~~
+src/sample/experimental/UseJavaPackageFromKt.kt:31: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.foo.ExperimentalPackage or @OptIn(markerClass = sample.experimental.foo.ExperimentalPackage.class) [UnsafeOptInUsageError]
+ val bar = Bar()
~~~
src/sample/experimental/UseJavaPackageFromKt.kt:32: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.foo.ExperimentalPackage or @OptIn(markerClass = sample.experimental.foo.ExperimentalPackage.class) [UnsafeOptInUsageError]
bar.baz()
@@ -338,7 +401,7 @@
src/sample/experimental/UseJavaPackageFromKt.kt:55: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.foo.ExperimentalPackage or @OptIn(markerClass = sample.experimental.foo.ExperimentalPackage.class) [UnsafeOptInUsageError]
callPackageExperimental()
~~~~~~~~~~~~~~~~~~~~~~~
-3 errors, 0 warnings
+4 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
diff --git a/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/KotlinAnnotationsDetectorTest.kt b/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/KotlinAnnotationsDetectorTest.kt
index 96d7d69..4158bde 100644
--- a/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/KotlinAnnotationsDetectorTest.kt
+++ b/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/KotlinAnnotationsDetectorTest.kt
@@ -96,12 +96,18 @@
val expected = """
src/sample/kotlin/UseJavaExperimentalClassFromJava.java:31: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
AnnotatedJavaClass experimentalObject = new AnnotatedJavaClass();
+ ~~~~~~~~~~~~~~~~~~
+src/sample/kotlin/UseJavaExperimentalClassFromJava.java:31: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
+ AnnotatedJavaClass experimentalObject = new AnnotatedJavaClass();
~~~~~~~~~~~~~~~~~~~~~~~~
src/sample/kotlin/UseJavaExperimentalClassFromJava.java:32: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
return experimentalObject.field;
~~~~~
src/sample/kotlin/UseJavaExperimentalClassFromJava.java:39: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
AnnotatedJavaClass experimentalObject = new AnnotatedJavaClass();
+ ~~~~~~~~~~~~~~~~~~
+src/sample/kotlin/UseJavaExperimentalClassFromJava.java:39: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
+ AnnotatedJavaClass experimentalObject = new AnnotatedJavaClass();
~~~~~~~~~~~~~~~~~~~~~~~~
src/sample/kotlin/UseJavaExperimentalClassFromJava.java:40: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
return experimentalObject.method();
@@ -112,7 +118,7 @@
src/sample/kotlin/UseJavaExperimentalClassFromJava.java:54: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
return AnnotatedJavaClass.methodStatic();
~~~~~~~~~~~~
-6 errors, 0 warnings
+8 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
@@ -133,11 +139,14 @@
val expected = """
src/sample/kotlin/UseJavaExperimentalMultipleMarkersFromJava.java:33: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation2 or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation2.class) [UnsafeOptInUsageError]
AnnotatedJavaClass2 experimentalObject2 = new AnnotatedJavaClass2();
+ ~~~~~~~~~~~~~~~~~~~
+src/sample/kotlin/UseJavaExperimentalMultipleMarkersFromJava.java:33: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation2 or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation2.class) [UnsafeOptInUsageError]
+ AnnotatedJavaClass2 experimentalObject2 = new AnnotatedJavaClass2();
~~~~~~~~~~~~~~~~~~~~~~~~~
src/sample/kotlin/UseJavaExperimentalMultipleMarkersFromJava.java:34: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation2 or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation2.class) [UnsafeOptInUsageError]
return experimentalObject.method() + experimentalObject2.field;
~~~~~
-2 errors, 0 warnings
+3 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
@@ -161,6 +170,9 @@
val expected = """
src/sample/kotlin/UseKtExperimentalFromJava.java:28: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalKotlinAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalKotlinAnnotation.class) [UnsafeOptInUsageError]
AnnotatedKotlinClass experimentalObject = new AnnotatedKotlinClass();
+ ~~~~~~~~~~~~~~~~~~~~
+src/sample/kotlin/UseKtExperimentalFromJava.java:28: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalKotlinAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalKotlinAnnotation.class) [UnsafeOptInUsageError]
+ AnnotatedKotlinClass experimentalObject = new AnnotatedKotlinClass();
~~~~~~~~~~~~~~~~~~~~~~~~~~
src/sample/kotlin/UseKtExperimentalFromJava.java:29: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalKotlinAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalKotlinAnnotation.class) [UnsafeOptInUsageError]
return experimentalObject.method();
@@ -189,7 +201,7 @@
src/sample/kotlin/UseKtExperimentalFromJava.java:117: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalKotlinAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalKotlinAnnotation.class) [UnsafeOptInUsageError]
new AnnotatedKotlinMembers().setFieldWithSetMarker(-1);
~~~~~~~~~~~~~~~~~~~~~
-10 errors, 0 warnings
+11 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
@@ -209,6 +221,9 @@
val expected = """
src/sample/kotlin/UseJavaPackageFromJava.java:32: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
AnnotatedJavaPackage experimentalObject = new AnnotatedJavaPackage();
+ ~~~~~~~~~~~~~~~~~~~~
+src/sample/kotlin/UseJavaPackageFromJava.java:32: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
+ AnnotatedJavaPackage experimentalObject = new AnnotatedJavaPackage();
~~~~~~~~~~~~~~~~~~~~~~~~~~
src/sample/kotlin/UseJavaPackageFromJava.java:33: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
experimentalObject.method();
@@ -216,7 +231,7 @@
src/sample/kotlin/UseJavaPackageFromJava.java:66: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
safePropagateMarker();
~~~~~~~~~~~~~~~~~~~
-3 errors, 0 warnings
+4 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
@@ -262,6 +277,9 @@
~~~~~~~~~~~~~~~~~~
src/sample/kotlin/RegressionTestJava193110413.java:95: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
Bar bar = new Bar(); // unsafe
+ ~~~
+src/sample/kotlin/RegressionTestJava193110413.java:95: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
+ Bar bar = new Bar(); // unsafe
~~~~~~~~~
src/sample/kotlin/RegressionTestJava193110413.java:96: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
bar.stableMethodLevelOptIn(); // unsafe due to experimental class scope
@@ -269,7 +287,7 @@
src/sample/kotlin/RegressionTestJava193110413.java:97: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
bar.experimentalMethod(); // unsafe
~~~~~~~~~~~~~~~~~~
-5 errors, 0 warnings
+6 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
@@ -293,14 +311,20 @@
~~~~~~~~~~~~~~~~~~
src/sample/kotlin/RegressionTestJava192562469.java:62: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
ExperimentalInterface anonymous = new ExperimentalInterface() { // unsafe
+ ~~~~~~~~~~~~~~~~~~~~~
+src/sample/kotlin/RegressionTestJava192562469.java:62: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
+ ExperimentalInterface anonymous = new ExperimentalInterface() { // unsafe
~~~~~~~~~~~~~~~~~~~~~
src/sample/kotlin/RegressionTestJava192562469.java:64: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
public void experimentalMethod() {} // unsafe override
~~~~~~~~~~~~~~~~~~
src/sample/kotlin/RegressionTestJava192562469.java:67: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
ExperimentalInterface lambda = () -> {}; // unsafe
+ ~~~~~~~~~~~~~~~~~~~~~
+src/sample/kotlin/RegressionTestJava192562469.java:67: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
+ ExperimentalInterface lambda = () -> {}; // unsafe
~~~~~~~~
-5 errors, 0 warnings
+7 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
diff --git a/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/RequiresOptInDetectorTest.kt b/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/RequiresOptInDetectorTest.kt
index 90bd8d2..99eb6f1 100644
--- a/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/RequiresOptInDetectorTest.kt
+++ b/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/RequiresOptInDetectorTest.kt
@@ -91,12 +91,18 @@
val expected = """
src/sample/optin/UseJavaExperimentalClassFromJava.java:31: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
AnnotatedJavaClass experimentalObject = new AnnotatedJavaClass();
+ ~~~~~~~~~~~~~~~~~~
+src/sample/optin/UseJavaExperimentalClassFromJava.java:31: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
+ AnnotatedJavaClass experimentalObject = new AnnotatedJavaClass();
~~~~~~~~~~~~~~~~~~~~~~~~
src/sample/optin/UseJavaExperimentalClassFromJava.java:32: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
return experimentalObject.field;
~~~~~
src/sample/optin/UseJavaExperimentalClassFromJava.java:39: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
AnnotatedJavaClass experimentalObject = new AnnotatedJavaClass();
+ ~~~~~~~~~~~~~~~~~~
+src/sample/optin/UseJavaExperimentalClassFromJava.java:39: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
+ AnnotatedJavaClass experimentalObject = new AnnotatedJavaClass();
~~~~~~~~~~~~~~~~~~~~~~~~
src/sample/optin/UseJavaExperimentalClassFromJava.java:40: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
return experimentalObject.method();
@@ -107,7 +113,7 @@
src/sample/optin/UseJavaExperimentalClassFromJava.java:54: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
return AnnotatedJavaClass.methodStatic();
~~~~~~~~~~~~
-6 errors, 0 warnings
+8 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
@@ -128,11 +134,14 @@
val expected = """
src/sample/optin/UseJavaExperimentalMultipleMarkersFromJava.java:33: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation2 or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation2.class) [UnsafeOptInUsageError]
AnnotatedJavaClass2 experimentalObject2 = new AnnotatedJavaClass2();
+ ~~~~~~~~~~~~~~~~~~~
+src/sample/optin/UseJavaExperimentalMultipleMarkersFromJava.java:33: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation2 or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation2.class) [UnsafeOptInUsageError]
+ AnnotatedJavaClass2 experimentalObject2 = new AnnotatedJavaClass2();
~~~~~~~~~~~~~~~~~~~~~~~~~
src/sample/optin/UseJavaExperimentalMultipleMarkersFromJava.java:34: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation2 or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation2.class) [UnsafeOptInUsageError]
return experimentalObject.method() + experimentalObject2.field;
~~~~~
-2 errors, 0 warnings
+3 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
@@ -154,12 +163,18 @@
val expected = """
src/sample/optin/UseJavaExperimentalFromKt.kt:28: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
val experimentalObject = AnnotatedJavaClass()
+ ~~~~~~~~~~~~~~~~~~
+src/sample/optin/UseJavaExperimentalFromKt.kt:28: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
+ val experimentalObject = AnnotatedJavaClass()
~~~~~~~~~~~~~~~~~~
src/sample/optin/UseJavaExperimentalFromKt.kt:29: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
return experimentalObject.field
~~~~~
src/sample/optin/UseJavaExperimentalFromKt.kt:36: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
val experimentalObject = AnnotatedJavaClass()
+ ~~~~~~~~~~~~~~~~~~
+src/sample/optin/UseJavaExperimentalFromKt.kt:36: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
+ val experimentalObject = AnnotatedJavaClass()
~~~~~~~~~~~~~~~~~~
src/sample/optin/UseJavaExperimentalFromKt.kt:37: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
return experimentalObject.method()
@@ -194,7 +209,7 @@
src/sample/optin/UseJavaExperimentalFromKt.kt:146: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
AnnotatedJavaMembers().fieldWithSetMarker = -1
~~~~~~~~~~~~~~~~~~
-14 errors, 0 warnings
+16 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
@@ -218,6 +233,9 @@
val expected = """
src/sample/optin/UseKtExperimentalFromJava.java:28: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalKotlinAnnotation or @OptIn(markerClass = sample.optin.ExperimentalKotlinAnnotation.class) [UnsafeOptInUsageError]
AnnotatedKotlinClass experimentalObject = new AnnotatedKotlinClass();
+ ~~~~~~~~~~~~~~~~~~~~
+src/sample/optin/UseKtExperimentalFromJava.java:28: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalKotlinAnnotation or @OptIn(markerClass = sample.optin.ExperimentalKotlinAnnotation.class) [UnsafeOptInUsageError]
+ AnnotatedKotlinClass experimentalObject = new AnnotatedKotlinClass();
~~~~~~~~~~~~~~~~~~~~~~~~~~
src/sample/optin/UseKtExperimentalFromJava.java:29: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalKotlinAnnotation or @OptIn(markerClass = sample.optin.ExperimentalKotlinAnnotation.class) [UnsafeOptInUsageError]
return experimentalObject.method();
@@ -246,7 +264,7 @@
src/sample/optin/UseKtExperimentalFromJava.java:117: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalKotlinAnnotation or @OptIn(markerClass = sample.optin.ExperimentalKotlinAnnotation.class) [UnsafeOptInUsageError]
new AnnotatedKotlinMembers().setFieldWithSetMarker(-1);
~~~~~~~~~~~~~~~~~~~~~
-10 errors, 0 warnings
+11 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
@@ -266,6 +284,9 @@
val expected = """
src/sample/optin/UseJavaPackageFromJava.java:33: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
AnnotatedJavaPackage experimentalObject = new AnnotatedJavaPackage();
+ ~~~~~~~~~~~~~~~~~~~~
+src/sample/optin/UseJavaPackageFromJava.java:33: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
+ AnnotatedJavaPackage experimentalObject = new AnnotatedJavaPackage();
~~~~~~~~~~~~~~~~~~~~~~~~~~
src/sample/optin/UseJavaPackageFromJava.java:34: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
experimentalObject.method();
@@ -273,7 +294,7 @@
src/sample/optin/UseJavaPackageFromJava.java:67: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
safePropagateMarker();
~~~~~~~~~~~~~~~~~~~
-3 errors, 0 warnings
+4 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
@@ -315,6 +336,9 @@
val expected = """
src/sample/optin/UseJavaPackageFromKt.kt:29: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
val experimentalObject = AnnotatedJavaPackage()
+ ~~~~~~~~~~~~~~~~~~
+src/sample/optin/UseJavaPackageFromKt.kt:29: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
+ val experimentalObject = AnnotatedJavaPackage()
~~~~~~~~~~~~~~~~~~~~
src/sample/optin/UseJavaPackageFromKt.kt:30: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
experimentalObject.method()
@@ -322,7 +346,7 @@
src/sample/optin/UseJavaPackageFromKt.kt:63: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
callPackageExperimental()
~~~~~~~~~~~~~~~~~~~~~~~
-3 errors, 0 warnings
+4 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
@@ -346,6 +370,9 @@
~~~~~~~~~~~~~~~~~~
src/sample/optin/RegressionTestJava193110413.java:95: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
Bar bar = new Bar(); // unsafe
+ ~~~
+src/sample/optin/RegressionTestJava193110413.java:95: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
+ Bar bar = new Bar(); // unsafe
~~~~~~~~~
src/sample/optin/RegressionTestJava193110413.java:96: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
bar.stableMethodLevelOptIn(); // unsafe due to experimental class scope
@@ -353,7 +380,7 @@
src/sample/optin/RegressionTestJava193110413.java:97: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
bar.experimentalMethod(); // unsafe
~~~~~~~~~~~~~~~~~~
-5 errors, 0 warnings
+6 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
@@ -377,14 +404,20 @@
~~~~~~~~~~~~~~~~~~
src/sample/optin/RegressionTestJava192562469.java:62: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
ExperimentalInterface anonymous = new ExperimentalInterface() { // unsafe
+ ~~~~~~~~~~~~~~~~~~~~~
+src/sample/optin/RegressionTestJava192562469.java:62: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
+ ExperimentalInterface anonymous = new ExperimentalInterface() { // unsafe
~~~~~~~~~~~~~~~~~~~~~
src/sample/optin/RegressionTestJava192562469.java:64: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
public void experimentalMethod() {} // unsafe override
~~~~~~~~~~~~~~~~~~
src/sample/optin/RegressionTestJava192562469.java:67: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
ExperimentalInterface lambda = () -> {}; // unsafe
+ ~~~~~~~~~~~~~~~~~~~~~
+src/sample/optin/RegressionTestJava192562469.java:67: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
+ ExperimentalInterface lambda = () -> {}; // unsafe
~~~~~~~~
-5 errors, 0 warnings
+7 errors, 0 warnings
""".trimIndent()
/* ktlint-enable max-line-length */
diff --git a/appcompat/appcompat-lint/integration-tests/lint-baseline.xml b/appcompat/appcompat-lint/integration-tests/lint-baseline.xml
index 55f0f27..a248bc9 100644
--- a/appcompat/appcompat-lint/integration-tests/lint-baseline.xml
+++ b/appcompat/appcompat-lint/integration-tests/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 7.4.0-alpha08" type="baseline" client="gradle" dependencies="false" name="AGP (7.4.0-alpha08)" variant="all" version="7.4.0-alpha08">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="ClassVerificationFailure"
diff --git a/appcompat/appcompat-resources/lint-baseline.xml b/appcompat/appcompat-resources/lint-baseline.xml
index e8d403b..0447131 100644
--- a/appcompat/appcompat-resources/lint-baseline.xml
+++ b/appcompat/appcompat-resources/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="NewApi"
@@ -101,114 +101,6 @@
</issue>
<issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/resources/Compatibility.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 15"
- errorLine1=" @RequiresApi(15)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/resources/Compatibility.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/graphics/drawable/DrawableContainerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/DrawableUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/DrawableUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 15 && drawable instanceof InsetDrawable) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/DrawableUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT < 15 && drawable instanceof GradientDrawable) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/DrawableUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT < 17 && drawable instanceof LayerDrawable) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/DrawableUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/DrawableUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 15"
- errorLine1=" @RequiresApi(15)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/ResourcesWrapper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 15"
- errorLine1=" @RequiresApi(15)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/ResourcesWrapper.java"/>
- </issue>
-
- <issue
id="KotlinPropertyAccess"
message="The getter return type (`Theme`) and setter parameter type (`int`) getter and setter methods for property `theme` should have exactly the same type to allow be accessed as a property from Kotlin; see https://android.github.io/kotlin-guides/interop.html#property-prefixes"
errorLine1=" public Resources.Theme getTheme() {"
diff --git a/appcompat/appcompat/lint-baseline.xml b/appcompat/appcompat/lint-baseline.xml
index 871f6d7..0a8959a 100644
--- a/appcompat/appcompat/lint-baseline.xml
+++ b/appcompat/appcompat/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="NewApi"
@@ -264,52 +264,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
- errorLine1=" info.setHomeAsUpIndicator.invoke(actionBar, drawable);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/ActionBarDrawerToggleHoneycomb.java"/>
- </issue>
-
- <issue
- id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
- errorLine1=" info.setHomeActionContentDescription.invoke(actionBar, contentDescRes);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/ActionBarDrawerToggleHoneycomb.java"/>
- </issue>
-
- <issue
- id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
- errorLine1=" info.setHomeActionContentDescription.invoke(actionBar, contentDescRes);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/ActionBarDrawerToggleHoneycomb.java"/>
- </issue>
-
- <issue
- id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
- errorLine1=" method.invoke(mTextView);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatTextViewAutoSizeHelper.java"/>
- </issue>
-
- <issue
- id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
- errorLine1=" result = (T) method.invoke(object);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatTextViewAutoSizeHelper.java"/>
- </issue>
-
- <issue
- id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" mResolvedMethod.invoke(mResolvedContext, v);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -318,7 +273,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" mSetExclusiveCheckableMethod.invoke(mWrappedObject, checkable);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -327,7 +282,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" mDoBeforeTextChanged.invoke(view);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -336,7 +291,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" mDoAfterTextChanged.invoke(view);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -345,7 +300,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" mEnsureImeVisible.invoke(view, /* visible = */ true);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -354,7 +309,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" return (Boolean) mMethod.invoke(mRealOwner, item);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -363,7 +318,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" mMethod.invoke(mRealOwner, item);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -371,15 +326,6 @@
</issue>
<issue
- id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
- errorLine1=" sComputeFitSystemWindowsMethod.invoke(view, inoutInsets, outLocalInsets);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/ViewUtils.java"/>
- </issue>
-
- <issue
id="MissingTestSizeAnnotation"
message="Missing test size annotation"
errorLine1=" fun testTileifyLayerDrawable() {"
@@ -391,105 +337,6 @@
<issue
id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/ActionBarDrawerToggle.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/ActionBarDrawerToggle.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/ActionBarDrawerToggle.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/ActionBarDrawerToggle.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/ActionBarOverlayLayout.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/view/ActionBarPolicy.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatAutoCompleteTextView.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatCheckBox.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatCheckedTextView.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatCompoundButtonHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/AppCompatDelegate.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
errorLine1=" private static final boolean sCanApplyOverrideConfiguration = Build.VERSION.SDK_INT >= 17;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -507,213 +354,6 @@
<issue
id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/AppCompatDelegateImpl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/AppCompatDelegateImpl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/AppCompatDelegateImpl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/AppCompatDelegateImpl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/AppCompatDelegateImpl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/AppCompatDelegateImpl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatEditText.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatMultiAutoCompleteTextView.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatRadioButton.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatSpinner.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatSpinner.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatSpinner.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatSpinner.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatSpinner.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatSpinner.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatSpinner.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatSpinner.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatSpinner.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatSpinner.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatSpinner.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatSpinner.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatSpinner.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatSpinner.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 19"
errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -724,123 +364,6 @@
<issue
id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatTextHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17 && (drawableStart != null || drawableEnd != null)) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatTextHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatTextHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatTextHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatTextView.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatTextView.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatTextView.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatTextViewAutoSizeHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatTextViewAutoSizeHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" final int maxLines = Build.VERSION.SDK_INT >= 16 ? Api16Impl.getMaxLines(mTextView) : -1;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatTextViewAutoSizeHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatTextViewAutoSizeHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatTextViewAutoSizeHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/AppCompatToggleButton.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
errorLine1=" (Build.VERSION.SDK_INT >= 15 && !ViewCompat.hasOnClickListeners(view))) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -849,159 +372,6 @@
<issue
id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 19 || Build.VERSION.SDK_INT > 28) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/AppCompatViewInflater.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/view/ContextThemeWrapper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/view/ContextThemeWrapper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 18 && ctitle != null && !(ctitle instanceof String)) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/view/menu/MenuItemImpl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/view/menu/MenuItemWrapperICS.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/view/menu/MenuItemWrapperICS.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/view/menu/MenuPopupHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/view/menu/MenuPopupHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/MenuPopupWindow.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/MenuPopupWindow.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/ResourcesFlusher.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/app/ResourcesFlusher.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/SwitchCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/SwitchCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/Toolbar.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/ViewUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/ViewUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
message="This folder configuration (`v16`) is unnecessary; `minSdkVersion` is 19. Merge all the resources in this folder into `values`.">
<location
file="src/main/res/values-v16"/>
@@ -8608,33 +7978,6 @@
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" public static void computeFitSystemWindows(View view, Rect inoutInsets, Rect outLocalInsets) {"
- errorLine2=" ~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/ViewUtils.java"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" public static void computeFitSystemWindows(View view, Rect inoutInsets, Rect outLocalInsets) {"
- errorLine2=" ~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/ViewUtils.java"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" public static void computeFitSystemWindows(View view, Rect inoutInsets, Rect outLocalInsets) {"
- errorLine2=" ~~~~">
- <location
- file="src/main/java/androidx/appcompat/widget/ViewUtils.java"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public static void makeOptionalFitsSystemWindows(View view) {"
errorLine2=" ~~~~">
<location
diff --git a/appcompat/appcompat/src/main/java/androidx/appcompat/app/AppCompatDelegateImpl.java b/appcompat/appcompat/src/main/java/androidx/appcompat/app/AppCompatDelegateImpl.java
index 64b429e..23c51c9 100644
--- a/appcompat/appcompat/src/main/java/androidx/appcompat/app/AppCompatDelegateImpl.java
+++ b/appcompat/appcompat/src/main/java/androidx/appcompat/app/AppCompatDelegateImpl.java
@@ -1621,6 +1621,7 @@
TypedArray a = mContext.obtainStyledAttributes(R.styleable.AppCompatTheme);
String viewInflaterClassName =
a.getString(R.styleable.AppCompatTheme_viewInflaterClass);
+ a.recycle();
if (viewInflaterClassName == null) {
// Set to null (the default in all AppCompat themes). Create the base inflater
// (no reflection)
diff --git a/appsearch/appsearch-builtin-types/lint-baseline.xml b/appsearch/appsearch-builtin-types/lint-baseline.xml
deleted file mode 100644
index eb18f46..0000000
--- a/appsearch/appsearch-builtin-types/lint-baseline.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appsearch/utils/BootCountUtil.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appsearch/utils/BootCountUtil.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appsearch/builtintypes/Stopwatch.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appsearch/builtintypes/Stopwatch.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appsearch/builtintypes/Stopwatch.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appsearch/builtintypes/Timer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appsearch/builtintypes/Timer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appsearch/builtintypes/Timer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/appsearch/builtintypes/Timer.java"/>
- </issue>
-
-</issues>
diff --git a/appsearch/appsearch-local-storage/build.gradle b/appsearch/appsearch-local-storage/build.gradle
index 0679c7c..434e615 100644
--- a/appsearch/appsearch-local-storage/build.gradle
+++ b/appsearch/appsearch-local-storage/build.gradle
@@ -78,12 +78,12 @@
dependencies {
bundleInside(project(":icing"))
- api("androidx.annotation:annotation:1.1.0")
+ api("androidx.annotation:annotation:1.2.0")
implementation(project(":appsearch:appsearch"))
implementation('androidx.collection:collection:1.2.0')
implementation("androidx.concurrent:concurrent-futures:1.0.0")
- implementation("androidx.core:core:1.2.0")
+ implementation("androidx.core:core:1.6.0")
androidTestImplementation project(':appsearch:appsearch-test-util')
androidTestImplementation(libs.multidex)
diff --git a/appsearch/appsearch-platform-storage/build.gradle b/appsearch/appsearch-platform-storage/build.gradle
index 8ccc5bc..1c5d544 100644
--- a/appsearch/appsearch-platform-storage/build.gradle
+++ b/appsearch/appsearch-platform-storage/build.gradle
@@ -29,7 +29,7 @@
}
dependencies {
- api("androidx.annotation:annotation:1.1.0")
+ api("androidx.annotation:annotation:1.2.0")
implementation project(":appsearch:appsearch")
implementation('androidx.collection:collection:1.2.0')
diff --git a/arch/core/core-runtime/lint-baseline.xml b/arch/core/core-runtime/lint-baseline.xml
deleted file mode 100644
index 50b2d22..0000000
--- a/arch/core/core-runtime/lint-baseline.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/arch/core/executor/DefaultTaskExecutor.java"/>
- </issue>
-
-</issues>
diff --git a/benchmark/benchmark-common/build.gradle b/benchmark/benchmark-common/build.gradle
index c472c6d..10990d6 100644
--- a/benchmark/benchmark-common/build.gradle
+++ b/benchmark/benchmark-common/build.gradle
@@ -73,7 +73,7 @@
dependencies {
implementation(libs.kotlinStdlib)
- api("androidx.annotation:annotation:1.1.0")
+ api("androidx.annotation:annotation:1.7.0")
api(project(":annotation:annotation-experimental"))
implementation("androidx.tracing:tracing-ktx:1.0.0")
implementation(project(":tracing:tracing-perfetto-handshake"))
diff --git a/benchmark/benchmark-common/lint-baseline.xml b/benchmark/benchmark-common/lint-baseline.xml
index 21ab699..96cf036 100644
--- a/benchmark/benchmark-common/lint-baseline.xml
+++ b/benchmark/benchmark-common/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="NewApi"
@@ -73,4 +73,18 @@
file="src/androidTest/java/androidx/benchmark/PerfettoHelperTest.kt"/>
</issue>
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.benchmark.ExperimentalBenchmarkConfigApi` or `@OptIn(markerClass = androidx.benchmark.ExperimentalBenchmarkConfigApi.class)`">
+ <location
+ file="src/main/java/androidx/benchmark/MetricsContainer.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.benchmark.ExperimentalBenchmarkConfigApi` or `@OptIn(markerClass = androidx.benchmark.ExperimentalBenchmarkConfigApi.class)`">
+ <location
+ file="src/main/java/androidx/benchmark/MicrobenchmarkPhase.kt"/>
+ </issue>
+
</issues>
diff --git a/benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/ArgumentInjectingApplication.kt b/benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/ArgumentInjectingApplication.kt
index 7931916..499aa51 100644
--- a/benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/ArgumentInjectingApplication.kt
+++ b/benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/ArgumentInjectingApplication.kt
@@ -62,5 +62,8 @@
InstrumentationRegistry.getInstrumentation().targetContext.filesDir.absolutePath
)
}
+ // Since we don't care about measurement accuracy in these correctness test, enable method
+ // tracing to occur multiple times without killing the process.
+ BenchmarkState.enableMethodTracingAffectsMeasurementError = false
}
}
diff --git a/benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/DeviceInfoTest.kt b/benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/DeviceInfoTest.kt
index bd91e74..2ac03e5 100644
--- a/benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/DeviceInfoTest.kt
+++ b/benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/DeviceInfoTest.kt
@@ -16,17 +16,27 @@
package androidx.benchmark
+import android.os.Build
import androidx.benchmark.perfetto.PerfettoHelper
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SdkSuppress
import androidx.test.filters.SmallTest
+import kotlin.test.assertEquals
import kotlin.test.assertFalse
+import kotlin.test.assertTrue
+import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
@SmallTest
@RunWith(AndroidJUnit4::class)
class DeviceInfoTest {
+ @Before
+ fun setup() {
+ // clear any process wide warnings, since tests below will capture them
+ InstrumentationResults.clearIdeWarningPrefix()
+ }
+
@SdkSuppress(minSdkVersion = PerfettoHelper.MIN_SDK_VERSION)
@Test
fun misconfiguredForTracing() {
@@ -37,4 +47,31 @@
" and is not CTS compatible. All Perfetto/Atrace capture will fail."
)
}
+
+ @Test
+ fun artMainlineVersion() {
+ if (Build.VERSION.SDK_INT >= 30) {
+ // validate we have a reasonable looking number
+ if (Build.VERSION.SDK_INT >= 31) {
+ assertTrue(DeviceInfo.artMainlineVersion > 300000000)
+ } else {
+ assertEquals(1, DeviceInfo.artMainlineVersion)
+ }
+ // validate parsing by checking against shell command,
+ // which we don't use at runtime due to cost of shell commands
+ val shellVersion = Shell.executeCommandCaptureStdoutOnly(
+ "cmd package list packages --show-versioncode --apex-only art"
+ ).trim()
+
+ // "google" may or may not be present in package
+ val expectedRegExStr = "package:com(\\.google)?\\.android\\.art" +
+ " versionCode:${DeviceInfo.artMainlineVersion}"
+ assertTrue(
+ expectedRegExStr.toRegex().matches(shellVersion),
+ "Expected shell version ($shellVersion) to match $expectedRegExStr"
+ )
+ } else {
+ assertEquals(-1, DeviceInfo.artMainlineVersion)
+ }
+ }
}
diff --git a/benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/InstrumentationResultsTest.kt b/benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/InstrumentationResultsTest.kt
index 809da0e..be5eea5 100644
--- a/benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/InstrumentationResultsTest.kt
+++ b/benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/InstrumentationResultsTest.kt
@@ -21,12 +21,25 @@
import java.io.File
import kotlin.test.assertFailsWith
import org.junit.Assert.assertEquals
+import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
@SmallTest
@RunWith(AndroidJUnit4::class)
class InstrumentationResultsTest {
+ @Before
+ fun setup() {
+ // flush any scheduled ide warnings so that tests below aren't affected
+ InstrumentationResults.ideSummary(
+ testName = "foo",
+ measurements = BenchmarkResult.Measurements(
+ singleMetrics = listOf(MetricResult("Metric", listOf(0.0))),
+ sampledMetrics = emptyList()
+ )
+ )
+ }
+
@Test
fun ideSummaryBasicMicro_alignment() {
val summary1 = InstrumentationResults.ideSummaryBasicMicro(
@@ -238,8 +251,9 @@
fun ideSummary_warning() {
val metricResult = MetricResult("Metric", listOf(0.0, 1.0, 2.0))
val absoluteTracePaths = createAbsoluteTracePaths(3)
+
+ InstrumentationResults.scheduleIdeWarningOnNextReport("warning\nstring")
val summary = InstrumentationResults.ideSummary(
- warningMessage = "warning\nstring",
testName = "foo",
measurements = BenchmarkResult.Measurements(
singleMetrics = listOf(metricResult),
diff --git a/benchmark/benchmark-common/src/main/java/androidx/benchmark/Arguments.kt b/benchmark/benchmark-common/src/main/java/androidx/benchmark/Arguments.kt
index 8dba4a6..e35efaf 100644
--- a/benchmark/benchmark-common/src/main/java/androidx/benchmark/Arguments.kt
+++ b/benchmark/benchmark-common/src/main/java/androidx/benchmark/Arguments.kt
@@ -16,6 +16,7 @@
package androidx.benchmark
+import android.os.Build
import android.os.Bundle
import android.util.Log
import androidx.annotation.RestrictTo
@@ -92,11 +93,30 @@
val argumentName = "profiling.mode"
val argumentValue = getBenchmarkArgument(argumentName, "DEFAULT_VAL")
if (argumentValue == "DEFAULT_VAL") {
- // NOTE: Method tracing currently off by default, as it is unsafe in many OS versions
- // API 21 (b/300658578) Can corrupt the stack
- // API 29/30 (b/313868903) causes regressions in subsequent benchmark runs, but no jit
- // API 31+ (b/303686344) can causes regressions with jit depending on mainline version
- return null to true
+ return if (Build.VERSION.SDK_INT <= 21) {
+ // Have observed stack corruption on API 21, we haven't spent the time to find out
+ // why, or if it's better on other low API levels. See b/300658578
+ // TODO: consider adding warning here
+ null to true
+ } else if (DeviceInfo.methodTracingAffectsMeasurements) {
+ // We warn here instead of in Errors since this doesn't affect all measurements -
+ // BenchmarkState throws rather than measuring incorrectly, and the first benchmark
+ // can still measure with a trace safely
+ InstrumentationResults.scheduleIdeWarningOnNextReport(
+ """
+ NOTE: Your device is running a version of ART where method tracing is known to
+ affect performance measurement after trace capture, so method tracing is
+ off by default.
+
+ To use method tracing, either flash this device, use a different device, or
+ enable method tracing with MicrobenchmarkConfig / instrumentation argument, and
+ only run one test at a time.
+
+ For more information, see https://issuetracker.google.com/issues/316174880
+ """.trimIndent()
+ )
+ null to true
+ } else MethodTracing to true
}
val profiler = Profiler.getByName(argumentValue)
diff --git a/benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt b/benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
index f85d140..857eb39 100644
--- a/benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
+++ b/benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
@@ -294,8 +294,10 @@
if (this == MethodTracing &&
Looper.myLooper() == Looper.getMainLooper() &&
estimatedMethodTraceDurNs > METHOD_TRACING_MAX_DURATION_NS) {
- Log.d(TAG, "Skipping method trace of estimated duration" +
- " ${estimatedMethodTraceDurNs / 1_000_000_000.0} sec to avoid ANR")
+ InstrumentationResults.scheduleIdeWarningOnNextReport(
+ "Skipping method trace of estimated duration" +
+ " ${estimatedMethodTraceDurNs / 1_000_000_000.0} sec to avoid ANR"
+ )
null
} else {
start(traceUniqueName)
@@ -464,7 +466,14 @@
"isolation."
)
}
- firstBenchmark = false
+ check(
+ !enableMethodTracingAffectsMeasurementError ||
+ !DeviceInfo.methodTracingAffectsMeasurements ||
+ !MethodTracing.hasBeenUsed) {
+ "Measurement prevented by method trace - Running on a device/configuration where " +
+ "method tracing affects measurements, and a method trace has been captured " +
+ "- no additional benchmarks can be run without restarting the test suite."
+ }
thermalThrottleSleepSeconds = 0
@@ -527,7 +536,6 @@
metricResults.forEach { it.putInBundle(status, PREFIX) }
}
InstrumentationResultScope(status).reportSummaryToIde(
- warningMessage = Errors.acquireWarningStringForLogging() ?: "",
testName = key,
measurements = BenchmarkResult.Measurements(
singleMetrics = metricResults,
@@ -601,6 +609,15 @@
private var firstBenchmark = true
+ /**
+ * Disable error to enable internal correctness tests, which need to use method tracing
+ * and can safely ignore measurement accuracy
+ *
+ * Ideally this would function as a true suppressible error like in Errors.kt, but existing
+ * error functionality doesn't handle changing error states dynamically
+ */
+ internal var enableMethodTracingAffectsMeasurementError = false
+
private val DEFAULT_METRICS: Array<MetricCapture> =
if (Arguments.cpuEventCounterMask != 0) {
arrayOf(
diff --git a/benchmark/benchmark-common/src/main/java/androidx/benchmark/DeviceInfo.kt b/benchmark/benchmark-common/src/main/java/androidx/benchmark/DeviceInfo.kt
index b76a27e..8be8808 100644
--- a/benchmark/benchmark-common/src/main/java/androidx/benchmark/DeviceInfo.kt
+++ b/benchmark/benchmark-common/src/main/java/androidx/benchmark/DeviceInfo.kt
@@ -18,11 +18,16 @@
import android.content.Intent
import android.content.IntentFilter
+import android.content.pm.ApplicationInfo
+import android.content.pm.PackageManager
import android.os.BatteryManager
import android.os.Build
+import android.util.Printer
+import androidx.annotation.RequiresApi
import androidx.annotation.RestrictTo
import androidx.test.platform.app.InstrumentationRegistry
import java.io.File
+import java.lang.IllegalStateException
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
object DeviceInfo {
@@ -91,6 +96,71 @@
val misconfiguredForTracing = !File("/sys/kernel/tracing/trace_marker").exists() &&
!File("/sys/kernel/debug/tracing/trace_marker").exists()
+ val artMainlineVersion = when {
+ Build.VERSION.SDK_INT >= 31 ->
+ queryArtMainlineVersion()
+ Build.VERSION.SDK_INT == 30 ->
+ 1
+ else ->
+ -1
+ }
+
+ /**
+ * Starting with the first Android U release, ART mainline drops optimizations after method
+ * tracing occurs, so we disable tracing on those mainline versions.
+ *
+ * TODO: update max value once a fix is released to mainline
+ * See b/303660864
+ */
+ private val ART_MAINLINE_MIN_VERSIONS_AFFECTING_METHOD_TRACING = 340000000L..Long.MAX_VALUE
+
+ val methodTracingAffectsMeasurements =
+ Build.VERSION.SDK_INT in 26..30 || // b/313868903
+ artMainlineVersion in ART_MAINLINE_MIN_VERSIONS_AFFECTING_METHOD_TRACING // b/303660864
+
+ private fun getMainlineAppInfo(packageName: String): ApplicationInfo? {
+ return try {
+ InstrumentationRegistry.getInstrumentation().context.packageManager
+ .getApplicationInfo(packageName, PackageManager.MATCH_APEX)
+ } catch (notFoundException: PackageManager.NameNotFoundException) {
+ null
+ }
+ }
+
+ @RequiresApi(31)
+ private fun queryArtMainlineVersion(): Long {
+ val artMainlinePackage = getMainlineAppInfo("com.google.android.art")
+ ?: getMainlineAppInfo("com.android.art")
+ ?: throw IllegalStateException("Unable to find installed ART mainline module")
+
+ // This is an EXTREMELY SILLY way to find out ART's versions, but I couldn't find a better
+ // one without reflecting into ApplicationInfo.longVersionCode (not allowed in jetpack)
+ // or shell commands (slower)
+ var versionCode = -1L
+ val printer = object : Printer {
+ override fun println(x: String?) {
+ if (x == null || versionCode != -1L) return
+ // We're looking to a line like the following:
+ // `enabled=true minSdkVersion=31 targetSdkVersion=34 versionCode=340818022 targetSandboxVersion=1`
+ // See https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/content/pm/ApplicationInfo.java;l=1680;drc=5f97e1c49d341d58d971abef4b30de2d58a706aa
+ val prefix = " versionCode="
+ val offset = x.indexOf(prefix)
+ if (offset >= 0) {
+ val versionString = x.substring(
+ startIndex = offset + prefix.length,
+ endIndex = x.indexOf(' ', offset + prefix.length)
+ )
+ versionCode = versionString.toLong()
+ }
+ }
+ }
+ artMainlinePackage.dump(printer, "")
+ check(versionCode > 0) {
+ "Unable to parse ART version code"
+ }
+ return versionCode
+ }
+
init {
val context = InstrumentationRegistry.getInstrumentation().targetContext
diff --git a/benchmark/benchmark-common/src/main/java/androidx/benchmark/Errors.kt b/benchmark/benchmark-common/src/main/java/androidx/benchmark/Errors.kt
index 301f45e..4a27423 100644
--- a/benchmark/benchmark-common/src/main/java/androidx/benchmark/Errors.kt
+++ b/benchmark/benchmark-common/src/main/java/androidx/benchmark/Errors.kt
@@ -21,7 +21,6 @@
import android.content.pm.ApplicationInfo
import android.os.BatteryManager
import android.os.Build
-import android.util.Log
import androidx.annotation.RestrictTo
import androidx.test.platform.app.InstrumentationRegistry
import java.io.File
@@ -44,11 +43,8 @@
return toList().sorted().joinToString(" ")
}
- private const val TAG = "Benchmark"
-
val PREFIX: String
private val UNSUPPRESSED_WARNING_MESSAGE: String?
- private var warningString: String? = null
/**
* Battery percentage required to avoid low battery warning.
@@ -60,12 +56,6 @@
*/
private const val MINIMUM_BATTERY_PERCENT = 25
- fun acquireWarningStringForLogging(): String? {
- val ret = warningString
- warningString = null
- return ret
- }
-
private val isDeviceRooted =
arrayOf(
"/system/app/Superuser.apk",
@@ -226,8 +216,7 @@
PREFIX = warningPrefix
if (warningString.isNotEmpty()) {
- this.warningString = warningString
- warningString.split("\n").map { Log.w(TAG, it) }
+ InstrumentationResults.scheduleIdeWarningOnNextReport(warningString)
}
val warningSet = PREFIX
@@ -261,7 +250,7 @@
/**
* We don't throw immediately when the error is detected, since this will result in an error
- * deeply buried in a stack of intializer errors. Instead, they're deferred until this method
+ * deeply buried in a stack of initializer errors. Instead, they're deferred until this method
* call.
*/
fun throwIfError() {
diff --git a/benchmark/benchmark-common/src/main/java/androidx/benchmark/InstrumentationResults.kt b/benchmark/benchmark-common/src/main/java/androidx/benchmark/InstrumentationResults.kt
index bae0b4c..bd168f0 100644
--- a/benchmark/benchmark-common/src/main/java/androidx/benchmark/InstrumentationResults.kt
+++ b/benchmark/benchmark-common/src/main/java/androidx/benchmark/InstrumentationResults.kt
@@ -17,8 +17,10 @@
package androidx.benchmark
import android.os.Bundle
+import android.util.Log
import androidx.annotation.RestrictTo
import androidx.test.platform.app.InstrumentationRegistry
+import org.jetbrains.annotations.TestOnly
/**
* Wrapper for multi studio version link format
@@ -72,8 +74,10 @@
iterationTracePaths: List<String>? = null,
profilerResults: List<Profiler.ResultFile> = emptyList()
) {
+ if (warningMessage != null) {
+ InstrumentationResults.scheduleIdeWarningOnNextReport(warningMessage)
+ }
val summaryPair = InstrumentationResults.ideSummary(
- warningMessage = warningMessage,
testName = testName,
message = message,
measurements = measurements,
@@ -104,6 +108,7 @@
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
object InstrumentationResults {
+
/**
* Bundle containing values to be reported at end of run, instead of for each test.
*
@@ -150,14 +155,41 @@
return output
}
+ private var ideWarningPrefix = ""
+
+ @TestOnly
+ fun clearIdeWarningPrefix() {
+ println("clear ide warning")
+ ideWarningPrefix = ""
+ }
+
+ /**
+ * Schedule a string to be reported to the IDE on next benchmark report.
+ *
+ * Requires ideSummary to be called afterward, since we only post one instrumentation result per
+ * test.
+ *
+ * Note that this also prints to logcat.
+ */
+ fun scheduleIdeWarningOnNextReport(string: String) {
+ ideWarningPrefix = if (ideWarningPrefix.isEmpty()) {
+ string
+ } else {
+ ideWarningPrefix + "\n" + string
+ }
+ string.split("\n").map { Log.w(BenchmarkState.TAG, it) }
+ }
+
internal fun ideSummary(
- warningMessage: String? = null,
testName: String? = null,
message: String? = null,
measurements: BenchmarkResult.Measurements? = null,
iterationTracePaths: List<String>? = null,
profilerResults: List<Profiler.ResultFile> = emptyList()
): IdeSummaryPair {
+ val warningMessage = ideWarningPrefix.ifEmpty { null }
+ ideWarningPrefix = ""
+
val v1metricLines: List<String>
val v2metricLines: List<String>
val linkableIterTraces = iterationTracePaths?.map { absolutePath ->
diff --git a/benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt b/benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
index 1a7b9308..b5f936a 100644
--- a/benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
+++ b/benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
@@ -188,6 +188,7 @@
internal object MethodTracing : Profiler() {
override fun start(traceUniqueName: String): ResultFile {
+ hasBeenUsed = true
return startRuntimeMethodTracing(
traceFileName = traceName(traceUniqueName, "methodTracing"),
sampled = false,
@@ -205,7 +206,11 @@
ArtTrace(profilerTrace)
.writeAsPerfettoTrace(FileOutputStream(perfettoTrace, /* append = */ true))
}
+
+ var hasBeenUsed: Boolean = false
+ private set
}
+
@SuppressLint("BanThreadSleep") // needed for connected profiling
internal object ConnectedAllocation : Profiler() {
override fun start(traceUniqueName: String): ResultFile? {
diff --git a/benchmark/benchmark-junit4/lint-baseline.xml b/benchmark/benchmark-junit4/lint-baseline.xml
deleted file mode 100644
index 562a0fb..0000000
--- a/benchmark/benchmark-junit4/lint-baseline.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.0.0-beta03" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.0-beta03)" variant="all" version="8.0.0-beta03">
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(5)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/benchmark/junit4/BenchmarkRuleTest.kt"/>
- </issue>
-
-</issues>
diff --git a/benchmark/benchmark-macro/lint-baseline.xml b/benchmark/benchmark-macro/lint-baseline.xml
index 61cf10432..3743177 100644
--- a/benchmark/benchmark-macro/lint-baseline.xml
+++ b/benchmark/benchmark-macro/lint-baseline.xml
@@ -1,14 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-alpha14" type="baseline" client="cli" dependencies="false" name="AGP (8.2.0-alpha14)" variant="all" version="8.2.0-alpha14">
-
- <issue
- id="NewApi"
- message="Class requires API level 24 (current min is 23): `Partial`"
- errorLine1=" is CompilationMode.Partial -> compilationMode.warmupIterations"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/benchmark/macro/Macrobenchmark.kt"/>
- </issue>
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="NewApi"
@@ -49,15 +40,6 @@
<issue
id="BanThreadSleep"
message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(5000)"
- errorLine2=" ~~~~~">
- <location
- file="src/main/java/androidx/benchmark/macro/CompilationMode.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
errorLine1=" Thread.sleep(sleepDurMs)"
errorLine2=" ~~~~~">
<location
@@ -65,12 +47,45 @@
</issue>
<issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(500)"
- errorLine2=" ~~~~~">
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.benchmark.perfetto.ExperimentalPerfettoTraceProcessorApi` or `@OptIn(markerClass = androidx.benchmark.perfetto.ExperimentalPerfettoTraceProcessorApi.class)`">
<location
- file="src/main/java/androidx/benchmark/macro/ProfileInstallBroadcast.kt"/>
+ file="src/main/java/androidx/benchmark/macro/perfetto/MemoryCountersQuery.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.benchmark.macro.ExperimentalMetricApi` or `@OptIn(markerClass = androidx.benchmark.macro.ExperimentalMetricApi.class)`">
+ <location
+ file="src/main/java/androidx/benchmark/macro/perfetto/MemoryUsageQuery.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.benchmark.macro.ExperimentalMetricApi` or `@OptIn(markerClass = androidx.benchmark.macro.ExperimentalMetricApi.class)`">
+ <location
+ file="src/main/java/androidx/benchmark/macro/MetricResultExtensions.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.benchmark.macro.ExperimentalMetricApi` or `@OptIn(markerClass = androidx.benchmark.macro.ExperimentalMetricApi.class)`">
+ <location
+ file="src/main/java/androidx/benchmark/macro/MetricResultExtensions.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.benchmark.perfetto.ExperimentalPerfettoTraceProcessorApi` or `@OptIn(markerClass = androidx.benchmark.perfetto.ExperimentalPerfettoTraceProcessorApi.class)`">
+ <location
+ file="src/main/java/androidx/benchmark/macro/perfetto/PowerQuery.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.benchmark.perfetto.ExperimentalPerfettoTraceProcessorApi` or `@OptIn(markerClass = androidx.benchmark.perfetto.ExperimentalPerfettoTraceProcessorApi.class)`">
+ <location
+ file="src/main/java/androidx/benchmark/perfetto/Slice.kt"/>
</issue>
</issues>
diff --git a/benchmark/integration-tests/macrobenchmark-target/build.gradle b/benchmark/integration-tests/macrobenchmark-target/build.gradle
index d455803..fbe028a 100644
--- a/benchmark/integration-tests/macrobenchmark-target/build.gradle
+++ b/benchmark/integration-tests/macrobenchmark-target/build.gradle
@@ -45,4 +45,5 @@
implementation(project(":work:work-runtime"))
implementation(project(":work:work-runtime-ktx"))
implementation(project(":room:room-runtime"))
+ implementation(project(":room:room-ktx"))
}
diff --git a/benchmark/integration-tests/macrobenchmark/src/main/java/androidx/benchmark/integration/macrobenchmark/BaselineProfileRuleTest.kt b/benchmark/integration-tests/macrobenchmark/src/main/java/androidx/benchmark/integration/macrobenchmark/BaselineProfileRuleTest.kt
index b8ba7f7..98e187e 100644
--- a/benchmark/integration-tests/macrobenchmark/src/main/java/androidx/benchmark/integration/macrobenchmark/BaselineProfileRuleTest.kt
+++ b/benchmark/integration-tests/macrobenchmark/src/main/java/androidx/benchmark/integration/macrobenchmark/BaselineProfileRuleTest.kt
@@ -103,7 +103,6 @@
File(Outputs.outputDirectory, "BaselineProfileRuleTest_startupProfile-startup-prof.txt")
.readLines()
- .sorted()
.assertContainsInOrder(
PROFILE_LINE_EMPTY_ACTIVITY,
"$PROFILE_LINE_EMPTY_ACTIVITY-><init>()V",
@@ -125,7 +124,6 @@
val remaining = toFind.filter { it.isNotBlank() }.toMutableList()
for (line in this) {
val next = remaining.firstOrNull() ?: return
- println("MAAL: Next: $next, Line: $line")
if (predicate(line, next)) remaining.removeFirst()
}
if (remaining.size > 0) {
diff --git a/biometric/biometric/lint-baseline.xml b/biometric/biometric/lint-baseline.xml
index b7dd64e..2d8e9d0 100644
--- a/biometric/biometric/lint-baseline.xml
+++ b/biometric/biometric/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
<issue
id="WrongConstant"
@@ -28,85 +28,4 @@
file="src/main/java/androidx/biometric/BiometricManager.java"/>
</issue>
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/biometric/BiometricFragment.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/biometric/CancellationSignalProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/biometric/CancellationSignalProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/biometric/CancellationSignalProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/biometric/CancellationSignalProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/biometric/CancellationSignalProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.KITKAT)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/biometric/FingerprintDialogFragment.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/biometric/KeyguardUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/biometric/KeyguardUtils.java"/>
- </issue>
-
</issues>
diff --git a/biometric/integration-tests/testapp/build.gradle b/biometric/integration-tests/testapp/build.gradle
index 57c0eed..2475717 100755
--- a/biometric/integration-tests/testapp/build.gradle
+++ b/biometric/integration-tests/testapp/build.gradle
@@ -23,15 +23,6 @@
android {
defaultConfig {
applicationId "androidx.biometric.integration.testapp"
- testInstrumentationRunnerArgument "listener", "leakcanary.FailTestOnLeakRunListener"
- }
-
- sourceSets {
- main.manifest.srcFile "src/main/AndroidManifest.xml"
- main.java.srcDirs = ["src/main/java"]
- main.java.includes = ["**/*.java"]
- main.java.excludes = ["**/build/**"]
- main.res.srcDirs = ["src/main/res"]
}
buildTypes {
diff --git a/biometric/integration-tests/testapp/lint-baseline.xml b/biometric/integration-tests/testapp/lint-baseline.xml
deleted file mode 100644
index 34bc125..0000000
--- a/biometric/integration-tests/testapp/lint-baseline.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="NotificationPermission"
- message="When targeting Android 13 or higher, posting a permission requires holding the `POST_NOTIFICATIONS` permission (usage from leakcanary.NotificationEventListener)">
- <location
- file="src/main/AndroidManifest.xml"/>
- </issue>
-
-</issues>
diff --git a/biometric/integration-tests/testapp/src/androidTest/java/androidx/biometric/integration/testapp/BiometricPromptEnrolledTest.kt b/biometric/integration-tests/testapp/src/androidTest/java/androidx/biometric/integration/testapp/BiometricPromptEnrolledTest.kt
index 2faa940..ad2eac7 100644
--- a/biometric/integration-tests/testapp/src/androidTest/java/androidx/biometric/integration/testapp/BiometricPromptEnrolledTest.kt
+++ b/biometric/integration-tests/testapp/src/androidTest/java/androidx/biometric/integration/testapp/BiometricPromptEnrolledTest.kt
@@ -28,6 +28,7 @@
import androidx.test.filters.LargeTest
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
+import leakcanary.DetectLeaksAfterTestSuccess
import org.hamcrest.Matchers.containsString
import org.junit.After
import org.junit.Assume.assumeFalse
@@ -44,6 +45,9 @@
@get:Rule
val activityRule = androidx.test.rule.ActivityTestRule(BiometricPromptTestActivity::class.java)
+ @get:Rule
+ val rule = DetectLeaksAfterTestSuccess()
+
private lateinit var context: Context
private lateinit var device: UiDevice
diff --git a/bluetooth/integration-tests/testapp/lint-baseline.xml b/bluetooth/integration-tests/testapp/lint-baseline.xml
deleted file mode 100644
index c849aef..0000000
--- a/bluetooth/integration-tests/testapp/lint-baseline.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-beta01)" variant="all" version="8.2.0-beta01">
-
- <issue
- id="DiffUtilEquals"
- message="Suspicious equality check: `equals()` is not implemented in BluetoothDevice"
- errorLine1=" return oldItem.device == newItem.device"
- errorLine2=" ~~">
- <location
- file="src/main/java/androidx/bluetooth/integration/testapp/ui/scanner/ScannerAdapter.kt"/>
- </issue>
-
-</issues>
diff --git a/buildSrc-tests/src/test/java/androidx/build/testConfiguration/AndroidTestConfigBuilderTest.kt b/buildSrc-tests/src/test/java/androidx/build/testConfiguration/AndroidTestConfigBuilderTest.kt
index ca8f016..7886608 100644
--- a/buildSrc-tests/src/test/java/androidx/build/testConfiguration/AndroidTestConfigBuilderTest.kt
+++ b/buildSrc-tests/src/test/java/androidx/build/testConfiguration/AndroidTestConfigBuilderTest.kt
@@ -78,6 +78,8 @@
@Test
fun testXmlAgainstGoldenMacroBenchmark() {
builder.isMacrobenchmark(true)
+ builder.instrumentationArgsMap["androidx.test.argument1"] = "something1"
+ builder.instrumentationArgsMap["androidx.test.argument2"] = "something2"
MatcherAssert.assertThat(
builder.buildXml(),
CoreMatchers.`is`(goldenDefaultConfigMacroBenchmark)
@@ -86,6 +88,8 @@
@Test
fun testJsonAgainstGoldenDefault() {
+ builder.instrumentationArgsMap["androidx.test.argument1"] = "something1"
+ builder.instrumentationArgsMap["androidx.test.argument2"] = "something2"
MatcherAssert.assertThat(
builder.buildJson(),
CoreMatchers.`is`("""
@@ -99,6 +103,14 @@
"testApkSha256": "123456",
"instrumentationArgs": [
{
+ "key": "androidx.test.argument1",
+ "value": "something1"
+ },
+ {
+ "key": "androidx.test.argument2",
+ "value": "something2"
+ },
+ {
"key": "notAnnotation",
"value": "androidx.test.filters.FlakyTest"
}
@@ -440,6 +452,8 @@
<option name="config-descriptor:metadata" key="applicationId" value="com.androidx.placeholder.Placeholder" />
<option name="wifi:disable" value="true" />
<option name="instrumentation-arg" key="notAnnotation" value="androidx.test.filters.FlakyTest" />
+ <option name="instrumentation-arg" key="androidx.test.argument1" value="something1" />
+ <option name="instrumentation-arg" key="androidx.test.argument2" value="something2" />
<option name="instrumentation-arg" key="listener" value="androidx.benchmark.junit4.InstrumentationResultsRunListener" />
<option name="instrumentation-arg" key="listener" value="androidx.benchmark.macro.junit4.SideEffectRunListener" />
<include name="google/unbundled/common/setup" />
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt
index 7761191..daeaf6b 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt
@@ -563,6 +563,10 @@
project,
kotlinMultiplatformAndroidComponentsExtension
)
+ kotlinMultiplatformAndroidTarget.configureAndroidLibraryOptions(
+ project,
+ androidXExtension
+ )
project.configureProjectForApiTasks(
AndroidMultiplatformApiTaskConfig,
@@ -977,7 +981,41 @@
project.extensions.findByType<LibraryAndroidComponentsExtension>()!!.finalizeDsl {
it.defaultConfig.aarMetadata.minCompileSdk = it.compileSdk
}
+ project.fixGuavaDeps()
+ project.disableStrictVersionConstraints()
+ project.setPublishProperty(androidXExtension)
+ project.afterEvaluate {
+ setBenchmarkAdbOptions(project)
+ }
+ }
+ private fun KotlinMultiplatformAndroidTarget.configureAndroidLibraryOptions(
+ project: Project,
+ androidXExtension: AndroidXExtension
+ ) {
+ // Propagate the compileSdk value into minCompileSdk.
+ aarMetadata.minCompileSdk = compileSdk
+ project.fixGuavaDeps()
+ project.disableStrictVersionConstraints()
+ project.setPublishProperty(androidXExtension)
+ }
+
+ private fun LibraryExtension.setBenchmarkAdbOptions(project: Project) {
+ if (project.hasBenchmarkPlugin()) {
+ // Inject AOT compilation - see b/287358254 for context, b/288167775 for AGP support
+
+ // NOTE: we assume here that all benchmarks have package name $namespace.test
+ val aotCompile = "cmd package compile -m speed -f $namespace.test"
+
+ // only run aotCompile on N+, where it's supported
+ val inject = "if [ `getprop ro.build.version.sdk` -ge 24 ]; then $aotCompile; fi"
+ val options =
+ "/data/local/tmp/${project.name}-$testBuildType-androidTest.apk && $inject #"
+ adbOptions.setInstallOptions(*options.split(" ").toTypedArray())
+ }
+ }
+
+ private fun Project.fixGuavaDeps() {
// The full Guava artifact is very large, so they split off a special artifact containing a
// standalone version of the commonly-used ListenableFuture interface. However, they also
// structured the artifacts in a way that causes dependency resolution conflicts:
@@ -996,7 +1034,9 @@
}
}
}
+ }
+ private fun Project.disableStrictVersionConstraints() {
// Gradle inserts strict version constraints to ensure that dependency versions are
// identical across main and test source sets. For normal projects, this ensures
// that test bytecode is binary- and behavior-compatible with the main source set's
@@ -1016,23 +1056,13 @@
}
}
}
+ }
- project.afterEvaluate {
+ private fun Project.setPublishProperty(androidXExtension: AndroidXExtension) {
+ afterEvaluate {
if (androidXExtension.shouldRelease()) {
project.extra.set("publish", true)
}
- if (project.hasBenchmarkPlugin()) {
- // Inject AOT compilation - see b/287358254 for context, b/288167775 for AGP support
-
- // NOTE: we assume here that all benchmarks have package name $namespace.test
- val aotCompile = "cmd package compile -m speed -f $namespace.test"
-
- // only run aotCompile on N+, where it's supported
- val inject = "if [ `getprop ro.build.version.sdk` -ge 24 ]; then $aotCompile; fi"
- val options =
- "/data/local/tmp/${project.name}-$testBuildType-androidTest.apk && $inject #"
- adbOptions.setInstallOptions(*options.split(" ").toTypedArray())
- }
}
}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXPlaygroundRootImplPlugin.kt b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXPlaygroundRootImplPlugin.kt
index b6dfe5a..c06363a5 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXPlaygroundRootImplPlugin.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXPlaygroundRootImplPlugin.kt
@@ -25,9 +25,8 @@
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.dsl.RepositoryHandler
-import org.gradle.api.tasks.testing.Test
+import org.gradle.api.tasks.testing.AbstractTestTask
import org.gradle.work.DisableCachingByDefault
-import org.jetbrains.kotlin.gradle.plugin.extraProperties
/**
* This plugin is used in Playground projects and adds functionality like resolving to snapshot
@@ -79,7 +78,7 @@
}
}
if (project.path in primaryProjectPaths) {
- project.tasks.withType(Test::class.java).configureEach {
+ project.tasks.withType(AbstractTestTask::class.java).configureEach {
PlaygroundCIHostTestsTask.addTask(project, it)
}
}
@@ -254,9 +253,10 @@
description = "Runs host tests that belong to the projects which were explicitly " +
"requested in the playground setup."
}
+
companion object {
private val NAME = "playgroundCIHostTests"
- fun addTask(project: Project, task: Test) {
+ fun addTask(project: Project, task: AbstractTestTask) {
project.rootProject.tasks.named(NAME).configure {
it.dependsOn(task)
}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/LintConfiguration.kt b/buildSrc/private/src/main/kotlin/androidx/build/LintConfiguration.kt
index 3a9dffe..392abeb 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/LintConfiguration.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/LintConfiguration.kt
@@ -23,6 +23,7 @@
import com.android.build.gradle.internal.lint.LintModelWriterTask
import com.android.build.gradle.internal.lint.VariantInputs
import java.io.File
+import java.lang.reflect.Field
import org.gradle.api.GradleException
import org.gradle.api.Project
import org.gradle.api.file.ConfigurableFileCollection
@@ -381,11 +382,33 @@
private fun ConfigurableFileCollection.withChangesAllowed(
block: ConfigurableFileCollection.() -> Unit
) {
- val disallowChanges = this::class.java.getDeclaredField("disallowChanges")
- disallowChanges.isAccessible = true
- disallowChanges.set(this, false)
+ // The `disallowChanges` field is defined on `ConfigurableFileCollection` prior to Gradle 8.6
+ // and on the inner ValueState in later versions.
+ val (target, field) =
+ findDeclaredFieldOnClass("disallowChanges")?.let { field -> Pair(this, field) }
+ ?: findDeclaredFieldOnClass("valueState")?.let { valueState ->
+ valueState.isAccessible = true
+ val target = valueState.get(this)
+ target.findDeclaredFieldOnClass("disallowChanges")?.let { field ->
+ // For Gradle 8.6 and later,
+ Pair(target, field)
+ }
+ }
+ ?: throw NoSuchFieldException()
+
+ // Make the field temporarily accessible while we run the `block`.
+ field.isAccessible = true
+ field.set(target, false)
block()
- disallowChanges.set(this, true)
+ field.set(target, true)
+}
+
+private fun Any.findDeclaredFieldOnClass(name: String): Field? {
+ try {
+ return this::class.java.getDeclaredField(name)
+ } catch (e: NoSuchFieldException) {
+ return null
+ }
}
private val Project.lintBaseline: RegularFileProperty
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/metalava/MetalavaRunner.kt b/buildSrc/private/src/main/kotlin/androidx/build/metalava/MetalavaRunner.kt
index 17d8170..3c98b3e 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/metalava/MetalavaRunner.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/metalava/MetalavaRunner.kt
@@ -48,7 +48,6 @@
val allArgs =
args +
listOf(
- "--update-kotlin-nulls", // b/309149849: temporary feature flag
"--hide",
"HiddenSuperclass", // We allow having a hidden parent class
"--hide",
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/testConfiguration/AndroidTestConfigBuilder.kt b/buildSrc/private/src/main/kotlin/androidx/build/testConfiguration/AndroidTestConfigBuilder.kt
index 996f878..1ae1beb 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/testConfiguration/AndroidTestConfigBuilder.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/testConfiguration/AndroidTestConfigBuilder.kt
@@ -33,6 +33,7 @@
lateinit var testRunner: String
val additionalApkKeys = mutableListOf<String>()
val initialSetupApks = mutableListOf<String>()
+ val instrumentationArgsMap = mutableMapOf<String, String>()
fun configName(configName: String) = apply { this.configName = configName }
@@ -68,7 +69,11 @@
fun buildJson(): String {
val gson = GsonBuilder().setPrettyPrinting().create()
- val instrumentationArgs =
+ val instrumentationArgsList = mutableListOf<InstrumentationArg>()
+ instrumentationArgsMap.forEach { (key, value) ->
+ instrumentationArgsList.add(InstrumentationArg(key, value))
+ }
+ instrumentationArgsList.addAll(
if (isMicrobenchmark && !isPostsubmit) {
listOf(
InstrumentationArg("notAnnotation", "androidx.test.filters.FlakyTest"),
@@ -77,6 +82,7 @@
} else {
listOf(InstrumentationArg("notAnnotation", "androidx.test.filters.FlakyTest"))
}
+ )
val values =
mapOf(
"name" to configName,
@@ -86,7 +92,7 @@
"testApkSha256" to testApkSha256,
"appApk" to appApkName,
"appApkSha256" to appApkSha256,
- "instrumentationArgs" to instrumentationArgs,
+ "instrumentationArgs" to instrumentationArgsList,
"additionalApkKeys" to additionalApkKeys
)
return gson.toJson(values)
@@ -108,6 +114,12 @@
sb.append(MICROBENCHMARK_PRESUBMIT_OPTION)
}
}
+ instrumentationArgsMap.forEach { (key, value) ->
+ sb.append("""
+ <option name="instrumentation-arg" key="$key" value="$value" />
+
+ """.trimIndent())
+ }
if (isMacrobenchmark) {
sb.append(MACROBENCHMARK_POSTSUBMIT_OPTIONS)
}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/testConfiguration/GenerateTestConfigurationTask.kt b/buildSrc/private/src/main/kotlin/androidx/build/testConfiguration/GenerateTestConfigurationTask.kt
index e57e077..a0f33a6 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/testConfiguration/GenerateTestConfigurationTask.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/testConfiguration/GenerateTestConfigurationTask.kt
@@ -26,6 +26,7 @@
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.model.ObjectFactory
import org.gradle.api.provider.ListProperty
+import org.gradle.api.provider.MapProperty
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputFiles
@@ -88,6 +89,8 @@
@get:Input abstract val additionalTags: ListProperty<String>
+ @get:Input abstract val instrumentationArgs: MapProperty<String, String>
+
@get:OutputFile abstract val outputXml: RegularFileProperty
@get:OutputFile abstract val outputJson: RegularFileProperty
@@ -184,6 +187,9 @@
val testApkBuiltArtifact = testApk.elements.single()
val destinationApk = outputTestApk.get().asFile
File(testApkBuiltArtifact.outputFile).copyTo(destinationApk, overwrite = true)
+ instrumentationArgs.get().forEach {
+ (key, value) -> configBuilder.instrumentationArgsMap[key] = value
+ }
configBuilder
.testApkName(destinationApk.name)
.applicationId(testApk.applicationId)
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/testConfiguration/TestSuiteConfiguration.kt b/buildSrc/private/src/main/kotlin/androidx/build/testConfiguration/TestSuiteConfiguration.kt
index da4062e..8fc1428 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/testConfiguration/TestSuiteConfiguration.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/testConfiguration/TestSuiteConfiguration.kt
@@ -61,6 +61,7 @@
artifacts: Artifacts,
minSdk: Int,
testRunner: String,
+ instrumentationRunnerArgs: Map<String, String>
) {
val xmlName = "${path.asFilenamePrefix()}$variantName.xml"
val jsonName = "_${path.asFilenamePrefix()}$variantName.json"
@@ -109,6 +110,7 @@
task.outputXml.set(getFileInTestConfigDirectory(xmlName))
task.outputJson.set(getFileInTestConfigDirectory(jsonName))
task.presubmit.set(isPresubmitBuild())
+ task.instrumentationArgs.putAll(instrumentationRunnerArgs)
// Disable work tests on < API 18: b/178127496
if (path.startsWith(":work:")) {
task.minSdk.set(maxOf(18, minSdk))
@@ -452,7 +454,7 @@
artifacts,
baseExtension.defaultConfig.minSdk!!,
baseExtension.defaultConfig.testInstrumentationRunner!!,
- isMedia2 = false
+ isMedia2 = false,
)
}
else -> {
@@ -460,7 +462,8 @@
name,
artifacts,
baseExtension.defaultConfig.minSdk!!,
- baseExtension.defaultConfig.testInstrumentationRunner!!
+ baseExtension.defaultConfig.testInstrumentationRunner!!,
+ baseExtension.defaultConfig.testInstrumentationRunnerArguments
)
}
}
@@ -482,7 +485,8 @@
name,
artifacts,
kotlinMultiplatformAndroidTarget.minSdk!!,
- it.instrumentationRunner!!
+ it.instrumentationRunner!!,
+ mapOf()
)
}
}
diff --git a/camera/camera-camera2-pipe-testing/lint-baseline.xml b/camera/camera-camera2-pipe-testing/lint-baseline.xml
deleted file mode 100644
index fd988ca..0000000
--- a/camera/camera-camera2-pipe-testing/lint-baseline.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(Build.VERSION_CODES.KITKAT)"
- errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/testing/FakeImage.kt"/>
- </issue>
-
-</issues>
diff --git a/camera/camera-camera2-pipe/lint-baseline.xml b/camera/camera-camera2-pipe/lint-baseline.xml
deleted file mode 100644
index de258ca..0000000
--- a/camera/camera-camera2-pipe/lint-baseline.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="NewApi"
- message="Class requires API level 33 (current min is 21): `ExternalOutputConfig`"
- errorLine1=" (output as? OutputStream.Config.ExternalOutputConfig)?.output"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/graph/StreamGraphImpl.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(Build.VERSION_CODES.KITKAT)"
- errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/media/ImageWrapper.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(Build.VERSION_CODES.KITKAT)"
- errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/media/OutputImage.kt"/>
- </issue>
-
-</issues>
diff --git a/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/CameraGraph.kt b/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/CameraGraph.kt
index 9a28822..21c8f7f 100644
--- a/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/CameraGraph.kt
+++ b/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/CameraGraph.kt
@@ -94,7 +94,8 @@
*
* @param camera The Camera2 [CameraId] that this [CameraGraph] represents.
* @param streams A list of [CameraStream]s to use when building the configuration.
- * @param streamSharingGroups A list of [CameraStream]s to apply buffer sharing to.
+ * @param exclusiveStreamGroups A list of [CameraStream] groups where the [CameraStream]s in
+ * a group aren't expected to used simultaneously.
* @param input A list of input configurations to support Camera2 Reprocessing.
* @param sessionTemplate The template id to use when creating the [CaptureRequest] to supply
* the default parameters for a [SessionConfiguration] object.
@@ -120,7 +121,7 @@
data class Config(
val camera: CameraId,
val streams: List<CameraStream.Config>,
- val streamSharingGroups: List<List<CameraStream.Config>> = listOf(),
+ val exclusiveStreamGroups: List<List<CameraStream.Config>> = listOf(),
val input: List<InputStream.Config>? = null,
val sessionTemplate: RequestTemplate = RequestTemplate(1),
val sessionParameters: Map<*, Any?> = emptyMap<Any, Any?>(),
diff --git a/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/core/Debug.kt b/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/core/Debug.kt
index d0e049a..e50c84c 100644
--- a/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/core/Debug.kt
+++ b/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/core/Debug.kt
@@ -84,7 +84,7 @@
}
parametersString
.sortedBy { it.first }
- .forEach { append(" ${it.first.padEnd(50, ' ')}${it.second}\n") }
+ .forEach { append(" ${it.first.padEnd(50, ' ')} ${it.second}\n") }
}
}
}
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 a2aced6..5b5f69d 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
@@ -78,7 +78,7 @@
// Compute groupNumbers for buffer sharing.
val groupNumbers = mutableMapOf<CameraStream.Config, Int>()
- for (group in graphConfig.streamSharingGroups) {
+ for (group in graphConfig.exclusiveStreamGroups) {
check(group.size > 1)
val surfaceGroupId = computeNextSurfaceGroupId(graphConfig)
for (config in group) {
diff --git a/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/testing/FakeGraphConfigs.kt b/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/testing/FakeGraphConfigs.kt
index 8373cb11..a6e7870 100644
--- a/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/testing/FakeGraphConfigs.kt
+++ b/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/testing/FakeGraphConfigs.kt
@@ -146,7 +146,7 @@
sharedStreamConfig1,
sharedStreamConfig2
),
- streamSharingGroups = listOf(listOf(streamConfig1, streamConfig2)),
+ exclusiveStreamGroups = listOf(listOf(streamConfig1, streamConfig2)),
defaultParameters = mapOf(CaptureRequest.JPEG_THUMBNAIL_QUALITY to 24),
requiredParameters = mapOf(CaptureRequest.JPEG_THUMBNAIL_QUALITY to 42)
)
diff --git a/camera/camera-camera2/lint-baseline.xml b/camera/camera-camera2/lint-baseline.xml
index d61b3e6..6c8f9a0 100644
--- a/camera/camera-camera2/lint-baseline.xml
+++ b/camera/camera-camera2/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha02" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="NewApi"
@@ -38,42 +38,6 @@
</issue>
<issue
- id="UnsafeOptInUsageError"
- message="This declaration is opt-in and its usage should be marked with
'@androidx.camera.core.ExperimentalZeroShutterLag' or '@OptIn(markerClass = androidx.camera.core.ExperimentalZeroShutterLag.class)'"
- errorLine1=" public boolean isZslSupported() {"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/internal/Camera2CameraInfoImpl.java"/>
- </issue>
-
- <issue
- id="UnsafeOptInUsageError"
- message="This declaration is opt-in and its usage should be marked with
'@androidx.camera.core.ExperimentalZeroShutterLag' or '@OptIn(markerClass = androidx.camera.core.ExperimentalZeroShutterLag.class)'"
- errorLine1=" return Build.VERSION.SDK_INT >= 23 && isPrivateReprocessingSupported()"
- errorLine2=" ^">
- <location
- file="src/main/java/androidx/camera/camera2/internal/Camera2CameraInfoImpl.java"/>
- </issue>
-
- <issue
- id="UnsafeOptInUsageError"
- message="This declaration is opt-in and its usage should be marked with
'@androidx.camera.camera2.interop.ExperimentalCamera2Interop' or '@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)'"
- errorLine1=" Camera2ImplConfig.Builder camera2ConfigBuilder = new Camera2ImplConfig.Builder();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/internal/ImageCaptureOptionUnpacker.java"/>
- </issue>
-
- <issue
- id="UnsafeOptInUsageError"
- message="This declaration is opt-in and its usage should be marked with
'@androidx.camera.camera2.interop.ExperimentalCamera2Interop' or '@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)'"
- errorLine1=" builder.addImplementationOptions(camera2ConfigBuilder.build());"
- errorLine2=" ~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/internal/ImageCaptureOptionUnpacker.java"/>
- </issue>
-
- <issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
errorLine1=" characteristics = CameraCharacteristicsCompat.toCameraCharacteristicsCompat("
diff --git a/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/Camera2CapturePipelineTest.kt b/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/Camera2CapturePipelineTest.kt
index d05a748..e3f39a9 100644
--- a/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/Camera2CapturePipelineTest.kt
+++ b/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/Camera2CapturePipelineTest.kt
@@ -29,6 +29,8 @@
import android.media.Image
import android.media.ImageWriter
import android.os.Build
+import android.os.Handler
+import android.os.HandlerThread
import android.os.Looper
import android.view.Surface
import androidx.annotation.RequiresApi
@@ -40,6 +42,7 @@
import androidx.camera.camera2.internal.compat.quirk.UseTorchAsFlashQuirk
import androidx.camera.camera2.internal.compat.workaround.OverrideAeModeForStillCapture
import androidx.camera.core.ImageCapture
+import androidx.camera.core.ImageCapture.CAPTURE_MODE_MAXIMIZE_QUALITY
import androidx.camera.core.ImageCapture.FLASH_MODE_AUTO
import androidx.camera.core.ImageCapture.FLASH_MODE_OFF
import androidx.camera.core.ImageCapture.FLASH_MODE_ON
@@ -375,39 +378,64 @@
imageCaptureMode: Int,
addFlashModeTorchQuirk: Boolean = false
) {
+ // Since the threads for CapturePipeline executor and scheduler are different here, need to
+ // be careful of some task not being executed yet by the time the scheduler is simulating
+ // the capture result required for the task. To solve this, we can make sure the executor is
+ // advanced until idle first. Should also improves runtime due to removing initial delay.
+ val thread = HandlerThread("Background").apply { start() }
+ val executor = CameraXExecutors.newHandlerExecutor(Handler(thread.looper))
val cameraControl = createCameraControl(
- addTorchFlashRequiredFor3aUpdateQuirk = addFlashModeTorchQuirk
+ addTorchFlashRequiredFor3aUpdateQuirk = addFlashModeTorchQuirk,
+ executor = executor,
).apply {
flashMode = FLASH_MODE_SCREEN
-
- // Act.
- submitStillCaptureRequests(
- listOf(singleRequest),
- imageCaptureMode,
- ImageCapture.FLASH_TYPE_ONE_SHOT_FLASH,
- )
}
- // Wait for a few repeating requests to be submitted for the initial flash mode confirmation
+ // Wait for a repeating request to be submitted for the initial flash mode confirmation
// in Camera2CameraControlImpl#submitStillCaptureRequests
- CountDownLatch(5).let {
+ thread.looper.advanceUntilIdle()
+ CountDownLatch(1).let {
cameraControl.simulateRepeatingResult(
- initialDelay = 100,
+ initialDelay = 0,
period = 50,
requestCountLatch = it,
- scheduledRunnableExecutor = CameraXExecutors.mainThreadExecutor()
)
it.await(1, TimeUnit.SECONDS)
+ // TODO: Instead of waiting for 1 result explicitly to save time, we should probably
+ // refactor the whole test structure here to use something like virtual time like in
+ // coroutine testScope. Then we can just wait for a few results like in real scenarios.
+ }
+
+ // Act.
+ cameraControl.submitStillCaptureRequests(
+ listOf(singleRequest),
+ imageCaptureMode,
+ ImageCapture.FLASH_TYPE_ONE_SHOT_FLASH,
+ )
+
+ if (imageCaptureMode == CAPTURE_MODE_MAXIMIZE_QUALITY) {
+ // AfTask requires an initial capture result preCapture
+ thread.looper.advanceUntilIdle()
+ CountDownLatch(1).let {
+ cameraControl.simulateRepeatingResult(
+ initialDelay = 0,
+ period = 50,
+ requestCountLatch = it,
+ )
+ it.await(1, TimeUnit.SECONDS)
+ }
}
// Wait for main thread because ScreenFlashTask invokes callbacks in UI thread
- Shadows.shadowOf(Looper.getMainLooper()).idleFor(1, TimeUnit.SECONDS)
+ thread.looper.advanceUntilIdle() // needed since main thread task posted asynchronously
+ Looper.getMainLooper().advanceUntilIdle()
if (Build.VERSION.SDK_INT >= 28) {
// Submit a repeating request for CONTROL_AE_MODE_ON_EXTERNAL_FLASH
- CountDownLatch(5).let {
+ thread.looper.advanceUntilIdle()
+ CountDownLatch(1).let {
cameraControl.simulateRepeatingResult(
- initialDelay = 100,
+ initialDelay = 0,
period = 50,
resultParameters = mapOf(CaptureResult.CONTROL_AE_MODE
to CaptureResult.CONTROL_AE_MODE_ON_EXTERNAL_FLASH),
@@ -419,9 +447,10 @@
if (addFlashModeTorchQuirk) {
// Submit a repeating request for FLASH_MODE_TORCH
- CountDownLatch(5).let {
+ thread.looper.advanceUntilIdle()
+ CountDownLatch(1).let {
cameraControl.simulateRepeatingResult(
- initialDelay = 100,
+ initialDelay = 0,
period = 50,
resultParameters = mapOf(CaptureResult.FLASH_MODE
to CaptureResult.FLASH_MODE_TORCH),
@@ -432,6 +461,7 @@
}
// Assert, verify AE precapture is triggered
+ thread.looper.advanceUntilIdle()
immediateCompleteCapture.verifyRequestResult {
it.requestContains(
CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER,
@@ -440,9 +470,13 @@
}
// Submit a repeating request for convergence
- CountDownLatch(5).let {
+ thread.looper.advanceUntilIdle()
+ CountDownLatch(
+ if (imageCaptureMode == CAPTURE_MODE_MAXIMIZE_QUALITY) 2 // one extra for the AF task
+ else 1
+ ).let {
cameraControl.simulateRepeatingResult(
- initialDelay = 100,
+ initialDelay = 0,
period = 50,
resultParameters = resultConverged,
requestCountLatch = it
@@ -450,10 +484,9 @@
it.await(1, TimeUnit.SECONDS)
}
- // Wait for main thread because ScreenFlashTask invokes callbacks in UI thread
- Shadows.shadowOf(Looper.getMainLooper()).idleFor(1, TimeUnit.SECONDS)
-
// Assert, verify ScreenFlash APIs are invoked properly
+ thread.looper.advanceUntilIdle()
+ Looper.getMainLooper().advanceUntilIdle()
assertThat(testScreenFlash.awaitClear(1000)).isTrue()
assertThat(testScreenFlash.screenFlashEvents).isEqualTo(
listOf(
@@ -471,6 +504,8 @@
)
}
}
+
+ thread.quitSafely()
}
@Test
@@ -1301,6 +1336,7 @@
quirks: Quirks? = null,
updateCallback: CameraControlInternal.ControlUpdateCallback = immediateCompleteCapture,
addTorchFlashRequiredFor3aUpdateQuirk: Boolean = false,
+ executor: Executor = executorService,
): Camera2CameraControlImpl {
val cameraManager = context.getSystemService(Context.CAMERA_SERVICE) as CameraManager
val characteristics = cameraManager.getCameraCharacteristics(cameraId)
@@ -1321,7 +1357,7 @@
return Camera2CameraControlImpl(
characteristicsCompat,
executorService,
- executorService,
+ executor,
updateCallback,
cameraQuirk
).apply {
@@ -1516,4 +1552,11 @@
return cameraControl
}
+
+ private fun Looper.advanceUntilIdle() {
+ val shadowLooper = Shadows.shadowOf(this)
+ while (!shadowLooper.isIdle) {
+ shadowLooper.idle()
+ }
+ }
}
diff --git a/camera/camera-core/lint-baseline.xml b/camera/camera-core/lint-baseline.xml
index c5c75a3..f1db923 100644
--- a/camera/camera-core/lint-baseline.xml
+++ b/camera/camera-core/lint-baseline.xml
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="UnsafeOptInUsageError"
- message="This declaration is opt-in and its usage should be marked with
'@androidx.camera.core.ExperimentalZeroShutterLag' or '@OptIn(markerClass = androidx.camera.core.ExperimentalZeroShutterLag.class)'"
- errorLine1=" case CAPTURE_MODE_ZERO_SHUTTER_LAG:"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/core/ImageCapture.java"/>
- </issue>
-
- <issue
- id="UnsafeOptInUsageError"
- message="This declaration is opt-in and its usage should be marked with
'@androidx.camera.core.ExperimentalZeroShutterLag' or '@OptIn(markerClass = androidx.camera.core.ExperimentalZeroShutterLag.class)'"
- errorLine1=" CAPTURE_MODE_ZERO_SHUTTER_LAG})"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/core/ImageCapture.java"/>
- </issue>
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="UnknownNullness"
diff --git a/camera/camera-extensions/build.gradle b/camera/camera-extensions/build.gradle
index c9c82b6..1cc83d2 100644
--- a/camera/camera-extensions/build.gradle
+++ b/camera/camera-extensions/build.gradle
@@ -46,8 +46,8 @@
testImplementation(project(":camera:camera-testing"))
testImplementation(project(":camera:camera-extensions-stub"))
testImplementation(libs.testCore)
- // To use the extensions-stub for testing directly.
testImplementation(libs.testRunner)
+ testImplementation(libs.truth)
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testRunner)
diff --git a/camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/sessionprocessor/CaptureResultImageMatcher.java b/camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/sessionprocessor/CaptureResultImageMatcher.java
index 96b2bd5..d452bee 100644
--- a/camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/sessionprocessor/CaptureResultImageMatcher.java
+++ b/camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/sessionprocessor/CaptureResultImageMatcher.java
@@ -26,7 +26,9 @@
import androidx.annotation.RequiresApi;
import androidx.core.util.Preconditions;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
/**
@@ -38,7 +40,7 @@
private static final int INVALID_TIMESTAMP = -1;
/** TotalCaptureResults that haven't been matched with Image. */
@GuardedBy("mLock")
- private final LongSparseArray<TotalCaptureResult> mPendingCaptureResults =
+ private final LongSparseArray<List<TotalCaptureResult>> mPendingCaptureResults =
new LongSparseArray<>();
/** To store the capture stage ids for each TotalCaptureResult */
@@ -47,7 +49,7 @@
/** Images that haven't been matched with timestamp. */
@GuardedBy("mLock")
- private final LongSparseArray<ImageReference> mPendingImages = new LongSparseArray<>();
+ private final LongSparseArray<List<ImageReference>> mPendingImages = new LongSparseArray<>();
@GuardedBy("mLock")
ImageReferenceListener mImageReferenceListener;
@@ -60,7 +62,9 @@
mPendingCaptureResults.clear();
for (int i = 0; i < mPendingImages.size(); i++) {
long key = mPendingImages.keyAt(i);
- mPendingImages.get(key).decrement();
+ for (ImageReference imageReference : mPendingImages.get(key)) {
+ imageReference.decrement();
+ }
}
mPendingImages.clear();
mCaptureStageIdMap.clear();
@@ -83,11 +87,30 @@
void imageIncoming(@NonNull ImageReference imageReference) {
synchronized (mLock) {
Image image = imageReference.get();
- mPendingImages.put(image.getTimestamp(), imageReference);
+ addToList(mPendingImages, image.getTimestamp(), imageReference);
}
matchImages();
}
+ private <T> void addToList(LongSparseArray<List<T>> array, long key, T object) {
+ List<T> list = array.get(key);
+ if (list == null) {
+ list = new ArrayList<>();
+ array.put(key, list);
+ }
+ list.add(object);
+ }
+
+ private <T> void removeFromList(LongSparseArray<List<T>> array, long key, T object) {
+ List<T> list = array.get(key);
+ if (list != null) {
+ list.remove(object);
+ if (list.isEmpty()) {
+ array.remove(key);
+ }
+ }
+ }
+
void captureResultIncoming(@NonNull TotalCaptureResult captureResult) {
captureResultIncoming(captureResult, 0);
}
@@ -100,7 +123,7 @@
return;
}
// Add the incoming CameraCaptureResult to pending list and do the matching logic.
- mPendingCaptureResults.put(timestamp, captureResult);
+ addToList(mPendingCaptureResults, timestamp, captureResult);
mCaptureStageIdMap.put(captureResult, captureStageId);
}
matchImages();
@@ -161,8 +184,10 @@
if (minCaptureResultTimestamp > minImageRefTimestamp) {
for (int i = mPendingImages.size() - 1; i >= 0; i--) {
if (mPendingImages.keyAt(i) < minCaptureResultTimestamp) {
- ImageReference imageReference = mPendingImages.valueAt(i);
- imageReference.decrement();
+ List<ImageReference> imageReferences = mPendingImages.valueAt(i);
+ for (ImageReference imageReference : imageReferences) {
+ imageReference.decrement();
+ }
mPendingImages.removeAt(i);
}
}
@@ -182,16 +207,24 @@
synchronized (mLock) {
// Iterate in reverse order so that capture result can be removed in place
for (int i = mPendingCaptureResults.size() - 1; i >= 0; i--) {
- TotalCaptureResult captureResult = mPendingCaptureResults.valueAt(i);
- long timestamp = getTimeStampFromCaptureResult(captureResult);
+ List<TotalCaptureResult> captureResultList = mPendingCaptureResults.valueAt(i);
+ if (!captureResultList.isEmpty()) {
+ TotalCaptureResult captureResult = captureResultList.get(0);
+ long timestamp = getTimeStampFromCaptureResult(captureResult);
+ Preconditions.checkState(timestamp == mPendingCaptureResults.keyAt(i));
+ List<ImageReference> imageReferenceList = mPendingImages.get(timestamp);
+ if (imageReferenceList != null && !imageReferenceList.isEmpty()) {
+ ImageReference imageReference = imageReferenceList.get(0);
+ removeFromList(mPendingImages, timestamp, imageReference);
- ImageReference imageReference = mPendingImages.get(timestamp);
-
- if (imageReference != null) {
- mPendingImages.remove(timestamp);
- mPendingCaptureResults.removeAt(i);
- imageToNotify = imageReference;
- resultToNotify = captureResult;
+ captureResultList.remove(captureResult);
+ if (captureResultList.isEmpty()) {
+ mPendingCaptureResults.removeAt(i);
+ }
+ imageToNotify = imageReference;
+ resultToNotify = captureResult;
+ break;
+ }
}
}
removeStaleData();
diff --git a/camera/camera-extensions/src/test/java/androidx/camera/extensions/internal/sessionprocessor/CaptureResultImageMatcherTest.kt b/camera/camera-extensions/src/test/java/androidx/camera/extensions/internal/sessionprocessor/CaptureResultImageMatcherTest.kt
new file mode 100644
index 0000000..81b936e
--- /dev/null
+++ b/camera/camera-extensions/src/test/java/androidx/camera/extensions/internal/sessionprocessor/CaptureResultImageMatcherTest.kt
@@ -0,0 +1,260 @@
+/*
+ * 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.camera.extensions.internal.sessionprocessor
+
+import android.hardware.camera2.CaptureResult
+import android.hardware.camera2.TotalCaptureResult
+import android.media.Image
+import android.os.Build
+import com.google.common.truth.Truth.assertThat
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.Mockito
+import org.mockito.Mockito.`when`
+import org.robolectric.RobolectricTestRunner
+import org.robolectric.annotation.Config
+import org.robolectric.annotation.internal.DoNotInstrument
+
+@RunWith(RobolectricTestRunner::class)
+@DoNotInstrument
+@Config(minSdk = Build.VERSION_CODES.LOLLIPOP)
+class CaptureResultImageMatcherTest {
+ private val matcher = CaptureResultImageMatcher();
+ private val imagesRetrieved = mutableListOf<ImageReference>()
+ private val stageIdsRetrieved = mutableListOf<Int>()
+
+ @Before
+ fun setUp() {
+ matcher.setImageReferenceListener { imageRef, _, stageId ->
+ imagesRetrieved.add(imageRef)
+ stageIdsRetrieved.add(stageId)
+ }
+ }
+
+ private fun createCaptureResult(timestamp: Long): TotalCaptureResult {
+ val captureResult = Mockito.mock(TotalCaptureResult::class.java)
+ `when`(captureResult.get(CaptureResult.SENSOR_TIMESTAMP))
+ .thenReturn(timestamp)
+ return captureResult
+ }
+
+ private fun createImageRef(timestamp: Long): FakeImageReference {
+ val image = Mockito.mock(Image::class.java)
+ `when`(image.timestamp).thenReturn(timestamp)
+ return FakeImageReference(image)
+ }
+
+ @Test
+ fun canMatchImage_captureResultFirst() {
+ val captureResult0 = createCaptureResult(timestamp = 1000L)
+ matcher.captureResultIncoming(captureResult0, 0)
+
+ val imageRef0 = createImageRef(timestamp = 1000L)
+ matcher.imageIncoming(imageRef0)
+
+ assertThat(imagesRetrieved.size).isEqualTo(1)
+ assertThat(imageRef0).isSameInstanceAs(imagesRetrieved[0])
+ assertThat(imageRef0.refCount).isEqualTo(1)
+ }
+
+ @Test
+ fun canMatchImage_imageFirst() {
+ val imageRef0 = createImageRef(timestamp = 1000L)
+ matcher.imageIncoming(imageRef0)
+
+ val captureResult0 = createCaptureResult(timestamp = 1000L)
+ matcher.captureResultIncoming(captureResult0, 0)
+
+ assertThat(imagesRetrieved.size).isEqualTo(1)
+ assertThat(imageRef0).isSameInstanceAs(imagesRetrieved[0])
+ assertThat(imageRef0.refCount).isEqualTo(1)
+ }
+
+ @Test
+ fun matchImageFailed() {
+ val imageRef0 = createImageRef(timestamp = 1000L)
+ matcher.imageIncoming(imageRef0)
+
+ val captureResult0 = createCaptureResult(timestamp = 2000L)
+ matcher.captureResultIncoming(captureResult0, 0)
+ assertThat(imagesRetrieved.size).isEqualTo(0)
+ }
+
+ @Test
+ fun canMatchMultipleImages() {
+ val imageRef0 = createImageRef(timestamp = 1000L)
+ val imageRef1 = createImageRef(timestamp = 2000L)
+ val imageRef2 = createImageRef(timestamp = 3000L)
+ val captureResult0 = createCaptureResult(timestamp = 1000L)
+ val captureResult1 = createCaptureResult(timestamp = 2000L)
+ val captureResult2 = createCaptureResult(timestamp = 3000L)
+
+ matcher.imageIncoming(imageRef0)
+ matcher.captureResultIncoming(captureResult0, 0)
+ matcher.imageIncoming(imageRef1)
+ matcher.imageIncoming(imageRef2)
+ matcher.captureResultIncoming(captureResult1, 1)
+ matcher.captureResultIncoming(captureResult2, 2)
+
+ assertThat(imagesRetrieved).containsExactly(imageRef0, imageRef1, imageRef2)
+ assertThat(stageIdsRetrieved).containsExactly(0, 1, 2)
+ }
+
+ @Test
+ fun canMatchImage_duplicateTimestamp() {
+ val imageRef0 = createImageRef(timestamp = 1000L)
+ val imageRef1 = createImageRef(timestamp = 1000L)
+ val imageRef2 = createImageRef(timestamp = 2000L)
+ val imageRef3 = createImageRef(timestamp = 2000L)
+ val imageRef4 = createImageRef(timestamp = 3000L)
+
+ val captureResult0 = createCaptureResult(timestamp = 1000L)
+ val captureResult1 = createCaptureResult(timestamp = 1000L)
+ val captureResult2 = createCaptureResult(timestamp = 2000L)
+ val captureResult3 = createCaptureResult(timestamp = 2000L)
+ val captureResult4 = createCaptureResult(timestamp = 3000L)
+
+ matcher.imageIncoming(imageRef0)
+ matcher.captureResultIncoming(captureResult0, 0)
+ matcher.imageIncoming(imageRef1)
+ matcher.imageIncoming(imageRef2)
+ matcher.captureResultIncoming(captureResult1, 1)
+ matcher.captureResultIncoming(captureResult2, 2)
+ matcher.captureResultIncoming(captureResult3, 3)
+ matcher.imageIncoming(imageRef3)
+ matcher.captureResultIncoming(captureResult4, 4)
+ matcher.imageIncoming(imageRef4)
+
+ assertThat(imagesRetrieved).containsExactly(
+ imageRef0, imageRef1, imageRef2, imageRef3, imageRef4)
+ assertThat(stageIdsRetrieved).containsExactly(0, 1, 2, 3, 4)
+ }
+
+ @Test
+ fun canClear() {
+ val imageRef0 = createImageRef(timestamp = 1000L)
+ val imageRef1 = createImageRef(timestamp = 1000L)
+ val imageRef2 = createImageRef(timestamp = 3000L)
+ val captureResult0 = createCaptureResult(timestamp = 1000L)
+ matcher.imageIncoming(imageRef0)
+ matcher.captureResultIncoming(captureResult0, 0)
+ matcher.imageIncoming(imageRef1)
+ matcher.imageIncoming(imageRef2)
+
+ matcher.clear()
+
+ assertThat(imagesRetrieved).containsExactly(imageRef0)
+ assertThat(stageIdsRetrieved).containsExactly(0)
+ assertThat(imageRef0.refCount).isEqualTo(1)
+ // unmatched images are decremented.
+ assertThat(imageRef1.refCount).isEqualTo(0)
+ assertThat(imageRef2.refCount).isEqualTo(0)
+
+ // After clear(), the pending ImageReference are cleared so it won't match.
+ val captureResult1 = createCaptureResult(timestamp = 1000L)
+ val captureResult2 = createCaptureResult(timestamp = 3000L)
+ matcher.captureResultIncoming(captureResult1)
+ matcher.captureResultIncoming(captureResult2)
+
+ assertThat(imagesRetrieved).containsNoneOf(imageRef1, imageRef2)
+ }
+
+ @Test
+ fun canClearImageReferenceListener() {
+ matcher.clearImageReferenceListener()
+
+ val imageRef0 = createImageRef(timestamp = 1000L)
+ val captureResult0 = createCaptureResult(timestamp = 1000L)
+
+ matcher.imageIncoming(imageRef0)
+ matcher.captureResultIncoming(captureResult0, 0)
+
+ assertThat(imagesRetrieved).isEmpty()
+ }
+
+ @Test
+ fun canRemoveStaleImages() {
+ val imageRef0 = createImageRef(timestamp = 1000L)
+ val imageRef1 = createImageRef(timestamp = 1000L)
+ val imageRef2 = createImageRef(timestamp = 2000L)
+ val captureResult3 = createCaptureResult(timestamp = 3000L)
+ matcher.imageIncoming(imageRef0)
+ matcher.imageIncoming(imageRef1)
+ matcher.imageIncoming(imageRef2)
+ matcher.captureResultIncoming(captureResult3, 3)
+
+ // Images that are older than captureResult3 are decremented.
+ assertThat(imageRef0.refCount).isEqualTo(0)
+ assertThat(imageRef1.refCount).isEqualTo(0)
+ assertThat(imageRef2.refCount).isEqualTo(0)
+
+ // The pending images are clear so they shouldn't match anymore.
+ val captureResult0 = createCaptureResult(timestamp = 1000L)
+ val captureResult1 = createCaptureResult(timestamp = 1000L)
+ val captureResult2 = createCaptureResult(timestamp = 2000L)
+ matcher.captureResultIncoming(captureResult0, 0)
+ matcher.captureResultIncoming(captureResult1, 1)
+ matcher.captureResultIncoming(captureResult2, 2)
+ assertThat(imagesRetrieved).isEmpty()
+ }
+
+ @Test
+ fun canRemoveStaleCaptureResults() {
+ val captureResult0 = createCaptureResult(timestamp = 1000L)
+ val captureResult1 = createCaptureResult(timestamp = 1000L)
+ val captureResult2 = createCaptureResult(timestamp = 2000L)
+ val imageRef3 = createImageRef(timestamp = 3000L)
+
+ matcher.captureResultIncoming(captureResult0, 0)
+ matcher.captureResultIncoming(captureResult1, 1)
+ matcher.captureResultIncoming(captureResult2, 2)
+ matcher.imageIncoming(imageRef3)
+
+ // Capture results older than the image are clear so they won't match anymore.
+ val imageRef0 = createImageRef(timestamp = 1000L)
+ val imageRef1 = createImageRef(timestamp = 1000L)
+ val imageRef2 = createImageRef(timestamp = 2000L)
+ matcher.imageIncoming(imageRef0)
+ matcher.imageIncoming(imageRef1)
+ matcher.imageIncoming(imageRef2)
+
+ // The pending images are clear so they shouldn't match anymore.
+ assertThat(imagesRetrieved).isEmpty()
+ }
+
+ class FakeImageReference(val image: Image) : ImageReference {
+ var refCount = 1
+ override fun increment(): Boolean {
+ if (refCount <= 0) {
+ return false
+ }
+ refCount++
+ return true
+ }
+
+ override fun decrement(): Boolean {
+ if (refCount <= 0) {
+ return false
+ }
+ refCount--
+ return true
+ }
+
+ override fun get(): Image = image
+ }
+}
diff --git a/camera/camera-mlkit-vision/lint-baseline.xml b/camera/camera-mlkit-vision/lint-baseline.xml
new file mode 100644
index 0000000..f856ce3
--- /dev/null
+++ b/camera/camera-mlkit-vision/lint-baseline.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.camera.view.TransformExperimental` or `@OptIn(markerClass = androidx.camera.view.TransformExperimental.class)`"
+ errorLine1=" final ImageProxyTransformFactory mImageAnalysisTransformFactory;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/mlkit/vision/MlKitAnalyzer.java"/>
+ </issue>
+
+</issues>
diff --git a/camera/camera-testing/lint-baseline.xml b/camera/camera-testing/lint-baseline.xml
index 5e26c64..58c53b0 100644
--- a/camera/camera-testing/lint-baseline.xml
+++ b/camera/camera-testing/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-alpha14" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-alpha14)" variant="all" version="8.2.0-alpha14">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
@@ -28,22 +28,4 @@
file="src/test/java/androidx/camera/testing/mocks/MockObserverTest.java"/>
</issue>
- <issue
- id="UnsafeOptInUsageError"
- message="This declaration is opt-in and its usage should be marked with
'@androidx.camera.core.ExperimentalZeroShutterLag' or '@OptIn(markerClass = androidx.camera.core.ExperimentalZeroShutterLag.class)'"
- errorLine1=" public boolean isZslSupported() {"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/testing/fakes/FakeCameraInfoInternal.java"/>
- </issue>
-
- <issue
- id="UnsafeOptInUsageError"
- message="This declaration is opt-in and its usage should be marked with
'@androidx.camera.core.ExperimentalZeroShutterLag' or '@OptIn(markerClass = androidx.camera.core.ExperimentalZeroShutterLag.class)'"
- errorLine1=" return false;"
- errorLine2=" ~~~~~">
- <location
- file="src/main/java/androidx/camera/testing/fakes/FakeCameraInfoInternal.java"/>
- </issue>
-
</issues>
diff --git a/camera/camera-testlib-extensions/src/main/java/androidx/camera/extensions/impl/NightImageCaptureExtenderImpl.java b/camera/camera-testlib-extensions/src/main/java/androidx/camera/extensions/impl/NightImageCaptureExtenderImpl.java
index 798c3503..eb1ef80 100644
--- a/camera/camera-testlib-extensions/src/main/java/androidx/camera/extensions/impl/NightImageCaptureExtenderImpl.java
+++ b/camera/camera-testlib-extensions/src/main/java/androidx/camera/extensions/impl/NightImageCaptureExtenderImpl.java
@@ -284,19 +284,48 @@
}
try {
- ByteBuffer yByteBuffer = outputImage.getPlanes()[0].getBuffer();
- ByteBuffer uByteBuffer = outputImage.getPlanes()[2].getBuffer();
- ByteBuffer vByteBuffer = outputImage.getPlanes()[1].getBuffer();
+ // copy y plane
+ Image.Plane inYPlane = normalImage.getPlanes()[0];
+ Image.Plane outYPlane = outputImage.getPlanes()[0];
+ ByteBuffer inYBuffer = inYPlane.getBuffer();
+ ByteBuffer outYBuffer = outYPlane.getBuffer();
+ int inYPixelStride = inYPlane.getPixelStride();
+ int inYRowStride = inYPlane.getRowStride();
+ int outYPixelStride = outYPlane.getPixelStride();
+ int outYRowStride = outYPlane.getRowStride();
+ for (int x = 0; x < outputImage.getHeight(); x++) {
+ for (int y = 0; y < outputImage.getWidth(); y++) {
+ int inIndex = x * inYRowStride + y * inYPixelStride;
+ int outIndex = x * outYRowStride + y * outYPixelStride;
+ outYBuffer.put(outIndex, inYBuffer.get(inIndex));
+ }
+ }
- // Sample here just simply copy/paste the capture image result
- yByteBuffer.put(normalImage.getPlanes()[0].getBuffer());
if (resultCallback != null) {
executorForCallback.execute(
() -> resultCallback.onCaptureProcessProgressed(50));
}
- uByteBuffer.put(normalImage.getPlanes()[2].getBuffer());
- vByteBuffer.put(normalImage.getPlanes()[1].getBuffer());
+ // Copy UV
+ for (int i = 1; i < 3; i++) {
+ Image.Plane inPlane = normalImage.getPlanes()[i];
+ Image.Plane outPlane = outputImage.getPlanes()[i];
+ ByteBuffer inBuffer = inPlane.getBuffer();
+ ByteBuffer outBuffer = outPlane.getBuffer();
+ int inPixelStride = inPlane.getPixelStride();
+ int inRowStride = inPlane.getRowStride();
+ int outPixelStride = outPlane.getPixelStride();
+ int outRowStride = outPlane.getRowStride();
+ // UV are half width compared to Y
+ for (int x = 0; x < outputImage.getHeight() / 2; x++) {
+ for (int y = 0; y < outputImage.getWidth() / 2; y++) {
+ int inIndex = x * inRowStride + y * inPixelStride;
+ int outIndex = x * outRowStride + y * outPixelStride;
+ byte b = inBuffer.get(inIndex);
+ outBuffer.put(outIndex, b);
+ }
+ }
+ }
} catch (IllegalStateException e) {
Log.e(TAG, "Error accessing the Image: " + e);
// Since something went wrong, don't try to queue up the image.
diff --git a/camera/camera-testlib-extensions/src/main/java/androidx/camera/extensions/impl/advanced/LongCaptureAdvancedExtenderImpl.java b/camera/camera-testlib-extensions/src/main/java/androidx/camera/extensions/impl/advanced/LongCaptureAdvancedExtenderImpl.java
index 121c2e3..abefe9e 100644
--- a/camera/camera-testlib-extensions/src/main/java/androidx/camera/extensions/impl/advanced/LongCaptureAdvancedExtenderImpl.java
+++ b/camera/camera-testlib-extensions/src/main/java/androidx/camera/extensions/impl/advanced/LongCaptureAdvancedExtenderImpl.java
@@ -552,6 +552,10 @@
@Override
public void onCaptureCompleted(@NonNull RequestProcessorImpl.Request request,
@NonNull TotalCaptureResult totalCaptureResult) {
+ // RequestProcessorImpl.Callback.onCaptureSequenceCompleted will be invoked
+ // when onCaptureFailed happens. SessionProcessorImpl.CaptureCallback
+ // .onCaptureSequenceCompleted should be invoked only when the capture succeeds.
+ captureCallback.onCaptureSequenceCompleted(seqId);
}
@Override
@@ -568,7 +572,6 @@
@Override
public void onCaptureSequenceCompleted(int sequenceId, long frameNumber) {
- captureCallback.onCaptureSequenceCompleted(seqId);
}
@Override
diff --git a/camera/camera-video/lint-baseline.xml b/camera/camera-video/lint-baseline.xml
index 6bb2b1ba..3d8b587 100644
--- a/camera/camera-video/lint-baseline.xml
+++ b/camera/camera-video/lint-baseline.xml
@@ -1,14 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="NewApi"
- message="Class requires API level 21 (current min is 19): `Status`"
- errorLine1=" is VideoRecordEvent.Status -> {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/camera/video/VideoRecordingTest.kt"/>
- </issue>
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
diff --git a/camera/camera-video/src/androidTest/java/androidx/camera/video/SupportedQualitiesVerificationTest.kt b/camera/camera-video/src/androidTest/java/androidx/camera/video/SupportedQualitiesVerificationTest.kt
index 5a4f191..c088ac2 100644
--- a/camera/camera-video/src/androidTest/java/androidx/camera/video/SupportedQualitiesVerificationTest.kt
+++ b/camera/camera-video/src/androidTest/java/androidx/camera/video/SupportedQualitiesVerificationTest.kt
@@ -38,22 +38,17 @@
import androidx.camera.camera2.Camera2Config
import androidx.camera.camera2.pipe.integration.CameraPipeConfig
import androidx.camera.core.Camera
-import androidx.camera.core.CameraEffect
-import androidx.camera.core.CameraEffect.VIDEO_CAPTURE
import androidx.camera.core.CameraInfo
import androidx.camera.core.CameraSelector
import androidx.camera.core.CameraXConfig
import androidx.camera.core.DynamicRange
import androidx.camera.core.impl.utils.TransformUtils.rotateSize
import androidx.camera.core.impl.utils.executor.CameraXExecutors
-import androidx.camera.core.processing.DefaultSurfaceProcessor
-import androidx.camera.core.processing.SurfaceProcessorInternal
import androidx.camera.lifecycle.ProcessCameraProvider
import androidx.camera.testing.impl.CameraPipeConfigTestRule
import androidx.camera.testing.impl.CameraUtil
import androidx.camera.testing.impl.WakelockEmptyActivityRule
import androidx.camera.testing.impl.fakes.FakeLifecycleOwner
-import androidx.camera.testing.impl.fakes.FakeSurfaceEffect
import androidx.core.util.Consumer
import androidx.test.core.app.ApplicationProvider
import androidx.test.filters.LargeTest
@@ -142,7 +137,6 @@
private val instrumentation = InstrumentationRegistry.getInstrumentation()
private val context: Context = ApplicationProvider.getApplicationContext()
- private val surfaceProcessorsToRelease = mutableListOf<SurfaceProcessorInternal>()
// TODO(b/278168212): Only SDR is checked by now. Need to extend to HDR dynamic ranges.
private val dynamicRange = DynamicRange.SDR
private lateinit var cameraProvider: ProcessCameraProvider
@@ -185,10 +179,6 @@
if (this::cameraProvider.isInitialized) {
cameraProvider.shutdownAsync()[10, TimeUnit.SECONDS]
}
- for (surfaceProcessor in surfaceProcessorsToRelease) {
- surfaceProcessor.release()
- }
- surfaceProcessorsToRelease.clear()
}
@Test
@@ -197,20 +187,23 @@
}
@Test
- fun qualityOptionCanRecordVideo_enableSurfaceProcessor() {
+ fun qualityOptionCanRecordVideo_enableSurfaceProcessing() {
assumeSuccessfulSurfaceProcessing()
- testQualityOptionRecordVideo(effect = createEffect())
+ testQualityOptionRecordVideo(enableSurfaceProcessing = true)
}
- private fun testQualityOptionRecordVideo(effect: CameraEffect? = null) {
+ private fun testQualityOptionRecordVideo(enableSurfaceProcessing: Boolean = false) {
// Arrange.
val videoCapabilities = Recorder.getVideoCapabilities(cameraInfo)
val videoProfile =
videoCapabilities.getProfiles(quality, dynamicRange)!!.defaultVideoProfile
val recorder = Recorder.Builder().setQualitySelector(QualitySelector.from(quality)).build()
- val videoCapture = VideoCapture.withOutput(recorder)
- videoCapture.effect = effect
+ val videoCapture = VideoCapture.Builder(recorder).apply {
+ if (enableSurfaceProcessing) {
+ setSurfaceProcessingForceEnabled()
+ }
+ }.build()
val file = File.createTempFile("CameraX", ".tmp").apply { deleteOnExit() }
val latchForRecordingStatus = CountDownLatch(5)
val latchForRecordingFinalized = CountDownLatch(1)
@@ -241,6 +234,11 @@
)
}
+ if (enableSurfaceProcessing) {
+ // Ensure the surface processing is enabled.
+ assertThat(isSurfaceProcessingEnabled(videoCapture)).isTrue()
+ }
+
// Act.
videoCapture.startVideoRecording(file, eventListener).use {
// Verify the recording proceed for a while.
@@ -267,15 +265,6 @@
file.delete()
}
- private fun createEffect(): CameraEffect {
- val fakeSurfaceProcessor = DefaultSurfaceProcessor.Factory.newInstance(DynamicRange.SDR)
- surfaceProcessorsToRelease.add(fakeSurfaceProcessor)
- return FakeSurfaceEffect(
- VIDEO_CAPTURE,
- fakeSurfaceProcessor
- )
- }
-
private fun VideoCapture<Recorder>.startVideoRecording(
file: File,
eventListener: Consumer<VideoRecordEvent>
diff --git a/camera/camera-video/src/androidTest/java/androidx/camera/video/VideoRecordingTest.kt b/camera/camera-video/src/androidTest/java/androidx/camera/video/VideoRecordingTest.kt
index 27c9214..c514c78 100644
--- a/camera/camera-video/src/androidTest/java/androidx/camera/video/VideoRecordingTest.kt
+++ b/camera/camera-video/src/androidTest/java/androidx/camera/video/VideoRecordingTest.kt
@@ -40,7 +40,6 @@
import androidx.camera.core.ImageCapture
import androidx.camera.core.ImageCaptureException
import androidx.camera.core.Preview
-import androidx.camera.core.UseCase
import androidx.camera.core.impl.utils.AspectRatioUtil.ASPECT_RATIO_16_9
import androidx.camera.core.impl.utils.AspectRatioUtil.ASPECT_RATIO_3_4
import androidx.camera.core.impl.utils.AspectRatioUtil.ASPECT_RATIO_4_3
@@ -1230,11 +1229,6 @@
assumeExtraCroppingQuirk(implName)
}
- private fun isStreamSharingEnabled(useCase: UseCase) = !useCase.camera!!.hasTransform
-
- private fun isSurfaceProcessingEnabled(videoCapture: VideoCapture<*>) =
- videoCapture.node != null || isStreamSharingEnabled(videoCapture)
-
private class ImageSavedCallback :
ImageCapture.OnImageSavedCallback {
diff --git a/camera/camera-video/src/androidTest/java/androidx/camera/video/VideoTestingUtil.kt b/camera/camera-video/src/androidTest/java/androidx/camera/video/VideoTestingUtil.kt
index 61b85f5..8e220bd 100644
--- a/camera/camera-video/src/androidTest/java/androidx/camera/video/VideoTestingUtil.kt
+++ b/camera/camera-video/src/androidTest/java/androidx/camera/video/VideoTestingUtil.kt
@@ -28,6 +28,7 @@
import androidx.camera.camera2.pipe.integration.compat.quirk.DeviceQuirks as PipeDeviceQuirks
import androidx.camera.camera2.pipe.integration.compat.quirk.ExtraCroppingQuirk as PipeExtraCroppingQuirk
import androidx.camera.core.CameraInfo
+import androidx.camera.core.UseCase
import androidx.camera.video.internal.compat.quirk.DeviceQuirks
import androidx.camera.video.internal.compat.quirk.StopCodecAfterSurfaceRemovalCrashMediaServerQuirk
import com.google.common.truth.Truth.assertThat
@@ -82,3 +83,10 @@
assertThat(it.getRotatedResolution()).isEqualTo(expectedResolution)
}
}
+
+@RequiresApi(21)
+fun isStreamSharingEnabled(useCase: UseCase) = !useCase.camera!!.hasTransform
+
+@RequiresApi(21)
+fun isSurfaceProcessingEnabled(videoCapture: VideoCapture<*>) =
+ videoCapture.node != null || isStreamSharingEnabled(videoCapture)
diff --git a/camera/camera-video/src/main/java/androidx/camera/video/VideoCapture.java b/camera/camera-video/src/main/java/androidx/camera/video/VideoCapture.java
index 372c681..b31f1f6 100644
--- a/camera/camera-video/src/main/java/androidx/camera/video/VideoCapture.java
+++ b/camera/camera-video/src/main/java/androidx/camera/video/VideoCapture.java
@@ -44,6 +44,7 @@
import static androidx.camera.core.internal.UseCaseEventConfig.OPTION_USE_CASE_EVENT_CALLBACK;
import static androidx.camera.video.QualitySelector.getQualityToResolutionMap;
import static androidx.camera.video.StreamInfo.STREAM_ID_ERROR;
+import static androidx.camera.video.impl.VideoCaptureConfig.OPTION_FORCE_ENABLE_SURFACE_PROCESSING;
import static androidx.camera.video.impl.VideoCaptureConfig.OPTION_VIDEO_ENCODER_INFO_FINDER;
import static androidx.camera.video.impl.VideoCaptureConfig.OPTION_VIDEO_OUTPUT;
import static androidx.camera.video.internal.config.VideoConfigUtil.resolveVideoEncoderConfig;
@@ -620,7 +621,7 @@
// pipeline when the transformation becomes invalid.
mHasCompensatingTransformation = true;
}
- mNode = createNodeIfNeeded(camera, mCropRect, resolution, dynamicRange);
+ mNode = createNodeIfNeeded(camera, config, mCropRect, resolution, dynamicRange);
// Choose Timebase based on the whether the buffer is copied.
Timebase timebase;
if (mNode != null || !camera.getHasTransform()) {
@@ -901,10 +902,12 @@
@Nullable
private SurfaceProcessorNode createNodeIfNeeded(@NonNull CameraInternal camera,
+ @NonNull VideoCaptureConfig<T> config,
@NonNull Rect cropRect,
@NonNull Size resolution,
@NonNull DynamicRange dynamicRange) {
if (getEffect() != null
+ || shouldEnableSurfaceProcessingByConfig(camera, config)
|| shouldEnableSurfaceProcessingByQuirk(camera)
|| shouldCrop(cropRect, resolution)
|| shouldMirror(camera)
@@ -1092,6 +1095,13 @@
|| resolution.getHeight() != cropRect.height();
}
+ private static <T extends VideoOutput> boolean shouldEnableSurfaceProcessingByConfig(
+ @NonNull CameraInternal camera, @NonNull VideoCaptureConfig<T> config) {
+ // If there has been a buffer copy, it means the surface processing is already enabled on
+ // input stream. Otherwise, enable it as needed.
+ return camera.getHasTransform() && config.isSurfaceProcessingForceEnabled();
+ }
+
private static boolean shouldEnableSurfaceProcessingByQuirk(@NonNull CameraInternal camera) {
// If there has been a buffer copy, it means the surface processing is already enabled on
// input stream. Otherwise, enable it as needed.
@@ -1874,5 +1884,26 @@
getMutableConfig().insertOption(OPTION_CAPTURE_TYPE, captureType);
return this;
}
+
+ /**
+ * Forces surface processing to be enabled.
+ *
+ * <p>Typically, surface processing is automatically enabled only when required for a
+ * specific effect. However, calling this method will force it to be enabled even if no
+ * effect is required. Surface processing creates additional processing through the OpenGL
+ * pipeline, affecting performance and memory usage. Camera service may treat the surface
+ * differently, potentially impacting video quality and stabilization. So it is generally
+ * not recommended to enable it.
+ *
+ * <p>One example where it might be useful is to work around device compatibility issues.
+ * For example, UHD video recording might not work on some devices, but enabling surface
+ * processing could work around the issue.
+ */
+ @RestrictTo(Scope.LIBRARY_GROUP)
+ @NonNull
+ public Builder<T> setSurfaceProcessingForceEnabled() {
+ getMutableConfig().insertOption(OPTION_FORCE_ENABLE_SURFACE_PROCESSING, true);
+ return this;
+ }
}
}
diff --git a/camera/camera-video/src/main/java/androidx/camera/video/impl/VideoCaptureConfig.java b/camera/camera-video/src/main/java/androidx/camera/video/impl/VideoCaptureConfig.java
index c9bd4de..4cc1477 100644
--- a/camera/camera-video/src/main/java/androidx/camera/video/impl/VideoCaptureConfig.java
+++ b/camera/camera-video/src/main/java/androidx/camera/video/impl/VideoCaptureConfig.java
@@ -16,6 +16,10 @@
package androidx.camera.video.impl;
+import static androidx.core.util.Preconditions.checkArgument;
+
+import static java.util.Objects.requireNonNull;
+
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import androidx.arch.core.util.Function;
@@ -30,8 +34,6 @@
import androidx.camera.video.internal.encoder.VideoEncoderConfig;
import androidx.camera.video.internal.encoder.VideoEncoderInfo;
-import java.util.Objects;
-
/**
* Config for a video capture use case.
*
@@ -55,23 +57,31 @@
OPTION_VIDEO_ENCODER_INFO_FINDER =
Option.create("camerax.video.VideoCapture.videoEncoderInfoFinder", Function.class);
+ public static final Option<Boolean> OPTION_FORCE_ENABLE_SURFACE_PROCESSING = Option.create(
+ "camerax.video.VideoCapture.forceEnableSurfaceProcessing", Boolean.class);
+
// *********************************************************************************************
private final OptionsBundle mConfig;
public VideoCaptureConfig(@NonNull OptionsBundle config) {
+ checkArgument(config.containsOption(OPTION_VIDEO_OUTPUT));
mConfig = config;
}
@SuppressWarnings("unchecked")
@NonNull
public T getVideoOutput() {
- return (T) retrieveOption(OPTION_VIDEO_OUTPUT);
+ return (T) requireNonNull(retrieveOption(OPTION_VIDEO_OUTPUT));
}
@NonNull
public Function<VideoEncoderConfig, VideoEncoderInfo> getVideoEncoderInfoFinder() {
- return Objects.requireNonNull(retrieveOption(OPTION_VIDEO_ENCODER_INFO_FINDER));
+ return requireNonNull(retrieveOption(OPTION_VIDEO_ENCODER_INFO_FINDER));
+ }
+
+ public boolean isSurfaceProcessingForceEnabled() {
+ return requireNonNull(retrieveOption(OPTION_FORCE_ENABLE_SURFACE_PROCESSING, false));
}
/**
diff --git a/camera/integration-tests/avsynctestapp/lint-baseline.xml b/camera/integration-tests/avsynctestapp/lint-baseline.xml
index 639924f..3544f4b 100644
--- a/camera/integration-tests/avsynctestapp/lint-baseline.xml
+++ b/camera/integration-tests/avsynctestapp/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha02" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="RestrictedApiAndroidX"
@@ -273,135 +273,54 @@
<issue
id="RestrictedApiAndroidX"
- message="Logger.e can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" Logger.e(TAG, "Camera binding failed", exception)"
- errorLine2=" ~">
+ message="FileUtil.canDeviceWriteToMediaStore can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" return if (canDeviceWriteToMediaStore()) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
</issue>
<issue
id="RestrictedApiAndroidX"
- message="Logger.e can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" Logger.e(TAG, "Camera binding failed", exception)"
- errorLine2=" ~~~">
+ message="FileUtil.generateVideoMediaStoreOptions can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" generateVideoMediaStoreOptions(context.contentResolver, fileName)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
</issue>
<issue
id="RestrictedApiAndroidX"
- message="Logger.e can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" Logger.e(TAG, "Camera binding failed", exception)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ message="FileUtil.generateVideoMediaStoreOptions can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" generateVideoMediaStoreOptions(context.contentResolver, fileName)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
</issue>
<issue
id="RestrictedApiAndroidX"
- message="Logger.e can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" Logger.e(TAG, "Camera binding failed", exception)"
- errorLine2=" ~~~~~~~~~">
+ message="FileUtil.generateVideoMediaStoreOptions can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" generateVideoMediaStoreOptions(context.contentResolver, fileName)"
+ errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
</issue>
<issue
id="RestrictedApiAndroidX"
- message="DeviceQuirks.get can only be called from within the same library (androidx.camera:camera-video)"
- errorLine1=" return DeviceQuirks.get(MediaStoreVideoCannotWrite::class.java) == null"
- errorLine2=" ~~~">
+ message="FileUtil.generateVideoFileOutputOptions can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" generateVideoFileOutputOptions(fileName)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
</issue>
<issue
id="RestrictedApiAndroidX"
- message="DeviceQuirks.get can only be called from within the same library (androidx.camera:camera-video)"
- errorLine1=" return DeviceQuirks.get(MediaStoreVideoCannotWrite::class.java) == null"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Logger.e can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" Logger.e(TAG, "Failed to create directory: $videoFolder")"
- errorLine2=" ~">
- <location
- file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Logger.e can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" Logger.e(TAG, "Failed to create directory: $videoFolder")"
- errorLine2=" ~~~">
- <location
- file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Logger.e can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" Logger.e(TAG, "Failed to create directory: $videoFolder")"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Logger.d can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" Logger.d(TAG, "Video saved to: $uri")"
- errorLine2=" ~">
- <location
- file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Logger.d can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" Logger.d(TAG, "Video saved to: $uri")"
- errorLine2=" ~~~">
- <location
- file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Logger.d can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" Logger.d(TAG, "Video saved to: $uri")"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Logger.e can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" Logger.e(TAG, "Failed to save video: $msg")"
- errorLine2=" ~">
- <location
- file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Logger.e can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" Logger.e(TAG, "Failed to save video: $msg")"
- errorLine2=" ~~~">
- <location
- file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Logger.e can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" Logger.e(TAG, "Failed to save video: $msg")"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ message="FileUtil.generateVideoFileOutputOptions can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" generateVideoFileOutputOptions(fileName)"
+ errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
</issue>
@@ -622,58 +541,4 @@
file="src/main/java/androidx/camera/integration/avsync/model/AudioGenerator.kt"/>
</issue>
- <issue
- id="RestrictedApiAndroidX"
- message="FileUtil.canDeviceWriteToMediaStore can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" return if (canDeviceWriteToMediaStore()) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="FileUtil.generateVideoMediaStoreOptions can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" generateVideoMediaStoreOptions(context.contentResolver, fileName)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="FileUtil.generateVideoMediaStoreOptions can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" generateVideoMediaStoreOptions(context.contentResolver, fileName)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="FileUtil.generateVideoMediaStoreOptions can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" generateVideoMediaStoreOptions(context.contentResolver, fileName)"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="FileUtil.generateVideoFileOutputOptions can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" generateVideoFileOutputOptions(fileName)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="FileUtil.generateVideoFileOutputOptions can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" generateVideoFileOutputOptions(fileName)"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/avsync/model/CameraHelper.kt"/>
- </issue>
-
</issues>
diff --git a/camera/integration-tests/camerapipetestapp/lint-baseline.xml b/camera/integration-tests/camerapipetestapp/lint-baseline.xml
index 80b96ac..a4cfedb 100644
--- a/camera/integration-tests/camerapipetestapp/lint-baseline.xml
+++ b/camera/integration-tests/camerapipetestapp/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-alpha15" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-alpha15)" variant="all" version="8.2.0-alpha15">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
@@ -21,6 +21,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="CameraPipe can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" private lateinit var cameraPipe: CameraPipe"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/CameraPipeActivity.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Companion.getNORMAL can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" private var operatingMode: CameraGraph.OperatingMode = CameraGraph.OperatingMode.NORMAL"
errorLine2=" ~~~~~~">
@@ -30,6 +39,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="OperatingMode can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" private var operatingMode: CameraGraph.OperatingMode = CameraGraph.OperatingMode.NORMAL"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/CameraPipeActivity.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="CameraPipe.cameras can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" val cameraDevices = cameraPipe.cameras()"
errorLine2=" ~~~~~~~">
@@ -84,6 +102,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="CameraPipe can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" var result: CameraPipe?"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/CameraPipeApplication.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="CameraPipe can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" result = CameraPipe(CameraPipe.Config(appContext = this))"
errorLine2=" ~~~~~~~~~~">
@@ -120,6 +147,78 @@
<issue
id="RestrictedApiAndroidX"
+ message="Config can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" private val cameraConfig: CameraGraph.Config,"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Config can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" private val cameraConfig: CameraGraph.Config,"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="CameraGraph can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" private val cameraGraph: CameraGraph,"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="CameraGraph can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" private val cameraGraph: CameraGraph,"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="CameraMetadata can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" private val cameraMetadata: CameraMetadata,"
+ errorLine2=" ~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="CameraMetadata can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" private val cameraMetadata: CameraMetadata,"
+ errorLine2=" ~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="CameraPipe can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" cameraPipe: CameraPipe,"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Listener can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" listeners: List<Request.Listener> = emptyList(),"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Companion.getNORMAL can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" operatingMode: CameraGraph.OperatingMode? = CameraGraph.OperatingMode.NORMAL"
errorLine2=" ~~~~~~">
@@ -129,6 +228,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="OperatingMode can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" operatingMode: CameraGraph.OperatingMode? = CameraGraph.OperatingMode.NORMAL"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Companion.getHIGH_SPEED can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" if (operatingMode == CameraGraph.OperatingMode.HIGH_SPEED) {"
errorLine2=" ~~~~~~~~~~">
@@ -138,6 +246,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="CameraPipe can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" cameraPipe: CameraPipe,"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="CameraPipe can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" cameraPipe: CameraPipe,"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Listener can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" listeners: List<Request.Listener> = emptyList()"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="CameraDevices.awaitCameraMetadata-FpsL5FU can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" val cameraMetadata = cameraPipe.cameras().awaitCameraMetadata(cameraId)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
@@ -201,6 +336,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="CameraStream.Config can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" val viewfinderStreamConfig = Config.create("
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Companion.create-bSQo6-Q can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" val viewfinderStreamConfig = Config.create("
errorLine2=" ~~~~~~">
@@ -246,6 +390,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="CameraStream.Config can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" val privateStreamConfig = Config.create("
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Companion.create-bSQo6-Q can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" val privateStreamConfig = Config.create("
errorLine2=" ~~~~~~">
@@ -309,6 +462,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="CameraGraph.Config can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" val config = CameraGraph.Config("
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Companion.getHIGH_SPEED can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" sessionMode = CameraGraph.OperatingMode.HIGH_SPEED,"
errorLine2=" ~~~~~~~~~~">
@@ -525,6 +687,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="CameraGraph.Session can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" cameraGraph.acquireSessionOrNull()!!.use {"
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="CameraGraph.acquireSessionOrNull can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" cameraGraph.acquireSessionOrNull()!!.use {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
@@ -570,6 +741,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="CameraPipe can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" cameraPipe: CameraPipe,"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Listener can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" listeners: List<Request.Listener> = emptyList()"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="CameraDevices.awaitCameraMetadata-FpsL5FU can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" val cameraMetadata = cameraPipe.cameras().awaitCameraMetadata(cameraId)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
@@ -615,6 +804,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="CameraStream.Config can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" val viewfinderStreamConfig = Config.create("
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Companion.create-bSQo6-Q can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" val viewfinderStreamConfig = Config.create("
errorLine2=" ~~~~~~">
@@ -660,6 +858,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="CameraStream.Config can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" val yuvStreamConfig = Config.create("
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Companion.create-bSQo6-Q can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" val yuvStreamConfig = Config.create("
errorLine2=" ~~~~~~">
@@ -687,6 +894,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="CameraGraph.Config can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" val config = CameraGraph.Config("
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="CameraPipe.create can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" val cameraGraph = cameraPipe.create(config)"
errorLine2=" ~~~~~~">
@@ -867,6 +1083,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="CameraGraph.Session can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" cameraGraph.acquireSessionOrNull()!!.use {"
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="CameraGraph.acquireSessionOrNull can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" cameraGraph.acquireSessionOrNull()!!.use {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
@@ -912,6 +1137,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="CameraPipe can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" cameraPipe: CameraPipe,"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="CameraDevices.awaitCameraMetadata-FpsL5FU can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" val cameraMetadata = cameraPipe.cameras().awaitCameraMetadata(cameraId)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
@@ -1074,6 +1308,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="CameraGraph.Session can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" cameraGraph.acquireSessionOrNull()!!.use {"
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="CameraGraph.acquireSessionOrNull can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" cameraGraph.acquireSessionOrNull()!!.use {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
@@ -1110,6 +1353,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="CameraGraph.Config can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" return configs.mapIndexed { i, config ->"
+ errorLine2=" ~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="CameraGraph.start can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" cameraGraph.start()"
errorLine2=" ~~~~~">
diff --git a/camera/integration-tests/coretestapp/lint-baseline.xml b/camera/integration-tests/coretestapp/lint-baseline.xml
index cf4ef0d..b215e32 100644
--- a/camera/integration-tests/coretestapp/lint-baseline.xml
+++ b/camera/integration-tests/coretestapp/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
@@ -390,15 +390,6 @@
<issue
id="RestrictedApiAndroidX"
- message="TransformationInfo.hasCameraTransform can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" mHasCameraTransform = transformationInfo.hasCameraTransform();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/core/OpenGLRenderer.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
message="TransformUtils.within360 can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" return within360((180 - mTextureRotationDegrees) + mSurfaceRotationDegrees);"
errorLine2=" ~~~~~~~~~">
diff --git a/camera/integration-tests/extensionstestapp/lint-baseline.xml b/camera/integration-tests/extensionstestapp/lint-baseline.xml
index f411714..1f2a8e8 100644
--- a/camera/integration-tests/extensionstestapp/lint-baseline.xml
+++ b/camera/integration-tests/extensionstestapp/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-alpha15" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-alpha15)" variant="all" version="8.2.0-alpha15">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="RestrictedApiAndroidX"
@@ -39,15 +39,6 @@
<issue
id="RestrictedApiAndroidX"
- message="CameraXExecutors.ioExecutor can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
- errorLine1=" imageAnalysis.setAnalyzer(CameraXExecutors.ioExecutor(), img -> {"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/extensions/CameraExtensionsActivity.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
message="Exif.createFromFile can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" val exif = Exif.createFromFile(tempFile)"
errorLine2=" ~~~~~~~~~~~~~~">
diff --git a/camera/integration-tests/extensionstestapp/src/main/java/androidx/camera/integration/extensions/Camera2ExtensionsActivity.kt b/camera/integration-tests/extensionstestapp/src/main/java/androidx/camera/integration/extensions/Camera2ExtensionsActivity.kt
index 4b61d64..7053aa6 100644
--- a/camera/integration-tests/extensionstestapp/src/main/java/androidx/camera/integration/extensions/Camera2ExtensionsActivity.kt
+++ b/camera/integration-tests/extensionstestapp/src/main/java/androidx/camera/integration/extensions/Camera2ExtensionsActivity.kt
@@ -757,7 +757,6 @@
* triggers to open the camera and capture session to start the preview with the extension mode
* enabled.
*/
- @Suppress("DEPRECATION") /* defaultDisplay */
private fun setupAndStartPreview(cameraId: String, extensionMode: Int) {
if (!textureView.isAvailable) {
Toast.makeText(
@@ -768,6 +767,12 @@
return
}
+ updatePreviewSize(cameraId, extensionMode)
+ startPreview(cameraId, extensionMode)
+ }
+
+ @Suppress("DEPRECATION") /* defaultDisplay */
+ private fun updatePreviewSize(cameraId: String, extensionMode: Int) {
val previewResolution = pickPreviewResolution(
cameraManager,
cameraId,
@@ -808,10 +813,7 @@
cameraSensorRotationDegrees,
lensFacing == CameraCharacteristics.LENS_FACING_BACK
)
-
- startPreview(cameraId, extensionMode)
}
-
/**
* Opens the camera and capture session to start the preview with the extension mode enabled.
*/
@@ -1059,6 +1061,8 @@
val newExtensionMode = currentExtensionMode
+ updatePreviewSize(currentCameraId, newExtensionMode)
+
lifecycleScope.launch(cameraTaskDispatcher) {
cameraCaptureSession =
openCaptureSession(newExtensionMode)
diff --git a/camera/integration-tests/timingtestapp/lint-baseline.xml b/camera/integration-tests/timingtestapp/lint-baseline.xml
index 70291d7..c36a0d1 100644
--- a/camera/integration-tests/timingtestapp/lint-baseline.xml
+++ b/camera/integration-tests/timingtestapp/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-alpha15" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-alpha15)" variant="all" version="8.2.0-alpha15">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
diff --git a/camera/integration-tests/uiwidgetstestapp/lint-baseline.xml b/camera/integration-tests/uiwidgetstestapp/lint-baseline.xml
index 6e4ccf9..29700ac 100644
--- a/camera/integration-tests/uiwidgetstestapp/lint-baseline.xml
+++ b/camera/integration-tests/uiwidgetstestapp/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha02" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="RestrictedApiAndroidX"
@@ -129,6 +129,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Exif can only be accessed from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
+ errorLine1=" private val exif: Exif"
+ errorLine2=" ~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/uiwidgets/rotations/ImageCaptureResult.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Exif.createFromInputStream can only be called from within the same library group (referenced groupId=`androidx.camera` from groupId=`androidx.camera.integration-tests`)"
errorLine1=" exif = Exif.createFromInputStream(inputStream!!)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
diff --git a/camera/integration-tests/viewtestapp/lint-baseline.xml b/camera/integration-tests/viewtestapp/lint-baseline.xml
index 6168e19..2f1ac7f 100644
--- a/camera/integration-tests/viewtestapp/lint-baseline.xml
+++ b/camera/integration-tests/viewtestapp/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="RestrictedApiAndroidX"
@@ -507,6 +507,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="OpenGlRenderer can only be accessed from within the same library (androidx.camera:camera-core)"
+ errorLine1=" private val glRenderer: OpenGlRenderer = OpenGlRenderer()"
+ errorLine2=" ~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/integration/view/ToneMappingSurfaceProcessor.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="OpenGlRenderer can only be called from within the same library (androidx.camera:camera-core)"
errorLine1=" private val glRenderer: OpenGlRenderer = OpenGlRenderer()"
errorLine2=" ~~~~~~~~~~~~~~">
diff --git a/car/app/app-automotive/lint-baseline.xml b/car/app/app-automotive/lint-baseline.xml
index 949fe8f..67c3ab1 100644
--- a/car/app/app-automotive/lint-baseline.xml
+++ b/car/app/app-automotive/lint-baseline.xml
@@ -1,5 +1,104 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-alpha15" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-alpha15)" variant="all" version="8.2.0-alpha15">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" static final List<CarZone> GLOBAL_CAR_ZONE = Arrays.asList(getGlobalCarZone());"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/info/AutomotiveCarInfo.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" static final ImmutableMap<Integer, List<CarZone>> ENERGY_LEVEL_REQUEST = ImmutableMap.<Integer,"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/info/AutomotiveCarInfo.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" private static final ImmutableMap<Integer, List<CarZone>> MILEAGE_REQUEST ="
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/info/AutomotiveCarInfo.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" static final ImmutableMap<Integer, List<CarZone>> TOLL_REQUEST = ImmutableMap.<Integer,"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/info/AutomotiveCarInfo.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" private static final ImmutableMap<Integer, List<CarZone>> SPEED_REQUEST = ImmutableMap.<Integer,"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/info/AutomotiveCarInfo.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" private static final ImmutableMap<Integer, List<CarZone>> EV_STATUS_REQUEST ="
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/info/AutomotiveCarInfo.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" private final OnCarDataAvailableListener<EvStatus> mEvStatusOnCarDataAvailableListener;"
+ errorLine2=" ~~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/info/AutomotiveCarInfo.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" EvStatusListener(OnCarDataAvailableListener<EvStatus> listener, Executor executor) {"
+ errorLine2=" ~~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/info/AutomotiveCarInfo.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" public abstract ImmutableMap<Set<CarZone>, Set<Integer>> getHvacFanDirection();"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/CarPropertyProfile.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" public abstract ImmutableMap<Set<CarZone>, Pair<T, T>> getCarZoneSetsToMinMaxRange();"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/CarPropertyProfile.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" public abstract ImmutableList<Set<CarZone>> getCarZones();"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/CarPropertyProfile.java"/>
+ </issue>
<issue
id="UnsafeOptInUsageError"
@@ -13,8 +112,89 @@
<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
- errorLine1=" fanDirectionValues.put(convertAreaIdToCarZones(CarZoneUtils.AreaType.SEAT,"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" public abstract Builder<T> setHvacFanDirection(@Nullable Map<Set<CarZone>,"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/CarPropertyProfile.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" @Nullable Map<Set<CarZone>, Pair<T, T>> minMaxRange);"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/CarPropertyProfile.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" @NonNull List<Set<CarZone>> carZones);"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/CarPropertyProfile.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" public abstract ImmutableList<CarZone> getCarZones();"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/CarPropertyResponse.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" public abstract Builder<T> setCarZones(@NonNull List<CarZone> carZones);"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/CarPropertyResponse.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" public abstract ImmutableList<CarZone> getCarZones();"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/GetPropertyRequest.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" public abstract Builder setCarZones(@NonNull List<CarZone> carZones);"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/GetPropertyRequest.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" @NonNull Map<Integer, List<CarZone>> propertyIdsToCarZones, float sampleRate,"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/PropertyManager.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" Map<Integer, List<CarZone>> propertyIdsToCarZones = new HashMap<>();"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/PropertyManager.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" Map<Set<CarZone>, Set<Integer>> fanDirectionValues = new HashMap<>();"
+ errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/car/app/hardware/common/PropertyRequestProcessor.java"/>
</issue>
@@ -23,7 +203,7 @@
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
errorLine1=" fanDirectionValues.put(convertAreaIdToCarZones(CarZoneUtils.AreaType.SEAT,"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/car/app/hardware/common/PropertyRequestProcessor.java"/>
</issue>
@@ -58,6 +238,24 @@
<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" Map<Set<CarZone>, Pair<Object, Object>> minMaxRange = new HashMap<>();"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/PropertyRequestProcessor.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" List<Set<CarZone>> carZones = new ArrayList<>();"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/PropertyRequestProcessor.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
errorLine1=" minMaxRange.put(convertAreaIdToCarZones(areaType,"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -67,15 +265,6 @@
<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
- errorLine1=" minMaxRange.put(convertAreaIdToCarZones(areaType,"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/car/app/hardware/common/PropertyRequestProcessor.java"/>
- </issue>
-
- <issue
- id="UnsafeOptInUsageError"
- message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
errorLine1=" carZones.add(convertAreaIdToCarZones(areaType, areaId));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -85,15 +274,6 @@
<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
- errorLine1=" carZones.add(convertAreaIdToCarZones(areaType, areaId));"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/car/app/hardware/common/PropertyRequestProcessor.java"/>
- </issue>
-
- <issue
- id="UnsafeOptInUsageError"
- message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
errorLine1=" append(HVAC_ELECTRIC_DEFROSTER_ON_PROPERTY_ID, CAR_PERMISSION_CLIMATE_CONTROL);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -110,6 +290,60 @@
</issue>
<issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" public static Map<Set<CarZone>, Pair<Integer, Integer>> getMinMaxProfileIntegerMap("
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/PropertyUtils.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" @NonNull Map<Set<CarZone>, ? extends Pair<?, ?>> minMaxRange) {"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/PropertyUtils.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" Map<Set<CarZone>, Pair<Integer, Integer>>"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/PropertyUtils.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" public static Map<Set<CarZone>, Pair<Float, Float>> getMinMaxProfileFloatMap("
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/PropertyUtils.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" @NonNull Map<Set<CarZone>, ? extends Pair<?, ?>> minMaxRange) {"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/PropertyUtils.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" Map<Set<CarZone>, Pair<Float, Float>>"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/PropertyUtils.java"/>
+ </issue>
+
+ <issue
id="SupportAnnotationUsage"
message="This annotation does not apply for type com.google.common.collect.ImmutableMap<java.util.Set<androidx.car.app.hardware.common.CarZone>,java.util.Set<java.lang.Integer>>; expected int"
errorLine1=" @HvacFanDirection"
diff --git a/car/app/app-projected/lint-baseline.xml b/car/app/app-projected/lint-baseline.xml
new file mode 100644
index 0000000..5f5d8bd
--- /dev/null
+++ b/car/app/app-projected/lint-baseline.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" private final CarResultStub<EvStatus> mEvStatusCarResultStub;"
+ errorLine2=" ~~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/info/ProjectedCarInfo.java"/>
+ </issue>
+
+</issues>
diff --git a/car/app/app-samples/showcase/common/lint-baseline.xml b/car/app/app-samples/showcase/common/lint-baseline.xml
index d9f9bc5..af8abfd 100644
--- a/car/app/app-samples/showcase/common/lint-baseline.xml
+++ b/car/app/app-samples/showcase/common/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-alpha14" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-alpha14)" variant="all" version="8.2.0-alpha14">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
@@ -22,6 +22,24 @@
<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" EvStatus mEvStatus;"
+ errorLine2=" ~~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/sample/showcase/common/renderer/CarHardwareRenderer.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" private final OnCarDataAvailableListener<EvStatus> mEvStatusListener = data -> {"
+ errorLine2=" ~~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/sample/showcase/common/renderer/CarHardwareRenderer.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
errorLine1=" .addAction(createFabBackAction())"
errorLine2=" ~~~~~~~~~">
<location
diff --git a/car/app/app/lint-baseline.xml b/car/app/app/lint-baseline.xml
index 8492f99..3e44987 100644
--- a/car/app/app/lint-baseline.xml
+++ b/car/app/app/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha02" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="MissingPermission"
@@ -336,7 +336,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" enumName = (String) nameMethod.invoke(obj);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -345,7 +345,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" Object obj = converter.invoke(null, binder);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -354,7 +354,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" return nameMethod.invoke(null, enumName);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -373,6 +373,33 @@
<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" private final List<CarZone> mCarZones;"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/hardware/common/CarValue.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" private final Badge mBadge;"
+ errorLine2=" ~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/model/GridItem.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
+ errorLine1=" Badge mBadge;"
+ errorLine2=" ~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/model/GridItem.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.car.app.annotations.ExperimentalCarApi` or `@OptIn(markerClass = androidx.car.app.annotations.ExperimentalCarApi.class)`"
errorLine1=" } else if (rowObj instanceof ConversationItem) {"
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
diff --git a/cardview/cardview/lint-baseline.xml b/cardview/cardview/lint-baseline.xml
index dbd37d1..cc40871 100644
--- a/cardview/cardview/lint-baseline.xml
+++ b/cardview/cardview/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
<issue
id="NewApi"
@@ -10,22 +10,4 @@
file="src/main/java/androidx/cardview/widget/CardView.java"/>
</issue>
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/cardview/widget/CardView.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1="@RequiresApi(17)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/cardview/widget/CardViewApi17Impl.java"/>
- </issue>
-
</issues>
diff --git a/collection/collection/api/current.txt b/collection/collection/api/current.txt
index a9eb715..387bef3 100644
--- a/collection/collection/api/current.txt
+++ b/collection/collection/api/current.txt
@@ -94,6 +94,70 @@
property public final int last;
}
+ public abstract sealed class DoubleList {
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final operator boolean contains(double element);
+ method public final boolean containsAll(androidx.collection.DoubleList elements);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final double elementAt(@IntRange(from=0L) int index);
+ method public final inline double elementAtOrElse(@IntRange(from=0L) int index, kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Double> defaultValue);
+ method public final double first();
+ method public final inline double first(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final inline <R> R fold(R initial, kotlin.jvm.functions.Function2<? super R,? super java.lang.Double,? extends R> operation);
+ method public final inline <R> R foldIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super R,? super java.lang.Double,? extends R> operation);
+ method public final inline <R> R foldRight(R initial, kotlin.jvm.functions.Function2<? super java.lang.Double,? super R,? extends R> operation);
+ method public final inline <R> R foldRightIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super java.lang.Double,? super R,? extends R> operation);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super java.lang.Double,kotlin.Unit> block);
+ method public final inline void forEachIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Double,kotlin.Unit> block);
+ method public final inline void forEachReversed(kotlin.jvm.functions.Function1<? super java.lang.Double,kotlin.Unit> block);
+ method public final inline void forEachReversedIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Double,kotlin.Unit> block);
+ method public final operator double get(@IntRange(from=0L) int index);
+ method public final inline kotlin.ranges.IntRange getIndices();
+ method @IntRange(from=-1L) public final inline int getLastIndex();
+ method @IntRange(from=0L) public final int getSize();
+ method public final int indexOf(double element);
+ method public final inline int indexOfFirst(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final inline int indexOfLast(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final double last();
+ method public final inline double last(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final int lastIndexOf(double element);
+ method public final boolean none();
+ method public final inline boolean reversedAny(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ property public final inline kotlin.ranges.IntRange indices;
+ property @IntRange(from=-1L) public final inline int lastIndex;
+ property @IntRange(from=0L) public final int size;
+ }
+
+ public final class DoubleListKt {
+ method public static androidx.collection.DoubleList doubleListOf();
+ method public static androidx.collection.DoubleList doubleListOf(double element1);
+ method public static androidx.collection.DoubleList doubleListOf(double element1, double element2);
+ method public static androidx.collection.DoubleList doubleListOf(double element1, double element2, double element3);
+ method public static androidx.collection.DoubleList doubleListOf(double... elements);
+ method public static androidx.collection.DoubleList emptyDoubleList();
+ method public static inline androidx.collection.MutableDoubleList mutableDoubleListOf();
+ method public static androidx.collection.MutableDoubleList mutableDoubleListOf(double element1);
+ method public static androidx.collection.MutableDoubleList mutableDoubleListOf(double element1, double element2);
+ method public static androidx.collection.MutableDoubleList mutableDoubleListOf(double element1, double element2, double element3);
+ method public static inline androidx.collection.MutableDoubleList mutableDoubleListOf(double... elements);
+ }
+
public abstract sealed class FloatFloatMap {
method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,java.lang.Boolean> predicate);
method public final boolean any();
@@ -1142,6 +1206,37 @@
method public static inline <K, V> androidx.collection.LruCache<K,V> lruCache(int maxSize, optional kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Integer> sizeOf, optional kotlin.jvm.functions.Function1<? super K,? extends V?> create, optional kotlin.jvm.functions.Function4<? super java.lang.Boolean,? super K,? super V,? super V?,kotlin.Unit> onEntryRemoved);
}
+ public final class MutableDoubleList extends androidx.collection.DoubleList {
+ ctor public MutableDoubleList(optional int initialCapacity);
+ method public boolean add(double element);
+ method public void add(@IntRange(from=0L) int index, double element);
+ method public boolean addAll(androidx.collection.DoubleList elements);
+ method public boolean addAll(double[] elements);
+ method public boolean addAll(@IntRange(from=0L) int index, androidx.collection.DoubleList elements);
+ method public boolean addAll(@IntRange(from=0L) int index, double[] elements);
+ method public void clear();
+ method public void ensureCapacity(int capacity);
+ method public inline int getCapacity();
+ method public operator void minusAssign(androidx.collection.DoubleList elements);
+ method public inline operator void minusAssign(double element);
+ method public operator void minusAssign(double[] elements);
+ method public operator void plusAssign(androidx.collection.DoubleList elements);
+ method public inline operator void plusAssign(double element);
+ method public operator void plusAssign(double[] elements);
+ method public boolean remove(double element);
+ method public boolean removeAll(androidx.collection.DoubleList elements);
+ method public boolean removeAll(double[] elements);
+ method public double removeAt(@IntRange(from=0L) int index);
+ method public void removeRange(@IntRange(from=0L) int start, @IntRange(from=0L) int end);
+ method public boolean retainAll(androidx.collection.DoubleList elements);
+ method public boolean retainAll(double[] elements);
+ method public operator double set(@IntRange(from=0L) int index, double element);
+ method public void sort();
+ method public void sortDescending();
+ method public void trim(optional int minCapacity);
+ property public final inline int capacity;
+ }
+
public final class MutableFloatFloatMap extends androidx.collection.FloatFloatMap {
ctor public MutableFloatFloatMap(optional int initialCapacity);
method public void clear();
diff --git a/collection/collection/api/restricted_current.txt b/collection/collection/api/restricted_current.txt
index 91368d2..8b4f85d 100644
--- a/collection/collection/api/restricted_current.txt
+++ b/collection/collection/api/restricted_current.txt
@@ -94,6 +94,72 @@
property public final int last;
}
+ public abstract sealed class DoubleList {
+ method public final boolean any();
+ method public final inline boolean any(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final operator boolean contains(double element);
+ method public final boolean containsAll(androidx.collection.DoubleList elements);
+ method public final int count();
+ method public final inline int count(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final double elementAt(@IntRange(from=0L) int index);
+ method public final inline double elementAtOrElse(@IntRange(from=0L) int index, kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Double> defaultValue);
+ method public final double first();
+ method public final inline double first(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final inline <R> R fold(R initial, kotlin.jvm.functions.Function2<? super R,? super java.lang.Double,? extends R> operation);
+ method public final inline <R> R foldIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super R,? super java.lang.Double,? extends R> operation);
+ method public final inline <R> R foldRight(R initial, kotlin.jvm.functions.Function2<? super java.lang.Double,? super R,? extends R> operation);
+ method public final inline <R> R foldRightIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super java.lang.Double,? super R,? extends R> operation);
+ method public final inline void forEach(kotlin.jvm.functions.Function1<? super java.lang.Double,kotlin.Unit> block);
+ method public final inline void forEachIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Double,kotlin.Unit> block);
+ method public final inline void forEachReversed(kotlin.jvm.functions.Function1<? super java.lang.Double,kotlin.Unit> block);
+ method public final inline void forEachReversedIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.Double,kotlin.Unit> block);
+ method public final operator double get(@IntRange(from=0L) int index);
+ method public final inline kotlin.ranges.IntRange getIndices();
+ method @IntRange(from=-1L) public final inline int getLastIndex();
+ method @IntRange(from=0L) public final int getSize();
+ method public final int indexOf(double element);
+ method public final inline int indexOfFirst(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final inline int indexOfLast(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final boolean isEmpty();
+ method public final boolean isNotEmpty();
+ method public final String joinToString();
+ method public final String joinToString(optional CharSequence separator);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit);
+ method public final String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, optional CharSequence truncated, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, optional int limit, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, optional CharSequence postfix, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, optional CharSequence prefix, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(optional CharSequence separator, kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final inline String joinToString(kotlin.jvm.functions.Function1<? super java.lang.Double,? extends java.lang.CharSequence> transform);
+ method public final double last();
+ method public final inline double last(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ method public final int lastIndexOf(double element);
+ method public final boolean none();
+ method public final inline boolean reversedAny(kotlin.jvm.functions.Function1<? super java.lang.Double,java.lang.Boolean> predicate);
+ property public final inline kotlin.ranges.IntRange indices;
+ property @IntRange(from=-1L) public final inline int lastIndex;
+ property @IntRange(from=0L) public final int size;
+ field @kotlin.PublishedApi internal int _size;
+ field @kotlin.PublishedApi internal double[] content;
+ }
+
+ public final class DoubleListKt {
+ method public static androidx.collection.DoubleList doubleListOf();
+ method public static androidx.collection.DoubleList doubleListOf(double element1);
+ method public static androidx.collection.DoubleList doubleListOf(double element1, double element2);
+ method public static androidx.collection.DoubleList doubleListOf(double element1, double element2, double element3);
+ method public static androidx.collection.DoubleList doubleListOf(double... elements);
+ method public static androidx.collection.DoubleList emptyDoubleList();
+ method public static inline androidx.collection.MutableDoubleList mutableDoubleListOf();
+ method public static androidx.collection.MutableDoubleList mutableDoubleListOf(double element1);
+ method public static androidx.collection.MutableDoubleList mutableDoubleListOf(double element1, double element2);
+ method public static androidx.collection.MutableDoubleList mutableDoubleListOf(double element1, double element2, double element3);
+ method public static inline androidx.collection.MutableDoubleList mutableDoubleListOf(double... elements);
+ }
+
public abstract sealed class FloatFloatMap {
method public final inline boolean all(kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,java.lang.Boolean> predicate);
method public final boolean any();
@@ -1214,6 +1280,37 @@
method public static inline <K, V> androidx.collection.LruCache<K,V> lruCache(int maxSize, optional kotlin.jvm.functions.Function2<? super K,? super V,java.lang.Integer> sizeOf, optional kotlin.jvm.functions.Function1<? super K,? extends V?> create, optional kotlin.jvm.functions.Function4<? super java.lang.Boolean,? super K,? super V,? super V?,kotlin.Unit> onEntryRemoved);
}
+ public final class MutableDoubleList extends androidx.collection.DoubleList {
+ ctor public MutableDoubleList(optional int initialCapacity);
+ method public boolean add(double element);
+ method public void add(@IntRange(from=0L) int index, double element);
+ method public boolean addAll(androidx.collection.DoubleList elements);
+ method public boolean addAll(double[] elements);
+ method public boolean addAll(@IntRange(from=0L) int index, androidx.collection.DoubleList elements);
+ method public boolean addAll(@IntRange(from=0L) int index, double[] elements);
+ method public void clear();
+ method public void ensureCapacity(int capacity);
+ method public inline int getCapacity();
+ method public operator void minusAssign(androidx.collection.DoubleList elements);
+ method public inline operator void minusAssign(double element);
+ method public operator void minusAssign(double[] elements);
+ method public operator void plusAssign(androidx.collection.DoubleList elements);
+ method public inline operator void plusAssign(double element);
+ method public operator void plusAssign(double[] elements);
+ method public boolean remove(double element);
+ method public boolean removeAll(androidx.collection.DoubleList elements);
+ method public boolean removeAll(double[] elements);
+ method public double removeAt(@IntRange(from=0L) int index);
+ method public void removeRange(@IntRange(from=0L) int start, @IntRange(from=0L) int end);
+ method public boolean retainAll(androidx.collection.DoubleList elements);
+ method public boolean retainAll(double[] elements);
+ method public operator double set(@IntRange(from=0L) int index, double element);
+ method public void sort();
+ method public void sortDescending();
+ method public void trim(optional int minCapacity);
+ property public final inline int capacity;
+ }
+
public final class MutableFloatFloatMap extends androidx.collection.FloatFloatMap {
ctor public MutableFloatFloatMap(optional int initialCapacity);
method public void clear();
diff --git a/collection/collection/src/commonMain/kotlin/androidx/collection/DoubleList.kt b/collection/collection/src/commonMain/kotlin/androidx/collection/DoubleList.kt
new file mode 100644
index 0000000..9ba38be
--- /dev/null
+++ b/collection/collection/src/commonMain/kotlin/androidx/collection/DoubleList.kt
@@ -0,0 +1,972 @@
+/*
+ * 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.
+ */
+@file:Suppress("NOTHING_TO_INLINE", "RedundantVisibilityModifier")
+@file:OptIn(ExperimentalContracts::class)
+
+package androidx.collection
+
+import kotlin.contracts.ExperimentalContracts
+import kotlin.contracts.contract
+import kotlin.jvm.JvmField
+import kotlin.jvm.JvmOverloads
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// DO NOT MAKE CHANGES to the kotlin source file.
+//
+// This file was generated from a template in the template directory.
+// Make a change to the original template and run the generateCollections.sh script
+// to ensure the change is available on all versions of the map.
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+/**
+ * [DoubleList] is a [List]-like collection for [Double] values. It allows retrieving
+ * the elements without boxing. [DoubleList] is always backed by a [MutableDoubleList],
+ * its [MutableList]-like subclass.
+ *
+ * This implementation is not thread-safe: if multiple threads access this
+ * container concurrently, and one or more threads modify the structure of
+ * the list (insertion or removal for instance), the calling code must provide
+ * the appropriate synchronization. It is also not safe to mutate during reentrancy --
+ * in the middle of a [forEach], for example. However, concurrent reads are safe.
+ */
+public sealed class DoubleList(initialCapacity: Int) {
+ @JvmField
+ @PublishedApi
+ internal var content: DoubleArray = if (initialCapacity == 0) {
+ EmptyDoubleArray
+ } else {
+ DoubleArray(initialCapacity)
+ }
+
+ @Suppress("PropertyName")
+ @JvmField
+ @PublishedApi
+ internal var _size: Int = 0
+
+ /**
+ * The number of elements in the [DoubleList].
+ */
+ @get:androidx.annotation.IntRange(from = 0)
+ public val size: Int
+ get() = _size
+
+ /**
+ * Returns the last valid index in the [DoubleList]. This can be `-1` when the list is empty.
+ */
+ @get:androidx.annotation.IntRange(from = -1)
+ public inline val lastIndex: Int get() = _size - 1
+
+ /**
+ * Returns an [IntRange] of the valid indices for this [DoubleList].
+ */
+ public inline val indices: IntRange get() = 0 until _size
+
+ /**
+ * Returns `true` if the collection has no elements in it.
+ */
+ public fun none(): Boolean {
+ return isEmpty()
+ }
+
+ /**
+ * Returns `true` if there's at least one element in the collection.
+ */
+ public fun any(): Boolean {
+ return isNotEmpty()
+ }
+
+ /**
+ * Returns `true` if any of the elements give a `true` return value for [predicate].
+ */
+ public inline fun any(predicate: (element: Double) -> Boolean): Boolean {
+ contract { callsInPlace(predicate) }
+ forEach {
+ if (predicate(it)) {
+ return true
+ }
+ }
+ return false
+ }
+
+ /**
+ * Returns `true` if any of the elements give a `true` return value for [predicate] while
+ * iterating in the reverse order.
+ */
+ public inline fun reversedAny(predicate: (element: Double) -> Boolean): Boolean {
+ contract { callsInPlace(predicate) }
+ forEachReversed {
+ if (predicate(it)) {
+ return true
+ }
+ }
+ return false
+ }
+
+ /**
+ * Returns `true` if the [DoubleList] contains [element] or `false` otherwise.
+ */
+ public operator fun contains(element: Double): Boolean {
+ forEach {
+ if (it == element) {
+ return true
+ }
+ }
+ return false
+ }
+
+ /**
+ * Returns `true` if the [DoubleList] contains all elements in [elements] or `false` if
+ * one or more are missing.
+ */
+ public fun containsAll(elements: DoubleList): Boolean {
+ for (i in elements.indices) {
+ if (!contains(elements[i])) return false
+ }
+ return true
+ }
+
+ /**
+ * Returns the number of elements in this list.
+ */
+ public fun count(): Int = _size
+
+ /**
+ * Counts the number of elements matching [predicate].
+ * @return The number of elements in this list for which [predicate] returns true.
+ */
+ public inline fun count(predicate: (element: Double) -> Boolean): Int {
+ contract { callsInPlace(predicate) }
+ var count = 0
+ forEach { if (predicate(it)) count++ }
+ return count
+ }
+
+ /**
+ * Returns the first element in the [DoubleList] or throws a [NoSuchElementException] if
+ * it [isEmpty].
+ */
+ public fun first(): Double {
+ if (isEmpty()) {
+ throw NoSuchElementException("DoubleList is empty.")
+ }
+ return content[0]
+ }
+
+ /**
+ * Returns the first element in the [DoubleList] for which [predicate] returns `true` or
+ * throws [NoSuchElementException] if nothing matches.
+ * @see indexOfFirst
+ */
+ public inline fun first(predicate: (element: Double) -> Boolean): Double {
+ contract { callsInPlace(predicate) }
+ forEach { item ->
+ if (predicate(item)) return item
+ }
+ throw NoSuchElementException("DoubleList contains no element matching the predicate.")
+ }
+
+ /**
+ * Accumulates values, starting with [initial], and applying [operation] to each element
+ * in the [DoubleList] in order.
+ * @param initial The value of `acc` for the first call to [operation] or return value if
+ * there are no elements in this list.
+ * @param operation function that takes current accumulator value and an element, and
+ * calculates the next accumulator value.
+ */
+ public inline fun <R> fold(initial: R, operation: (acc: R, element: Double) -> R): R {
+ contract { callsInPlace(operation) }
+ var acc = initial
+ forEach { item ->
+ acc = operation(acc, item)
+ }
+ return acc
+ }
+
+ /**
+ * Accumulates values, starting with [initial], and applying [operation] to each element
+ * in the [DoubleList] in order.
+ */
+ public inline fun <R> foldIndexed(
+ initial: R,
+ operation: (index: Int, acc: R, element: Double) -> R
+ ): R {
+ contract { callsInPlace(operation) }
+ var acc = initial
+ forEachIndexed { i, item ->
+ acc = operation(i, acc, item)
+ }
+ return acc
+ }
+
+ /**
+ * Accumulates values, starting with [initial], and applying [operation] to each element
+ * in the [DoubleList] in reverse order.
+ * @param initial The value of `acc` for the first call to [operation] or return value if
+ * there are no elements in this list.
+ * @param operation function that takes an element and the current accumulator value, and
+ * calculates the next accumulator value.
+ */
+ public inline fun <R> foldRight(initial: R, operation: (element: Double, acc: R) -> R): R {
+ contract { callsInPlace(operation) }
+ var acc = initial
+ forEachReversed { item ->
+ acc = operation(item, acc)
+ }
+ return acc
+ }
+
+ /**
+ * Accumulates values, starting with [initial], and applying [operation] to each element
+ * in the [DoubleList] in reverse order.
+ */
+ public inline fun <R> foldRightIndexed(
+ initial: R,
+ operation: (index: Int, element: Double, acc: R) -> R
+ ): R {
+ contract { callsInPlace(operation) }
+ var acc = initial
+ forEachReversedIndexed { i, item ->
+ acc = operation(i, item, acc)
+ }
+ return acc
+ }
+
+ /**
+ * Calls [block] for each element in the [DoubleList], in order.
+ * @param block will be executed for every element in the list, accepting an element from
+ * the list
+ */
+ public inline fun forEach(block: (element: Double) -> Unit) {
+ contract { callsInPlace(block) }
+ val content = content
+ for (i in 0 until _size) {
+ block(content[i])
+ }
+ }
+
+ /**
+ * Calls [block] for each element in the [DoubleList] along with its index, in order.
+ * @param block will be executed for every element in the list, accepting the index and
+ * the element at that index.
+ */
+ public inline fun forEachIndexed(block: (index: Int, element: Double) -> Unit) {
+ contract { callsInPlace(block) }
+ val content = content
+ for (i in 0 until _size) {
+ block(i, content[i])
+ }
+ }
+
+ /**
+ * Calls [block] for each element in the [DoubleList] in reverse order.
+ * @param block will be executed for every element in the list, accepting an element from
+ * the list
+ */
+ public inline fun forEachReversed(block: (element: Double) -> Unit) {
+ contract { callsInPlace(block) }
+ val content = content
+ for (i in _size - 1 downTo 0) {
+ block(content[i])
+ }
+ }
+
+ /**
+ * Calls [block] for each element in the [DoubleList] along with its index, in reverse
+ * order.
+ * @param block will be executed for every element in the list, accepting the index and
+ * the element at that index.
+ */
+ public inline fun forEachReversedIndexed(block: (index: Int, element: Double) -> Unit) {
+ contract { callsInPlace(block) }
+ val content = content
+ for (i in _size - 1 downTo 0) {
+ block(i, content[i])
+ }
+ }
+
+ /**
+ * Returns the element at the given [index] or throws [IndexOutOfBoundsException] if
+ * the [index] is out of bounds of this collection.
+ */
+ public operator fun get(@androidx.annotation.IntRange(from = 0) index: Int): Double {
+ if (index !in 0 until _size) {
+ throw IndexOutOfBoundsException("Index $index must be in 0..$lastIndex")
+ }
+ return content[index]
+ }
+
+ /**
+ * Returns the element at the given [index] or throws [IndexOutOfBoundsException] if
+ * the [index] is out of bounds of this collection.
+ */
+ public fun elementAt(@androidx.annotation.IntRange(from = 0) index: Int): Double {
+ if (index !in 0 until _size) {
+ throw IndexOutOfBoundsException("Index $index must be in 0..$lastIndex")
+ }
+ return content[index]
+ }
+
+ /**
+ * Returns the element at the given [index] or [defaultValue] if [index] is out of bounds
+ * of the collection.
+ * @param index The index of the element whose value should be returned
+ * @param defaultValue A lambda to call with [index] as a parameter to return a value at
+ * an index not in the list.
+ */
+ public inline fun elementAtOrElse(
+ @androidx.annotation.IntRange(from = 0) index: Int,
+ defaultValue: (index: Int) -> Double
+ ): Double {
+ if (index !in 0 until _size) {
+ return defaultValue(index)
+ }
+ return content[index]
+ }
+
+ /**
+ * Returns the index of [element] in the [DoubleList] or `-1` if [element] is not there.
+ */
+ public fun indexOf(element: Double): Int {
+ forEachIndexed { i, item ->
+ if (element == item) {
+ return i
+ }
+ }
+ return -1
+ }
+
+ /**
+ * Returns the index if the first element in the [DoubleList] for which [predicate]
+ * returns `true`.
+ */
+ public inline fun indexOfFirst(predicate: (element: Double) -> Boolean): Int {
+ contract { callsInPlace(predicate) }
+ forEachIndexed { i, item ->
+ if (predicate(item)) {
+ return i
+ }
+ }
+ return -1
+ }
+
+ /**
+ * Returns the index if the last element in the [DoubleList] for which [predicate]
+ * returns `true`.
+ */
+ public inline fun indexOfLast(predicate: (element: Double) -> Boolean): Int {
+ contract { callsInPlace(predicate) }
+ forEachReversedIndexed { i, item ->
+ if (predicate(item)) {
+ return i
+ }
+ }
+ return -1
+ }
+
+ /**
+ * Returns `true` if the [DoubleList] has no elements in it or `false` otherwise.
+ */
+ public fun isEmpty(): Boolean = _size == 0
+
+ /**
+ * Returns `true` if there are elements in the [DoubleList] or `false` if it is empty.
+ */
+ public fun isNotEmpty(): Boolean = _size != 0
+
+ /**
+ * Returns the last element in the [DoubleList] or throws a [NoSuchElementException] if
+ * it [isEmpty].
+ */
+ public fun last(): Double {
+ if (isEmpty()) {
+ throw NoSuchElementException("DoubleList is empty.")
+ }
+ return content[lastIndex]
+ }
+
+ /**
+ * Returns the last element in the [DoubleList] for which [predicate] returns `true` or
+ * throws [NoSuchElementException] if nothing matches.
+ * @see indexOfLast
+ */
+ public inline fun last(predicate: (element: Double) -> Boolean): Double {
+ contract { callsInPlace(predicate) }
+ forEachReversed { item ->
+ if (predicate(item)) {
+ return item
+ }
+ }
+ throw NoSuchElementException("DoubleList contains no element matching the predicate.")
+ }
+
+ /**
+ * Returns the index of the last element in the [DoubleList] that is the same as
+ * [element] or `-1` if no elements match.
+ */
+ public fun lastIndexOf(element: Double): Int {
+ forEachReversedIndexed { i, item ->
+ if (item == element) {
+ return i
+ }
+ }
+ return -1
+ }
+
+ /**
+ * Creates a String from the elements separated by [separator] and using [prefix] before
+ * and [postfix] after, if supplied.
+ *
+ * When a non-negative value of [limit] is provided, a maximum of [limit] items are used
+ * to generate the string. If the collection holds more than [limit] items, the string
+ * is terminated with [truncated].
+ */
+ @JvmOverloads
+ public fun joinToString(
+ separator: CharSequence = ", ",
+ prefix: CharSequence = "",
+ postfix: CharSequence = "", // I know this should be suffix, but this is kotlin's name
+ limit: Int = -1,
+ truncated: CharSequence = "...",
+ ): String = buildString {
+ append(prefix)
+ [email protected] { index, element ->
+ if (index == limit) {
+ append(truncated)
+ return@buildString
+ }
+ if (index != 0) {
+ append(separator)
+ }
+ append(element)
+ }
+ append(postfix)
+ }
+
+ /**
+ * Creates a String from the elements separated by [separator] and using [prefix] before
+ * and [postfix] after, if supplied. [transform] dictates how each element will be represented.
+ *
+ * When a non-negative value of [limit] is provided, a maximum of [limit] items are used
+ * to generate the string. If the collection holds more than [limit] items, the string
+ * is terminated with [truncated].
+ */
+ @JvmOverloads
+ public inline fun joinToString(
+ separator: CharSequence = ", ",
+ prefix: CharSequence = "",
+ postfix: CharSequence = "", // I know this should be suffix, but this is kotlin's name
+ limit: Int = -1,
+ truncated: CharSequence = "...",
+ crossinline transform: (Double) -> CharSequence
+ ): String = buildString {
+ append(prefix)
+ [email protected] { index, element ->
+ if (index == limit) {
+ append(truncated)
+ return@buildString
+ }
+ if (index != 0) {
+ append(separator)
+ }
+ append(transform(element))
+ }
+ append(postfix)
+ }
+
+ /**
+ * Returns a hash code based on the contents of the [DoubleList].
+ */
+ override fun hashCode(): Int {
+ var hashCode = 0
+ forEach { element ->
+ hashCode += 31 * element.hashCode()
+ }
+ return hashCode
+ }
+
+ /**
+ * Returns `true` if [other] is a [DoubleList] and the contents of this and [other] are the
+ * same.
+ */
+ override fun equals(other: Any?): Boolean {
+ if (other !is DoubleList || other._size != _size) {
+ return false
+ }
+ val content = content
+ val otherContent = other.content
+ for (i in indices) {
+ if (content[i] != otherContent[i]) {
+ return false
+ }
+ }
+ return true
+ }
+
+ /**
+ * Returns a String representation of the list, surrounded by "[]" and each element
+ * separated by ", ".
+ */
+ override fun toString(): String = joinToString(prefix = "[", postfix = "]")
+}
+
+/**
+ * [MutableDoubleList] is a [MutableList]-like collection for [Double] values.
+ * It allows storing and retrieving the elements without boxing. Immutable
+ * access is available through its base class [DoubleList], which has a [List]-like
+ * interface.
+ *
+ * This implementation is not thread-safe: if multiple threads access this
+ * container concurrently, and one or more threads modify the structure of
+ * the list (insertion or removal for instance), the calling code must provide
+ * the appropriate synchronization. It is also not safe to mutate during reentrancy --
+ * in the middle of a [forEach], for example. However, concurrent reads are safe.
+ *
+ * @constructor Creates a [MutableDoubleList] with a [capacity] of `initialCapacity`.
+ */
+public class MutableDoubleList(
+ initialCapacity: Int = 16
+) : DoubleList(initialCapacity) {
+ /**
+ * Returns the total number of elements that can be held before the [MutableDoubleList] must
+ * grow.
+ *
+ * @see ensureCapacity
+ */
+ public inline val capacity: Int
+ get() = content.size
+
+ /**
+ * Adds [element] to the [MutableDoubleList] and returns `true`.
+ */
+ public fun add(element: Double): Boolean {
+ ensureCapacity(_size + 1)
+ content[_size] = element
+ _size++
+ return true
+ }
+
+ /**
+ * Adds [element] to the [MutableDoubleList] at the given [index], shifting over any
+ * elements at [index] and after, if any.
+ * @throws IndexOutOfBoundsException if [index] isn't between 0 and [size], inclusive
+ */
+ public fun add(@androidx.annotation.IntRange(from = 0) index: Int, element: Double) {
+ if (index !in 0.._size) {
+ throw IndexOutOfBoundsException("Index $index must be in 0..$_size")
+ }
+ ensureCapacity(_size + 1)
+ val content = content
+ if (index != _size) {
+ content.copyInto(
+ destination = content,
+ destinationOffset = index + 1,
+ startIndex = index,
+ endIndex = _size
+ )
+ }
+ content[index] = element
+ _size++
+ }
+
+ /**
+ * Adds all [elements] to the [MutableDoubleList] at the given [index], shifting over any
+ * elements at [index] and after, if any.
+ * @return `true` if the [MutableDoubleList] was changed or `false` if [elements] was empty
+ * @throws IndexOutOfBoundsException if [index] isn't between 0 and [size], inclusive.
+ */
+ public fun addAll(
+ @androidx.annotation.IntRange(from = 0) index: Int,
+ elements: DoubleArray
+ ): Boolean {
+ if (index !in 0.._size) {
+ throw IndexOutOfBoundsException("Index $index must be in 0..$_size")
+ }
+ if (elements.isEmpty()) return false
+ ensureCapacity(_size + elements.size)
+ val content = content
+ if (index != _size) {
+ content.copyInto(
+ destination = content,
+ destinationOffset = index + elements.size,
+ startIndex = index,
+ endIndex = _size
+ )
+ }
+ elements.copyInto(content, index)
+ _size += elements.size
+ return true
+ }
+
+ /**
+ * Adds all [elements] to the [MutableDoubleList] at the given [index], shifting over any
+ * elements at [index] and after, if any.
+ * @return `true` if the [MutableDoubleList] was changed or `false` if [elements] was empty
+ * @throws IndexOutOfBoundsException if [index] isn't between 0 and [size], inclusive
+ */
+ public fun addAll(
+ @androidx.annotation.IntRange(from = 0) index: Int,
+ elements: DoubleList
+ ): Boolean {
+ if (index !in 0.._size) {
+ throw IndexOutOfBoundsException("Index $index must be in 0..$_size")
+ }
+ if (elements.isEmpty()) return false
+ ensureCapacity(_size + elements._size)
+ val content = content
+ if (index != _size) {
+ content.copyInto(
+ destination = content,
+ destinationOffset = index + elements._size,
+ startIndex = index,
+ endIndex = _size
+ )
+ }
+ elements.content.copyInto(
+ destination = content,
+ destinationOffset = index,
+ startIndex = 0,
+ endIndex = elements._size
+ )
+ _size += elements._size
+ return true
+ }
+
+ /**
+ * Adds all [elements] to the end of the [MutableDoubleList] and returns `true` if the
+ * [MutableDoubleList] was changed or `false` if [elements] was empty.
+ */
+ public fun addAll(elements: DoubleList): Boolean {
+ return addAll(_size, elements)
+ }
+
+ /**
+ * Adds all [elements] to the end of the [MutableDoubleList] and returns `true` if the
+ * [MutableDoubleList] was changed or `false` if [elements] was empty.
+ */
+ public fun addAll(elements: DoubleArray): Boolean {
+ return addAll(_size, elements)
+ }
+
+ /**
+ * Adds all [elements] to the end of the [MutableDoubleList].
+ */
+ public operator fun plusAssign(elements: DoubleList) {
+ addAll(_size, elements)
+ }
+
+ /**
+ * Adds all [elements] to the end of the [MutableDoubleList].
+ */
+ public operator fun plusAssign(elements: DoubleArray) {
+ addAll(_size, elements)
+ }
+
+ /**
+ * Removes all elements in the [MutableDoubleList]. The storage isn't released.
+ * @see trim
+ */
+ public fun clear() {
+ _size = 0
+ }
+
+ /**
+ * Reduces the internal storage. If [capacity] is greater than [minCapacity] and [size], the
+ * internal storage is reduced to the maximum of [size] and [minCapacity].
+ * @see ensureCapacity
+ */
+ public fun trim(minCapacity: Int = _size) {
+ val minSize = maxOf(minCapacity, _size)
+ if (capacity > minSize) {
+ content = content.copyOf(minSize)
+ }
+ }
+
+ /**
+ * Ensures that there is enough space to store [capacity] elements in the [MutableDoubleList].
+ * @see trim
+ */
+ public fun ensureCapacity(capacity: Int) {
+ val oldContent = content
+ if (oldContent.size < capacity) {
+ val newSize = maxOf(capacity, oldContent.size * 3 / 2)
+ content = oldContent.copyOf(newSize)
+ }
+ }
+
+ /**
+ * [add] [element] to the [MutableDoubleList].
+ */
+ public inline operator fun plusAssign(element: Double) {
+ add(element)
+ }
+
+ /**
+ * [remove] [element] from the [MutableDoubleList]
+ */
+ public inline operator fun minusAssign(element: Double) {
+ remove(element)
+ }
+
+ /**
+ * Removes [element] from the [MutableDoubleList]. If [element] was in the [MutableDoubleList]
+ * and was removed, `true` will be returned, or `false` will be returned if the element
+ * was not found.
+ */
+ public fun remove(element: Double): Boolean {
+ val index = indexOf(element)
+ if (index >= 0) {
+ removeAt(index)
+ return true
+ }
+ return false
+ }
+
+ /**
+ * Removes all [elements] from the [MutableDoubleList] and returns `true` if anything was removed.
+ */
+ public fun removeAll(elements: DoubleArray): Boolean {
+ val initialSize = _size
+ for (i in elements.indices) {
+ remove(elements[i])
+ }
+ return initialSize != _size
+ }
+
+ /**
+ * Removes all [elements] from the [MutableDoubleList] and returns `true` if anything was removed.
+ */
+ public fun removeAll(elements: DoubleList): Boolean {
+ val initialSize = _size
+ for (i in 0..elements.lastIndex) {
+ remove(elements[i])
+ }
+ return initialSize != _size
+ }
+
+ /**
+ * Removes all [elements] from the [MutableDoubleList].
+ */
+ public operator fun minusAssign(elements: DoubleArray) {
+ elements.forEach { element ->
+ remove(element)
+ }
+ }
+
+ /**
+ * Removes all [elements] from the [MutableDoubleList].
+ */
+ public operator fun minusAssign(elements: DoubleList) {
+ elements.forEach { element ->
+ remove(element)
+ }
+ }
+
+ /**
+ * Removes the element at the given [index] and returns it.
+ * @throws IndexOutOfBoundsException if [index] isn't between 0 and [lastIndex], inclusive
+ */
+ public fun removeAt(@androidx.annotation.IntRange(from = 0) index: Int): Double {
+ if (index !in 0 until _size) {
+ throw IndexOutOfBoundsException("Index $index must be in 0..$lastIndex")
+ }
+ val content = content
+ val item = content[index]
+ if (index != lastIndex) {
+ content.copyInto(
+ destination = content,
+ destinationOffset = index,
+ startIndex = index + 1,
+ endIndex = _size
+ )
+ }
+ _size--
+ return item
+ }
+
+ /**
+ * Removes items from index [start] (inclusive) to [end] (exclusive).
+ * @throws IndexOutOfBoundsException if [start] or [end] isn't between 0 and [size], inclusive
+ * @throws IllegalArgumentException if [start] is greater than [end]
+ */
+ public fun removeRange(
+ @androidx.annotation.IntRange(from = 0) start: Int,
+ @androidx.annotation.IntRange(from = 0) end: Int
+ ) {
+ if (start !in 0.._size || end !in 0.._size) {
+ throw IndexOutOfBoundsException("Start ($start) and end ($end) must be in 0..$_size")
+ }
+ if (end < start) {
+ throw IllegalArgumentException("Start ($start) is more than end ($end)")
+ }
+ if (end != start) {
+ if (end < _size) {
+ content.copyInto(
+ destination = content,
+ destinationOffset = start,
+ startIndex = end,
+ endIndex = _size
+ )
+ }
+ _size -= (end - start)
+ }
+ }
+
+ /**
+ * Keeps only [elements] in the [MutableDoubleList] and removes all other values.
+ * @return `true` if the [MutableDoubleList] has changed.
+ */
+ public fun retainAll(elements: DoubleArray): Boolean {
+ val initialSize = _size
+ val content = content
+ for (i in lastIndex downTo 0) {
+ val item = content[i]
+ if (elements.indexOfFirst { it == item } < 0) {
+ removeAt(i)
+ }
+ }
+ return initialSize != _size
+ }
+
+ /**
+ * Keeps only [elements] in the [MutableDoubleList] and removes all other values.
+ * @return `true` if the [MutableDoubleList] has changed.
+ */
+ public fun retainAll(elements: DoubleList): Boolean {
+ val initialSize = _size
+ val content = content
+ for (i in lastIndex downTo 0) {
+ val item = content[i]
+ if (item !in elements) {
+ removeAt(i)
+ }
+ }
+ return initialSize != _size
+ }
+
+ /**
+ * Sets the value at [index] to [element].
+ * @return the previous value set at [index]
+ * @throws IndexOutOfBoundsException if [index] isn't between 0 and [lastIndex], inclusive
+ */
+ public operator fun set(
+ @androidx.annotation.IntRange(from = 0) index: Int,
+ element: Double
+ ): Double {
+ if (index !in 0 until _size) {
+ throw IndexOutOfBoundsException("set index $index must be between 0 .. $lastIndex")
+ }
+ val content = content
+ val old = content[index]
+ content[index] = element
+ return old
+ }
+
+ /**
+ * Sorts the [MutableDoubleList] elements in ascending order.
+ */
+ public fun sort() {
+ content.sort(fromIndex = 0, toIndex = _size)
+ }
+
+ /**
+ * Sorts the [MutableDoubleList] elements in descending order.
+ */
+ public fun sortDescending() {
+ content.sortDescending(fromIndex = 0, toIndex = _size)
+ }
+}
+
+private val EmptyDoubleList: DoubleList = MutableDoubleList(0)
+
+/**
+ * @return a read-only [DoubleList] with nothing in it.
+ */
+public fun emptyDoubleList(): DoubleList = EmptyDoubleList
+
+/**
+ * @return a read-only [DoubleList] with nothing in it.
+ */
+public fun doubleListOf(): DoubleList = EmptyDoubleList
+
+/**
+ * @return a new read-only [DoubleList] with [element1] as the only item in the list.
+ */
+public fun doubleListOf(element1: Double): DoubleList = mutableDoubleListOf(element1)
+
+/**
+ * @return a new read-only [DoubleList] with 2 elements, [element1] and [element2], in order.
+ */
+public fun doubleListOf(element1: Double, element2: Double): DoubleList =
+ mutableDoubleListOf(element1, element2)
+
+/**
+ * @return a new read-only [DoubleList] with 3 elements, [element1], [element2], and [element3],
+ * in order.
+ */
+public fun doubleListOf(element1: Double, element2: Double, element3: Double): DoubleList =
+ mutableDoubleListOf(element1, element2, element3)
+
+/**
+ * @return a new read-only [DoubleList] with [elements] in order.
+ */
+public fun doubleListOf(vararg elements: Double): DoubleList =
+ MutableDoubleList(elements.size).apply { plusAssign(elements) }
+
+/**
+ * @return a new empty [MutableDoubleList] with the default capacity.
+ */
+public inline fun mutableDoubleListOf(): MutableDoubleList = MutableDoubleList()
+
+/**
+ * @return a new [MutableDoubleList] with [element1] as the only item in the list.
+ */
+public fun mutableDoubleListOf(element1: Double): MutableDoubleList {
+ val list = MutableDoubleList(1)
+ list += element1
+ return list
+}
+
+/**
+ * @return a new [MutableDoubleList] with 2 elements, [element1] and [element2], in order.
+ */
+public fun mutableDoubleListOf(element1: Double, element2: Double): MutableDoubleList {
+ val list = MutableDoubleList(2)
+ list += element1
+ list += element2
+ return list
+}
+
+/**
+ * @return a new [MutableDoubleList] with 3 elements, [element1], [element2], and [element3],
+ * in order.
+ */
+public fun mutableDoubleListOf(
+ element1: Double,
+ element2: Double,
+ element3: Double
+): MutableDoubleList {
+ val list = MutableDoubleList(3)
+ list += element1
+ list += element2
+ list += element3
+ return list
+}
+
+/**
+ * @return a new [MutableDoubleList] with the given elements, in order.
+ */
+public inline fun mutableDoubleListOf(vararg elements: Double): MutableDoubleList =
+ MutableDoubleList(elements.size).apply { plusAssign(elements) }
diff --git a/collection/collection/src/commonMain/kotlin/androidx/collection/DoubleSet.kt b/collection/collection/src/commonMain/kotlin/androidx/collection/DoubleSet.kt
new file mode 100644
index 0000000..dd5d348
--- /dev/null
+++ b/collection/collection/src/commonMain/kotlin/androidx/collection/DoubleSet.kt
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+@file:Suppress(
+ "RedundantVisibilityModifier",
+ "KotlinRedundantDiagnosticSuppress",
+ "KotlinConstantConditions",
+ "PropertyName",
+ "ConstPropertyName",
+ "PrivatePropertyName",
+ "NOTHING_TO_INLINE"
+)
+
+package androidx.collection
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// DO NOT MAKE CHANGES to the kotlin source file.
+//
+// This file was generated from a template in the template directory.
+// Make a change to the original template and run the generateCollections.sh script
+// to ensure the change is available on all versions of the map.
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+// An empty array of doubles
+internal val EmptyDoubleArray = DoubleArray(0)
diff --git a/collection/collection/src/commonTest/kotlin/androidx/collection/DoubleListTest.kt b/collection/collection/src/commonTest/kotlin/androidx/collection/DoubleListTest.kt
new file mode 100644
index 0000000..3c5636d
--- /dev/null
+++ b/collection/collection/src/commonTest/kotlin/androidx/collection/DoubleListTest.kt
@@ -0,0 +1,744 @@
+/*
+ * 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.collection
+
+import kotlin.test.Test
+import kotlin.test.assertEquals
+import kotlin.test.assertFailsWith
+import kotlin.test.assertFalse
+import kotlin.test.assertNotEquals
+import kotlin.test.assertTrue
+
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// DO NOT MAKE CHANGES to the kotlin source file.
+//
+// This file was generated from a template in the template directory.
+// Make a change to the original template and run the generateCollections.sh script
+// to ensure the change is available on all versions of the map.
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+class DoubleListTest {
+ private val list: MutableDoubleList = mutableDoubleListOf(1.0, 2.0, 3.0, 4.0, 5.0)
+
+ @Test
+ fun emptyConstruction() {
+ val l = mutableDoubleListOf()
+ assertEquals(0, l.size)
+ assertEquals(16, l.capacity)
+ }
+
+ @Test
+ fun sizeConstruction() {
+ val l = MutableDoubleList(4)
+ assertEquals(4, l.capacity)
+ }
+
+ @Test
+ fun contentConstruction() {
+ val l = mutableDoubleListOf(1.0, 2.0, 3.0)
+ assertEquals(3, l.size)
+ assertEquals(1.0, l[0])
+ assertEquals(2.0, l[1])
+ assertEquals(3.0, l[2])
+ assertEquals(3, l.capacity)
+ repeat(2) {
+ val l2 = mutableDoubleListOf(1.0, 2.0, 3.0, 4.0, 5.0)
+ assertEquals(list, l2)
+ l2.removeAt(0)
+ }
+ }
+
+ @Test
+ fun hashCodeTest() {
+ val l2 = mutableDoubleListOf(1.0, 2.0, 3.0, 4.0, 5.0)
+ assertEquals(list.hashCode(), l2.hashCode())
+ l2.removeAt(4)
+ assertNotEquals(list.hashCode(), l2.hashCode())
+ l2.add(5.0)
+ assertEquals(list.hashCode(), l2.hashCode())
+ l2.clear()
+ assertNotEquals(list.hashCode(), l2.hashCode())
+ }
+
+ @Test
+ fun equalsTest() {
+ val l2 = mutableDoubleListOf(1.0, 2.0, 3.0, 4.0, 5.0)
+ assertEquals(list, l2)
+ assertNotEquals(list, mutableDoubleListOf())
+ l2.removeAt(4)
+ assertNotEquals(list, l2)
+ l2.add(5.0)
+ assertEquals(list, l2)
+ l2.clear()
+ assertNotEquals(list, l2)
+ }
+
+ @Test
+ fun string() {
+ assertEquals("[${1.0}, ${2.0}, ${3.0}, ${4.0}, ${5.0}]", list.toString())
+ assertEquals("[]", mutableDoubleListOf().toString())
+ }
+
+ @Test
+ fun joinToString() {
+ assertEquals("${1.0}, ${2.0}, ${3.0}, ${4.0}, ${5.0}", list.joinToString())
+ assertEquals(
+ "x${1.0}, ${2.0}, ${3.0}...",
+ list.joinToString(prefix = "x", postfix = "y", limit = 3)
+ )
+ assertEquals(
+ ">${1.0}-${2.0}-${3.0}-${4.0}-${5.0}<",
+ list.joinToString(separator = "-", prefix = ">", postfix = "<")
+ )
+ assertEquals("one, two, three...", list.joinToString(limit = 3) {
+ when (it.toInt()) {
+ 1 -> "one"
+ 2 -> "two"
+ 3 -> "three"
+ else -> "whoops"
+ }
+ })
+ }
+
+ @Test
+ fun size() {
+ assertEquals(5, list.size)
+ assertEquals(5, list.count())
+ val l2 = mutableDoubleListOf()
+ assertEquals(0, l2.size)
+ assertEquals(0, l2.count())
+ l2 += 1.0
+ assertEquals(1, l2.size)
+ assertEquals(1, l2.count())
+ }
+
+ @Test
+ fun get() {
+ assertEquals(1.0, list[0])
+ assertEquals(5.0, list[4])
+ assertEquals(1.0, list.elementAt(0))
+ assertEquals(5.0, list.elementAt(4))
+ }
+
+ @Test
+ fun getOutOfBounds() {
+ assertFailsWith(IndexOutOfBoundsException::class) {
+ list[5]
+ }
+ }
+
+ @Test
+ fun getOutOfBoundsNegative() {
+ assertFailsWith(IndexOutOfBoundsException::class) {
+ list[-1]
+ }
+ }
+
+ @Test
+ fun elementAtOfBounds() {
+ assertFailsWith(IndexOutOfBoundsException::class) {
+ list.elementAt(5)
+ }
+ }
+
+ @Test
+ fun elementAtOfBoundsNegative() {
+ assertFailsWith(IndexOutOfBoundsException::class) {
+ list.elementAt(-1)
+ }
+ }
+
+ @Test
+ fun elementAtOrElse() {
+ assertEquals(1.0, list.elementAtOrElse(0) {
+ assertEquals(0, it)
+ 0.0
+ })
+ assertEquals(0.0, list.elementAtOrElse(-1) {
+ assertEquals(-1, it)
+ 0.0
+ })
+ assertEquals(0.0, list.elementAtOrElse(5) {
+ assertEquals(5, it)
+ 0.0
+ })
+ }
+
+ @Test
+ fun count() {
+ assertEquals(1, list.count { it < 2.0 })
+ assertEquals(0, list.count { it < 0.0 })
+ assertEquals(5, list.count { it < 10.0 })
+ }
+
+ @Test
+ fun isEmpty() {
+ assertFalse(list.isEmpty())
+ assertFalse(list.none())
+ assertTrue(mutableDoubleListOf().isEmpty())
+ assertTrue(mutableDoubleListOf().none())
+ }
+
+ @Test
+ fun isNotEmpty() {
+ assertTrue(list.isNotEmpty())
+ assertTrue(list.any())
+ assertFalse(mutableDoubleListOf().isNotEmpty())
+ }
+
+ @Test
+ fun indices() {
+ assertEquals(IntRange(0, 4), list.indices)
+ assertEquals(IntRange(0, -1), mutableDoubleListOf().indices)
+ }
+
+ @Test
+ fun any() {
+ assertTrue(list.any { it == 5.0 })
+ assertTrue(list.any { it == 1.0 })
+ assertFalse(list.any { it == 0.0 })
+ }
+
+ @Test
+ fun reversedAny() {
+ val reversedList = mutableDoubleListOf()
+ assertFalse(
+ list.reversedAny {
+ reversedList.add(it)
+ false
+ }
+ )
+ val reversedContent = mutableDoubleListOf(5.0, 4.0, 3.0, 2.0, 1.0)
+ assertEquals(reversedContent, reversedList)
+
+ val reversedSublist = mutableDoubleListOf()
+ assertTrue(
+ list.reversedAny {
+ reversedSublist.add(it)
+ reversedSublist.size == 2
+ }
+ )
+ assertEquals(reversedSublist, mutableDoubleListOf(5.0, 4.0))
+ }
+
+ @Test
+ fun forEach() {
+ val copy = mutableDoubleListOf()
+ list.forEach { copy += it }
+ assertEquals(list, copy)
+ }
+
+ @Test
+ fun forEachReversed() {
+ val copy = mutableDoubleListOf()
+ list.forEachReversed { copy += it }
+ assertEquals(copy, mutableDoubleListOf(5.0, 4.0, 3.0, 2.0, 1.0))
+ }
+
+ @Test
+ fun forEachIndexed() {
+ val copy = mutableDoubleListOf()
+ val indices = mutableDoubleListOf()
+ list.forEachIndexed { index, item ->
+ copy += item
+ indices += index.toDouble()
+ }
+ assertEquals(list, copy)
+ assertEquals(indices, mutableDoubleListOf(0.0, 1.0, 2.0, 3.0, 4.0))
+ }
+
+ @Test
+ fun forEachReversedIndexed() {
+ val copy = mutableDoubleListOf()
+ val indices = mutableDoubleListOf()
+ list.forEachReversedIndexed { index, item ->
+ copy += item
+ indices += index.toDouble()
+ }
+ assertEquals(copy, mutableDoubleListOf(5.0, 4.0, 3.0, 2.0, 1.0))
+ assertEquals(indices, mutableDoubleListOf(4.0, 3.0, 2.0, 1.0, 0.0))
+ }
+
+ @Test
+ fun indexOfFirst() {
+ assertEquals(0, list.indexOfFirst { it == 1.0 })
+ assertEquals(4, list.indexOfFirst { it == 5.0 })
+ assertEquals(-1, list.indexOfFirst { it == 0.0 })
+ assertEquals(0, mutableDoubleListOf(8.0, 8.0).indexOfFirst { it == 8.0 })
+ }
+
+ @Test
+ fun indexOfLast() {
+ assertEquals(0, list.indexOfLast { it == 1.0 })
+ assertEquals(4, list.indexOfLast { it == 5.0 })
+ assertEquals(-1, list.indexOfLast { it == 0.0 })
+ assertEquals(1, mutableDoubleListOf(8.0, 8.0).indexOfLast { it == 8.0 })
+ }
+
+ @Test
+ fun contains() {
+ assertTrue(list.contains(5.0))
+ assertTrue(list.contains(1.0))
+ assertFalse(list.contains(0.0))
+ }
+
+ @Test
+ fun containsAllList() {
+ assertTrue(list.containsAll(mutableDoubleListOf(2.0, 3.0, 1.0)))
+ assertFalse(list.containsAll(mutableDoubleListOf(2.0, 3.0, 6.0)))
+ }
+
+ @Test
+ fun lastIndexOf() {
+ assertEquals(4, list.lastIndexOf(5.0))
+ assertEquals(1, list.lastIndexOf(2.0))
+ val copy = mutableDoubleListOf()
+ copy.addAll(list)
+ copy.addAll(list)
+ assertEquals(5, copy.lastIndexOf(1.0))
+ }
+
+ @Test
+ fun first() {
+ assertEquals(1.0, list.first())
+ }
+
+ @Test
+ fun firstException() {
+ assertFailsWith(NoSuchElementException::class) {
+ mutableDoubleListOf().first()
+ }
+ }
+
+ @Test
+ fun firstWithPredicate() {
+ assertEquals(5.0, list.first { it == 5.0 })
+ assertEquals(1.0, mutableDoubleListOf(1.0, 5.0).first { it != 0.0 })
+ }
+
+ @Test
+ fun firstWithPredicateException() {
+ assertFailsWith(NoSuchElementException::class) {
+ mutableDoubleListOf().first { it == 8.0 }
+ }
+ }
+
+ @Test
+ fun last() {
+ assertEquals(5.0, list.last())
+ }
+
+ @Test
+ fun lastException() {
+ assertFailsWith(NoSuchElementException::class) {
+ mutableDoubleListOf().last()
+ }
+ }
+
+ @Test
+ fun lastWithPredicate() {
+ assertEquals(1.0, list.last { it == 1.0 })
+ assertEquals(5.0, mutableDoubleListOf(1.0, 5.0).last { it != 0.0 })
+ }
+
+ @Test
+ fun lastWithPredicateException() {
+ assertFailsWith(NoSuchElementException::class) {
+ mutableDoubleListOf().last { it == 8.0 }
+ }
+ }
+
+ @Test
+ fun fold() {
+ assertEquals("12345", list.fold("") { acc, i -> acc + i.toInt().toString() })
+ }
+
+ @Test
+ fun foldIndexed() {
+ assertEquals(
+ "01-12-23-34-45-",
+ list.foldIndexed("") { index, acc, i ->
+ "$acc$index${i.toInt()}-"
+ }
+ )
+ }
+
+ @Test
+ fun foldRight() {
+ assertEquals("54321", list.foldRight("") { i, acc -> acc + i.toInt().toString() })
+ }
+
+ @Test
+ fun foldRightIndexed() {
+ assertEquals(
+ "45-34-23-12-01-",
+ list.foldRightIndexed("") { index, i, acc ->
+ "$acc$index${i.toInt()}-"
+ }
+ )
+ }
+
+ @Test
+ fun add() {
+ val l = mutableDoubleListOf(1.0, 2.0, 3.0)
+ l += 4.0
+ l.add(5.0)
+ assertEquals(list, l)
+ }
+
+ @Test
+ fun addAtIndex() {
+ val l = mutableDoubleListOf(2.0, 4.0)
+ l.add(2, 5.0)
+ l.add(0, 1.0)
+ l.add(2, 3.0)
+ assertEquals(list, l)
+ assertFailsWith(IndexOutOfBoundsException::class) {
+ l.add(-1, 2.0)
+ }
+ assertFailsWith(IndexOutOfBoundsException::class) {
+ l.add(6, 2.0)
+ }
+ }
+
+ @Test
+ fun addAllListAtIndex() {
+ val l = mutableDoubleListOf(4.0)
+ val l2 = mutableDoubleListOf(1.0, 2.0)
+ val l3 = mutableDoubleListOf(5.0)
+ val l4 = mutableDoubleListOf(3.0)
+ assertTrue(l4.addAll(1, l3))
+ assertTrue(l4.addAll(0, l2))
+ assertTrue(l4.addAll(3, l))
+ assertFalse(l4.addAll(0, mutableDoubleListOf()))
+ assertEquals(list, l4)
+ assertFailsWith(IndexOutOfBoundsException::class) {
+ l4.addAll(6, mutableDoubleListOf())
+ }
+ assertFailsWith(IndexOutOfBoundsException::class) {
+ l4.addAll(-1, mutableDoubleListOf())
+ }
+ }
+
+ @Test
+ fun addAllList() {
+ val l = MutableDoubleList()
+ l.add(3.0)
+ l.add(4.0)
+ l.add(5.0)
+ val l2 = mutableDoubleListOf(1.0, 2.0)
+ assertTrue(l2.addAll(l))
+ assertEquals(list, l2)
+ assertFalse(l2.addAll(mutableDoubleListOf()))
+ }
+
+ @Test
+ fun plusAssignList() {
+ val l = MutableDoubleList()
+ l.add(3.0)
+ l.add(4.0)
+ l.add(5.0)
+ val l2 = mutableDoubleListOf(1.0, 2.0)
+ l2 += l
+ assertEquals(list, l2)
+ }
+
+ @Test
+ fun addAllArrayAtIndex() {
+ val a1 = doubleArrayOf(4.0)
+ val a2 = doubleArrayOf(1.0, 2.0)
+ val a3 = doubleArrayOf(5.0)
+ val l = mutableDoubleListOf(3.0)
+ assertTrue(l.addAll(1, a3))
+ assertTrue(l.addAll(0, a2))
+ assertTrue(l.addAll(3, a1))
+ assertFalse(l.addAll(0, doubleArrayOf()))
+ assertEquals(list, l)
+ assertFailsWith(IndexOutOfBoundsException::class) {
+ l.addAll(6, doubleArrayOf())
+ }
+ assertFailsWith(IndexOutOfBoundsException::class) {
+ l.addAll(-1, doubleArrayOf())
+ }
+ }
+
+ @Test
+ fun addAllArray() {
+ val a = doubleArrayOf(3.0, 4.0, 5.0)
+ val v = mutableDoubleListOf(1.0, 2.0)
+ v.addAll(a)
+ assertEquals(5, v.size)
+ assertEquals(3.0, v[2])
+ assertEquals(4.0, v[3])
+ assertEquals(5.0, v[4])
+ }
+
+ @Test
+ fun plusAssignArray() {
+ val a = doubleArrayOf(3.0, 4.0, 5.0)
+ val v = mutableDoubleListOf(1.0, 2.0)
+ v += a
+ assertEquals(list, v)
+ }
+
+ @Test
+ fun clear() {
+ val l = mutableDoubleListOf()
+ l.addAll(list)
+ assertTrue(l.isNotEmpty())
+ l.clear()
+ assertTrue(l.isEmpty())
+ }
+
+ @Test
+ fun trim() {
+ val l = mutableDoubleListOf(1.0)
+ l.trim()
+ assertEquals(1, l.capacity)
+ l += doubleArrayOf(1.0, 2.0, 3.0, 4.0, 5.0)
+ l.trim()
+ assertEquals(6, l.capacity)
+ assertEquals(6, l.size)
+ l.clear()
+ l.trim()
+ assertEquals(0, l.capacity)
+ l.trim(100)
+ assertEquals(0, l.capacity)
+ l += doubleArrayOf(1.0, 2.0, 3.0, 4.0, 5.0)
+ l -= 5.0
+ l.trim(5)
+ assertEquals(5, l.capacity)
+ l.trim(4)
+ assertEquals(4, l.capacity)
+ l.trim(3)
+ assertEquals(4, l.capacity)
+ }
+
+ @Test
+ fun remove() {
+ val l = mutableDoubleListOf(1.0, 2.0, 3.0, 4.0, 5.0)
+ l.remove(3.0)
+ assertEquals(mutableDoubleListOf(1.0, 2.0, 4.0, 5.0), l)
+ }
+
+ @Test
+ fun removeAt() {
+ val l = mutableDoubleListOf(1.0, 2.0, 3.0, 4.0, 5.0)
+ l.removeAt(2)
+ assertEquals(mutableDoubleListOf(1.0, 2.0, 4.0, 5.0), l)
+ assertFailsWith(IndexOutOfBoundsException::class) {
+ l.removeAt(6)
+ }
+ assertFailsWith(IndexOutOfBoundsException::class) {
+ l.removeAt(-1)
+ }
+ }
+
+ @Test
+ fun set() {
+ val l = mutableDoubleListOf(0.0, 0.0, 0.0, 0.0, 0.0)
+ l[0] = 1.0
+ l[4] = 5.0
+ l[2] = 3.0
+ l[1] = 2.0
+ l[3] = 4.0
+ assertEquals(list, l)
+ assertFailsWith<IndexOutOfBoundsException> {
+ l.set(-1, 1.0)
+ }
+ assertFailsWith<IndexOutOfBoundsException> {
+ l.set(6, 1.0)
+ }
+ assertEquals(4.0, l.set(3, 1.0));
+ }
+
+ @Test
+ fun ensureCapacity() {
+ val l = mutableDoubleListOf(1.0)
+ assertEquals(1, l.capacity)
+ l.ensureCapacity(5)
+ assertEquals(5, l.capacity)
+ }
+
+ @Test
+ fun removeAllList() {
+ assertFalse(list.removeAll(mutableDoubleListOf(0.0, 10.0, 15.0)))
+ val l = mutableDoubleListOf(0.0, 1.0, 15.0, 10.0, 2.0, 3.0, 4.0, 5.0, 20.0, 5.0)
+ assertTrue(l.removeAll(mutableDoubleListOf(20.0, 0.0, 15.0, 10.0, 5.0)))
+ assertEquals(list, l)
+ }
+
+ @Test
+ fun removeAllDoubleArray() {
+ assertFalse(list.removeAll(doubleArrayOf(0.0, 10.0, 15.0)))
+ val l = mutableDoubleListOf(0.0, 1.0, 15.0, 10.0, 2.0, 3.0, 4.0, 5.0, 20.0, 5.0)
+ assertTrue(l.removeAll(doubleArrayOf(20.0, 0.0, 15.0, 10.0, 5.0)))
+ assertEquals(list, l)
+ }
+
+ @Test
+ fun minusAssignList() {
+ val l = mutableDoubleListOf().also { it += list }
+ l -= mutableDoubleListOf(0.0, 10.0, 15.0)
+ assertEquals(list, l)
+ val l2 = mutableDoubleListOf(0.0, 1.0, 15.0, 10.0, 2.0, 3.0, 4.0, 5.0, 20.0, 5.0)
+ l2 -= mutableDoubleListOf(20.0, 0.0, 15.0, 10.0, 5.0)
+ assertEquals(list, l2)
+ }
+
+ @Test
+ fun minusAssignDoubleArray() {
+ val l = mutableDoubleListOf().also { it += list }
+ l -= doubleArrayOf(0.0, 10.0, 15.0)
+ assertEquals(list, l)
+ val l2 = mutableDoubleListOf(0.0, 1.0, 15.0, 10.0, 2.0, 3.0, 4.0, 5.0, 20.0, 5.0)
+ l2 -= doubleArrayOf(20.0, 0.0, 15.0, 10.0, 5.0)
+ assertEquals(list, l2)
+ }
+
+ @Test
+ fun retainAll() {
+ assertFalse(list.retainAll(mutableDoubleListOf(1.0, 2.0, 3.0, 4.0, 5.0, 6.0)))
+ val l = mutableDoubleListOf(0.0, 1.0, 15.0, 10.0, 2.0, 3.0, 4.0, 5.0, 20.0)
+ assertTrue(l.retainAll(mutableDoubleListOf(1.0, 2.0, 3.0, 4.0, 5.0, 6.0)))
+ assertEquals(list, l)
+ }
+
+ @Test
+ fun retainAllDoubleArray() {
+ assertFalse(list.retainAll(doubleArrayOf(1.0, 2.0, 3.0, 4.0, 5.0, 6.0)))
+ val l = mutableDoubleListOf(0.0, 1.0, 15.0, 10.0, 2.0, 3.0, 4.0, 5.0, 20.0)
+ assertTrue(l.retainAll(doubleArrayOf(1.0, 2.0, 3.0, 4.0, 5.0, 6.0)))
+ assertEquals(list, l)
+ }
+
+ @Test
+ fun removeRange() {
+ val l = mutableDoubleListOf(1.0, 9.0, 7.0, 6.0, 2.0, 3.0, 4.0, 5.0)
+ l.removeRange(1, 4)
+ assertEquals(list, l)
+ assertFailsWith<IndexOutOfBoundsException> {
+ l.removeRange(6, 6)
+ }
+ assertFailsWith<IndexOutOfBoundsException> {
+ l.removeRange(100, 200)
+ }
+ assertFailsWith<IndexOutOfBoundsException> {
+ l.removeRange(-1, 0)
+ }
+ assertFailsWith<IllegalArgumentException> {
+ l.removeRange(3, 2)
+ }
+ }
+
+ @Test
+ fun sort() {
+ val l = mutableDoubleListOf(1.0, 4.0, 2.0, 5.0, 3.0)
+ l.sort()
+ assertEquals(list, l)
+ }
+
+ @Test
+ fun sortDescending() {
+ val l = mutableDoubleListOf(1.0, 4.0, 2.0, 5.0, 3.0)
+ l.sortDescending()
+ assertEquals(mutableDoubleListOf(5.0, 4.0, 3.0, 2.0, 1.0), l)
+ }
+
+ @Test
+ fun testEmptyDoubleList() {
+ val l = emptyDoubleList()
+ assertEquals(0, l.size)
+ }
+
+ @Test
+ fun doubleListOfEmpty() {
+ val l = doubleListOf()
+ assertEquals(0, l.size)
+ }
+
+ @Test
+ fun doubleListOfOneValue() {
+ val l = doubleListOf(2.0)
+ assertEquals(1, l.size)
+ assertEquals(2.0, l[0])
+ }
+
+ @Test
+ fun doubleListOfTwoValues() {
+ val l = doubleListOf(2.0, 1.0)
+ assertEquals(2, l.size)
+ assertEquals(2.0, l[0])
+ assertEquals(1.0, l[1])
+ }
+
+ @Test
+ fun doubleListOfThreeValues() {
+ val l = doubleListOf(2.0, 10.0, -1.0)
+ assertEquals(3, l.size)
+ assertEquals(2.0, l[0])
+ assertEquals(10.0, l[1])
+ assertEquals(-1.0, l[2])
+ }
+
+ @Test
+ fun doubleListOfFourValues() {
+ val l = doubleListOf(2.0, 10.0, -1.0, 10.0)
+ assertEquals(4, l.size)
+ assertEquals(2.0, l[0])
+ assertEquals(10.0, l[1])
+ assertEquals(-1.0, l[2])
+ assertEquals(10.0, l[3])
+ }
+
+ @Test
+ fun mutableDoubleListOfOneValue() {
+ val l = mutableDoubleListOf(2.0)
+ assertEquals(1, l.size)
+ assertEquals(1, l.capacity)
+ assertEquals(2.0, l[0])
+ }
+
+ @Test
+ fun mutableDoubleListOfTwoValues() {
+ val l = mutableDoubleListOf(2.0, 1.0)
+ assertEquals(2, l.size)
+ assertEquals(2, l.capacity)
+ assertEquals(2.0, l[0])
+ assertEquals(1.0, l[1])
+ }
+
+ @Test
+ fun mutableDoubleListOfThreeValues() {
+ val l = mutableDoubleListOf(2.0, 10.0, -1.0)
+ assertEquals(3, l.size)
+ assertEquals(3, l.capacity)
+ assertEquals(2.0, l[0])
+ assertEquals(10.0, l[1])
+ assertEquals(-1.0, l[2])
+ }
+
+ @Test
+ fun mutableDoubleListOfFourValues() {
+ val l = mutableDoubleListOf(2.0, 10.0, -1.0, 10.0)
+ assertEquals(4, l.size)
+ assertEquals(4, l.capacity)
+ assertEquals(2.0, l[0])
+ assertEquals(10.0, l[1])
+ assertEquals(-1.0, l[2])
+ assertEquals(10.0, l[3])
+ }
+}
diff --git a/collection/collection/template/generateCollections.sh b/collection/collection/template/generateCollections.sh
index 99b1d7d..94667f7f 100755
--- a/collection/collection/template/generateCollections.sh
+++ b/collection/collection/template/generateCollections.sh
@@ -1,7 +1,7 @@
#!/bin/bash
-primitives=("Float" "Long" "Int")
-suffixes=("f" "L" "")
+primitives=("Double" "Float" "Long" "Int")
+suffixes=(".0" "f" "L" "")
# Note: Had to use `dirname ${0}` on Linux
scriptDir=`dirname ${PWD}/${0}`
diff --git a/compose/animation/animation-core/lint-baseline.xml b/compose/animation/animation-core/lint-baseline.xml
index 6d4664f..f95935a 100644
--- a/compose/animation/animation-core/lint-baseline.xml
+++ b/compose/animation/animation-core/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanSuppressTag"
@@ -58,15 +58,6 @@
<issue
id="BanSuppressTag"
message="@suppress is not allowed in documentation"
- errorLine1=" fun setPlaytimeAfterInitialAndTargetStateEstablished("
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/animation/core/Transition.kt"/>
- </issue>
-
- <issue
- id="BanSuppressTag"
- message="@suppress is not allowed in documentation"
errorLine1=" inner class DeferredAnimation<T, V : AnimationVector> internal constructor("
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
diff --git a/compose/animation/animation-graphics/build.gradle b/compose/animation/animation-graphics/build.gradle
index 1c7a544..7d96f6d 100644
--- a/compose/animation/animation-graphics/build.gradle
+++ b/compose/animation/animation-graphics/build.gradle
@@ -52,6 +52,7 @@
}
androidMain.dependencies {
api("androidx.annotation:annotation:1.1.0")
+ api(project(":annotation:annotation-experimental"))
implementation("androidx.core:core-ktx:1.5.0")
}
diff --git a/compose/animation/animation-graphics/lint-baseline.xml b/compose/animation/animation-graphics/lint-baseline.xml
index 0208a7d..bdc4bc5 100644
--- a/compose/animation/animation-graphics/lint-baseline.xml
+++ b/compose/animation/animation-graphics/lint-baseline.xml
@@ -1,14 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-beta01)" variant="all" version="8.2.0-beta01">
-
- <issue
- id="RestrictedApiAndroidX"
- message="PathParser.createPathFromPathData can only be called from within the same library (androidx.core:core)"
- errorLine1=" PathInterpolator(PathParser.createPathFromPathData(pathData)).toEasing()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/animation/graphics/vector/compat/XmlAnimatorParser.android.kt"/>
- </issue>
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="PrimitiveInCollection"
diff --git a/compose/animation/animation/build.gradle b/compose/animation/animation/build.gradle
index 4532e53..578889e 100644
--- a/compose/animation/animation/build.gradle
+++ b/compose/animation/animation/build.gradle
@@ -67,6 +67,7 @@
dependsOn(jvmMain)
dependencies {
api("androidx.annotation:annotation:1.1.0")
+ api(project(":annotation:annotation-experimental"))
}
}
diff --git a/compose/animation/animation/integration-tests/animation-demos/lint-baseline.xml b/compose/animation/animation/integration-tests/animation-demos/lint-baseline.xml
index 543c3c8..b3839ca 100644
--- a/compose/animation/animation/integration-tests/animation-demos/lint-baseline.xml
+++ b/compose/animation/animation/integration-tests/animation-demos/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="PrimitiveInCollection"
diff --git a/compose/animation/animation/lint-baseline.xml b/compose/animation/animation/lint-baseline.xml
deleted file mode 100644
index d4a8714..0000000
--- a/compose/animation/animation/lint-baseline.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="PrimitiveInCollection"
- message="variable constraintsMap with type Map<S, Constraints>: replace with ObjectLongMap"
- errorLine1=" val constraintsMap = remember { mutableMapOf<S, Constraints>() }"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/animation/AnimatedContent.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="constructor AnimatedContentMeasurePolicy has parameter constraintsMap with type Map<S, Constraints>: replace with ObjectLongMap"
- errorLine1=" val constraintsMap: MutableMap<S, Constraints>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/animation/AnimatedContent.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="field constraintsMap with type Map<S, Constraints>: replace with ObjectLongMap"
- errorLine1=" val constraintsMap: MutableMap<S, Constraints>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/animation/AnimatedContent.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type Map<S, Constraints> of getConstraintsMap: replace with ObjectLongMap"
- errorLine1=" val constraintsMap: MutableMap<S, Constraints>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/animation/AnimatedContent.kt"/>
- </issue>
-
-</issues>
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/androidUnitTest/kotlin/androidx/compose/compiler/plugins/kotlin/KtxTransformationTest.kt b/compose/compiler/compiler-hosted/integration-tests/src/androidUnitTest/kotlin/androidx/compose/compiler/plugins/kotlin/ComposeBytecodeCodegenTest.kt
similarity index 95%
rename from compose/compiler/compiler-hosted/integration-tests/src/androidUnitTest/kotlin/androidx/compose/compiler/plugins/kotlin/KtxTransformationTest.kt
rename to compose/compiler/compiler-hosted/integration-tests/src/androidUnitTest/kotlin/androidx/compose/compiler/plugins/kotlin/ComposeBytecodeCodegenTest.kt
index a1cfb0c..739cbf2 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/androidUnitTest/kotlin/androidx/compose/compiler/plugins/kotlin/KtxTransformationTest.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/androidUnitTest/kotlin/androidx/compose/compiler/plugins/kotlin/ComposeBytecodeCodegenTest.kt
@@ -16,10 +16,11 @@
package androidx.compose.compiler.plugins.kotlin
+import kotlin.test.assertFalse
import org.junit.Assume.assumeFalse
import org.junit.Test
-class KtxTransformationTest(useFir: Boolean) : AbstractCodegenTest(useFir) {
+class ComposeBytecodeCodegenTest(useFir: Boolean) : AbstractCodegenTest(useFir) {
// b/179279455
// @Test
// fun testObserveLowering() {
@@ -718,4 +719,27 @@
"""
)
}
+
+ @Test
+ fun testRecursiveLocalFunction() = validateBytecode(
+ """
+ import androidx.compose.runtime.*
+
+ @Composable fun Surface(content: @Composable () -> Unit) {}
+
+ @Composable
+ fun MyComposable(){
+ @Composable
+ fun LocalComposable(){
+ Surface { LocalComposable() }
+ }
+ }
+ """,
+ validate = {
+ assertFalse(
+ it.contains("ComposableSingletons"),
+ message = "ComposableSingletons class should not be generated"
+ )
+ }
+ )
}
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/AbstractCodegenTest.kt b/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/AbstractCodegenTest.kt
index 2dd5570..a82b240 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/AbstractCodegenTest.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/AbstractCodegenTest.kt
@@ -117,9 +117,8 @@
return loader
}
- protected fun testCompile(source: String, dumpClasses: Boolean = false) {
- val loader = createClassLoader(listOf(SourceFile("Test.kt", source)))
- if (dumpClasses) dumpClasses(loader)
+ protected fun testCompile(@Language("kotlin") source: String, dumpClasses: Boolean = false) {
+ classLoader(source, "Test.kt", dumpClasses)
}
protected val COMPOSE_VIEW_STUBS_IMPORTS = """
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposerLambdaMemoization.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposerLambdaMemoization.kt
index 99cacc5..f7efc83 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposerLambdaMemoization.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposerLambdaMemoization.kt
@@ -428,23 +428,23 @@
!declaration.isInline
val context = FunctionContext(declaration, composable, canRemember)
- declarationContextStack.push(context)
- val result = super.visitFunction(declaration)
- declarationContextStack.pop()
if (declaration.isLocal) {
declarationContextStack.recordLocalDeclaration(context)
}
+ declarationContextStack.push(context)
+ val result = super.visitFunction(declaration)
+ declarationContextStack.pop()
return result
}
override fun visitClass(declaration: IrClass): IrStatement {
val context = ClassContext(declaration)
- declarationContextStack.push(context)
- val result = super.visitClass(declaration)
- declarationContextStack.pop()
if (declaration.isLocal) {
declarationContextStack.recordLocalDeclaration(context)
}
+ declarationContextStack.push(context)
+ val result = super.visitClass(declaration)
+ declarationContextStack.pop()
return result
}
diff --git a/compose/foundation/foundation-layout/build.gradle b/compose/foundation/foundation-layout/build.gradle
index 40eb325..126368e 100644
--- a/compose/foundation/foundation-layout/build.gradle
+++ b/compose/foundation/foundation-layout/build.gradle
@@ -63,6 +63,7 @@
dependsOn(jvmMain)
dependencies {
api("androidx.annotation:annotation:1.1.0")
+ api(project(":annotation:annotation-experimental"))
implementation("androidx.core:core:1.7.0")
implementation("androidx.compose.animation:animation-core:1.2.1")
}
diff --git a/compose/foundation/foundation/build.gradle b/compose/foundation/foundation/build.gradle
index 58190c2..5822984 100644
--- a/compose/foundation/foundation/build.gradle
+++ b/compose/foundation/foundation/build.gradle
@@ -69,6 +69,7 @@
dependsOn(jvmMain)
dependencies {
api("androidx.annotation:annotation:1.1.0")
+ api(project(":annotation:annotation-experimental"))
implementation("androidx.emoji2:emoji2:1.3.0")
implementation("androidx.core:core:1.12.0")
}
diff --git a/compose/foundation/foundation/integration-tests/foundation-demos/build.gradle b/compose/foundation/foundation/integration-tests/foundation-demos/build.gradle
index 589736d..5522a97 100644
--- a/compose/foundation/foundation/integration-tests/foundation-demos/build.gradle
+++ b/compose/foundation/foundation/integration-tests/foundation-demos/build.gradle
@@ -23,6 +23,7 @@
dependencies {
+ implementation("androidx.core:core:1.12.0")
implementation(libs.kotlinStdlib)
implementation(project(":compose:animation:animation"))
diff --git a/compose/foundation/foundation/integration-tests/foundation-demos/lint-baseline.xml b/compose/foundation/foundation/integration-tests/foundation-demos/lint-baseline.xml
index e8ae680..1527a9b 100644
--- a/compose/foundation/foundation/integration-tests/foundation-demos/lint-baseline.xml
+++ b/compose/foundation/foundation/integration-tests/foundation-demos/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="NewApi"
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 940d20d..536b9355 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
@@ -82,7 +82,7 @@
val availableLayoutSpace = layoutSize - beforeContentPadding - afterContentPadding
return when (itemIndex) {
0 -> 0
- itemCount - 2 -> availableLayoutSpace - itemSize
+ itemCount - 1 -> availableLayoutSpace - itemSize
else -> availableLayoutSpace / 2 - itemSize / 2
}
}
diff --git a/compose/foundation/foundation/lint-baseline.xml b/compose/foundation/foundation/lint-baseline.xml
index 857f966..6aa9e58 100644
--- a/compose/foundation/foundation/lint-baseline.xml
+++ b/compose/foundation/foundation/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanSuppressTag"
@@ -47,6 +47,33 @@
</issue>
<issue
+ id="IllegalExperimentalApiUsage"
+ message="`Experimental` and `RequiresOptIn` APIs may only be used within the same-version group where they were defined."
+ errorLine1="@OptIn(ExperimentalTextApi::class)"
+ errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/foundation/text/BasicText.kt"/>
+ </issue>
+
+ <issue
+ id="IllegalExperimentalApiUsage"
+ message="`Experimental` and `RequiresOptIn` APIs may only be used within the same-version group where they were defined."
+ errorLine1="@OptIn(ExperimentalTextApi::class)"
+ errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringNode.kt"/>
+ </issue>
+
+ <issue
+ id="IllegalExperimentalApiUsage"
+ message="`Experimental` and `RequiresOptIn` APIs may only be used within the same-version group where they were defined."
+ errorLine1="@OptIn(ExperimentalTextApi::class)"
+ errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/foundation/text/TextLinkScope.kt"/>
+ </issue>
+
+ <issue
id="PrimitiveInCollection"
message="field anchors with type Map<T, Float>: replace with ObjectFloatMap"
errorLine1=" internal val anchors = mutableMapOf<T, Float>()"
@@ -273,15 +300,6 @@
<issue
id="PrimitiveInCollection"
- message="field map with type Map<Object, Integer>: replace with ObjectIntMap"
- errorLine1=" private val map: Map<Any, Int>"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/foundation/lazy/layout/LazyLayoutKeyIndexMap.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
message="field placeablesCache with type HashMap<Integer, List<Placeable>>: replace with IntObjectMap"
errorLine1=" /**"
errorLine2=" ^">
@@ -478,34 +496,6 @@
file="src/commonMain/kotlin/androidx/compose/foundation/pager/PagerMeasure.kt"/>
</issue>
- <!-- TODO(soboleva) temporary change, remove when stable link annotations merged -->
- <issue
- id="IllegalExperimentalApiUsage"
- message="`Experimental` and `RequiresOptIn` APIs may only be used within the same-version group where they were defined."
- errorLine1="@OptIn(ExperimentalTextApi::class)"
- errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/foundation/text/BasicText.kt"/>
- </issue>
-
- <issue
- id="IllegalExperimentalApiUsage"
- message="`Experimental` and `RequiresOptIn` APIs may only be used within the same-version group where they were defined."
- errorLine1="@OptIn(ExperimentalTextApi::class)"
- errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringNode.kt"/>
- </issue>
-
- <issue
- id="IllegalExperimentalApiUsage"
- message="`Experimental` and `RequiresOptIn` APIs may only be used within the same-version group where they were defined."
- errorLine1="@OptIn(ExperimentalTextApi::class)"
- errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/foundation/text/TextLinkScope.kt"/>
- </issue>
-
<issue
id="PrimitiveInCollection"
message="method createPagesAfterList has parameter pinnedPages with type List<Integer>: replace with IntList"
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/AndroidManifest.xml b/compose/foundation/foundation/src/androidInstrumentedTest/AndroidManifest.xml
index cae21f8..87a3f9e 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/AndroidManifest.xml
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/AndroidManifest.xml
@@ -22,6 +22,12 @@
android:name="androidx.compose.foundation.TestActivity"
android:theme="@android:style/Theme.Material.NoActionBar.Fullscreen" />
<activity
+ android:name="androidx.compose.foundation.TestActivityWithScreenLayoutConfigChanges"
+ android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density"
+ android:exported="true"
+ android:theme="@android:style/Theme.Material.Light.NoActionBar"
+ />
+ <activity
android:name="androidx.fragment.app.FragmentActivity"
android:theme="@android:style/Theme.Material.NoActionBar.Fullscreen" />
<!--
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/ClickableWithDynamicConfigChangesTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/ClickableWithDynamicConfigChangesTest.kt
new file mode 100644
index 0000000..72e74a5
--- /dev/null
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/ClickableWithDynamicConfigChangesTest.kt
@@ -0,0 +1,99 @@
+/*
+ * 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
+
+import android.view.ViewGroup
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.text.BasicText
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.platform.ComposeView
+import androidx.compose.ui.platform.LocalView
+import androidx.compose.ui.platform.testTag
+import androidx.compose.ui.test.junit4.AndroidComposeTestRule
+import androidx.compose.ui.test.junit4.ComposeContentTestRule
+import androidx.compose.ui.test.junit4.createAndroidComposeRule
+import androidx.compose.ui.test.onNodeWithTag
+import androidx.compose.ui.test.performClick
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.MediumTest
+import com.google.common.truth.Truth.assertThat
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@MediumTest
+@RunWith(AndroidJUnit4::class)
+class ClickableWithDynamicConfigChangesTest {
+
+ @get:Rule
+ val rule: ComposeContentTestRule =
+ createAndroidComposeRule<TestActivityWithScreenLayoutConfigChanges>()
+
+ @Test
+ fun click_viewAddedAndRemovedWithRecomposerCancelledAndRecreated_clickStillWorks() {
+ lateinit var grandParent: ViewGroup
+ lateinit var parentComposeView: ComposeView
+
+ var counter = 0
+
+ rule.setContent {
+ val view = LocalView.current
+ parentComposeView = view.parent as ComposeView
+ grandParent = parentComposeView.parent as ViewGroup
+
+ Box {
+ BasicText(
+ "ClickableText",
+ modifier = Modifier
+ .testTag("myClickable")
+ .clickable {
+ ++counter
+ }
+ )
+ }
+ }
+
+ rule.onNodeWithTag("myClickable").performClick()
+
+ rule.runOnIdle {
+ assertThat(counter).isEqualTo(1)
+ }
+
+ rule.runOnUiThread {
+ grandParent.removeView(parentComposeView)
+ }
+
+ rule.runOnUiThread {
+ (rule as? AndroidComposeTestRule<*, *>)?.cancelAndRecreateRecomposer()
+ }
+
+ rule.runOnUiThread {
+ // THIS is the right one to cancel!
+ parentComposeView.setParentCompositionContext(null)
+ }
+
+ rule.runOnUiThread {
+ grandParent.addView(parentComposeView)
+ }
+
+ rule.onNodeWithTag("myClickable").performClick()
+
+ rule.runOnIdle {
+ assertThat(counter).isEqualTo(2)
+ }
+ }
+}
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/TestActivityWithScreenLayoutConfigChanges.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/TestActivityWithScreenLayoutConfigChanges.kt
new file mode 100644
index 0000000..f381b91
--- /dev/null
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/TestActivityWithScreenLayoutConfigChanges.kt
@@ -0,0 +1,20 @@
+/*
+ * 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
+
+import androidx.activity.ComponentActivity
+
+class TestActivityWithScreenLayoutConfigChanges : ComponentActivity()
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/anchoredDraggable/AnchoredDraggableStateTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/anchoredDraggable/AnchoredDraggableStateTest.kt
index d86a98d..58a4c3f 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/anchoredDraggable/AnchoredDraggableStateTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/anchoredDraggable/AnchoredDraggableStateTest.kt
@@ -1458,6 +1458,47 @@
assertThat(tweenAnimationSpec.animationWasExecutions).isEqualTo(1)
}
+ @Test
+ fun anchoredDraggable_settleWhenOffsetEqualsTargetOffset() =
+ runBlocking(AutoTestFrameClock()) {
+ val inspectDecayAnimationSpec =
+ InspectSplineAnimationSpec(SplineBasedFloatDecayAnimationSpec(rule.density))
+ val decayAnimationSpec: DecayAnimationSpec<Float> =
+ inspectDecayAnimationSpec.generateDecayAnimationSpec()
+ val tweenAnimationSpec = InspectSpringAnimationSpec(tween(easing = LinearEasing))
+ val state = AnchoredDraggableState(
+ initialValue = A,
+ positionalThreshold = defaultPositionalThreshold,
+ velocityThreshold = defaultVelocityThreshold,
+ snapAnimationSpec = tweenAnimationSpec,
+ decayAnimationSpec = decayAnimationSpec,
+ anchors = DraggableAnchors {
+ A at 0f
+ B at 250f
+ }
+ )
+
+ val positionA = state.anchors.positionOf(A)
+ val positionB = state.anchors.positionOf(B)
+ val distance = abs(positionA - positionB)
+
+ assertThat(state.currentValue).isEqualTo(A)
+ assertThat(state.offset).isEqualTo(positionA)
+
+ state.dispatchRawDelta(distance)
+
+ assertThat(state.offset).isEqualTo(positionB)
+
+ state.settle(velocity = 1000f)
+
+ // Assert that the component settled at positionB (anchor B)
+ assertThat(state.offset).isEqualTo(positionB)
+
+ // since offset == positionB, decay animation is used
+ assertThat(inspectDecayAnimationSpec.animationWasExecutions).isEqualTo(1)
+ assertThat(tweenAnimationSpec.animationWasExecutions).isEqualTo(0)
+ }
+
private suspend fun suspendIndefinitely() = suspendCancellableCoroutine<Unit> { }
private class HandPumpTestFrameClock : MonotonicFrameClock {
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/EmptyPagerTests.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/EmptyPagerTests.kt
deleted file mode 100644
index 044636b..0000000
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/EmptyPagerTests.kt
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2022 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.pager
-
-import androidx.compose.foundation.ExperimentalFoundationApi
-import androidx.compose.foundation.layout.fillMaxSize
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.test.onNodeWithTag
-import androidx.test.filters.LargeTest
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.junit.runners.Parameterized
-
-@OptIn(ExperimentalFoundationApi::class)
-@LargeTest
-@RunWith(Parameterized::class)
-class EmptyPagerTests(val config: ParamConfig) : BasePagerTest(config) {
-
- @Test
- fun checkNoPagesArePlaced() {
- // Arrange
- // Act
- createPager(pageCount = { 0 }, modifier = Modifier.fillMaxSize())
-
- // Assert
- rule.onNodeWithTag("0").assertDoesNotExist()
- }
-
- companion object {
- @JvmStatic
- @Parameterized.Parameters(name = "{0}")
- fun params() = AllOrientationsParams
- }
-}
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PageCountTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PageCountTest.kt
new file mode 100644
index 0000000..759a6b2
--- /dev/null
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PageCountTest.kt
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2022 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.pager
+
+import androidx.compose.foundation.ExperimentalFoundationApi
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.size
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.test.onNodeWithTag
+import androidx.compose.ui.test.performTouchInput
+import androidx.compose.ui.unit.dp
+import androidx.test.filters.LargeTest
+import com.google.common.truth.Truth
+import kotlinx.coroutines.runBlocking
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.junit.runners.Parameterized
+
+@OptIn(ExperimentalFoundationApi::class)
+@LargeTest
+@RunWith(Parameterized::class)
+class PageCountTest(val config: ParamConfig) : BasePagerTest(config) {
+
+ @Test
+ fun pageCountIsZero_checkNoPagesArePlaced() {
+ // Arrange
+ // Act
+ createPager(pageCount = { 0 }, modifier = Modifier.fillMaxSize())
+
+ // Assert
+ rule.onNodeWithTag("0").assertDoesNotExist()
+ }
+
+ @Test
+ fun pageCountIsMax_shouldAllowScroll() {
+ createPager(pageCount = { Int.MAX_VALUE }, modifier = Modifier.size(500.dp), pageSize = {
+ PageSize.Fixed(200.dp)
+ })
+ val initialPage = pagerState.currentPage
+ onPager().performTouchInput {
+ swipeWithVelocityAcrossMainAxis(2000f)
+ }
+
+ rule.runOnIdle {
+ Truth.assertThat(initialPage).isNotEqualTo(pagerState.currentPage)
+ }
+ }
+
+ @Test
+ fun pageCountIsMax_shouldNotAllowScrollBeyondMax_fullPages() {
+ createPager(pageCount = { Int.MAX_VALUE }, modifier = Modifier.fillMaxSize())
+ rule.runOnIdle {
+ runBlocking {
+ pagerState.scrollToPage(Int.MAX_VALUE)
+ }
+ }
+
+ rule.runOnIdle {
+ Truth.assertThat(pagerState.currentPage).isEqualTo(Int.MAX_VALUE - 1)
+ }
+
+ onPager().performTouchInput {
+ swipeWithVelocityAcrossMainAxis(20000f)
+ }
+
+ rule.runOnIdle {
+ Truth.assertThat(pagerState.currentPage).isEqualTo(Int.MAX_VALUE - 1)
+ }
+ }
+
+ @Test
+ fun pageCountIsMax_shouldNotAllowScrollBeyondMax_fixesSizedPages() {
+ createPager(pageCount = { Int.MAX_VALUE }, pageSize = {
+ PageSize.Fixed(100.dp)
+ }, modifier = Modifier.size(500.dp))
+ rule.runOnIdle {
+ runBlocking {
+ pagerState.scrollToPage(Int.MAX_VALUE)
+ }
+ }
+
+ val currentPage = pagerState.currentPage
+
+ onPager().performTouchInput {
+ swipeWithVelocityAcrossMainAxis(20000f)
+ }
+
+ rule.runOnIdle {
+ Truth.assertThat(pagerState.currentPage).isEqualTo(currentPage)
+ }
+ }
+
+ @Test
+ fun pageCountIsMax_shouldSettleAfterSmallScroll() {
+ createPager(pageCount = { Int.MAX_VALUE }, modifier = Modifier.fillMaxSize())
+ rule.runOnIdle {
+ runBlocking {
+ pagerState.scrollToPage(Int.MAX_VALUE)
+ }
+ }
+
+ rule.runOnIdle {
+ Truth.assertThat(pagerState.currentPage).isEqualTo(Int.MAX_VALUE - 1)
+ }
+
+ onPager().performTouchInput {
+ swipeWithVelocityAcrossMainAxis(100f, delta = pageSize * 0.2f * scrollForwardSign * -1)
+ }
+
+ rule.runOnIdle {
+ Truth.assertThat(pagerState.currentPage).isEqualTo(Int.MAX_VALUE - 1)
+ }
+ }
+
+ companion object {
+ @JvmStatic
+ @Parameterized.Parameters(name = "{0}")
+ fun params() = AllOrientationsParams
+ }
+}
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerScrollingTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerScrollingTest.kt
index b31df33..9a9aab0 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerScrollingTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerScrollingTest.kt
@@ -19,6 +19,7 @@
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.gestures.snapping.MinFlingVelocityDp
import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.size
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.test.assertIsDisplayed
@@ -200,6 +201,32 @@
}
@Test
+ fun swipeWithLowVelocity_atTheEndOfTheList_shouldNotMove() {
+ // Arrange
+ createPager(
+ initialPage = DefaultPageCount - 1,
+ modifier = Modifier.size(125.dp),
+ pageSize = { PageSize.Fixed(50.dp) }
+ )
+ val swipeValue = 0.1f
+ val delta = pagerSize * swipeValue * scrollForwardSign * -1 // scroll a bit at the end
+
+ // Act - forward
+ onPager().performTouchInput {
+ swipeWithVelocityAcrossMainAxis(
+ with(rule.density) { 0.5f * MinFlingVelocityDp.toPx() },
+ delta
+ )
+ }
+
+ // Assert
+ rule.runOnIdle {
+ // page is out of snap
+ assertThat(pagerState.currentPageOffsetFraction).isNotEqualTo(0.0f)
+ }
+ }
+
+ @Test
fun swipeWithLowVelocity_positionalThresholdOverDefaultThreshold_shouldGoToNextPage() {
// Arrange
createPager(initialPage = 5, modifier = Modifier.fillMaxSize())
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextLinkTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextLinkTest.kt
index 8b2d968..917a353 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextLinkTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextLinkTest.kt
@@ -35,6 +35,7 @@
import androidx.compose.ui.platform.UriHandler
import androidx.compose.ui.platform.ViewConfiguration
import androidx.compose.ui.platform.testTag
+import androidx.compose.ui.semantics.SemanticsActions
import androidx.compose.ui.test.SemanticsNodeInteraction
import androidx.compose.ui.test.SemanticsNodeInteractionsProvider
import androidx.compose.ui.test.assertIsFocused
@@ -248,6 +249,39 @@
}
}
+ @Test
+ fun link_withTranslatedString() {
+ val originalText = buildAnnotatedString {
+ append("text ")
+ withAnnotation(UrlAnnotation(Url1)) {
+ append("link")
+ }
+ }
+ setupContent { BasicText(originalText) }
+
+ // set translated string
+ val node = rule.onFirstText().fetchSemanticsNode()
+ rule.runOnUiThread {
+ val translatedText = buildAnnotatedString { append("text") }
+ node.config[SemanticsActions.SetTextSubstitution].action?.invoke(translatedText)
+ }
+ rule.waitForIdle()
+
+ rule.runOnUiThread {
+ // show the translated text
+ node.config[SemanticsActions.ShowTextSubstitution].action?.invoke(true)
+ }
+ rule.waitForIdle()
+
+ // check that there no link anymore
+ rule.onNode(hasClickAction()).assertDoesNotExist()
+
+ rule.onFirstText().performClick()
+ rule.runOnIdle {
+ assertThat(openedUri).isEqualTo(null)
+ }
+ }
+
@Composable
private fun TextWithLinks() = with(rule.density) {
Column {
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/AnchoredDraggable.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/AnchoredDraggable.kt
index 7f425a9..e6f22db 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/AnchoredDraggable.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/AnchoredDraggable.kt
@@ -751,9 +751,10 @@
if (!targetOffset.isNaN()) {
var prev = if (offset.isNaN()) 0f else offset
// If targetOffset is not in the same direction as the direction of the drag (sign
- // of the velocity), velocity can't be used for decay animation. So, target animation
- // should be used in this case.
- if (sign(velocity) != sign(targetOffset - offset) || velocity == 0f) {
+ // of the velocity) we fall back to using target animation.
+ // If the component is at the target offset already, we use decay animation that will
+ // not consume any velocity.
+ if (velocity * (targetOffset - prev) < 0f || velocity == 0f) {
animateTo(velocity, this, anchors, latestTarget)
remainingVelocity = 0f
} else {
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 49271a0..18cb915 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
@@ -53,6 +53,7 @@
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.Velocity
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.util.fastForEach
import kotlin.math.abs
import kotlin.math.absoluteValue
import kotlin.math.roundToInt
@@ -487,7 +488,7 @@
} else {
// if we haven't crossed the threshold. but scrolled minimally, we should
// bound to the previous bound
- if (abs(pagerState.currentPageOffsetFraction) >=
+ if (abs(offsetFromSnappedPosition) >=
abs(pagerState.positionThresholdFraction)
) {
debugLog { "Crossed Positional Threshold Fraction" }
@@ -585,46 +586,19 @@
debugLog { "Calculating Snapping Bounds" }
var lowerBoundOffset = Float.NEGATIVE_INFINITY
var upperBoundOffset = Float.POSITIVE_INFINITY
- val totalPageSize = pagerState.pageSize + pagerState.pageSpacing
- val layoutInfo = pagerState.layoutInfo
- val currentPage = pagerState.currentPage
- val currentPageScrollOffset = snapPosition.currentPageOffset(
- layoutInfo.mainAxisViewportSize,
- layoutInfo.pageSize,
- layoutInfo.pageSpacing,
- layoutInfo.beforeContentPadding,
- layoutInfo.afterContentPadding,
- pagerState.currentPage,
- pagerState.currentPageOffsetFraction,
- pagerState.pageCount
- )
-
- // the closest page should be close to the current page, we'll start from current page
- // and search both sides.
- var page = currentPage
- var currentOffset = currentPageScrollOffset
-
- debugLog { "Start Search: Page=$currentPage Offset=$currentOffset" }
-
- // The snapping bounds will be at most visiblePages/2 from the current page.
- val maxDistanceFromCurrentPage = layoutInfo.visiblePagesInfo.size / 2
-
- // go back
- while (page >= (currentPage - maxDistanceFromCurrentPage).coerceAtLeast(0)) {
+ layoutInfo.visiblePagesInfo.fastForEach { page ->
val offset = calculateDistanceToDesiredSnapPosition(
mainAxisViewPortSize = layoutInfo.mainAxisViewportSize,
beforeContentPadding = layoutInfo.beforeContentPadding,
afterContentPadding = layoutInfo.afterContentPadding,
itemSize = layoutInfo.pageSize,
- itemOffset = currentOffset,
- itemIndex = page,
+ itemOffset = page.offset,
+ itemIndex = page.index,
snapPosition = snapPosition,
itemCount = pagerState.pageCount
)
- debugLog { "Snapping Offset=$offset for page=$page" }
-
// Find page that is closest to the snap position, but before it
if (offset <= 0 && offset > lowerBoundOffset) {
lowerBoundOffset = offset
@@ -634,45 +608,6 @@
if (offset >= 0 && offset < upperBoundOffset) {
upperBoundOffset = offset
}
-
- currentOffset -= totalPageSize
- page--
- }
-
- page = currentPage + 1
- currentOffset = currentPageScrollOffset + totalPageSize
-
- // go forward
- while (page <= (currentPage + maxDistanceFromCurrentPage)
- .coerceAtMost(pagerState.pageCount - 1)
- ) {
- val offset = calculateDistanceToDesiredSnapPosition(
- mainAxisViewPortSize = layoutInfo.mainAxisViewportSize,
- beforeContentPadding = layoutInfo.beforeContentPadding,
- afterContentPadding = layoutInfo.afterContentPadding,
- itemSize = layoutInfo.pageSize,
- itemOffset = currentOffset,
- itemIndex = page,
- snapPosition = snapPosition,
- itemCount = pagerState.pageCount
- )
-
- debugLog {
- "Snapping Offset=$offset for page=$page"
- }
-
- // Find page that is closest to the snap position, but after it
- if (offset >= 0 && offset < upperBoundOffset) {
- upperBoundOffset = offset
- }
-
- // Find page that is closest to the snap position, but before it
- if (offset <= 0 && offset > lowerBoundOffset) {
- lowerBoundOffset = offset
- }
-
- currentOffset += totalPageSize
- page++
}
// If any of the bounds is unavailable, use the other.
@@ -684,6 +619,14 @@
upperBoundOffset = lowerBoundOffset
}
+ // Do not move if we can't scroll
+ if (!pagerState.canScrollForward) {
+ upperBoundOffset = 0.0f
+ }
+
+ if (!pagerState.canScrollBackward) {
+ lowerBoundOffset = 0.0f
+ }
return lowerBoundOffset to upperBoundOffset
}
}
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerScrollPosition.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerScrollPosition.kt
index c7a96e6..5a027a1 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerScrollPosition.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerScrollPosition.kt
@@ -23,7 +23,7 @@
import androidx.compose.runtime.mutableFloatStateOf
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.setValue
-import kotlin.math.roundToInt
+import kotlin.math.roundToLong
/**
* Contains the current scroll position represented by the first visible page and the first
@@ -110,9 +110,10 @@
currentPageOffsetFraction = offsetFraction
}
- fun currentAbsoluteScrollOffset(): Int {
- return ((currentPage +
- currentPageOffsetFraction) * state.pageSizeWithSpacing).roundToInt()
+ fun currentAbsoluteScrollOffset(): Long {
+ val currentPageOffset = currentPage.toLong() * state.pageSizeWithSpacing
+ val offsetFraction = (currentPageOffsetFraction * state.pageSizeWithSpacing).roundToLong()
+ return currentPageOffset + offsetFraction
}
fun applyScrollDelta(delta: Int) {
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerSnapDistance.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerSnapDistance.kt
index ef2e27f..bba81d7 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerSnapDistance.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerSnapDistance.kt
@@ -82,7 +82,10 @@
"pageSize=$pageSize " +
"pageSpacing$pageSpacing"
}
- return suggestedTargetPage.coerceIn(startPage - pagesLimit, startPage + pagesLimit)
+ val startPageLong = startPage.toLong()
+ val minRange = (startPageLong - pagesLimit).coerceAtLeast(0).toInt()
+ val maxRange = (startPageLong + pagesLimit).coerceAtMost(Int.MAX_VALUE.toLong()).toInt()
+ return suggestedTargetPage.coerceIn(minRange, maxRange)
}
override fun equals(other: Any?): Boolean {
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerState.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerState.kt
index b72cc7b..474dbc5 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerState.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerState.kt
@@ -58,6 +58,7 @@
import kotlin.math.abs
import kotlin.math.absoluteValue
import kotlin.math.roundToInt
+import kotlin.math.roundToLong
import kotlin.math.sign
/**
@@ -186,10 +187,13 @@
internal var firstVisiblePageOffset = 0
private set
- private var maxScrollOffset: Float = Float.MAX_VALUE
+ private var maxScrollOffset: Long = Long.MAX_VALUE
private set
- private var accumulator: Float = 0f
+ private var minScrollOffset: Long = 0L
+ private set
+
+ private var accumulator: Float = 0.0f
/**
* The prefetch will act after the measure pass has finished and it needs to know the
@@ -216,20 +220,42 @@
"\nmaxScrollOffset=$maxScrollOffset"
}
- val absolute = (currentScrollPosition + delta + accumulator)
- val newValue = absolute.coerceIn(0.0f, maxScrollOffset)
- val changed = absolute != newValue
- val consumed = newValue - currentScrollPosition
- previousPassDelta = consumed
- if (consumed.absoluteValue != 0.0f) {
- isScrollingForward = consumed > 0.0f
+ val decimalAccumulation = (delta + accumulator)
+ val decimalAccumulationInt = decimalAccumulation.roundToLong()
+ accumulator = decimalAccumulation - decimalAccumulationInt
+
+ /**
+ * The updated scroll position is the current position with the integer part of the delta
+ * and accumulator applied.
+ */
+ val updatedScrollPosition = (currentScrollPosition + decimalAccumulationInt)
+
+ /**
+ * Check if the scroll position may be larger than the maximum possible scroll.
+ */
+ val coercedScrollPosition = updatedScrollPosition.coerceIn(minScrollOffset, maxScrollOffset)
+
+ /**
+ * Check if we actually coerced.
+ */
+ val changed = updatedScrollPosition != coercedScrollPosition
+
+ /**
+ * Calculated the actual scroll delta to be applied
+ */
+ val scrollDelta = coercedScrollPosition - currentScrollPosition
+
+ previousPassDelta = scrollDelta.toFloat()
+
+ if (scrollDelta.absoluteValue != 0L) {
+ isScrollingForward = scrollDelta > 0.0f
}
- val consumedInt = consumed.roundToInt()
-
+ /**
+ * Apply the scroll delta
+ */
val layoutInfo = pagerLayoutInfoState.value
-
- if (layoutInfo.tryToApplyScrollWithoutRemeasure(-consumedInt)) {
+ if (layoutInfo.tryToApplyScrollWithoutRemeasure(-scrollDelta.toInt())) {
debugLog { "Will Apply Without Remeasure" }
applyMeasureResult(
result = layoutInfo,
@@ -239,13 +265,12 @@
placementScopeInvalidator.invalidateScope()
} else {
debugLog { "Will Apply With Remeasure" }
- scrollPosition.applyScrollDelta(consumedInt)
+ scrollPosition.applyScrollDelta(scrollDelta.toInt())
remeasurement?.forceRemeasure()
}
- accumulator = consumed - consumedInt
- // Avoid floating-point rounding error
- return if (changed) consumed else delta
+ // Return the consumed value.
+ return (if (changed) scrollDelta else delta).toFloat()
}
/**
@@ -636,6 +661,7 @@
firstVisiblePageOffset = result.firstVisiblePageScrollOffset
tryRunPrefetch(result)
maxScrollOffset = result.calculateNewMaxScrollOffset(pageCount)
+ minScrollOffset = result.calculateNewMinScrollOffset(pageCount)
debugLog {
"Finished Applying Measure Result" +
"\nNew maxScrollOffset=$maxScrollOffset"
@@ -799,9 +825,46 @@
}
}
-@OptIn(ExperimentalFoundationApi::class)
-private fun PagerMeasureResult.calculateNewMaxScrollOffset(pageCount: Int): Float {
- return (beforeContentPadding +
- (pageCount - 1) * (pageSpacing + pageSize).toFloat() +
- afterContentPadding).coerceAtLeast(0.0f)
+private fun PagerMeasureResult.calculateNewMaxScrollOffset(pageCount: Int): Long {
+ val pageSizeWithSpacing = pageSpacing + pageSize
+ val maxScrollPossible =
+ (pageCount.toLong()) * pageSizeWithSpacing + beforeContentPadding + afterContentPadding
+ val layoutSize =
+ if (orientation == Orientation.Horizontal) viewportSize.width else viewportSize.height
+
+ /**
+ * We need to take into consideration the snap position for max scroll position.
+ * For instance, if SnapPosition.Start, the max scroll position is
+ * pageCount * pageSize - viewport. Now if SnapPosition.End, it should be pageCount * pageSize.
+ * Therefore, the snap position discount varies between 0 and viewport.
+ */
+ val snapPositionDiscount = layoutSize - (snapPosition.position(
+ layoutSize = layoutSize,
+ itemSize = pageSize,
+ itemIndex = pageCount - 1,
+ beforeContentPadding = beforeContentPadding,
+ afterContentPadding = afterContentPadding,
+ itemCount = pageCount
+ )).coerceIn(0, layoutSize)
+
+ debugLog {
+ "maxScrollPossible=$maxScrollPossible" +
+ "\nsnapPositionDiscount=$snapPositionDiscount" +
+ "\nlayoutSize=$layoutSize"
+ }
+ return (maxScrollPossible - snapPositionDiscount).coerceAtLeast(0L)
+}
+
+private fun PagerMeasureResult.calculateNewMinScrollOffset(pageCount: Int): Long {
+ val layoutSize =
+ if (orientation == Orientation.Horizontal) viewportSize.width else viewportSize.height
+
+ return snapPosition.position(
+ layoutSize = layoutSize,
+ itemSize = pageSize,
+ itemIndex = 0,
+ beforeContentPadding = beforeContentPadding,
+ afterContentPadding = afterContentPadding,
+ itemCount = pageCount
+ ).coerceIn(0, layoutSize).toLong()
}
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicText.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicText.kt
index 9dbce7e..6089a6c 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicText.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicText.kt
@@ -19,6 +19,7 @@
import androidx.compose.foundation.text.modifiers.SelectableTextAnnotatedStringElement
import androidx.compose.foundation.text.modifiers.SelectionController
import androidx.compose.foundation.text.modifiers.TextAnnotatedStringElement
+import androidx.compose.foundation.text.modifiers.TextAnnotatedStringNode
import androidx.compose.foundation.text.modifiers.TextStringSimpleElement
import androidx.compose.foundation.text.modifiers.hasLinks
import androidx.compose.foundation.text.selection.LocalSelectionRegistrar
@@ -27,10 +28,12 @@
import androidx.compose.foundation.text.selection.hasSelection
import androidx.compose.runtime.Composable
import androidx.compose.runtime.MutableState
+import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.Saver
import androidx.compose.runtime.saveable.rememberSaveable
+import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Rect
import androidx.compose.ui.graphics.ColorProducer
@@ -129,7 +132,8 @@
placeholders = null,
onPlaceholderLayout = null,
selectionController = selectionController,
- color = color
+ color = color,
+ onShowTranslation = null
)
} else {
modifier
@@ -228,16 +232,20 @@
placeholders = null,
onPlaceholderLayout = null,
selectionController = selectionController,
- color = color
+ color = color,
+ onShowTranslation = null
),
EmptyMeasurePolicy
)
} else {
+ // takes into account text substitution (for translation) that is happening inside the
+ // TextAnnotatedStringNode
+ var displayedText by remember(text) { mutableStateOf(text) }
+
LayoutWithLinksAndInlineContent(
modifier = modifier,
- text = text,
+ text = displayedText,
onTextLayout = onTextLayout,
- hasLinks = hasLinks,
hasInlineContent = hasInlineContent,
inlineContent = inlineContent,
style = style,
@@ -247,7 +255,14 @@
minLines = minLines,
fontFamilyResolver = LocalFontFamilyResolver.current,
selectionController = selectionController,
- color = color
+ color = color,
+ onShowTranslation = { substitutionValue ->
+ displayedText = if (substitutionValue.isShowingSubstitution) {
+ substitutionValue.substitution
+ } else {
+ substitutionValue.original
+ }
+ }
)
}
}
@@ -359,6 +374,7 @@
/** Measure policy for inline content and links */
private class TextMeasurePolicy(
+ private val shouldMeasureLinks: () -> Boolean,
private val placements: () -> List<Rect?>?
) : MeasurePolicy {
override fun MeasureScope.measure(
@@ -389,7 +405,10 @@
val linksMeasurables = measurables.fastFilter {
it.parentData is TextRangeLayoutModifier
}
- val linksToPlace = measureWithTextRangeMeasureConstraints(linksMeasurables)
+ val linksToPlace = measureWithTextRangeMeasureConstraints(
+ measurables = linksMeasurables,
+ shouldMeasureLinks = shouldMeasureLinks
+ )
return layout(constraints.maxWidth, constraints.maxHeight) {
// inline content
@@ -397,7 +416,7 @@
placeable.place(position)
}
// links
- linksToPlace.fastForEach { (placeable, measureResult) ->
+ linksToPlace?.fastForEach { (placeable, measureResult) ->
placeable.place(measureResult?.invoke() ?: IntOffset.Zero)
}
}
@@ -405,14 +424,19 @@
}
/** Measure policy for links only */
-private object LinksTextMeasurePolicy : MeasurePolicy {
+private class LinksTextMeasurePolicy(
+ private val shouldMeasureLinks: () -> Boolean
+) : MeasurePolicy {
override fun MeasureScope.measure(
measurables: List<Measurable>,
constraints: Constraints
): MeasureResult {
- val linksToPlace = measureWithTextRangeMeasureConstraints(measurables)
return layout(constraints.maxWidth, constraints.maxHeight) {
- linksToPlace.fastForEach { (placeable, measureResult) ->
+ val linksToPlace = measureWithTextRangeMeasureConstraints(
+ measurables = measurables,
+ shouldMeasureLinks = shouldMeasureLinks
+ )
+ linksToPlace?.fastForEach { (placeable, measureResult) ->
placeable.place(measureResult?.invoke() ?: IntOffset.Zero)
}
}
@@ -420,18 +444,24 @@
}
private fun measureWithTextRangeMeasureConstraints(
- measurables: List<Measurable>
-): List<Pair<Placeable, (() -> IntOffset)?>> {
- val textRangeLayoutMeasureScope = TextRangeLayoutMeasureScope()
- return measurables.fastMapIndexedNotNull { _, measurable ->
- val rangeMeasurePolicy = (measurable.parentData as TextRangeLayoutModifier).measurePolicy
- val rangeMeasureResult = with(rangeMeasurePolicy) {
- textRangeLayoutMeasureScope.measure()
+ measurables: List<Measurable>,
+ shouldMeasureLinks: () -> Boolean,
+): List<Pair<Placeable, (() -> IntOffset)?>>? {
+ return if (shouldMeasureLinks()) {
+ val textRangeLayoutMeasureScope = TextRangeLayoutMeasureScope()
+ measurables.fastMapIndexedNotNull { _, measurable ->
+ val rangeMeasurePolicy =
+ (measurable.parentData as TextRangeLayoutModifier).measurePolicy
+ val rangeMeasureResult = with(rangeMeasurePolicy) {
+ textRangeLayoutMeasureScope.measure()
+ }
+ val placeable = measurable.measure(
+ Constraints.fixed(rangeMeasureResult.width, rangeMeasureResult.height)
+ )
+ Pair(placeable, rangeMeasureResult.place)
}
- val placeable = measurable.measure(
- Constraints.fixed(rangeMeasureResult.width, rangeMeasureResult.height)
- )
- Pair(placeable, rangeMeasureResult.place)
+ } else {
+ null
}
}
@@ -447,7 +477,8 @@
placeholders: List<AnnotatedString.Range<Placeholder>>?,
onPlaceholderLayout: ((List<Rect?>) -> Unit)?,
selectionController: SelectionController?,
- color: ColorProducer?
+ color: ColorProducer?,
+ onShowTranslation: ((TextAnnotatedStringNode.TextSubstitutionValue) -> Unit)?
): Modifier {
if (selectionController == null) {
val staticTextModifier = TextAnnotatedStringElement(
@@ -462,7 +493,8 @@
placeholders,
onPlaceholderLayout,
null,
- color
+ color,
+ onShowTranslation
)
return this then Modifier /* selection position */ then staticTextModifier
} else {
@@ -489,7 +521,6 @@
modifier: Modifier,
text: AnnotatedString,
onTextLayout: ((TextLayoutResult) -> Unit)?,
- hasLinks: Boolean,
hasInlineContent: Boolean,
inlineContent: Map<String, InlineTextContent> = mapOf(),
style: TextStyle,
@@ -499,9 +530,10 @@
minLines: Int,
fontFamilyResolver: FontFamily.Resolver,
selectionController: SelectionController?,
- color: ColorProducer?
+ color: ColorProducer?,
+ onShowTranslation: ((TextAnnotatedStringNode.TextSubstitutionValue) -> Unit)?
) {
- val textScope = if (hasLinks) {
+ val textScope = if (text.hasLinks()) {
remember(text) { TextLinkScope(text) }
} else null
@@ -545,12 +577,18 @@
placeholders = placeholders,
onPlaceholderLayout = onPlaceholderLayout,
selectionController = selectionController,
- color = color
+ color = color,
+ onShowTranslation = onShowTranslation
),
measurePolicy = if (!hasInlineContent) {
- LinksTextMeasurePolicy
+ LinksTextMeasurePolicy(
+ shouldMeasureLinks = { textScope?.let { it.shouldMeasureLinks() } ?: false }
+ )
} else {
- TextMeasurePolicy { measuredPlaceholderPositions?.value }
+ TextMeasurePolicy(
+ shouldMeasureLinks = { textScope?.let { it.shouldMeasureLinks() } ?: false },
+ placements = { measuredPlaceholderPositions?.value }
+ )
}
)
}
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLinkScope.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLinkScope.kt
index a34cb89..22a5e08 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLinkScope.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLinkScope.kt
@@ -57,6 +57,12 @@
internal class TextLinkScope(val text: AnnotatedString) {
var textLayoutResult: TextLayoutResult? by mutableStateOf(null)
+ // indicates whether the links should be measured or not. The latter needed to handle
+ // case where translated string forces measurement before the recomposition. Recomposition in
+ // this case will dispose the links altogether because translator returns plain text
+ val shouldMeasureLinks: () -> Boolean
+ get() = { text == textLayoutResult?.layoutInput?.text }
+
/**
* Causes the modified element to be measured with fixed constraints equal to the bounds of the
* text range [[start], [end]) and placed over that range of text.
@@ -106,9 +112,14 @@
@OptIn(ExperimentalFoundationApi::class)
@Composable
- fun LinksComposables() = with(this) {
+ fun LinksComposables() {
+ // we might be out of sync if translation happened but BasicText's children weren't
+ // recomposed yet
+ if (!shouldMeasureLinks()) return
+
val indication = LocalIndication.current
val uriHandler = LocalUriHandler.current
+
val links = text.getUrlAnnotations(0, text.length)
links.fastForEach { range ->
val interactionSource = remember(range) { MutableInteractionSource() }
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/SelectableTextAnnotatedStringNode.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/SelectableTextAnnotatedStringNode.kt
index 57adcad..282e349 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/SelectableTextAnnotatedStringNode.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/SelectableTextAnnotatedStringNode.kt
@@ -56,7 +56,8 @@
placeholders: List<AnnotatedString.Range<Placeholder>>? = null,
onPlaceholderLayout: ((List<Rect?>) -> Unit)? = null,
private var selectionController: SelectionController? = null,
- overrideColor: ColorProducer? = null
+ overrideColor: ColorProducer? = null,
+ private var onShowTranslation: ((TextAnnotatedStringNode.TextSubstitutionValue) -> Unit)? = null
) : DelegatingNode(), LayoutModifierNode, DrawModifierNode, GlobalPositionAwareModifierNode {
private val delegate = delegate(
@@ -72,7 +73,8 @@
placeholders = placeholders,
onPlaceholderLayout = onPlaceholderLayout,
selectionController = selectionController,
- overrideColor = overrideColor
+ overrideColor = overrideColor,
+ onShowTranslation = onShowTranslation
)
)
@@ -144,7 +146,8 @@
callbacksChanged = delegate.updateCallbacks(
onTextLayout = onTextLayout,
onPlaceholderLayout = onPlaceholderLayout,
- selectionController = selectionController
+ selectionController = selectionController,
+ onShowTranslation = onShowTranslation
),
)
this.selectionController = selectionController
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringElement.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringElement.kt
index 4530d5a..f8853ad 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringElement.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringElement.kt
@@ -45,7 +45,8 @@
private val placeholders: List<AnnotatedString.Range<Placeholder>>? = null,
private val onPlaceholderLayout: ((List<Rect?>) -> Unit)? = null,
private val selectionController: SelectionController? = null,
- private val color: ColorProducer? = null
+ private val color: ColorProducer? = null,
+ private val onShowTranslation: ((TextAnnotatedStringNode.TextSubstitutionValue) -> Unit)? = null
) : ModifierNodeElement<TextAnnotatedStringNode>() {
override fun create(): TextAnnotatedStringNode = TextAnnotatedStringNode(
@@ -60,7 +61,8 @@
placeholders,
onPlaceholderLayout,
selectionController,
- color
+ color,
+ onShowTranslation
)
override fun update(node: TextAnnotatedStringNode) {
@@ -81,7 +83,8 @@
callbacksChanged = node.updateCallbacks(
onTextLayout = onTextLayout,
onPlaceholderLayout = onPlaceholderLayout,
- selectionController = selectionController
+ selectionController = selectionController,
+ onShowTranslation = onShowTranslation
)
)
}
@@ -100,6 +103,7 @@
// these are equally unlikely to change
if (fontFamilyResolver != other.fontFamilyResolver) return false
if (onTextLayout != other.onTextLayout) return false
+ if (onShowTranslation != other.onShowTranslation) return false
if (overflow != other.overflow) return false
if (softWrap != other.softWrap) return false
if (maxLines != other.maxLines) return false
@@ -125,6 +129,7 @@
result = 31 * result + (onPlaceholderLayout?.hashCode() ?: 0)
result = 31 * result + (selectionController?.hashCode() ?: 0)
result = 31 * result + (color?.hashCode() ?: 0)
+ result = 31 * result + (onShowTranslation?.hashCode() ?: 0)
return result
}
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringNode.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringNode.kt
index c945897..6d1d3f9 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringNode.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringNode.kt
@@ -82,7 +82,8 @@
private var placeholders: List<AnnotatedString.Range<Placeholder>>? = null,
private var onPlaceholderLayout: ((List<Rect?>) -> Unit)? = null,
private var selectionController: SelectionController? = null,
- private var overrideColor: ColorProducer? = null
+ private var overrideColor: ColorProducer? = null,
+ private var onShowTranslation: ((TextSubstitutionValue) -> Unit)? = null
) : Modifier.Node(), LayoutModifierNode, DrawModifierNode, SemanticsModifierNode {
private var baselineCache: Map<AlignmentLine, Int>? = null
@@ -194,7 +195,8 @@
fun updateCallbacks(
onTextLayout: ((TextLayoutResult) -> Unit)?,
onPlaceholderLayout: ((List<Rect?>) -> Unit)?,
- selectionController: SelectionController?
+ selectionController: SelectionController?,
+ onShowTranslation: ((TextSubstitutionValue) -> Unit)?
): Boolean {
var changed = false
@@ -212,6 +214,11 @@
this.selectionController = selectionController
changed = true
}
+
+ if (this.onShowTranslation != onShowTranslation) {
+ this.onShowTranslation = onShowTranslation
+ changed = true
+ }
return changed
}
@@ -347,6 +354,7 @@
if ([email protected] == null) {
return@showTextSubstitution false
}
+ onShowTranslation?.invoke([email protected]!!)
[email protected]?.isShowingSubstitution = it
@@ -534,7 +542,12 @@
}
// draw inline content and links indication
- if (text.hasLinks() || !placeholders.isNullOrEmpty()) {
+ val hasLinks = if (textSubstitution?.isShowingSubstitution == true) {
+ false
+ } else {
+ text.hasLinks()
+ }
+ if (hasLinks || !placeholders.isNullOrEmpty()) {
drawContent()
}
}
diff --git a/compose/material/material/build.gradle b/compose/material/material/build.gradle
index 3ea9012..692fbd3 100644
--- a/compose/material/material/build.gradle
+++ b/compose/material/material/build.gradle
@@ -83,6 +83,7 @@
dependsOn(jvmMain)
dependencies {
api("androidx.annotation:annotation:1.1.0")
+ api(project(":annotation:annotation-experimental"))
// TODO: remove next 3 dependencies when b/202810604 is fixed
implementation("androidx.savedstate:savedstate:1.2.1")
diff --git a/compose/material/material/icons/generator/src/main/kotlin/androidx/compose/material/icons/generator/tasks/IconGenerationTask.kt b/compose/material/material/icons/generator/src/main/kotlin/androidx/compose/material/icons/generator/tasks/IconGenerationTask.kt
index ce7fd5d..3626a13e 100644
--- a/compose/material/material/icons/generator/src/main/kotlin/androidx/compose/material/icons/generator/tasks/IconGenerationTask.kt
+++ b/compose/material/material/icons/generator/src/main/kotlin/androidx/compose/material/icons/generator/tasks/IconGenerationTask.kt
@@ -174,6 +174,7 @@
// b/175401659 - disable lint as it takes a long time, and most errors should
// be caught by lint on material-icons-core anyway
project.afterEvaluate {
+ if (project.hasProperty("android.injected.invoked.from.ide")) return@afterEvaluate
project.tasks.named("lintAnalyzeDebug") { t ->
t.enabled = false
}
diff --git a/compose/material/material/lint-baseline.xml b/compose/material/material/lint-baseline.xml
index 8a3345b2..7d01edba 100644
--- a/compose/material/material/lint-baseline.xml
+++ b/compose/material/material/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
@@ -40,24 +40,6 @@
<issue
id="BanThreadSleep"
message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(300)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidInstrumentedTest/kotlin/androidx/compose/material/MaterialRippleThemeTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(300)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidInstrumentedTest/kotlin/androidx/compose/material/MaterialRippleThemeTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
errorLine1=" Thread.sleep(300)"
errorLine2=" ~~~~~">
<location
diff --git a/compose/material3/material3-adaptive-navigation-suite/build.gradle b/compose/material3/material3-adaptive-navigation-suite/build.gradle
index 785cab4..243766e 100644
--- a/compose/material3/material3-adaptive-navigation-suite/build.gradle
+++ b/compose/material3/material3-adaptive-navigation-suite/build.gradle
@@ -66,6 +66,7 @@
dependsOn(jvmMain)
dependencies {
api("androidx.annotation:annotation:1.1.0")
+ api(project(":annotation:annotation-experimental"))
}
}
diff --git a/compose/material3/material3-adaptive/api/current.txt b/compose/material3/material3-adaptive/api/current.txt
index f32d8b3..edc1637 100644
--- a/compose/material3/material3-adaptive/api/current.txt
+++ b/compose/material3/material3-adaptive/api/current.txt
@@ -70,7 +70,8 @@
public final class ListDetailPaneScaffold_androidKt {
method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static void ListDetailPaneScaffold(kotlin.jvm.functions.Function1<? super androidx.compose.material3.adaptive.ThreePaneScaffoldScope,kotlin.Unit> listPane, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.material3.adaptive.ThreePaneScaffoldState scaffoldState, optional androidx.compose.foundation.layout.WindowInsets windowInsets, optional kotlin.jvm.functions.Function1<? super androidx.compose.material3.adaptive.ThreePaneScaffoldScope,kotlin.Unit>? extraPane, kotlin.jvm.functions.Function1<? super androidx.compose.material3.adaptive.ThreePaneScaffoldScope,kotlin.Unit> detailPane);
- method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldState calculateListDetailPaneScaffoldState(optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, optional androidx.compose.material3.adaptive.ThreePaneScaffoldRole currentPaneDestination);
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldState calculateListDetailPaneScaffoldState(optional androidx.compose.material3.adaptive.ThreePaneScaffoldRole currentPaneDestination, optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies);
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldState calculateListDetailPaneScaffoldState(java.util.List<? extends androidx.compose.material3.adaptive.ThreePaneScaffoldRole> paneDestinationHistory, optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies);
}
@SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @kotlin.jvm.JvmInline public final value class PaneAdaptedValue {
@@ -145,7 +146,8 @@
public final class SupportingPaneScaffold_androidKt {
method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static void SupportingPaneScaffold(kotlin.jvm.functions.Function1<? super androidx.compose.material3.adaptive.ThreePaneScaffoldScope,kotlin.Unit> supportingPane, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.material3.adaptive.ThreePaneScaffoldState scaffoldState, optional androidx.compose.foundation.layout.WindowInsets windowInsets, optional kotlin.jvm.functions.Function1<? super androidx.compose.material3.adaptive.ThreePaneScaffoldScope,kotlin.Unit>? extraPane, kotlin.jvm.functions.Function1<? super androidx.compose.material3.adaptive.ThreePaneScaffoldScope,kotlin.Unit> mainPane);
- method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldState calculateSupportingPaneScaffoldState(optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, optional androidx.compose.material3.adaptive.ThreePaneScaffoldRole currentPaneDestination);
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldState calculateSupportingPaneScaffoldState(optional androidx.compose.material3.adaptive.ThreePaneScaffoldRole currentPaneDestination, optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies);
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldState calculateSupportingPaneScaffoldState(java.util.List<? extends androidx.compose.material3.adaptive.ThreePaneScaffoldRole> paneDestinationHistory, optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies);
}
@SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi public final class ThreePaneScaffoldAdaptStrategies {
@@ -160,14 +162,17 @@
@SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Stable public interface ThreePaneScaffoldNavigator {
method public boolean canNavigateBack(optional boolean scaffoldValueMustChange);
method public androidx.compose.material3.adaptive.ThreePaneScaffoldState getScaffoldState();
+ method public boolean isDestinationHistoryAware();
method public boolean navigateBack(optional boolean popUntilScaffoldValueChange);
method public void navigateTo(androidx.compose.material3.adaptive.ThreePaneScaffoldRole pane);
+ method public void setDestinationHistoryAware(boolean);
+ property public abstract boolean isDestinationHistoryAware;
property public abstract androidx.compose.material3.adaptive.ThreePaneScaffoldState scaffoldState;
}
public final class ThreePaneScaffoldNavigator_androidKt {
- method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldNavigator rememberListDetailPaneScaffoldNavigator(optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, optional java.util.List<? extends androidx.compose.material3.adaptive.ThreePaneScaffoldRole> initialDestinationHistory);
- method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldNavigator rememberSupportingPaneScaffoldNavigator(optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, optional java.util.List<? extends androidx.compose.material3.adaptive.ThreePaneScaffoldRole> initialDestinationHistory);
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldNavigator rememberListDetailPaneScaffoldNavigator(optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, optional boolean isDestinationHistoryAware, optional java.util.List<? extends androidx.compose.material3.adaptive.ThreePaneScaffoldRole> initialDestinationHistory);
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldNavigator rememberSupportingPaneScaffoldNavigator(optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, optional boolean isDestinationHistoryAware, optional java.util.List<? extends androidx.compose.material3.adaptive.ThreePaneScaffoldRole> initialDestinationHistory);
}
@SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi public enum ThreePaneScaffoldRole {
@@ -210,7 +215,8 @@
}
public final class ThreePaneScaffoldValueKt {
- method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi public static androidx.compose.material3.adaptive.ThreePaneScaffoldValue calculateThreePaneScaffoldValue(int maxHorizontalPartitions, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, optional androidx.compose.material3.adaptive.ThreePaneScaffoldRole? currentDestination);
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi public static androidx.compose.material3.adaptive.ThreePaneScaffoldValue calculateThreePaneScaffoldValue(int maxHorizontalPartitions, androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, androidx.compose.material3.adaptive.ThreePaneScaffoldRole? currentDestination);
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi public static androidx.compose.material3.adaptive.ThreePaneScaffoldValue calculateThreePaneScaffoldValue(int maxHorizontalPartitions, androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, java.util.List<? extends androidx.compose.material3.adaptive.ThreePaneScaffoldRole> destinationHistory);
}
@SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Immutable public final class WindowAdaptiveInfo {
diff --git a/compose/material3/material3-adaptive/api/restricted_current.txt b/compose/material3/material3-adaptive/api/restricted_current.txt
index f32d8b3..edc1637 100644
--- a/compose/material3/material3-adaptive/api/restricted_current.txt
+++ b/compose/material3/material3-adaptive/api/restricted_current.txt
@@ -70,7 +70,8 @@
public final class ListDetailPaneScaffold_androidKt {
method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static void ListDetailPaneScaffold(kotlin.jvm.functions.Function1<? super androidx.compose.material3.adaptive.ThreePaneScaffoldScope,kotlin.Unit> listPane, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.material3.adaptive.ThreePaneScaffoldState scaffoldState, optional androidx.compose.foundation.layout.WindowInsets windowInsets, optional kotlin.jvm.functions.Function1<? super androidx.compose.material3.adaptive.ThreePaneScaffoldScope,kotlin.Unit>? extraPane, kotlin.jvm.functions.Function1<? super androidx.compose.material3.adaptive.ThreePaneScaffoldScope,kotlin.Unit> detailPane);
- method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldState calculateListDetailPaneScaffoldState(optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, optional androidx.compose.material3.adaptive.ThreePaneScaffoldRole currentPaneDestination);
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldState calculateListDetailPaneScaffoldState(optional androidx.compose.material3.adaptive.ThreePaneScaffoldRole currentPaneDestination, optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies);
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldState calculateListDetailPaneScaffoldState(java.util.List<? extends androidx.compose.material3.adaptive.ThreePaneScaffoldRole> paneDestinationHistory, optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies);
}
@SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @kotlin.jvm.JvmInline public final value class PaneAdaptedValue {
@@ -145,7 +146,8 @@
public final class SupportingPaneScaffold_androidKt {
method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static void SupportingPaneScaffold(kotlin.jvm.functions.Function1<? super androidx.compose.material3.adaptive.ThreePaneScaffoldScope,kotlin.Unit> supportingPane, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.material3.adaptive.ThreePaneScaffoldState scaffoldState, optional androidx.compose.foundation.layout.WindowInsets windowInsets, optional kotlin.jvm.functions.Function1<? super androidx.compose.material3.adaptive.ThreePaneScaffoldScope,kotlin.Unit>? extraPane, kotlin.jvm.functions.Function1<? super androidx.compose.material3.adaptive.ThreePaneScaffoldScope,kotlin.Unit> mainPane);
- method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldState calculateSupportingPaneScaffoldState(optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, optional androidx.compose.material3.adaptive.ThreePaneScaffoldRole currentPaneDestination);
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldState calculateSupportingPaneScaffoldState(optional androidx.compose.material3.adaptive.ThreePaneScaffoldRole currentPaneDestination, optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies);
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldState calculateSupportingPaneScaffoldState(java.util.List<? extends androidx.compose.material3.adaptive.ThreePaneScaffoldRole> paneDestinationHistory, optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies);
}
@SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi public final class ThreePaneScaffoldAdaptStrategies {
@@ -160,14 +162,17 @@
@SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Stable public interface ThreePaneScaffoldNavigator {
method public boolean canNavigateBack(optional boolean scaffoldValueMustChange);
method public androidx.compose.material3.adaptive.ThreePaneScaffoldState getScaffoldState();
+ method public boolean isDestinationHistoryAware();
method public boolean navigateBack(optional boolean popUntilScaffoldValueChange);
method public void navigateTo(androidx.compose.material3.adaptive.ThreePaneScaffoldRole pane);
+ method public void setDestinationHistoryAware(boolean);
+ property public abstract boolean isDestinationHistoryAware;
property public abstract androidx.compose.material3.adaptive.ThreePaneScaffoldState scaffoldState;
}
public final class ThreePaneScaffoldNavigator_androidKt {
- method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldNavigator rememberListDetailPaneScaffoldNavigator(optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, optional java.util.List<? extends androidx.compose.material3.adaptive.ThreePaneScaffoldRole> initialDestinationHistory);
- method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldNavigator rememberSupportingPaneScaffoldNavigator(optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, optional java.util.List<? extends androidx.compose.material3.adaptive.ThreePaneScaffoldRole> initialDestinationHistory);
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldNavigator rememberListDetailPaneScaffoldNavigator(optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, optional boolean isDestinationHistoryAware, optional java.util.List<? extends androidx.compose.material3.adaptive.ThreePaneScaffoldRole> initialDestinationHistory);
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.ThreePaneScaffoldNavigator rememberSupportingPaneScaffoldNavigator(optional androidx.compose.material3.adaptive.PaneScaffoldDirective scaffoldDirective, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, optional boolean isDestinationHistoryAware, optional java.util.List<? extends androidx.compose.material3.adaptive.ThreePaneScaffoldRole> initialDestinationHistory);
}
@SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi public enum ThreePaneScaffoldRole {
@@ -210,7 +215,8 @@
}
public final class ThreePaneScaffoldValueKt {
- method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi public static androidx.compose.material3.adaptive.ThreePaneScaffoldValue calculateThreePaneScaffoldValue(int maxHorizontalPartitions, optional androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, optional androidx.compose.material3.adaptive.ThreePaneScaffoldRole? currentDestination);
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi public static androidx.compose.material3.adaptive.ThreePaneScaffoldValue calculateThreePaneScaffoldValue(int maxHorizontalPartitions, androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, androidx.compose.material3.adaptive.ThreePaneScaffoldRole? currentDestination);
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi public static androidx.compose.material3.adaptive.ThreePaneScaffoldValue calculateThreePaneScaffoldValue(int maxHorizontalPartitions, androidx.compose.material3.adaptive.ThreePaneScaffoldAdaptStrategies adaptStrategies, java.util.List<? extends androidx.compose.material3.adaptive.ThreePaneScaffoldRole> destinationHistory);
}
@SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Immutable public final class WindowAdaptiveInfo {
diff --git a/compose/material3/material3-adaptive/build.gradle b/compose/material3/material3-adaptive/build.gradle
index dd5ed5d..b00d5fd 100644
--- a/compose/material3/material3-adaptive/build.gradle
+++ b/compose/material3/material3-adaptive/build.gradle
@@ -65,6 +65,7 @@
dependsOn(jvmMain)
dependencies {
api("androidx.annotation:annotation:1.1.0")
+ api(project(":annotation:annotation-experimental"))
implementation("androidx.window:window:1.2.0")
}
}
diff --git a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ListDetailPaneScaffoldNavigatorTest.kt b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ListDetailPaneScaffoldNavigatorTest.kt
index 83c85bd..1599b52 100644
--- a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ListDetailPaneScaffoldNavigatorTest.kt
+++ b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ListDetailPaneScaffoldNavigatorTest.kt
@@ -36,7 +36,7 @@
val composeRule = createComposeRule()
@Test
- fun singlePaneLayout_navigateTo_makeFocusPaneExpanded() {
+ fun singlePaneLayout_navigateTo_makeDestinationPaneExpanded() {
lateinit var scaffoldNavigator: ThreePaneScaffoldNavigator
var canNavigateBack by Delegates.notNull<Boolean>()
@@ -49,21 +49,21 @@
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.primary
+ scaffoldNavigator.scaffoldState.scaffoldValue[ListDetailPaneScaffoldRole.Detail]
).isEqualTo(PaneAdaptedValue.Hidden)
scaffoldNavigator.navigateTo(ListDetailPaneScaffoldRole.Detail)
}
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.primary
+ scaffoldNavigator.scaffoldState.scaffoldValue[ListDetailPaneScaffoldRole.Detail]
).isEqualTo(PaneAdaptedValue.Expanded)
assertThat(canNavigateBack).isTrue()
}
}
@Test
- fun dualPaneLayout_navigateTo_keepFocusPaneExpanded() {
+ fun dualPaneLayout_navigateTo_keepDestinationPaneExpanded() {
lateinit var scaffoldNavigator: ThreePaneScaffoldNavigator
var canNavigateBack by Delegates.notNull<Boolean>()
@@ -76,21 +76,77 @@
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.primary
+ scaffoldNavigator.scaffoldState.scaffoldValue[ListDetailPaneScaffoldRole.Detail]
).isEqualTo(PaneAdaptedValue.Expanded)
scaffoldNavigator.navigateTo(ListDetailPaneScaffoldRole.Detail)
}
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.primary
+ scaffoldNavigator.scaffoldState.scaffoldValue[ListDetailPaneScaffoldRole.Detail]
).isEqualTo(PaneAdaptedValue.Expanded)
assertThat(canNavigateBack).isFalse()
}
}
@Test
- fun singlePaneLayout_navigateBack_makeFocusPaneHidden() {
+ fun dualPaneLayout_navigateToExtra_hideListWhenNotHistoryAware() {
+ lateinit var scaffoldNavigator: ThreePaneScaffoldNavigator
+ var canNavigateBack by Delegates.notNull<Boolean>()
+
+ composeRule.setContent {
+ scaffoldNavigator = rememberListDetailPaneScaffoldNavigator(
+ scaffoldDirective = MockDualPaneScaffoldDirective,
+ isDestinationHistoryAware = false
+ )
+ canNavigateBack = scaffoldNavigator.canNavigateBack()
+ }
+
+ composeRule.runOnIdle {
+ assertThat(
+ scaffoldNavigator.scaffoldState.scaffoldValue[ListDetailPaneScaffoldRole.List]
+ ).isEqualTo(PaneAdaptedValue.Expanded)
+ scaffoldNavigator.navigateTo(ListDetailPaneScaffoldRole.Extra)
+ }
+
+ composeRule.runOnIdle {
+ assertThat(
+ scaffoldNavigator.scaffoldState.scaffoldValue[ListDetailPaneScaffoldRole.List]
+ ).isEqualTo(PaneAdaptedValue.Hidden)
+ assertThat(canNavigateBack).isTrue()
+ }
+ }
+
+ @Test
+ fun dualPaneLayout_navigateToExtra_keepListExpandedWhenHistoryAware() {
+ lateinit var scaffoldNavigator: ThreePaneScaffoldNavigator
+ var canNavigateBack by Delegates.notNull<Boolean>()
+
+ composeRule.setContent {
+ scaffoldNavigator = rememberListDetailPaneScaffoldNavigator(
+ scaffoldDirective = MockDualPaneScaffoldDirective,
+ isDestinationHistoryAware = true
+ )
+ canNavigateBack = scaffoldNavigator.canNavigateBack()
+ }
+
+ composeRule.runOnIdle {
+ assertThat(
+ scaffoldNavigator.scaffoldState.scaffoldValue[ListDetailPaneScaffoldRole.List]
+ ).isEqualTo(PaneAdaptedValue.Expanded)
+ scaffoldNavigator.navigateTo(ListDetailPaneScaffoldRole.Extra)
+ }
+
+ composeRule.runOnIdle {
+ assertThat(
+ scaffoldNavigator.scaffoldState.scaffoldValue[ListDetailPaneScaffoldRole.List]
+ ).isEqualTo(PaneAdaptedValue.Expanded)
+ assertThat(canNavigateBack).isTrue()
+ }
+ }
+
+ @Test
+ fun singlePaneLayout_navigateBack_makeDestinationPaneHidden() {
lateinit var scaffoldNavigator: ThreePaneScaffoldNavigator
var canNavigateBack by Delegates.notNull<Boolean>()
@@ -107,7 +163,7 @@
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.primary
+ scaffoldNavigator.scaffoldState.scaffoldValue[ListDetailPaneScaffoldRole.Detail]
).isEqualTo(PaneAdaptedValue.Expanded)
assertThat(canNavigateBack).isTrue()
scaffoldNavigator.navigateBack()
@@ -115,7 +171,7 @@
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.primary
+ scaffoldNavigator.scaffoldState.scaffoldValue[ListDetailPaneScaffoldRole.Detail]
).isEqualTo(PaneAdaptedValue.Hidden)
assertThat(canNavigateBack).isFalse()
}
@@ -156,7 +212,7 @@
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.primary
+ scaffoldNavigator.scaffoldState.scaffoldValue[ListDetailPaneScaffoldRole.Detail]
).isEqualTo(PaneAdaptedValue.Expanded)
assertThat(scaffoldNavigator.canNavigateBack(false)).isTrue()
scaffoldNavigator.navigateBack(false)
@@ -164,12 +220,96 @@
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.primary
+ scaffoldNavigator.scaffoldState.scaffoldValue[ListDetailPaneScaffoldRole.Detail]
).isEqualTo(PaneAdaptedValue.Expanded)
}
}
@Test
+ fun dualPaneLayout_enforceScaffoldChangeWhenHistoryAware_notSkipBackstackEntry() {
+ lateinit var scaffoldNavigator: ThreePaneScaffoldNavigator
+
+ composeRule.setContent {
+ scaffoldNavigator = rememberListDetailPaneScaffoldNavigator(
+ scaffoldDirective = MockDualPaneScaffoldDirective,
+ initialDestinationHistory = listOf(
+ ListDetailPaneScaffoldRole.Extra,
+ ListDetailPaneScaffoldRole.List,
+ ),
+ isDestinationHistoryAware = true
+ )
+ }
+
+ composeRule.runOnIdle {
+ scaffoldNavigator.scaffoldState.scaffoldValue.assert(
+ PaneAdaptedValue.Hidden,
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Expanded
+ )
+ scaffoldNavigator.navigateTo(ListDetailPaneScaffoldRole.Detail)
+ }
+
+ composeRule.runOnIdle {
+ scaffoldNavigator.scaffoldState.scaffoldValue.assert(
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Hidden
+ )
+ scaffoldNavigator.navigateBack()
+ }
+
+ composeRule.runOnIdle {
+ scaffoldNavigator.scaffoldState.scaffoldValue.assert(
+ PaneAdaptedValue.Hidden,
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Expanded
+ )
+ }
+ }
+
+ @Test
+ fun dualPaneLayout_enforceScaffoldChangeWhenNotHistoryAware_skipBackstackEntry() {
+ lateinit var scaffoldNavigator: ThreePaneScaffoldNavigator
+
+ composeRule.setContent {
+ scaffoldNavigator = rememberListDetailPaneScaffoldNavigator(
+ scaffoldDirective = MockDualPaneScaffoldDirective,
+ initialDestinationHistory = listOf(
+ ListDetailPaneScaffoldRole.Extra,
+ ListDetailPaneScaffoldRole.List,
+ ),
+ isDestinationHistoryAware = false
+ )
+ }
+
+ composeRule.runOnIdle {
+ scaffoldNavigator.scaffoldState.scaffoldValue.assert(
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Hidden
+ )
+ scaffoldNavigator.navigateTo(ListDetailPaneScaffoldRole.Detail)
+ }
+
+ composeRule.runOnIdle {
+ scaffoldNavigator.scaffoldState.scaffoldValue.assert(
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Hidden
+ )
+ scaffoldNavigator.navigateBack()
+ }
+
+ composeRule.runOnIdle {
+ scaffoldNavigator.scaffoldState.scaffoldValue.assert(
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Hidden,
+ PaneAdaptedValue.Expanded
+ )
+ }
+ }
+
+ @Test
fun singlePaneToDualPaneLayout_enforceScaffoldValueChange_cannotNavigateBack() {
lateinit var scaffoldNavigator: ThreePaneScaffoldNavigator
val mockCurrentScaffoldDirective = mutableStateOf(MockSinglePaneScaffoldDirective)
@@ -185,7 +325,7 @@
}
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.primary
+ scaffoldNavigator.scaffoldState.scaffoldValue[ListDetailPaneScaffoldRole.Detail]
).isEqualTo(PaneAdaptedValue.Expanded)
// Switches to dual pane
mockCurrentScaffoldDirective.value = MockDualPaneScaffoldDirective
@@ -216,3 +356,14 @@
verticalPartitionSpacerSize = 0.dp,
excludedBounds = emptyList()
)
+
+@OptIn(ExperimentalMaterial3AdaptiveApi::class)
+private fun ThreePaneScaffoldValue.assert(
+ expectedDetailPaneAdaptedValue: PaneAdaptedValue,
+ expectedListPaneAdaptedValue: PaneAdaptedValue,
+ expectedExtraPaneAdaptedValue: PaneAdaptedValue
+) {
+ assertThat(this[ListDetailPaneScaffoldRole.Detail]).isEqualTo(expectedDetailPaneAdaptedValue)
+ assertThat(this[ListDetailPaneScaffoldRole.List]).isEqualTo(expectedListPaneAdaptedValue)
+ assertThat(this[ListDetailPaneScaffoldRole.Extra]).isEqualTo(expectedExtraPaneAdaptedValue)
+}
diff --git a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/SupportingPaneScaffoldNavigatorTest.kt b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/SupportingPaneScaffoldNavigatorTest.kt
index 34d2315..181d578 100644
--- a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/SupportingPaneScaffoldNavigatorTest.kt
+++ b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/SupportingPaneScaffoldNavigatorTest.kt
@@ -36,7 +36,7 @@
val composeRule = createComposeRule()
@Test
- fun singlePaneLayout_navigateTo_makeFocusPaneExpanded() {
+ fun singlePaneLayout_navigateTo_makeDestinationPaneExpanded() {
lateinit var scaffoldNavigator: ThreePaneScaffoldNavigator
var canNavigateBack by Delegates.notNull<Boolean>()
@@ -49,21 +49,21 @@
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.secondary
+ scaffoldNavigator.scaffoldState.scaffoldValue[SupportingPaneScaffoldRole.Supporting]
).isEqualTo(PaneAdaptedValue.Hidden)
scaffoldNavigator.navigateTo(SupportingPaneScaffoldRole.Supporting)
}
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.secondary
+ scaffoldNavigator.scaffoldState.scaffoldValue[SupportingPaneScaffoldRole.Supporting]
).isEqualTo(PaneAdaptedValue.Expanded)
assertThat(canNavigateBack).isTrue()
}
}
@Test
- fun dualPaneLayout_navigateTo_keepFocusPaneExpanded() {
+ fun dualPaneLayout_navigateTo_keepDestinationPaneExpanded() {
lateinit var scaffoldNavigator: ThreePaneScaffoldNavigator
var canNavigateBack by Delegates.notNull<Boolean>()
@@ -76,21 +76,79 @@
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.primary
+ scaffoldNavigator.scaffoldState.scaffoldValue[SupportingPaneScaffoldRole.Main]
).isEqualTo(PaneAdaptedValue.Expanded)
scaffoldNavigator.navigateTo(SupportingPaneScaffoldRole.Main)
}
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.primary
+ scaffoldNavigator.scaffoldState.scaffoldValue[SupportingPaneScaffoldRole.Main]
).isEqualTo(PaneAdaptedValue.Expanded)
assertThat(canNavigateBack).isFalse()
}
}
@Test
- fun singlePaneLayout_navigateBack_makeFocusPaneHidden() {
+ fun dualPaneLayout_navigateToExtra_hideSupportingWhenNotHistoryAware() {
+ lateinit var scaffoldNavigator: ThreePaneScaffoldNavigator
+ var canNavigateBack by Delegates.notNull<Boolean>()
+
+ composeRule.setContent {
+ scaffoldNavigator = rememberSupportingPaneScaffoldNavigator(
+ initialDestinationHistory = listOf(SupportingPaneScaffoldRole.Supporting),
+ scaffoldDirective = MockDualPaneScaffoldDirective,
+ isDestinationHistoryAware = false
+ )
+ canNavigateBack = scaffoldNavigator.canNavigateBack()
+ }
+
+ composeRule.runOnIdle {
+ assertThat(
+ scaffoldNavigator.scaffoldState.scaffoldValue[SupportingPaneScaffoldRole.Supporting]
+ ).isEqualTo(PaneAdaptedValue.Expanded)
+ scaffoldNavigator.navigateTo(SupportingPaneScaffoldRole.Extra)
+ }
+
+ composeRule.runOnIdle {
+ assertThat(
+ scaffoldNavigator.scaffoldState.scaffoldValue[SupportingPaneScaffoldRole.Supporting]
+ ).isEqualTo(PaneAdaptedValue.Hidden)
+ assertThat(canNavigateBack).isTrue()
+ }
+ }
+
+ @Test
+ fun dualPaneLayout_navigateToExtra_keepSupportingExpandedWhenHistoryAware() {
+ lateinit var scaffoldNavigator: ThreePaneScaffoldNavigator
+ var canNavigateBack by Delegates.notNull<Boolean>()
+
+ composeRule.setContent {
+ scaffoldNavigator = rememberSupportingPaneScaffoldNavigator(
+ initialDestinationHistory = listOf(SupportingPaneScaffoldRole.Supporting),
+ scaffoldDirective = MockDualPaneScaffoldDirective,
+ isDestinationHistoryAware = true
+ )
+ canNavigateBack = scaffoldNavigator.canNavigateBack()
+ }
+
+ composeRule.runOnIdle {
+ assertThat(
+ scaffoldNavigator.scaffoldState.scaffoldValue[SupportingPaneScaffoldRole.Supporting]
+ ).isEqualTo(PaneAdaptedValue.Expanded)
+ scaffoldNavigator.navigateTo(SupportingPaneScaffoldRole.Extra)
+ }
+
+ composeRule.runOnIdle {
+ assertThat(
+ scaffoldNavigator.scaffoldState.scaffoldValue[SupportingPaneScaffoldRole.Supporting]
+ ).isEqualTo(PaneAdaptedValue.Expanded)
+ assertThat(canNavigateBack).isTrue()
+ }
+ }
+
+ @Test
+ fun singlePaneLayout_navigateBack_makeDestinationPaneHidden() {
lateinit var scaffoldNavigator: ThreePaneScaffoldNavigator
var canNavigateBack by Delegates.notNull<Boolean>()
@@ -107,7 +165,7 @@
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.secondary
+ scaffoldNavigator.scaffoldState.scaffoldValue[SupportingPaneScaffoldRole.Supporting]
).isEqualTo(PaneAdaptedValue.Expanded)
assertThat(canNavigateBack).isTrue()
scaffoldNavigator.navigateBack()
@@ -115,7 +173,7 @@
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.secondary
+ scaffoldNavigator.scaffoldState.scaffoldValue[SupportingPaneScaffoldRole.Supporting]
).isEqualTo(PaneAdaptedValue.Hidden)
assertThat(canNavigateBack).isFalse()
}
@@ -156,7 +214,7 @@
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.primary
+ scaffoldNavigator.scaffoldState.scaffoldValue[SupportingPaneScaffoldRole.Main]
).isEqualTo(PaneAdaptedValue.Expanded)
assertThat(scaffoldNavigator.canNavigateBack(false)).isTrue()
scaffoldNavigator.navigateBack(false)
@@ -164,12 +222,96 @@
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.primary
+ scaffoldNavigator.scaffoldState.scaffoldValue[SupportingPaneScaffoldRole.Main]
).isEqualTo(PaneAdaptedValue.Expanded)
}
}
@Test
+ fun dualPaneLayout_enforceScaffoldChangeWhenHistoryAware_notSkipBackstackEntry() {
+ lateinit var scaffoldNavigator: ThreePaneScaffoldNavigator
+
+ composeRule.setContent {
+ scaffoldNavigator = rememberSupportingPaneScaffoldNavigator(
+ scaffoldDirective = MockDualPaneScaffoldDirective,
+ initialDestinationHistory = listOf(
+ SupportingPaneScaffoldRole.Extra,
+ SupportingPaneScaffoldRole.Supporting,
+ ),
+ isDestinationHistoryAware = true
+ )
+ }
+
+ composeRule.runOnIdle {
+ scaffoldNavigator.scaffoldState.scaffoldValue.assert(
+ PaneAdaptedValue.Hidden,
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Expanded
+ )
+ scaffoldNavigator.navigateTo(SupportingPaneScaffoldRole.Main)
+ }
+
+ composeRule.runOnIdle {
+ scaffoldNavigator.scaffoldState.scaffoldValue.assert(
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Hidden
+ )
+ scaffoldNavigator.navigateBack()
+ }
+
+ composeRule.runOnIdle {
+ scaffoldNavigator.scaffoldState.scaffoldValue.assert(
+ PaneAdaptedValue.Hidden,
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Expanded
+ )
+ }
+ }
+
+ @Test
+ fun dualPaneLayout_enforceScaffoldChangeWhenNotHistoryAware_skipBackstackEntry() {
+ lateinit var scaffoldNavigator: ThreePaneScaffoldNavigator
+
+ composeRule.setContent {
+ scaffoldNavigator = rememberSupportingPaneScaffoldNavigator(
+ scaffoldDirective = MockDualPaneScaffoldDirective,
+ initialDestinationHistory = listOf(
+ SupportingPaneScaffoldRole.Extra,
+ SupportingPaneScaffoldRole.Supporting,
+ ),
+ isDestinationHistoryAware = false
+ )
+ }
+
+ composeRule.runOnIdle {
+ scaffoldNavigator.scaffoldState.scaffoldValue.assert(
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Hidden
+ )
+ scaffoldNavigator.navigateTo(SupportingPaneScaffoldRole.Main)
+ }
+
+ composeRule.runOnIdle {
+ scaffoldNavigator.scaffoldState.scaffoldValue.assert(
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Hidden
+ )
+ scaffoldNavigator.navigateBack()
+ }
+
+ composeRule.runOnIdle {
+ scaffoldNavigator.scaffoldState.scaffoldValue.assert(
+ PaneAdaptedValue.Expanded,
+ PaneAdaptedValue.Hidden,
+ PaneAdaptedValue.Expanded
+ )
+ }
+ }
+
+ @Test
fun singlePaneToDualPaneLayout_enforceScaffoldValueChange_cannotNavigateBack() {
lateinit var scaffoldNavigator: ThreePaneScaffoldNavigator
val mockCurrentScaffoldDirective = mutableStateOf(MockSinglePaneScaffoldDirective)
@@ -185,7 +327,7 @@
}
composeRule.runOnIdle {
assertThat(
- scaffoldNavigator.scaffoldState.scaffoldValue.primary
+ scaffoldNavigator.scaffoldState.scaffoldValue[SupportingPaneScaffoldRole.Main]
).isEqualTo(PaneAdaptedValue.Expanded)
// Switches to dual pane
mockCurrentScaffoldDirective.value = MockDualPaneScaffoldDirective
@@ -216,3 +358,16 @@
verticalPartitionSpacerSize = 0.dp,
excludedBounds = emptyList()
)
+
+@OptIn(ExperimentalMaterial3AdaptiveApi::class)
+private fun ThreePaneScaffoldValue.assert(
+ expectedMainPaneAdaptedValue: PaneAdaptedValue,
+ expectedSupportingPaneAdaptedValue: PaneAdaptedValue,
+ expectedExtraPaneAdaptedValue: PaneAdaptedValue
+) {
+ assertThat(this[SupportingPaneScaffoldRole.Main]).isEqualTo(expectedMainPaneAdaptedValue)
+ assertThat(this[SupportingPaneScaffoldRole.Supporting]).isEqualTo(
+ expectedSupportingPaneAdaptedValue
+ )
+ assertThat(this[SupportingPaneScaffoldRole.Extra]).isEqualTo(expectedExtraPaneAdaptedValue)
+}
diff --git a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldScreenshotTest.kt b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldScreenshotTest.kt
index 004d147..1659ae5 100644
--- a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldScreenshotTest.kt
+++ b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldScreenshotTest.kt
@@ -170,7 +170,9 @@
currentWindowAdaptiveInfo()
)
val scaffoldValue = calculateThreePaneScaffoldValue(
- scaffoldDirective.maxHorizontalPartitions
+ scaffoldDirective.maxHorizontalPartitions,
+ ThreePaneScaffoldDefaults.adaptStrategies(),
+ null
)
SampleThreePaneScaffold(
scaffoldDirective,
@@ -186,7 +188,9 @@
currentWindowAdaptiveInfo()
)
val scaffoldValue = calculateThreePaneScaffoldValue(
- scaffoldDirective.maxHorizontalPartitions
+ scaffoldDirective.maxHorizontalPartitions,
+ ThreePaneScaffoldDefaults.adaptStrategies(),
+ null
)
SampleThreePaneScaffold(
scaffoldDirective,
@@ -204,7 +208,9 @@
currentWindowAdaptiveInfo()
)
val scaffoldValue = calculateThreePaneScaffoldValue(
- scaffoldDirective.maxHorizontalPartitions
+ scaffoldDirective.maxHorizontalPartitions,
+ ThreePaneScaffoldDefaults.adaptStrategies(),
+ null
)
SampleThreePaneScaffold(
scaffoldDirective,
diff --git a/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/ListDetailPaneScaffold.android.kt b/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/ListDetailPaneScaffold.android.kt
index a45e62b..c4b2638 100644
--- a/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/ListDetailPaneScaffold.android.kt
+++ b/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/ListDetailPaneScaffold.android.kt
@@ -63,22 +63,22 @@
* [ThreePaneScaffoldAdaptStrategies], and the current pane destination of a
* [ListDetailPaneScaffold].
*
+ * @param currentPaneDestination the current pane destination, which will be guaranteed to have the
+ * highest priority when deciding pane visibilities.
* @param scaffoldDirective the layout directives that the associated [ListDetailPaneScaffold]
* needs to follow. The default value will be the calculation result from
* [calculateStandardPaneScaffoldDirective] with the current window configuration, and
* will be automatically updated when the window configuration changes.
* @param adaptStrategies the [ThreePaneScaffoldAdaptStrategies] should be used by scaffold panes.
- * @param currentPaneDestination the current pane destination, which will be guaranteed to have
- * highest priority when deciding pane visibility.
*/
@ExperimentalMaterial3AdaptiveApi
@Composable
fun calculateListDetailPaneScaffoldState(
+ currentPaneDestination: ThreePaneScaffoldRole = ListDetailPaneScaffoldRole.List,
scaffoldDirective: PaneScaffoldDirective =
calculateStandardPaneScaffoldDirective(currentWindowAdaptiveInfo()),
adaptStrategies: ThreePaneScaffoldAdaptStrategies =
- ListDetailPaneScaffoldDefaults.adaptStrategies(),
- currentPaneDestination: ThreePaneScaffoldRole = ListDetailPaneScaffoldRole.List
+ ListDetailPaneScaffoldDefaults.adaptStrategies()
): ThreePaneScaffoldState = ThreePaneScaffoldStateImpl(
scaffoldDirective,
calculateThreePaneScaffoldValue(
@@ -89,6 +89,40 @@
)
/**
+ * This function calculates [ThreePaneScaffoldValue] based on the given [PaneScaffoldDirective],
+ * [ThreePaneScaffoldAdaptStrategies], and the pane destination history of a
+ * [ListDetailPaneScaffold].
+ *
+ * @param paneDestinationHistory The history of past pane destinations, the last destination will
+ * have the highest priority, and the second last destination will have the second highest
+ * priority, and so forth until all panes has a priority assigned. Note that the last
+ * destination is supposed to be the last item of the provided list. When the history is
+ * empty or there are panes left unassigned, default priorities will be assigned to those
+ * panes in the order of Detail > List > Extra.
+ * @param scaffoldDirective the layout directives that the associated [ListDetailPaneScaffold]
+ * needs to follow. The default value will be the calculation result from
+ * [calculateStandardPaneScaffoldDirective] with the current window configuration, and
+ * will be automatically updated when the window configuration changes.
+ * @param adaptStrategies the [ThreePaneScaffoldAdaptStrategies] should be used by scaffold panes.
+ */
+@ExperimentalMaterial3AdaptiveApi
+@Composable
+fun calculateListDetailPaneScaffoldState(
+ paneDestinationHistory: List<ThreePaneScaffoldRole>,
+ scaffoldDirective: PaneScaffoldDirective =
+ calculateStandardPaneScaffoldDirective(currentWindowAdaptiveInfo()),
+ adaptStrategies: ThreePaneScaffoldAdaptStrategies =
+ ListDetailPaneScaffoldDefaults.adaptStrategies()
+): ThreePaneScaffoldState = ThreePaneScaffoldStateImpl(
+ scaffoldDirective,
+ calculateThreePaneScaffoldValue(
+ scaffoldDirective.maxHorizontalPartitions,
+ adaptStrategies,
+ paneDestinationHistory
+ )
+)
+
+/**
* Provides default values of [ListDetailPaneScaffold].
*/
@ExperimentalMaterial3AdaptiveApi
diff --git a/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/SupportingPaneScaffold.android.kt b/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/SupportingPaneScaffold.android.kt
index 98ddd70..757d437 100644
--- a/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/SupportingPaneScaffold.android.kt
+++ b/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/SupportingPaneScaffold.android.kt
@@ -64,22 +64,22 @@
* [ThreePaneScaffoldAdaptStrategies], and the current pane destination of a
* [SupportingPaneScaffold].
*
+ * @param currentPaneDestination the current pane destination, which will be guaranteed to have the
+ * highest priority when deciding pane visibilities.
* @param scaffoldDirective the layout directives that the associated [SupportingPaneScaffold]
* needs to follow. The default value will be the calculation result from
* [calculateStandardPaneScaffoldDirective] with the current window configuration, and
* will be automatically updated when the window configuration changes.
* @param adaptStrategies the [ThreePaneScaffoldAdaptStrategies] should be used by scaffold panes.
- * @param currentPaneDestination the current pane destination, which will be guaranteed to have
- * highest priority when deciding pane visibility.
*/
@ExperimentalMaterial3AdaptiveApi
@Composable
fun calculateSupportingPaneScaffoldState(
+ currentPaneDestination: ThreePaneScaffoldRole = SupportingPaneScaffoldRole.Main,
scaffoldDirective: PaneScaffoldDirective =
calculateStandardPaneScaffoldDirective(currentWindowAdaptiveInfo()),
adaptStrategies: ThreePaneScaffoldAdaptStrategies =
- SupportingPaneScaffoldDefaults.adaptStrategies(),
- currentPaneDestination: ThreePaneScaffoldRole = SupportingPaneScaffoldRole.Main
+ SupportingPaneScaffoldDefaults.adaptStrategies()
): ThreePaneScaffoldState = ThreePaneScaffoldStateImpl(
scaffoldDirective,
calculateThreePaneScaffoldValue(
@@ -90,6 +90,40 @@
)
/**
+ * This function calculates [ThreePaneScaffoldValue] based on the given [PaneScaffoldDirective],
+ * [ThreePaneScaffoldAdaptStrategies], and the pane destination history of a
+ * [SupportingPaneScaffold].
+ *
+ * @param paneDestinationHistory The history of past pane destinations, the last destination will
+ * have the highest priority, and the second last destination will have the second highest
+ * priority, and so forth until all panes has a priority assigned. Note that the last
+ * destination is supposed to be the last item of the provided list. When the history is
+ * empty or there are panes left unassigned, default priorities will be assigned to those
+ * panes in the order of Main > Supporting > Extra.
+ * @param scaffoldDirective the layout directives that the associated [SupportingPaneScaffold]
+ * needs to follow. The default value will be the calculation result from
+ * [calculateStandardPaneScaffoldDirective] with the current window configuration, and
+ * will be automatically updated when the window configuration changes.
+ * @param adaptStrategies the [ThreePaneScaffoldAdaptStrategies] should be used by scaffold panes.
+ */
+@ExperimentalMaterial3AdaptiveApi
+@Composable
+fun calculateSupportingPaneScaffoldState(
+ paneDestinationHistory: List<ThreePaneScaffoldRole>,
+ scaffoldDirective: PaneScaffoldDirective =
+ calculateStandardPaneScaffoldDirective(currentWindowAdaptiveInfo()),
+ adaptStrategies: ThreePaneScaffoldAdaptStrategies =
+ SupportingPaneScaffoldDefaults.adaptStrategies()
+): ThreePaneScaffoldState = ThreePaneScaffoldStateImpl(
+ scaffoldDirective,
+ calculateThreePaneScaffoldValue(
+ scaffoldDirective.maxHorizontalPartitions,
+ adaptStrategies,
+ paneDestinationHistory
+ )
+)
+
+/**
* Provides default values of [SupportingPaneScaffold].
*/
@ExperimentalMaterial3AdaptiveApi
diff --git a/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldNavigator.android.kt b/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldNavigator.android.kt
index 329f29a..49f8e40 100644
--- a/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldNavigator.android.kt
+++ b/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldNavigator.android.kt
@@ -51,6 +51,15 @@
val scaffoldState: ThreePaneScaffoldState
/**
+ * Indicates if the navigator should be aware of pane destination history when deciding the
+ * result [ThreePaneScaffoldValue] by a navigation operation. If the value is `false`, only
+ * the current destination will be considered in the scaffold value calculation.
+ *
+ * @see calculateThreePaneScaffoldValue for more detailed explanation about history awareness.
+ */
+ var isDestinationHistoryAware: Boolean
+
+ /**
* Navigates to a new pane destination. The new destination is supposed to have the highest
* priority when calculating the new [scaffoldState]. When implementing this method, please
* ensure the new destination pane will be expanded or adapted in a reasonable way so it
@@ -93,6 +102,9 @@
* calculated with [calculateStandardPaneScaffoldDirective] using [WindowAdaptiveInfo]
* retrieved from the current context.
* @param adaptStrategies adaptation strategies of each pane.
+ * @param isDestinationHistoryAware `true` if the scaffold value calculation should be aware of the
+ * full destination history, instead of just the current destination. See
+ * [calculateThreePaneScaffoldValue] for more relevant details.
* @param initialDestinationHistory the initial pane destination history of the scaffold, by default
* it will be just the list pane.
*/
@@ -103,11 +115,13 @@
calculateStandardPaneScaffoldDirective(currentWindowAdaptiveInfo()),
adaptStrategies: ThreePaneScaffoldAdaptStrategies =
ListDetailPaneScaffoldDefaults.adaptStrategies(),
+ isDestinationHistoryAware: Boolean = true,
initialDestinationHistory: List<ThreePaneScaffoldRole> = listOf(ListDetailPaneScaffoldRole.List)
): ThreePaneScaffoldNavigator =
rememberThreePaneScaffoldNavigator(
scaffoldDirective,
adaptStrategies,
+ isDestinationHistoryAware,
initialDestinationHistory
)
@@ -121,6 +135,9 @@
* calculated with [calculateStandardPaneScaffoldDirective] using [WindowAdaptiveInfo]
* retrieved from the current context.
* @param adaptStrategies adaptation strategies of each pane.
+ * @param isDestinationHistoryAware `true` if the scaffold value calculation should be aware of the
+ * full destination history, instead of just the current destination. See
+ * [calculateThreePaneScaffoldValue] for more relevant details.
* @param initialDestinationHistory the initial destination history of the scaffold, by default it
* will be just the main pane.
*/
@@ -131,12 +148,14 @@
calculateStandardPaneScaffoldDirective(currentWindowAdaptiveInfo()),
adaptStrategies: ThreePaneScaffoldAdaptStrategies =
SupportingPaneScaffoldDefaults.adaptStrategies(),
+ isDestinationHistoryAware: Boolean = true,
initialDestinationHistory: List<ThreePaneScaffoldRole> =
listOf(SupportingPaneScaffoldRole.Main)
): ThreePaneScaffoldNavigator =
rememberThreePaneScaffoldNavigator(
scaffoldDirective,
adaptStrategies,
+ isDestinationHistoryAware,
initialDestinationHistory
)
@@ -145,19 +164,26 @@
internal fun rememberThreePaneScaffoldNavigator(
scaffoldDirective: PaneScaffoldDirective,
adaptStrategies: ThreePaneScaffoldAdaptStrategies,
+ isDestinationHistoryAware: Boolean,
initialDestinationHistory: List<ThreePaneScaffoldRole>
): ThreePaneScaffoldNavigator =
rememberSaveable(
- saver = DefaultThreePaneScaffoldNavigator.saver(scaffoldDirective, adaptStrategies)
+ saver = DefaultThreePaneScaffoldNavigator.saver(
+ scaffoldDirective,
+ adaptStrategies,
+ isDestinationHistoryAware
+ )
) {
DefaultThreePaneScaffoldNavigator(
initialDestinationHistory = initialDestinationHistory,
initialScaffoldDirective = scaffoldDirective,
- initialAdaptStrategies = adaptStrategies
+ initialAdaptStrategies = adaptStrategies,
+ initialIsDestinationHistoryAware = isDestinationHistoryAware
)
}.apply {
this.scaffoldDirective = scaffoldDirective
this.adaptStrategies = adaptStrategies
+ this.isDestinationHistoryAware = isDestinationHistoryAware
}
@OptIn(ExperimentalMaterial3AdaptiveApi::class)
@@ -165,6 +191,7 @@
initialDestinationHistory: List<ThreePaneScaffoldRole>,
initialScaffoldDirective: PaneScaffoldDirective,
initialAdaptStrategies: ThreePaneScaffoldAdaptStrategies,
+ initialIsDestinationHistoryAware: Boolean
) : ThreePaneScaffoldNavigator, ThreePaneScaffoldState {
private val destinationHistory = mutableStateListOf<ThreePaneScaffoldRole>().apply {
@@ -175,12 +202,14 @@
override var scaffoldDirective by mutableStateOf(initialScaffoldDirective)
+ override var isDestinationHistoryAware by mutableStateOf(initialIsDestinationHistoryAware)
+
var adaptStrategies by mutableStateOf(initialAdaptStrategies)
val currentDestination: ThreePaneScaffoldRole? get() = destinationHistory.lastOrNull()
override val scaffoldValue by derivedStateOf {
- calculateScaffoldValue(currentDestination)
+ calculateScaffoldValue(destinationHistory.lastIndex)
}
override fun navigateTo(pane: ThreePaneScaffoldRole) {
@@ -212,7 +241,7 @@
return destinationHistory.lastIndex - 1
}
for (previousDestinationIndex in destinationHistory.lastIndex - 1 downTo 0) {
- val newValue = calculateScaffoldValue(destinationHistory[previousDestinationIndex])
+ val newValue = calculateScaffoldValue(previousDestinationIndex)
if (newValue != scaffoldValue) {
return previousDestinationIndex
}
@@ -220,14 +249,26 @@
return -1
}
- private fun calculateScaffoldValue(
- destination: ThreePaneScaffoldRole?
- ): ThreePaneScaffoldValue =
- calculateThreePaneScaffoldValue(
- scaffoldDirective.maxHorizontalPartitions,
- adaptStrategies,
- destination
- )
+ private fun calculateScaffoldValue(destinationIndex: Int) =
+ if (destinationIndex == -1) {
+ calculateThreePaneScaffoldValue(
+ scaffoldDirective.maxHorizontalPartitions,
+ adaptStrategies,
+ null
+ )
+ } else if (isDestinationHistoryAware) {
+ calculateThreePaneScaffoldValue(
+ scaffoldDirective.maxHorizontalPartitions,
+ adaptStrategies,
+ destinationHistory.subList(0, destinationIndex + 1)
+ )
+ } else {
+ calculateThreePaneScaffoldValue(
+ scaffoldDirective.maxHorizontalPartitions,
+ adaptStrategies,
+ destinationHistory[destinationIndex]
+ )
+ }
companion object {
/**
@@ -235,7 +276,8 @@
*/
fun saver(
initialScaffoldDirective: PaneScaffoldDirective,
- initialAdaptStrategies: ThreePaneScaffoldAdaptStrategies
+ initialAdaptStrategies: ThreePaneScaffoldAdaptStrategies,
+ initialDestinationHistoryAware: Boolean
): Saver<DefaultThreePaneScaffoldNavigator, *> = listSaver(
save = {
it.destinationHistory
@@ -244,7 +286,8 @@
DefaultThreePaneScaffoldNavigator(
initialDestinationHistory = it,
initialScaffoldDirective = initialScaffoldDirective,
- initialAdaptStrategies = initialAdaptStrategies
+ initialAdaptStrategies = initialAdaptStrategies,
+ initialIsDestinationHistoryAware = initialDestinationHistoryAware
)
}
)
diff --git a/compose/material3/material3-adaptive/src/androidUnitTest/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldValueTest.kt b/compose/material3/material3-adaptive/src/androidUnitTest/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldValueTest.kt
index 32cfb93..c751a23 100644
--- a/compose/material3/material3-adaptive/src/androidUnitTest/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldValueTest.kt
+++ b/compose/material3/material3-adaptive/src/androidUnitTest/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldValueTest.kt
@@ -25,57 +25,122 @@
@RunWith(JUnit4::class)
class ThreePaneScaffoldValueTest {
@Test
- fun test_onePaneLayoutNoFocus() {
+ fun calculateWithoutHistory_onePaneLayout_noDestination() {
val scaffoldState = calculateThreePaneScaffoldValue(
maxHorizontalPartitions = 1,
- adaptStrategies = MockAdaptStrategies
+ adaptStrategies = MockAdaptStrategies,
+ currentDestination = null
)
scaffoldState.assertState(ThreePaneScaffoldRole.Primary, PaneAdaptedValue.Expanded)
- scaffoldState.assertState(
- ThreePaneScaffoldRole.Secondary,
- SecondaryPaneAdaptedState
- )
+ scaffoldState.assertState(ThreePaneScaffoldRole.Secondary, SecondaryPaneAdaptedState)
scaffoldState.assertState(ThreePaneScaffoldRole.Tertiary, TertiaryPaneAdaptedState)
}
@Test
- fun test_onePaneLayoutWithFocus() {
+ fun calculateWithHistory_onePaneLayout_noDestination() {
+ val scaffoldState = calculateThreePaneScaffoldValue(
+ maxHorizontalPartitions = 1,
+ adaptStrategies = MockAdaptStrategies,
+ destinationHistory = emptyList()
+ )
+ scaffoldState.assertState(ThreePaneScaffoldRole.Primary, PaneAdaptedValue.Expanded)
+ scaffoldState.assertState(ThreePaneScaffoldRole.Secondary, SecondaryPaneAdaptedState)
+ scaffoldState.assertState(ThreePaneScaffoldRole.Tertiary, TertiaryPaneAdaptedState)
+ }
+
+ @Test
+ fun calculateWithoutHistory_onePaneLayout() {
val scaffoldState = calculateThreePaneScaffoldValue(
maxHorizontalPartitions = 1,
adaptStrategies = MockAdaptStrategies,
currentDestination = ThreePaneScaffoldRole.Secondary
)
scaffoldState.assertState(ThreePaneScaffoldRole.Primary, PrimaryPaneAdaptedState)
- scaffoldState.assertState(
- ThreePaneScaffoldRole.Secondary,
- PaneAdaptedValue.Expanded)
+ scaffoldState.assertState(ThreePaneScaffoldRole.Secondary, PaneAdaptedValue.Expanded)
scaffoldState.assertState(ThreePaneScaffoldRole.Tertiary, TertiaryPaneAdaptedState)
}
@Test
- fun test_twoPaneLayoutNoFocus() {
+ fun calculateWithHistory_onePaneLayout() {
+ val scaffoldState = calculateThreePaneScaffoldValue(
+ maxHorizontalPartitions = 1,
+ adaptStrategies = MockAdaptStrategies,
+ destinationHistory = listOf(
+ ThreePaneScaffoldRole.Tertiary,
+ ThreePaneScaffoldRole.Secondary
+ )
+ )
+ scaffoldState.assertState(ThreePaneScaffoldRole.Primary, PrimaryPaneAdaptedState)
+ scaffoldState.assertState(ThreePaneScaffoldRole.Secondary, PaneAdaptedValue.Expanded)
+ scaffoldState.assertState(ThreePaneScaffoldRole.Tertiary, TertiaryPaneAdaptedState)
+ }
+
+ @Test
+ fun calculateWithoutHistory_twoPaneLayout_noDestination() {
val scaffoldState = calculateThreePaneScaffoldValue(
maxHorizontalPartitions = 2,
- adaptStrategies = MockAdaptStrategies
+ adaptStrategies = MockAdaptStrategies,
+ currentDestination = null
)
scaffoldState.assertState(ThreePaneScaffoldRole.Primary, PaneAdaptedValue.Expanded)
- scaffoldState.assertState(
- ThreePaneScaffoldRole.Secondary, PaneAdaptedValue.Expanded
- )
+ scaffoldState.assertState(ThreePaneScaffoldRole.Secondary, PaneAdaptedValue.Expanded)
scaffoldState.assertState(ThreePaneScaffoldRole.Tertiary, TertiaryPaneAdaptedState)
}
@Test
- fun test_twoPaneLayoutWithFocus() {
+ fun calculateWithHistory_twoPaneLayout_noDestination() {
+ val scaffoldState = calculateThreePaneScaffoldValue(
+ maxHorizontalPartitions = 2,
+ adaptStrategies = MockAdaptStrategies,
+ destinationHistory = emptyList()
+ )
+ scaffoldState.assertState(ThreePaneScaffoldRole.Primary, PaneAdaptedValue.Expanded)
+ scaffoldState.assertState(ThreePaneScaffoldRole.Secondary, PaneAdaptedValue.Expanded)
+ scaffoldState.assertState(ThreePaneScaffoldRole.Tertiary, TertiaryPaneAdaptedState)
+ }
+
+ @Test
+ fun calculateWithoutHistory_twoPaneLayout() {
val scaffoldState = calculateThreePaneScaffoldValue(
maxHorizontalPartitions = 2,
adaptStrategies = MockAdaptStrategies,
currentDestination = ThreePaneScaffoldRole.Tertiary
)
scaffoldState.assertState(ThreePaneScaffoldRole.Primary, PaneAdaptedValue.Expanded)
- scaffoldState.assertState(
- ThreePaneScaffoldRole.Secondary, SecondaryPaneAdaptedState
+ scaffoldState.assertState(ThreePaneScaffoldRole.Secondary, SecondaryPaneAdaptedState)
+ scaffoldState.assertState(ThreePaneScaffoldRole.Tertiary, PaneAdaptedValue.Expanded)
+ }
+
+ @Test
+ fun calculateWithHistory_twoPaneLayout() {
+ val scaffoldState = calculateThreePaneScaffoldValue(
+ maxHorizontalPartitions = 2,
+ adaptStrategies = MockAdaptStrategies,
+ destinationHistory = listOf(
+ ThreePaneScaffoldRole.Tertiary,
+ ThreePaneScaffoldRole.Secondary
+ )
)
+ scaffoldState.assertState(ThreePaneScaffoldRole.Primary, PrimaryPaneAdaptedState)
+ scaffoldState.assertState(ThreePaneScaffoldRole.Secondary, PaneAdaptedValue.Expanded)
+ scaffoldState.assertState(ThreePaneScaffoldRole.Tertiary, PaneAdaptedValue.Expanded)
+ }
+
+ @Test
+ fun calculateWithHistory_twoPaneLayout_longHistory() {
+ val scaffoldState = calculateThreePaneScaffoldValue(
+ maxHorizontalPartitions = 2,
+ adaptStrategies = MockAdaptStrategies,
+ destinationHistory = listOf(
+ ThreePaneScaffoldRole.Primary,
+ ThreePaneScaffoldRole.Tertiary,
+ ThreePaneScaffoldRole.Secondary,
+ ThreePaneScaffoldRole.Primary,
+ ThreePaneScaffoldRole.Tertiary
+ )
+ )
+ scaffoldState.assertState(ThreePaneScaffoldRole.Primary, PaneAdaptedValue.Expanded)
+ scaffoldState.assertState(ThreePaneScaffoldRole.Secondary, SecondaryPaneAdaptedState)
scaffoldState.assertState(ThreePaneScaffoldRole.Tertiary, PaneAdaptedValue.Expanded)
}
diff --git a/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldValue.kt b/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldValue.kt
index 981a5a7..6eaa462 100644
--- a/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldValue.kt
+++ b/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldValue.kt
@@ -17,6 +17,7 @@
package androidx.compose.material3.adaptive
import androidx.compose.runtime.Immutable
+import androidx.compose.ui.util.fastForEachReversed
@ExperimentalMaterial3AdaptiveApi
private inline fun buildThreePaneScaffoldValue(
@@ -41,7 +42,7 @@
* [PaneAdaptedValue.Expanded], otherwise it will be adapted according to its associated
* [AdaptStrategy].
*
- * @param maxHorizontalPartitions The maximum allowed partitions along the horizontal axis, i.e.
+ * @param maxHorizontalPartitions The maximum allowed partitions along the horizontal axis, i.e.,
* how many expanded panes can be shown at the same time.
* @param adaptStrategies The adapt strategies of each pane role that [ThreePaneScaffold] supports,
* the default value will be [ThreePaneScaffoldDefaults.threePaneScaffoldAdaptStrategies].
@@ -51,8 +52,8 @@
@ExperimentalMaterial3AdaptiveApi
fun calculateThreePaneScaffoldValue(
maxHorizontalPartitions: Int,
- adaptStrategies: ThreePaneScaffoldAdaptStrategies = ThreePaneScaffoldDefaults.adaptStrategies(),
- currentDestination: ThreePaneScaffoldRole? = null,
+ adaptStrategies: ThreePaneScaffoldAdaptStrategies,
+ currentDestination: ThreePaneScaffoldRole?,
): ThreePaneScaffoldValue {
var expandedCount = if (currentDestination != null) 1 else 0
return buildThreePaneScaffoldValue { role ->
@@ -69,6 +70,83 @@
}
/**
+ * Calculates the current adapted value of [ThreePaneScaffold] according to the given
+ * [maxHorizontalPartitions], [adaptStrategies] and [destinationHistory]. The returned value can be
+ * used as a unique representation of the current layout structure.
+ *
+ * The function will treat the current focus as the highest priority and then adapt the rest
+ * panes according to the order of [ThreePaneScaffoldRole.Primary],
+ * [ThreePaneScaffoldRole.Secondary] and [ThreePaneScaffoldRole.Tertiary]. If there are still
+ * remaining partitions to put the pane, the pane will be set as [PaneAdaptedValue.Expanded],
+ * otherwise it will be adapted according to its associated [AdaptStrategy].
+ *
+ * @param maxHorizontalPartitions The maximum allowed partitions along the horizontal axis, i.e.,
+ * how many expanded panes can be shown at the same time.
+ * @param adaptStrategies The adapt strategies of each pane role that [ThreePaneScaffold] supports,
+ * the default value will be [ThreePaneScaffoldDefaults.threePaneScaffoldAdaptStrategies].
+ * @param destinationHistory The history of past destination panes, the last destination will have
+ * the highest priority, and the second last destination will have the second highest
+ * priority, and so forth until all panes has a priority assigned. Note that the last
+ * destination is supposed to be the last item of the provided list.
+ */
+@ExperimentalMaterial3AdaptiveApi
+fun calculateThreePaneScaffoldValue(
+ maxHorizontalPartitions: Int,
+ adaptStrategies: ThreePaneScaffoldAdaptStrategies,
+ destinationHistory: List<ThreePaneScaffoldRole>,
+): ThreePaneScaffoldValue {
+ var expandedCount = 0
+ var primaryPaneAdaptedValue: PaneAdaptedValue? = null
+ var secondaryPaneAdaptedValue: PaneAdaptedValue? = null
+ var tertiaryPaneAdaptedValue: PaneAdaptedValue? = null
+ destinationHistory.fastForEachReversed {
+ if (expandedCount >= maxHorizontalPartitions) {
+ return@fastForEachReversed
+ }
+ when (it) {
+ ThreePaneScaffoldRole.Primary -> {
+ if (primaryPaneAdaptedValue == null) {
+ primaryPaneAdaptedValue = PaneAdaptedValue.Expanded
+ expandedCount++
+ }
+ }
+ ThreePaneScaffoldRole.Secondary -> {
+ if (secondaryPaneAdaptedValue == null) {
+ secondaryPaneAdaptedValue = PaneAdaptedValue.Expanded
+ expandedCount++
+ }
+ }
+ ThreePaneScaffoldRole.Tertiary -> {
+ if (tertiaryPaneAdaptedValue == null) {
+ tertiaryPaneAdaptedValue = PaneAdaptedValue.Expanded
+ expandedCount++
+ }
+ }
+ }
+ }
+ return ThreePaneScaffoldValue(
+ primary = primaryPaneAdaptedValue ?: if (expandedCount < maxHorizontalPartitions) {
+ expandedCount++
+ PaneAdaptedValue.Expanded
+ } else {
+ adaptStrategies[ThreePaneScaffoldRole.Primary].adapt()
+ },
+ secondary = secondaryPaneAdaptedValue ?: if (expandedCount < maxHorizontalPartitions) {
+ expandedCount++
+ PaneAdaptedValue.Expanded
+ } else {
+ adaptStrategies[ThreePaneScaffoldRole.Secondary].adapt()
+ },
+ tertiary = tertiaryPaneAdaptedValue ?: if (expandedCount < maxHorizontalPartitions) {
+ expandedCount++
+ PaneAdaptedValue.Expanded
+ } else {
+ adaptStrategies[ThreePaneScaffoldRole.Tertiary].adapt()
+ }
+ )
+}
+
+/**
* The adapted value of [ThreePaneScaffold]. It contains each pane's adapted value.
* [ThreePaneScaffold] will use the adapted values to decide which panes should be displayed
* and how they should be displayed. With other input parameters of [ThreePaneScaffold] fixed,
diff --git a/compose/material3/material3-window-size-class/build.gradle b/compose/material3/material3-window-size-class/build.gradle
index c2cc14e..a3148bf 100644
--- a/compose/material3/material3-window-size-class/build.gradle
+++ b/compose/material3/material3-window-size-class/build.gradle
@@ -74,6 +74,7 @@
androidMain {
dependsOn(jvmMain)
dependencies {
+ api(project(":annotation:annotation-experimental"))
implementation("androidx.window:window:1.0.0")
}
}
diff --git a/compose/material3/material3/build.gradle b/compose/material3/material3/build.gradle
index f59007c..27cac4b 100644
--- a/compose/material3/material3/build.gradle
+++ b/compose/material3/material3/build.gradle
@@ -41,6 +41,7 @@
commonMain {
dependencies {
implementation(libs.kotlinStdlibCommon)
+ implementation("androidx.collection:collection:1.4.0-beta02")
implementation("androidx.compose.animation:animation-core:1.6.0-beta01")
api("androidx.compose.foundation:foundation:1.6.0-beta01")
@@ -84,6 +85,7 @@
dependsOn(jvmMain)
dependencies {
api("androidx.annotation:annotation:1.1.0")
+ api(project(":annotation:annotation-experimental"))
implementation("androidx.activity:activity-compose:1.5.0")
// TODO: remove next 3 dependencies when b/202810604 is fixed
diff --git a/compose/material3/material3/integration-tests/material3-catalog/lint-baseline.xml b/compose/material3/material3/integration-tests/material3-catalog/lint-baseline.xml
index 26d94cb..2693060 100644
--- a/compose/material3/material3/integration-tests/material3-catalog/lint-baseline.xml
+++ b/compose/material3/material3/integration-tests/material3-catalog/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="PrimitiveInCollection"
diff --git a/compose/material3/material3/lint-baseline.xml b/compose/material3/material3/lint-baseline.xml
index 381d95c9..dc2af50 100644
--- a/compose/material3/material3/lint-baseline.xml
+++ b/compose/material3/material3/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
@@ -173,6 +173,62 @@
</issue>
<issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.compose.material3.ExperimentalMaterial3Api` or `@OptIn(markerClass = androidx.compose.material3.ExperimentalMaterial3Api.class)`">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/material3/ColorScheme.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.compose.material3.ExperimentalMaterial3Api` or `@OptIn(markerClass = androidx.compose.material3.ExperimentalMaterial3Api.class)`">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/material3/ColorScheme.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.compose.material3.ExperimentalMaterial3Api` or `@OptIn(markerClass = androidx.compose.material3.ExperimentalMaterial3Api.class)`">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/material3/ColorScheme.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.compose.material3.ExperimentalMaterial3Api` or `@OptIn(markerClass = androidx.compose.material3.ExperimentalMaterial3Api.class)`">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/material3/ColorScheme.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.compose.material3.ExperimentalMaterial3Api` or `@OptIn(markerClass = androidx.compose.material3.ExperimentalMaterial3Api.class)`">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/material3/ColorScheme.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.compose.material3.ExperimentalMaterial3Api` or `@OptIn(markerClass = androidx.compose.material3.ExperimentalMaterial3Api.class)`">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/material3/ColorScheme.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.compose.material3.ExperimentalMaterial3Api` or `@OptIn(markerClass = androidx.compose.material3.ExperimentalMaterial3Api.class)`">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/material3/ColorScheme.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.compose.material3.ExperimentalMaterial3Api` or `@OptIn(markerClass = androidx.compose.material3.ExperimentalMaterial3Api.class)`">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/material3/ColorScheme.kt"/>
+ </issue>
+
+ <issue
id="PrimitiveInCollection"
message="variable crossAxisSizes with type List<Integer>: replace with IntList"
errorLine1=" val crossAxisSizes = mutableListOf<Int>()"
diff --git a/compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/IconButtonTest.kt b/compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/IconButtonTest.kt
index 22ceff9..f93a36c 100644
--- a/compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/IconButtonTest.kt
+++ b/compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/IconButtonTest.kt
@@ -22,6 +22,7 @@
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.material.icons.outlined.FavoriteBorder
+import androidx.compose.material3.tokens.IconButtonTokens
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
@@ -30,6 +31,7 @@
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
+import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.semantics.SemanticsProperties
@@ -131,7 +133,10 @@
rule.setMaterialContent(lightColorScheme()) {
Box {
IconButton(onClick = {}) {
- Box(Modifier.size(IconSize).testTag(IconTestTag))
+ Box(
+ Modifier
+ .size(IconSize)
+ .testTag(IconTestTag))
}
}
}
@@ -149,7 +154,10 @@
rule.setMaterialContent(lightColorScheme()) {
Box {
IconButton(onClick = {}) {
- Box(Modifier.size(width, height).testTag(IconTestTag))
+ Box(
+ Modifier
+ .size(width, height)
+ .testTag(IconTestTag))
}
}
}
@@ -161,6 +169,55 @@
}
@Test
+ fun iconButtonColors_localContentColor() {
+ rule.setMaterialContent(lightColorScheme()) {
+ CompositionLocalProvider(LocalContentColor provides Color.Blue) {
+ val colors = IconButtonDefaults.iconButtonColors()
+ assert(colors.contentColor == Color.Blue)
+ }
+
+ CompositionLocalProvider(LocalContentColor provides Color.Red) {
+ val colors = IconButtonDefaults.iconButtonColors(
+ containerColor = Color.Green
+ )
+ assert(colors.containerColor == Color.Green)
+ assert(colors.contentColor == Color.Red)
+ }
+ }
+ }
+
+ @Test
+ fun iconButtonColors_customValues() {
+ rule.setMaterialContent(lightColorScheme()) {
+ CompositionLocalProvider(LocalContentColor provides Color.Blue) {
+ val colors = IconButtonDefaults.iconButtonColors()
+ assert(colors.contentColor == Color.Blue)
+ assert(colors.disabledContentColor
+ == Color.Blue.copy(IconButtonTokens.DisabledIconOpacity))
+ }
+
+ CompositionLocalProvider(LocalContentColor provides Color.Red) {
+ val colors = IconButtonDefaults.iconButtonColors(
+ containerColor = Color.Blue,
+ contentColor = Color.Green
+ )
+ assert(colors.containerColor == Color.Blue)
+ assert(colors.contentColor == Color.Green)
+ assert(colors.disabledContentColor
+ == Color.Green.copy(IconButtonTokens.DisabledIconOpacity))
+ }
+ }
+ }
+
+ @Test
+ fun iconButtonColors_copy() {
+ rule.setMaterialContent(lightColorScheme()) {
+ val colors = IconButtonDefaults.iconButtonColors().copy()
+ assert(colors == IconButtonDefaults.iconButtonColors())
+ }
+ }
+
+ @Test
fun iconToggleButton_size() {
rule
.setMaterialContentForSizeAssertions {
@@ -226,7 +283,10 @@
rule.setMaterialContent(lightColorScheme()) {
Box {
IconToggleButton(checked = false, onCheckedChange = {}) {
- Box(Modifier.size(IconSize).testTag(IconTestTag))
+ Box(
+ Modifier
+ .size(IconSize)
+ .testTag(IconTestTag))
}
}
}
@@ -244,7 +304,10 @@
rule.setMaterialContent(lightColorScheme()) {
Box {
IconToggleButton(checked = false, onCheckedChange = {}) {
- Box(Modifier.size(width, height).testTag(IconTestTag))
+ Box(
+ Modifier
+ .size(width, height)
+ .testTag(IconTestTag))
}
}
}
@@ -265,7 +328,10 @@
IconToggleButton(
checked = checked,
onCheckedChange = { checked = it },
- modifier = Modifier.align(Alignment.Center).requiredSize(2.dp).testTag(tag)
+ modifier = Modifier
+ .align(Alignment.Center)
+ .requiredSize(2.dp)
+ .testTag(tag)
) {
Box(Modifier.size(2.dp))
}
@@ -343,7 +409,10 @@
rule.setMaterialContent(lightColorScheme()) {
Box {
FilledIconButton(onClick = {}) {
- Box(Modifier.size(IconSize).testTag(IconTestTag))
+ Box(
+ Modifier
+ .size(IconSize)
+ .testTag(IconTestTag))
}
}
}
@@ -361,7 +430,10 @@
rule.setMaterialContent(lightColorScheme()) {
Box {
FilledIconButton(onClick = {}) {
- Box(Modifier.size(width, height).testTag(IconTestTag))
+ Box(
+ Modifier
+ .size(width, height)
+ .testTag(IconTestTag))
}
}
}
@@ -466,7 +538,10 @@
rule.setMaterialContent(lightColorScheme()) {
Box {
FilledIconToggleButton(checked = false, onCheckedChange = {}) {
- Box(Modifier.size(IconSize).testTag(IconTestTag))
+ Box(
+ Modifier
+ .size(IconSize)
+ .testTag(IconTestTag))
}
}
}
@@ -484,7 +559,10 @@
rule.setMaterialContent(lightColorScheme()) {
Box {
FilledIconToggleButton(checked = false, onCheckedChange = {}) {
- Box(Modifier.size(width, height).testTag(IconTestTag))
+ Box(
+ Modifier
+ .size(width, height)
+ .testTag(IconTestTag))
}
}
}
@@ -562,7 +640,10 @@
rule.setMaterialContent(lightColorScheme()) {
Box {
OutlinedIconButton(onClick = {}) {
- Box(Modifier.size(IconSize).testTag(IconTestTag))
+ Box(
+ Modifier
+ .size(IconSize)
+ .testTag(IconTestTag))
}
}
}
@@ -580,7 +661,10 @@
rule.setMaterialContent(lightColorScheme()) {
Box {
OutlinedIconButton(onClick = {}) {
- Box(Modifier.size(width, height).testTag(IconTestTag))
+ Box(
+ Modifier
+ .size(width, height)
+ .testTag(IconTestTag))
}
}
}
@@ -667,7 +751,10 @@
rule.setMaterialContent(lightColorScheme()) {
Box {
OutlinedIconToggleButton(checked = false, onCheckedChange = {}) {
- Box(Modifier.size(IconSize).testTag(IconTestTag))
+ Box(
+ Modifier
+ .size(IconSize)
+ .testTag(IconTestTag))
}
}
}
@@ -685,7 +772,10 @@
rule.setMaterialContent(lightColorScheme()) {
Box {
OutlinedIconToggleButton(checked = false, onCheckedChange = {}) {
- Box(Modifier.size(width, height).testTag(IconTestTag))
+ Box(
+ Modifier
+ .size(width, height)
+ .testTag(IconTestTag))
}
}
}
diff --git a/compose/material3/material3/src/androidUnitTest/kotlin/androidx/compose/material3/carousel/KeylineTest.kt b/compose/material3/material3/src/androidUnitTest/kotlin/androidx/compose/material3/carousel/KeylineTest.kt
new file mode 100644
index 0000000..e528318
--- /dev/null
+++ b/compose/material3/material3/src/androidUnitTest/kotlin/androidx/compose/material3/carousel/KeylineTest.kt
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.compose.material3.carousel
+
+import com.google.common.truth.Truth.assertThat
+import kotlin.math.roundToInt
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.junit.runners.JUnit4
+
+@RunWith(JUnit4::class)
+class KeylineTest {
+
+ @Test
+ fun testKeylineList_findsFirstAndLastFocalKeylines() {
+ val keylineList = createTestKeylineList()
+ assertThat(keylineList.firstFocalIndex).isEqualTo(4)
+ assertThat(keylineList.lastFocalIndex).isEqualTo(5)
+ }
+
+ @Test
+ fun testKeylineList_pivotsWithCorrectCutoffsRight() {
+ val carouselMainAxisSize = LargeSize + (MediumSize * .75f).roundToInt()
+ val keylineList = keylineListOf(carouselMainAxisSize, CarouselAlignment.Start) {
+ add(SmallSize, isAnchor = true)
+ add(LargeSize)
+ add(MediumSize)
+ add(SmallSize, isAnchor = true)
+ }
+
+ assertThat(keylineList[2].cutoff)
+ .isEqualTo(MediumSize - (MediumSize * .75f).roundToInt())
+ }
+
+ @Test
+ fun testKeylineList_pivotsWithCorrectCutoffsLeft() {
+ val carouselMainAxisSize = (MediumSize * .75f).roundToInt() + LargeSize
+ val keylineList = keylineListOf(carouselMainAxisSize, CarouselAlignment.End) {
+ add(SmallSize, isAnchor = true)
+ add(MediumSize)
+ add(LargeSize)
+ add(SmallSize, isAnchor = true)
+ }
+
+ assertThat(keylineList[1].cutoff)
+ .isEqualTo(-MediumSize + (MediumSize * .75f).roundToInt())
+ }
+
+ @Test
+ fun testKeylineList_findsFirstIndexAfterFocalRangeWithSize() {
+ val keylineList = createTestKeylineList()
+ assertThat(keylineList.firstIndexAfterFocalRangeWithSize(SmallSize))
+ .isEqualTo(7)
+ }
+
+ @Test
+ fun testKeylineList_findsLastIndexBeforeFocalRangeWithSize() {
+ val keylineList = createTestKeylineList()
+ assertThat(keylineList.lastIndexBeforeFocalRangeWithSize(SmallSize))
+ .isEqualTo(2)
+ }
+
+ @Test
+ fun testKeylineList_getKeylineBefore() {
+ val keylineList = createTestKeylineList()
+
+ assertThat(keylineList.getKeylineBefore(unadjustedOffset = 60f)).isEqualTo(keylineList[3])
+ assertThat(keylineList.getKeylineBefore(-Float.MAX_VALUE)).isEqualTo(keylineList[0])
+ assertThat(keylineList.getKeylineBefore(Float.MAX_VALUE)).isEqualTo(keylineList.last())
+ }
+
+ @Test
+ fun testKeylineList_getKeylineAfter() {
+ val keylineList = createTestKeylineList()
+
+ assertThat(keylineList.getKeylineAfter(60f)).isEqualTo(keylineList[4])
+ assertThat(keylineList.getKeylineAfter(-Float.MAX_VALUE)).isEqualTo(keylineList[0])
+ assertThat(keylineList.getKeylineAfter(Float.MAX_VALUE)).isEqualTo(keylineList.last())
+ }
+
+ companion object {
+ private const val LargeSize = 100f
+ private const val SmallSize = 20f
+ private const val XSmallSize = 5f
+ private const val MediumSize = (LargeSize + SmallSize) / 2f
+
+ /**
+ * Creates a list of keylines with the following arrangement: [xs-s-s-m-l-l-m-s-s-xs].
+ */
+ private fun createTestKeylineList(): KeylineList {
+ // Arrangement:
+ // [xs-s-s-m-l-l-m-s-s-xs]
+ val carouselMainAxisSize =
+ (XSmallSize * 2) + (SmallSize * 4) + (MediumSize * 2) + (LargeSize * 2)
+ return keylineListOf(carouselMainAxisSize, CarouselAlignment.Center) {
+ add(XSmallSize, isAnchor = true)
+ add(SmallSize)
+ add(SmallSize)
+ add(MediumSize)
+ add(LargeSize)
+ add(LargeSize)
+ add(MediumSize)
+ add(SmallSize)
+ add(SmallSize)
+ add(XSmallSize, isAnchor = true)
+ }
+ }
+ }
+}
diff --git a/compose/material3/material3/src/androidUnitTest/kotlin/androidx/compose/material3/carousel/StrategyTest.kt b/compose/material3/material3/src/androidUnitTest/kotlin/androidx/compose/material3/carousel/StrategyTest.kt
new file mode 100644
index 0000000..27998ae
--- /dev/null
+++ b/compose/material3/material3/src/androidUnitTest/kotlin/androidx/compose/material3/carousel/StrategyTest.kt
@@ -0,0 +1,357 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.compose.material3.carousel
+
+import com.google.common.truth.Truth.assertThat
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.junit.runners.JUnit4
+
+@RunWith(JUnit4::class)
+class StrategyTest {
+
+ @Test
+ fun testStrategy_startAlignedStrategyShiftsEnd() {
+ val itemCount = 10
+ val carouselMainAxisSize = large + medium + small
+ val maxScrollOffset = (itemCount * large) - carouselMainAxisSize
+ val defaultKeylineList = createStartAlignedKeylineList()
+
+ val strategy = Strategy.create(
+ carouselMainAxisSize = large + medium + small,
+ keylineList = defaultKeylineList
+ )
+
+ assertThat(strategy.getKeylineListForScrollOffset(0f, maxScrollOffset))
+ .isEqualTo(defaultKeylineList)
+
+ val lastEndStepOffsets = arrayOf(-2.5f, 10f, 50f, 130f, 182.5f)
+ val lastEndStepUnadjustedOffsets = arrayOf(
+ 130f - 300f,
+ 130f - 200f,
+ 130f - 100f,
+ 130f,
+ 130f + 100f
+ )
+ strategy.getKeylineListForScrollOffset(
+ maxScrollOffset,
+ maxScrollOffset,
+ ).forEachIndexed { i, k ->
+ assertThat(k.offset).isEqualTo(lastEndStepOffsets[i])
+ assertThat(k.unadjustedOffset).isEqualTo(lastEndStepUnadjustedOffsets[i])
+ }
+ }
+
+ @Test
+ fun testStrategy_centerAlignedShiftsStart() {
+ val itemCount = 12
+ val carouselMainAxisSize = (small * 2) + medium + (large * 2) + medium + (small * 2)
+ val maxScrollOffset = (itemCount * large) - carouselMainAxisSize
+ val defaultKeylines = createCenterAlignedKeylineList()
+
+ val strategy = Strategy.create(
+ carouselMainAxisSize = carouselMainAxisSize,
+ keylineList = defaultKeylines
+ )
+
+ val startSteps = listOf(
+ // default step - [xs | s s m l l m s s | xs]
+ createCenterAlignedKeylineList(),
+ // step 1 - [xs | s m l l m s s s | xs]
+ keylineListOf(carouselMainAxisSize, 3, (small * 1 + medium + (large / 2))) {
+ add(xSmall, isAnchor = true)
+ add(small)
+ add(medium)
+ add(large)
+ add(large)
+ add(medium)
+ add(small)
+ add(small)
+ add(small)
+ add(xSmall, isAnchor = true)
+ },
+ // step 2 - [xs | m l l m s s s s | xs]
+ keylineListOf(carouselMainAxisSize, 2, medium + (large / 2)) {
+ add(xSmall, isAnchor = true)
+ add(medium)
+ add(large)
+ add(large)
+ add(medium)
+ add(small)
+ add(small)
+ add(small)
+ add(small)
+ add(xSmall, isAnchor = true)
+ },
+ // step 3 - [xs | l l m m s s s s | xs]
+ keylineListOf(carouselMainAxisSize, 1, large / 2) {
+ add(xSmall, isAnchor = true)
+ add(large)
+ add(large)
+ add(medium)
+ add(medium)
+ add(small)
+ add(small)
+ add(small)
+ add(small)
+ add(xSmall, isAnchor = true)
+ }
+ )
+
+ val shiftedStart = strategy.getKeylineListForScrollOffset(
+ 0f,
+ maxScrollOffset,
+ )
+ assertThat(shiftedStart).isEqualTo(startSteps.last())
+ // Make sure the last shift towards start places the first focal item against the start of
+ // the carousel container.
+ assertThat(shiftedStart.firstFocal.offset - (shiftedStart.firstFocal.size / 2))
+ .isEqualTo(0)
+
+ // Test all shift steps start by manually calculating the scroll offset at each step and
+ // making sure getKeylineForScrollOffset returns the correct keyline list
+ val totalShiftStart =
+ startSteps.last().first().unadjustedOffset - startSteps.first().first().unadjustedOffset
+ val startStepsScrollOffsets = listOf(
+ totalShiftStart, // default step
+ totalShiftStart - (startSteps[1].first().unadjustedOffset -
+ startSteps[0].first().unadjustedOffset),
+ totalShiftStart - (startSteps[2].first().unadjustedOffset -
+ startSteps[0].first().unadjustedOffset),
+ totalShiftStart - (startSteps[3].first().unadjustedOffset -
+ startSteps[0].first().unadjustedOffset), // all the way start
+ )
+
+ startStepsScrollOffsets.forEachIndexed { i, scroll ->
+ val keylineList =
+ strategy.getKeylineListForScrollOffset(
+ scroll,
+ maxScrollOffset,
+ )
+ keylineList.forEachIndexed { j, keyline ->
+ assertEqualWithFloatTolerance(0.01f, keyline, startSteps[i][j])
+ }
+ }
+ }
+
+ @Test
+ fun testStrategy_centerAlignedShiftsEnd() {
+ val itemCount = 12
+ val carouselMainAxisSize = (small * 2) + medium + (large * 2) + medium + (small * 2)
+ val maxScrollOffset = (itemCount * large) - carouselMainAxisSize
+ val defaultKeylines = createCenterAlignedKeylineList()
+
+ val strategy = Strategy.create(
+ carouselMainAxisSize = carouselMainAxisSize,
+ keylineList = defaultKeylines
+ )
+
+ val endSteps = listOf(
+ // default step
+ createCenterAlignedKeylineList(),
+ // step 1: Move a small item from after focal to beginning of focal
+ keylineListOf(carouselMainAxisSize, 5, (small * 3) + medium + (large / 2)) {
+ add(xSmall, isAnchor = true)
+ add(small)
+ add(small)
+ add(small)
+ add(medium)
+ add(large)
+ add(large)
+ add(medium)
+ add(small)
+ add(xSmall, isAnchor = true)
+ },
+ // step 2: Move another small from after focal to beginning of focal
+ keylineListOf(carouselMainAxisSize, 6, (small * 4) + medium + (large / 2)) {
+ add(xSmall, isAnchor = true)
+ add(small)
+ add(small)
+ add(small)
+ add(small)
+ add(medium)
+ add(large)
+ add(large)
+ add(medium)
+ add(xSmall, isAnchor = true)
+ },
+
+ // step 3: Move medium from after focal to beginning of focal
+ keylineListOf(carouselMainAxisSize, 7, (small * 4) + (medium * 2) + (large / 2)) {
+ add(xSmall, isAnchor = true)
+ add(small)
+ add(small)
+ add(small)
+ add(small)
+ add(medium)
+ add(medium)
+ add(large)
+ add(large)
+ add(xSmall, isAnchor = true)
+ }
+ )
+
+ val shiftedEnd = strategy.getKeylineListForScrollOffset(
+ maxScrollOffset,
+ maxScrollOffset,
+ )
+ assertThat(shiftedEnd).isEqualTo(endSteps.last())
+ // Make sure the last shift towards end places the last focal item against the end of the
+ // carousel container.
+ assertThat(shiftedEnd.lastFocal.offset + (shiftedEnd.lastFocal.size / 2))
+ .isEqualTo(carouselMainAxisSize)
+
+ val totalShiftEnd =
+ endSteps.first().last().unadjustedOffset - endSteps.last().last().unadjustedOffset
+ val endStepsScrollOffsets = listOf(
+ maxScrollOffset - totalShiftEnd, // default step
+ maxScrollOffset - totalShiftEnd - (endSteps[1].last().unadjustedOffset -
+ endSteps[0].last().unadjustedOffset),
+ maxScrollOffset - totalShiftEnd - (endSteps[2].last().unadjustedOffset -
+ endSteps[0].last().unadjustedOffset),
+ maxScrollOffset - totalShiftEnd - (endSteps[3].last().unadjustedOffset -
+ endSteps[0].last().unadjustedOffset), // all the way end
+ )
+
+ // Test exact scroll offset returns the correct step
+ endStepsScrollOffsets.forEachIndexed { i, scroll ->
+ val keylineList = strategy.getKeylineListForScrollOffset(scroll, maxScrollOffset)
+ keylineList.forEachIndexed { j, keyline ->
+ assertEqualWithFloatTolerance(0.01f, keyline, endSteps[i][j])
+ }
+ }
+
+ // Test non-exact scroll offset rounds to the correct step
+ val almostToStepOneOffset = endStepsScrollOffsets[0] +
+ ((endStepsScrollOffsets[1] - endStepsScrollOffsets[0]) * .75f)
+ assertThat(
+ strategy.getKeylineListForScrollOffset(
+ almostToStepOneOffset,
+ maxScrollOffset,
+ roundToNearestStep = true
+ )
+ )
+ .isEqualTo(endSteps[1])
+ val halfWayToStepTwo =
+ endStepsScrollOffsets[1] + ((endStepsScrollOffsets[2] - endStepsScrollOffsets[1]) * .5f)
+ assertThat(
+ strategy.getKeylineListForScrollOffset(
+ halfWayToStepTwo,
+ maxScrollOffset,
+ roundToNearestStep = true
+ )
+ )
+ .isEqualTo(endSteps[2])
+ val justPastStepTwo =
+ endStepsScrollOffsets[2] + ((endStepsScrollOffsets[3] - endStepsScrollOffsets[2]) * .1f)
+ assertThat(strategy.getKeylineListForScrollOffset(
+ justPastStepTwo,
+ maxScrollOffset,
+ roundToNearestStep = true
+ ))
+ .isEqualTo(endSteps[2])
+ }
+
+ @Test
+ fun testKeylineListLerp() {
+ val carouselMainAxisSize = large + medium + small
+ val from = keylineListOf(carouselMainAxisSize, 1, large / 2) {
+ add(xSmall, isAnchor = true)
+ add(large)
+ add(medium)
+ add(small)
+ add(xSmall, isAnchor = true)
+ }
+ val to = keylineListOf(carouselMainAxisSize, 2, small + (large / 2)) {
+ add(xSmall, isAnchor = true)
+ add(small)
+ add(large)
+ add(medium)
+ add(xSmall, isAnchor = true)
+ }
+
+ // Create the expected interpolated KeylineList by using the KeylineList class' constructor
+ // directly. Otherwise, keylineListOf will set offsets and unadjusted offsets based on the
+ // pivot offset and will differ than the directly interpolated output of lerp.
+ val half = KeylineList(
+ listOf(
+ Keyline(xSmall, -2.5f, -90f, false, true, false, 0f),
+ Keyline(60f, 30f, 10f, false, false, false, 0f),
+ Keyline(80f, 100f, 110f, true, false, true, 0f),
+ Keyline(40f, 160f, 210f, false, false, false, 0f),
+ Keyline(xSmall, 182.5f, 310f, false, true, false, 0f)
+ )
+ )
+
+ assertThat(lerp(from, to, 0f)).isEqualTo(from)
+ assertThat(lerp(from, to, 1f)).isEqualTo(to)
+ assertThat(lerp(from, to, .5f)).isEqualTo(half)
+ }
+
+ private fun assertEqualWithFloatTolerance(
+ tolerance: Float,
+ actual: Keyline,
+ expected: Keyline
+ ) {
+ assertThat(actual.size)
+ .isWithin(tolerance).of(expected.size)
+ assertThat(actual.offset)
+ .isWithin(tolerance).of(expected.offset)
+ assertThat(actual.unadjustedOffset)
+ .isWithin(0.01f).of(expected.unadjustedOffset)
+ assertThat(actual.isFocal).isEqualTo(expected.isFocal)
+ assertThat(actual.isAnchor).isEqualTo(expected.isAnchor)
+ assertThat(actual.isPivot).isEqualTo(expected.isPivot)
+ assertThat(actual.cutoff)
+ .isWithin(tolerance).of(expected.cutoff)
+ }
+
+ companion object {
+ val large = 100f
+ val small = 20f
+ val medium = (large + small) / 2
+ val xSmall = 5f
+
+ private fun createCenterAlignedKeylineList(): KeylineList {
+ // [xs | s s m l l m s s | xs]
+ val carouselMainAxisSize = (small * 2) + medium + (large * 2) + medium + (small * 2)
+ return keylineListOf(carouselMainAxisSize, CarouselAlignment.Center) {
+ add(xSmall, isAnchor = true)
+ add(small)
+ add(small)
+ add(medium)
+ add(large)
+ add(large)
+ add(medium)
+ add(small)
+ add(small)
+ add(xSmall, isAnchor = true)
+ }
+ }
+
+ private fun createStartAlignedKeylineList(): KeylineList {
+ // [xs | l m s | xs]
+ return keylineListOf(large + medium + small, CarouselAlignment.Start) {
+ add(xSmall, isAnchor = true)
+ add(large)
+ add(medium)
+ add(small)
+ add(xSmall, isAnchor = true)
+ }
+ }
+ }
+}
diff --git a/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/IconButton.kt b/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/IconButton.kt
index a4a67b2..0aef860 100644
--- a/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/IconButton.kt
+++ b/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/IconButton.kt
@@ -549,7 +549,19 @@
* Creates a [IconButtonColors] that represents the default colors used in a [IconButton].
*/
@Composable
- fun iconButtonColors() = MaterialTheme.colorScheme.defaultIconButtonColors
+ fun iconButtonColors(): IconButtonColors {
+ val colors = MaterialTheme.colorScheme.defaultIconButtonColors
+ val contentColor = LocalContentColor.current
+ if (colors.contentColor == contentColor) {
+ return colors
+ } else {
+ return colors.copy(
+ contentColor = contentColor,
+ disabledContentColor =
+ contentColor.copy(alpha = IconButtonTokens.DisabledIconOpacity)
+ )
+ }
+ }
/**
* Creates a [IconButtonColors] that represents the default colors used in a [IconButton].
@@ -562,9 +574,10 @@
@Composable
fun iconButtonColors(
containerColor: Color = Color.Unspecified,
- contentColor: Color = Color.Unspecified,
+ contentColor: Color = LocalContentColor.current,
disabledContainerColor: Color = Color.Unspecified,
- disabledContentColor: Color = Color.Unspecified
+ disabledContentColor: Color =
+ contentColor.copy(alpha = IconButtonTokens.DisabledIconOpacity)
): IconButtonColors = MaterialTheme.colorScheme.defaultIconButtonColors.copy(
containerColor = containerColor,
contentColor = contentColor,
@@ -575,14 +588,17 @@
internal val ColorScheme.defaultIconButtonColors: IconButtonColors
@Composable
get() {
- return defaultIconButtonColorsCached ?: IconButtonColors(
- containerColor = Color.Transparent,
- contentColor = LocalContentColor.current,
- disabledContainerColor = Color.Transparent,
- disabledContentColor =
- LocalContentColor.current.copy(alpha = IconButtonTokens.DisabledIconOpacity)
- ).also {
- defaultIconButtonColorsCached = it
+ return defaultIconButtonColorsCached ?: run {
+ val localContentColor = LocalContentColor.current
+ IconButtonColors(
+ containerColor = Color.Transparent,
+ contentColor = localContentColor,
+ disabledContainerColor = Color.Transparent,
+ disabledContentColor =
+ localContentColor.copy(alpha = IconButtonTokens.DisabledIconOpacity)
+ ).also {
+ defaultIconButtonColorsCached = it
+ }
}
}
@@ -852,13 +868,13 @@
disabledContainerColor: Color = this.disabledContainerColor,
disabledContentColor: Color = this.disabledContentColor,
) = IconButtonColors(
- contentColor.takeOrElse { this.contentColor },
containerColor.takeOrElse { this.containerColor },
+ contentColor.takeOrElse { this.contentColor },
disabledContainerColor.takeOrElse { this.disabledContainerColor },
disabledContentColor.takeOrElse { this.disabledContentColor },
)
- /**
+ /**
* Represents the container color for this icon button, depending on [enabled].
*
* @param enabled whether the icon button is enabled
diff --git a/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/carousel/Keyline.kt b/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/carousel/Keyline.kt
new file mode 100644
index 0000000..472a0eb
--- /dev/null
+++ b/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/carousel/Keyline.kt
@@ -0,0 +1,470 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.compose.material3.carousel
+
+import androidx.compose.ui.util.fastFirstOrNull
+
+/**
+ * A structure that is fixed at a specific [offset] along a scrolling axis and
+ * defines properties of an item when its center is located at [offset].
+ *
+ * [Keyline] is the primary structure of any carousel. When multiple keylines are placed along a
+ * carousel's axis and an item is scrolled, that item will always be between two keylines. The
+ * item's distance between its two surrounding keylines can be used as a fraction to create an
+ * interpolated keyline that the item uses to set its size and translation.
+ *
+ * @param size the size an item should be in pixels when its center is at [offset]
+ * @param offset the location of the keyline along the scrolling axis and where the center of an
+ * item should be (usually translated to) when it is at [unadjustedOffset] in the end-to-end
+ * scrolling model
+ * @param unadjustedOffset the location of:445
+ * the keyline in the end-to-end scrolling model (when all
+ * items are laid out with their full size and placed end-to-end)
+ * @param isFocal whether an item at this keyline is focal or fully "viewable"
+ * @param isAnchor true if this keyline is able to be shifted within a list of keylines
+ * @param isPivot true if this is the keyline that was used to calculate all other keyline offsets
+ * and unadjusted offsets in a list
+ * @param cutoff the amount this item bleeds beyond the bounds of the container - 0 if the item
+ * is fully in-bounds or fully out-of-bounds
+ */
+internal data class Keyline(
+ val size: Float,
+ val offset: Float,
+ val unadjustedOffset: Float,
+ val isFocal: Boolean,
+ val isAnchor: Boolean,
+ val isPivot: Boolean,
+ val cutoff: Float,
+)
+
+/**
+ * A [List] of [Keyline]s with additional functionality specific to carousel.
+ *
+ * Note that [KeylineList]'s constructor should only be used when creating an interpolated
+ * KeylineList. If creating a new KeylineList - for a strategy or shifted step - prefer using the
+ * [keylineListOf] method which will handle setting all offsets and unadjusted offsets based on
+ * a pivot keyline.
+ */
+internal class KeylineList internal constructor(
+ keylines: List<Keyline>
+) : List<Keyline> by keylines {
+
+ /**
+ * Returns the index of the pivot keyline used to calculate all other keyline offsets and
+ * unadjusted offsets.
+ */
+ val pivotIndex: Int = indexOfFirst { it.isPivot }
+
+ /** Returns the keyline used to calculate all other keyline offsets and unadjusted offsets. */
+ val pivot: Keyline = get(pivotIndex)
+
+ /**
+ * Returns the index of the first non-anchor keyline or -1 if the list does not contain a
+ * non-anchor keyline.
+ */
+ val firstNonAnchorIndex: Int = indexOfFirst { !it.isAnchor }
+
+ /**
+ * Returns the first non-anchor [Keyline].
+ * @throws [NoSuchElementException] if there are no non-anchor keylines.
+ */
+ val firstNonAnchor: Keyline = get(firstNonAnchorIndex)
+
+ /**
+ * Returns the index of the last non-anchor keyline or -1 if the list does not contain a
+ * non-anchor keyline.
+ */
+ val lastNonAnchorIndex: Int = indexOfLast { !it.isAnchor }
+
+ /**
+ * Returns the last non-anchor [Keyline].
+ * @throws [NoSuchElementException] if there are no non-anchor keylines.
+ */
+ val lastNonAnchor = get(lastNonAnchorIndex)
+
+ /**
+ * Returns the index of the first focal keyline or -1 if the list does not contain a
+ * focal keyline.
+ */
+ val firstFocalIndex = indexOfFirst { it.isFocal }
+
+ /**
+ * Returns the first focal [Keyline].
+ * @throws [NoSuchElementException] if there are no focal keylines.
+ */
+ val firstFocal: Keyline = getOrNull(firstFocalIndex)
+ ?: throw NoSuchElementException("All KeylineLists must have at least one focal keyline")
+
+ /**
+ * Returns the index of the last focal keyline or -1 if the list does not contain a
+ * focal keyline.
+ */
+ val lastFocalIndex: Int = indexOfLast { it.isFocal }
+
+ /**
+ * Returns the last focal [Keyline].
+ * @throws [NoSuchElementException] if there are no focal keylines.
+ */
+ val lastFocal = getOrNull(lastFocalIndex)
+ ?: throw NoSuchElementException("All KeylineLists must have at least one focal keyline")
+
+ /**
+ * Returns true if the first focal item's left/top is within the visible bounds of the container
+ * and is the first non-anchor keyline.
+ *
+ * When this is true, it means the focal range cannot be shifted left/top or is shifted as
+ * far left/top as possible. When this is false, there are keylines that can be swapped to
+ * shift the first focal item closer to the left/top of the container while still remaining
+ * visible.
+ */
+ fun isFirstFocalItemAtStartOfContainer(): Boolean {
+ val firstFocalLeft = firstFocal.offset - (firstFocal.size / 2)
+ return firstFocalLeft >= 0 && firstFocal == firstNonAnchor
+ }
+
+ /**
+ * Returns true if the last focal item's right/bottom is within the visible bounds of the
+ * container and is the last non-anchor keyline.
+ *
+ * When this is true, it means the focal range cannot be shifted right/bottom or is shifted as
+ * far right/bottom as possible. When this is false, there are keylines that can be swapped to
+ * shift the last focal item closer to the right/bottom of the container while still remaining
+ * visible.
+ */
+ fun isLastFocalItemAtEndOfContainer(carouselMainAxisSize: Float): Boolean {
+ val lastFocalRight = lastFocal.offset + (lastFocal.size / 2)
+ return lastFocalRight <= carouselMainAxisSize && lastFocal == lastNonAnchor
+ }
+
+ /**
+ * Returns the index of the first keyline after the focal range where the keyline's size is
+ * equal to [size] or the last index if no keyline is found.
+ *
+ * This is useful when moving keylines from one side of the focal range to the other (shifting).
+ * Find an index on the other side of the focal range where after moving the keyline, the
+ * keyline list will retain its original visual balance.
+ */
+ fun firstIndexAfterFocalRangeWithSize(size: Float): Int {
+ val from = lastFocalIndex
+ val to = lastIndex
+ return (from..to).firstOrNull { i -> this[i].size == size } ?: lastIndex
+ }
+
+ /**
+ * Returns the index of the last keyline before the focal range where the keyline's size is
+ * equal to [size] or 0 if no keyline is found.
+ *
+ * This is useful when moving keylines from one side of the focal range to the other (shifting).
+ * Find an index on the other side of the focal range where after moving the keyline, the
+ * keyline list will retain its original visual balance.
+ */
+ fun lastIndexBeforeFocalRangeWithSize(size: Float): Int {
+ val from = firstFocalIndex - 1
+ val to = 0
+ return (from downTo to).firstOrNull { i -> this[i].size == size } ?: to
+ }
+
+ /**
+ * Returns the last [Keyline] with an unadjustedOffset that is less than [unadjustedOffset] or
+ * the first keyline if none is found.
+ */
+ fun getKeylineBefore(unadjustedOffset: Float): Keyline {
+ for (index in indices.reversed()) {
+ val k = get(index)
+ if (k.unadjustedOffset < unadjustedOffset) {
+ return k
+ }
+ }
+
+ return first()
+ }
+
+ /**
+ * Returns the first [Keyline] with an unadjustedOffset that is greater than
+ * [unadjustedOffset] or the last keyline if none is found.
+ */
+ fun getKeylineAfter(unadjustedOffset: Float): Keyline {
+ return fastFirstOrNull { it.unadjustedOffset >= unadjustedOffset } ?: last()
+ }
+}
+
+internal enum class CarouselAlignment {
+ Start, Center, End
+}
+
+/**
+ * Returns a [KeylineList] by aligning the focal range relative to the carousel container.
+ */
+internal fun keylineListOf(
+ carouselMainAxisSize: Float,
+ carouselAlignment: CarouselAlignment,
+ keylines: KeylineListScope.() -> Unit
+): KeylineList {
+ val keylineListScope = KeylineListScopeImpl()
+ keylines.invoke(keylineListScope)
+ return keylineListScope.createWithAlignment(carouselMainAxisSize, carouselAlignment)
+}
+
+/**
+ * Returns a [KeylineList] by using a single pivot keyline to calculate the offset and unadjusted
+ * offset of all keylines in the list.
+ */
+internal fun keylineListOf(
+ carouselMainAxisSize: Float,
+ pivotIndex: Int,
+ pivotOffset: Float,
+ keylines: KeylineListScope.() -> Unit
+): KeylineList {
+ val keylineListScope = KeylineListScopeImpl()
+ keylines.invoke(keylineListScope)
+ return keylineListScope.createWithPivot(carouselMainAxisSize, pivotIndex, pivotOffset)
+}
+
+/** Receiver scope for creating a [KeylineList] using [keylineListOf] */
+internal interface KeylineListScope {
+
+ /**
+ * Adds a keyline to the resulting [KeylineList].
+ *
+ * Note that keylines are added in the order they will appear.
+ *
+ * @param size the size of an item in pixels at this keyline
+ * @param isAnchor true if this keyline should not be shifted - usually the first and last fully
+ * off-screen keylines
+ */
+ fun add(size: Float, isAnchor: Boolean = false)
+}
+
+private class KeylineListScopeImpl : KeylineListScope {
+
+ private data class TmpKeyline(val size: Float, val isAnchor: Boolean)
+
+ private var firstFocalIndex: Int = -1
+ private var focalItemSize: Float = 0f
+ private var pivotIndex: Int = -1
+ private var pivotOffset: Float = 0f
+ private val tmpKeylines = mutableListOf<TmpKeyline>()
+ override fun add(size: Float, isAnchor: Boolean) {
+ tmpKeylines.add(TmpKeyline(size, isAnchor))
+ // Save the first "focal" item by looking for the first index of the largest item added
+ // to the list. The last focal item index will be found when `create` is called by starting
+ // from firstFocalIndex and incrementing the index until the next item's size does not
+ // equal focalItemSize.
+ if (size > focalItemSize) {
+ firstFocalIndex = tmpKeylines.lastIndex
+ focalItemSize = size
+ }
+ }
+
+ fun createWithPivot(
+ carouselMainAxisSize: Float,
+ pivotIndex: Int,
+ pivotOffset: Float
+ ): KeylineList {
+ val keylines = createKeylinesWithPivot(
+ pivotIndex,
+ pivotOffset,
+ firstFocalIndex,
+ findLastFocalIndex(),
+ itemMainAxisSize = focalItemSize,
+ carouselMainAxisSize = carouselMainAxisSize,
+ tmpKeylines
+ )
+ return KeylineList(keylines)
+ }
+
+ fun createWithAlignment(
+ carouselMainAxisSize: Float,
+ carouselAlignment: CarouselAlignment
+ ): KeylineList {
+ val lastFocalIndex = findLastFocalIndex()
+ val focalItemCount = lastFocalIndex - firstFocalIndex
+
+ pivotIndex = firstFocalIndex
+ pivotOffset = when (carouselAlignment) {
+ CarouselAlignment.Start -> focalItemSize / 2
+ CarouselAlignment.Center -> {
+ (carouselMainAxisSize / 2) - ((focalItemSize / 2) * focalItemCount)
+ }
+ CarouselAlignment.End -> carouselMainAxisSize - (focalItemSize / 2)
+ }
+
+ val keylines = createKeylinesWithPivot(
+ pivotIndex,
+ pivotOffset,
+ firstFocalIndex,
+ lastFocalIndex,
+ itemMainAxisSize = focalItemSize,
+ carouselMainAxisSize = carouselMainAxisSize,
+ tmpKeylines
+ )
+ return KeylineList(keylines)
+ }
+
+ private fun findLastFocalIndex(): Int {
+ // Find the last focal index. Start from the first focal index and walk up the indices
+ // while items remain the same size as the first focal item size - finding a contiguous
+ // range of indices where item size is equal to focalItemSize.
+ var lastFocalIndex = firstFocalIndex
+ while (lastFocalIndex < tmpKeylines.lastIndex &&
+ tmpKeylines[lastFocalIndex + 1].size == focalItemSize) {
+ lastFocalIndex ++
+ }
+ return lastFocalIndex
+ }
+
+ /**
+ * Converts a list of [TmpKeyline] to a list of [Keyline]s whose offset, unadjusted offset,
+ * and cutoff are calculated from a pivot.
+ *
+ * Pivoting is useful when aligning the entire arrangement relative to the scrolling container.
+ * When creating a keyline list with the first focal keyline aligned to the start of the
+ * container, use the first focal item as the pivot and set the pivot offset to where that first
+ * focal item's center should be placed (carouselStart + (item size / 2)). All keylines
+ * before and after the pivot will have their offset, unadjusted offset, and cutoff calculated
+ * based on the pivot offset. When shifting keylines and moving the carousel's alignment from
+ * start to end, use setPivot to align the last focal keyline to the end of the container.
+ *
+ * @param pivotIndex the index of the keyline from [tmpKeylines] that is used to align the
+ * entire arrangement
+ * @param pivotOffset the offset along the scrolling axis where the pivot keyline should
+ * be placed and where keylines before and after will have their offset, unadjustedOffset, and
+ * cutoff calculated from
+ * @param firstFocalIndex the index of the first focal item in the [tmpKeylines] list
+ * @param lastFocalIndex the index of the last focal item in the [tmpKeylines] list
+ * @param itemMainAxisSize the size of focal, or fully unmasked/clipped, items
+ * @param carouselMainAxisSize the size of the carousel container in the scrolling axis
+ */
+ private fun createKeylinesWithPivot(
+ pivotIndex: Int,
+ pivotOffset: Float,
+ firstFocalIndex: Int,
+ lastFocalIndex: Int,
+ itemMainAxisSize: Float,
+ carouselMainAxisSize: Float,
+ tmpKeylines: List<TmpKeyline>
+ ): List<Keyline> {
+ val pivot = tmpKeylines[pivotIndex]
+ val keylines = mutableListOf<Keyline>()
+
+ val pivotCutoff: Float = when {
+ isCutoffLeft(pivot.size, pivotOffset) -> pivotOffset - (pivot.size / 2)
+ isCutoffRight(
+ pivot.size,
+ pivotOffset,
+ carouselMainAxisSize
+ ) -> (pivotOffset + (pivot.size / 2)) - carouselMainAxisSize
+
+ else -> 0f
+ }
+ keylines.add(
+ // Add the pivot keyline first
+ Keyline(
+ size = pivot.size,
+ offset = pivotOffset,
+ unadjustedOffset = pivotOffset,
+ isFocal = pivotIndex in firstFocalIndex..lastFocalIndex,
+ isAnchor = pivot.isAnchor,
+ isPivot = true,
+ cutoff = pivotCutoff
+ )
+ )
+
+ // Convert all TmpKeylines before the pivot to Keylines by calculating their offset,
+ // unadjustedOffset, and cutoff and insert them at the beginning of the keyline list,
+ // maintaining the tmpKeyline list's original order.
+ var offset = pivotOffset - (itemMainAxisSize / 2)
+ var unadjustedOffset = pivotOffset - (itemMainAxisSize / 2)
+ (pivotIndex - 1 downTo 0).forEach { originalIndex ->
+ val tmp = tmpKeylines[originalIndex]
+ val tmpOffset = offset - (tmp.size / 2)
+ val tmpUnadjustedOffset = unadjustedOffset - (itemMainAxisSize / 2)
+ val cutoff = if (isCutoffLeft(tmp.size, tmpOffset)) tmpOffset - (tmp.size / 2) else 0f
+ keylines.add(0,
+ Keyline(
+ size = tmp.size,
+ offset = tmpOffset,
+ unadjustedOffset = tmpUnadjustedOffset,
+ isFocal = originalIndex in firstFocalIndex..lastFocalIndex,
+ isAnchor = tmp.isAnchor,
+ isPivot = false,
+ cutoff = cutoff
+ )
+ )
+
+ offset -= tmp.size
+ unadjustedOffset -= itemMainAxisSize
+ }
+
+ // Convert all TmpKeylines after the pivot to Keylines by calculating their offset,
+ // unadjustedOffset, and cutoff and inserting them at the end of the keyline list,
+ // maintaining the tmpKeyline list's original order.
+ offset = pivotOffset + (itemMainAxisSize / 2)
+ unadjustedOffset = pivotOffset + (itemMainAxisSize / 2)
+ (pivotIndex + 1 until tmpKeylines.size).forEach { originalIndex ->
+ val tmp = tmpKeylines[originalIndex]
+ val tmpOffset = offset + (tmp.size / 2)
+ val tmpUnadjustedOffset = unadjustedOffset + (itemMainAxisSize / 2)
+ val cutoff = if (isCutoffRight(tmp.size, tmpOffset, carouselMainAxisSize)) {
+ (tmpOffset + (tmp.size / 2)) - carouselMainAxisSize
+ } else {
+ 0f
+ }
+ keylines.add(
+ Keyline(
+ size = tmp.size,
+ offset = tmpOffset,
+ unadjustedOffset = tmpUnadjustedOffset,
+ isFocal = originalIndex in firstFocalIndex..lastFocalIndex,
+ isAnchor = tmp.isAnchor,
+ isPivot = false,
+ cutoff = cutoff
+ )
+ )
+
+ offset += tmp.size
+ unadjustedOffset += itemMainAxisSize
+ }
+
+ return keylines
+ }
+
+ /**
+ * Returns whether an item of [size] whose center is at [offset] is straddling the carousel
+ * container's left/top.
+ *
+ * This method will return false if the item is either fully visible (its left/top edge
+ * comes after the container's left/top) or fully invisible (its right/bottom edge comes before
+ * the container's left/top).
+ */
+ private fun isCutoffLeft(size: Float, offset: Float): Boolean {
+ return offset - (size / 2) < 0f && offset + (size / 2) > 0f
+ }
+
+ /**
+ * Returns whether an item of [size] whose center is at [offset] is straddling the carousel
+ * container's right/bottom edge.
+ *
+ * This method will return false if the item is either fully visible (its right/bottom edge
+ * comes before the container's right/bottom) or fully invisible (its left/top edge comes
+ * after the container's right/bottom).
+ */
+ private fun isCutoffRight(size: Float, offset: Float, carouselMainAxisSize: Float): Boolean {
+ return offset - (size / 2) < carouselMainAxisSize &&
+ offset + (size / 2) > carouselMainAxisSize
+ }
+}
diff --git a/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/carousel/Strategy.kt b/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/carousel/Strategy.kt
new file mode 100644
index 0000000..269d0c5
--- /dev/null
+++ b/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/carousel/Strategy.kt
@@ -0,0 +1,508 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.compose.material3.carousel
+
+import androidx.annotation.VisibleForTesting
+import androidx.collection.FloatList
+import androidx.collection.mutableFloatListOf
+import androidx.compose.ui.unit.Density
+import androidx.compose.ui.util.fastForEach
+import androidx.compose.ui.util.fastMapIndexed
+import androidx.compose.ui.util.lerp
+import kotlin.math.roundToInt
+
+/**
+ * An interface which provides [Strategy] instances to a scrollable component.
+ *
+ * [StrategyProvider.createStrategy] will be called any time properties which affect a carousel's
+ * arrangement change. It is the implementation's responsibility to create an arrangement for the
+ * given parameters and return a [Strategy] by calling [Strategy.create].
+ */
+internal interface StrategyProvider {
+ /**
+ * Create and return a new [Strategy] for the given carousel size.
+ *
+ * TODO: Add additional parameters like alignment and item count.
+ *
+ * @param density The [Density] object that provides pixel density information of the device
+ * @param carouselMainAxisSize the size of the carousel in the main axis in pixels
+ */
+ fun createStrategy(
+ density: Density,
+ carouselMainAxisSize: Float,
+ ): Strategy
+}
+
+/**
+ * A class which supplies carousel with the appropriate [KeylineList] for any given scroll offset.
+ *
+ * All items in a carousel need the opportunity to pass through the focal keyline range. Depending
+ * on where the focal range is located within the scrolling container, some items, like those at
+ * the beginning or end of the list, might not reach the focal range. To account for this,
+ * [Strategy] manages shifting the focal keylines to the beginning of the list when scrolled an
+ * offset of 0 and the end of the list when scrolled to the list's max offset. [StrategyProvider]
+ * needs only to create a "default" [KeylineList] (where keylines should be placed when scrolling
+ * in the middle of the list) and call [Strategy.create] to have [Strategy] generate the steps
+ * needed to move the focal range to the start and end of the scroll container. When scrolling, the
+ * scrollable component can access the correct [KeylineList] for any given offset using
+ * [getKeylineListForScrollOffset].
+ *
+ * @param defaultKeylines the [KeylineList] used when anywhere in the center of the list
+ * @param startKeylineSteps a list of [KeylineList]s that will be moved through when approaching
+ * the beginning of the list
+ * @param endKeylineSteps a list o [KeylineList]s that will be moved through when appraoching
+ * the end of the list
+ * @param startShiftDistance the scroll distance it should take to move through all the steps in
+ * [startKeylineSteps]
+ * @param endShiftDistance the scroll distance it should take to move through all the steps in the
+ * [endKeylineSteps]
+ * @param startShiftPoints a list of floats between 0-1 that define the percentage of shift distance
+ * at which the start keyline step at the corresponding index should be used
+ * @param endShiftPoints a list of floats between 0-1 that define the percentage of shift distance
+ * at which the end keyline step at the corresponding index should be used
+ */
+internal class Strategy private constructor(
+ private val defaultKeylines: KeylineList,
+ private val startKeylineSteps: List<KeylineList>,
+ private val endKeylineSteps: List<KeylineList>,
+ private val startShiftDistance: Float,
+ private val endShiftDistance: Float,
+ private val startShiftPoints: FloatList,
+ private val endShiftPoints: FloatList
+) {
+
+ /**
+ * Returns the [KeylineList] that should be used for the current [scrollOffset].
+ *
+ * @param scrollOffset the current scroll offset of the scrollable component
+ * @param maxScrollOffset the maximum scroll offset
+ * @param roundToNearestStep true if the KeylineList returned should be a complete shift step
+ */
+ internal fun getKeylineListForScrollOffset(
+ scrollOffset: Float,
+ maxScrollOffset: Float,
+ roundToNearestStep: Boolean = false
+ ): KeylineList {
+ val startShiftOffset = startShiftDistance
+ val endShiftOffset = maxScrollOffset - endShiftDistance
+
+ // If we're not within either shift range, return the default keylines
+ if (scrollOffset in startShiftOffset..endShiftOffset) {
+ return defaultKeylines
+ }
+
+ var interpolation = lerp(
+ outputMin = 1f,
+ outputMax = 0f,
+ inputMin = 0f,
+ inputMax = startShiftOffset,
+ value = scrollOffset
+ )
+ var shiftPoints = startShiftPoints
+ var steps = startKeylineSteps
+
+ if (scrollOffset > endShiftOffset) {
+ interpolation = lerp(
+ outputMin = 0f,
+ outputMax = 1f,
+ inputMin = endShiftOffset,
+ inputMax = maxScrollOffset,
+ value = scrollOffset
+ )
+ shiftPoints = endShiftPoints
+ steps = endKeylineSteps
+ }
+
+ val shiftPointRange = getShiftPointRange(
+ steps.size,
+ shiftPoints,
+ interpolation
+ )
+
+ if (roundToNearestStep) {
+ val roundedStepIndex = if (shiftPointRange.steppedInterpolation.roundToInt() == 0) {
+ shiftPointRange.fromStepIndex
+ } else {
+ shiftPointRange.toStepIndex
+ }
+ return steps[roundedStepIndex]
+ }
+
+ return lerp(
+ steps[shiftPointRange.fromStepIndex],
+ steps[shiftPointRange.toStepIndex],
+ shiftPointRange.steppedInterpolation
+ )
+ }
+
+ companion object {
+
+ /**
+ * Creates a new [Strategy] based on a default [keylineList].
+ *
+ * The [keylineList] passed to this method will be the keylines used when the carousel is
+ * scrolled anywhere in the middle of the list (not the beginning or end). From these
+ * default keylines, additional [KeylineList]s will be created which move the focal range
+ * to the beginning of the carousel container when scrolled to the beginning of the list and
+ * the end of the container when scrolled to the end of the list.
+ *
+ * @param carouselMainAxisSize the size of the carousel container in scrolling axis
+ * @param keylineList the default keylines that will be used to create the strategy
+ */
+ internal fun create(
+ /** The size of the carousel in the main axis. */
+ carouselMainAxisSize: Float,
+ /** The keylines along the main axis */
+ keylineList: KeylineList
+ ): Strategy {
+
+ val startKeylineSteps = getStartKeylineSteps(keylineList, carouselMainAxisSize)
+ val endKeylineSteps =
+ getEndKeylineSteps(keylineList, carouselMainAxisSize)
+
+ // TODO: Update this to use the first/last focal keylines to calculate shift?
+ val startShiftDistance = startKeylineSteps.last().first().unadjustedOffset -
+ keylineList.first().unadjustedOffset
+ val endShiftDistance = keylineList.last().unadjustedOffset -
+ endKeylineSteps.last().last().unadjustedOffset
+
+ return Strategy(
+ defaultKeylines = keylineList,
+ startKeylineSteps = startKeylineSteps,
+ endKeylineSteps = endKeylineSteps,
+ startShiftDistance = startShiftDistance,
+ endShiftDistance = endShiftDistance,
+ startShiftPoints = getStepInterpolationPoints(
+ startShiftDistance,
+ startKeylineSteps,
+ true
+ ),
+ endShiftPoints = getStepInterpolationPoints(
+ endShiftDistance,
+ endKeylineSteps,
+ false
+ )
+ )
+ }
+
+ /**
+ * Generates discreet steps which move the focal range from its original position until
+ * it reaches the start of the carousel container.
+ *
+ * Each step can only move the focal range by one keyline at a time to ensure every
+ * item in the list passes through the focal range. Each step removes the keyline at the
+ * start of the container and re-inserts it after the focal range in an order that retains
+ * visual balance. This is repeated until the first focal keyline is at the start of the
+ * container. Re-inserting keylines after the focal range in a balanced way is done by
+ * looking at the size of they keyline next to the keyline that is being re-positioned
+ * and finding a match on the other side of the focal range.
+ *
+ * The first state in the returned list is always the default [KeylineList] while
+ * the last state will be the start state or the state that has the focal range at the
+ * beginning of the carousel.
+ */
+ private fun getStartKeylineSteps(
+ defaultKeylines: KeylineList,
+ carouselMainAxisSize: Float
+ ): List<KeylineList> {
+ val steps: MutableList<KeylineList> = mutableListOf()
+ steps.add(defaultKeylines)
+
+ if (defaultKeylines.isFirstFocalItemAtStartOfContainer()) {
+ return steps
+ }
+
+ val startIndex = defaultKeylines.firstNonAnchorIndex
+ val endIndex = defaultKeylines.firstFocalIndex
+ val numberOfSteps = endIndex - startIndex
+
+ // If there are no steps but we need to account for a cutoff, create a
+ // list of keylines shifted for the cutoff.
+ if (numberOfSteps <= 0 && defaultKeylines.firstFocal.cutoff > 0) {
+ steps.add(
+ moveKeylineAndCreateShiftedKeylineList(
+ from = defaultKeylines,
+ srcIndex = 0,
+ dstIndex = 0,
+ carouselMainAxisSize = carouselMainAxisSize
+ )
+ )
+ return steps
+ }
+
+ var i = 0
+ while (i < numberOfSteps) {
+ val prevStep = steps.last()
+ val originalItemIndex = startIndex + i
+ var dstIndex = defaultKeylines.lastIndex
+ if (originalItemIndex > 0) {
+ val originalNeighborBeforeSize = defaultKeylines[originalItemIndex - 1].size
+ dstIndex = prevStep.firstIndexAfterFocalRangeWithSize(
+ originalNeighborBeforeSize
+ ) - 1
+ }
+
+ steps.add(
+ moveKeylineAndCreateShiftedKeylineList(
+ from = prevStep,
+ srcIndex = defaultKeylines.firstNonAnchorIndex,
+ dstIndex = dstIndex,
+ carouselMainAxisSize = carouselMainAxisSize
+ )
+ )
+ i++
+ }
+
+ return steps
+ }
+
+ /**
+ * Generates discreet steps which move the focal range from its original position until
+ * it reaches the end of the carousel container.
+ *
+ * Each step can only move the focal range by one keyline at a time to ensure every
+ * item in the list passes through the focal range. Each step removes the keyline at the
+ * end of the container and re-inserts it before the focal range in an order that retains
+ * visual balance. This is repeated until the last focal keyline is at the start of the
+ * container. Re-inserting keylines before the focal range in a balanced way is done by
+ * looking at the size of they keyline next to the keyline that is being re-positioned
+ * and finding a match on the other side of the focal range.
+ *
+ * The first state in the returned list is always the default [KeylineList] while
+ * the last state will be the end state or the state that has the focal range at the
+ * end of the carousel.
+ */
+ private fun getEndKeylineSteps(
+ defaultKeylines: KeylineList,
+ carouselMainAxisSize: Float
+ ): List<KeylineList> {
+ val steps: MutableList<KeylineList> = mutableListOf()
+ steps.add(defaultKeylines)
+
+ if (defaultKeylines.isLastFocalItemAtEndOfContainer(carouselMainAxisSize)) {
+ return steps
+ }
+
+ val startIndex = defaultKeylines.lastFocalIndex
+ val endIndex = defaultKeylines.lastNonAnchorIndex
+ val numberOfSteps = endIndex - startIndex
+
+ // If there are no steps but we need to account for a cutoff, create a
+ // list of keylines shifted for the cutoff.
+ if (numberOfSteps <= 0 && defaultKeylines.lastFocal.cutoff > 0) {
+ steps.add(
+ moveKeylineAndCreateShiftedKeylineList(
+ from = defaultKeylines,
+ srcIndex = 0,
+ dstIndex = 0,
+ carouselMainAxisSize = carouselMainAxisSize
+ )
+ )
+ return steps
+ }
+
+ var i = 0
+ while (i < numberOfSteps) {
+ val prevStep = steps.last()
+ val originalItemIndex = endIndex - i
+ var dstIndex = 0
+
+ if (originalItemIndex < defaultKeylines.lastIndex) {
+ val originalNeighborAfterSize = defaultKeylines[originalItemIndex + 1].size
+ dstIndex = prevStep.lastIndexBeforeFocalRangeWithSize(
+ originalNeighborAfterSize
+ ) + 1
+ }
+
+ val keylines = moveKeylineAndCreateShiftedKeylineList(
+ from = prevStep,
+ srcIndex = defaultKeylines.lastNonAnchorIndex,
+ dstIndex = dstIndex,
+ carouselMainAxisSize = carouselMainAxisSize
+ )
+ steps.add(keylines)
+ i++
+ }
+
+ return steps
+ }
+
+ /**
+ * Returns a new [KeylineList] where the keyline at [srcIndex] is moved to [dstIndex] and
+ * with updated pivot and offsets that reflect any change in focal shift.
+ */
+ private fun moveKeylineAndCreateShiftedKeylineList(
+ from: KeylineList,
+ srcIndex: Int,
+ dstIndex: Int,
+ carouselMainAxisSize: Float
+ ): KeylineList {
+ // -1 if the pivot is shifting left/top, 1 if shifting right/bottom
+ val pivotDir = if (srcIndex > dstIndex) 1 else -1
+ val pivotDelta = from[srcIndex].size * pivotDir
+ val newPivotIndex = from.pivotIndex + pivotDir
+ val newPivotOffset = from.pivot.offset + pivotDelta
+ return keylineListOf(carouselMainAxisSize, newPivotIndex, newPivotOffset) {
+ from.toMutableList()
+ .move(srcIndex, dstIndex)
+ .fastForEach { k -> add(k.size, k.isAnchor) }
+ }
+ }
+
+ /**
+ * Creates and returns a list of float values containing points between 0 and 1 that
+ * represent interpolation values for when the [KeylineList] at the corresponding index in
+ * [steps] should be visible.
+ *
+ * For example, if [steps] has a size of 4, this method will return an array of 4 float
+ * values that could look like [0, .33, .66, 1]. When interpolating through a list of
+ * [KeylineList]s, an interpolation value will be between 0-1. This interpolation will be
+ * used to find the range it falls within from this method's returned value. If
+ * interpolation is .25, that would fall between the 0 and .33, the 0th and 1st indices
+ * of the float array. Meaning the 0th and 1st items from [steps] should be the current
+ * [KeylineList]s being interpolated. This is an example with equally distributed values
+ * but these values will typically be unequally distributed since their size depends on
+ * the distance keylines shift between each step.
+ *
+ * @see [lerp] for more details on how interpolation points are used
+ * @see [getKeylineListForScrollOffset] for more details on how interpolation points
+ * are used
+ *
+ * @param totalShiftDistance the total distance keylines will shift between the first and
+ * last [KeylineList] of [steps]
+ * @param steps the steps to find interpolation points for
+ * @param isShiftingLeft true if this method should find interpolation points for shifting
+ * keylines to the left/top of a carousel, false if this method should find interpolation
+ * points for shifting keylines to the right/bottom of a carousel
+ * @return a list of floats, equal in size to [steps] that contains points between 0-1
+ * that align with when a [KeylineList] from [steps should be shown for a 0-1
+ * interpolation value
+ */
+ private fun getStepInterpolationPoints(
+ totalShiftDistance: Float,
+ steps: List<KeylineList>,
+ isShiftingLeft: Boolean
+ ): FloatList {
+ val points = mutableFloatListOf(0f)
+ if (totalShiftDistance == 0f) {
+ return points
+ }
+
+ (1 until steps.size).map { i ->
+ val prevKeylines = steps[i - 1]
+ val currKeylines = steps[i]
+ val distanceShifted = if (isShiftingLeft) {
+ currKeylines.first().unadjustedOffset - prevKeylines.first().unadjustedOffset
+ } else {
+ prevKeylines.last().unadjustedOffset - currKeylines.last().unadjustedOffset
+ }
+ val stepPercentage = distanceShifted / totalShiftDistance
+ val point = if (i == steps.lastIndex) 1f else points[i - 1] + stepPercentage
+ points.add(point)
+ }
+ return points
+ }
+
+ private data class ShiftPointRange(
+ val fromStepIndex: Int,
+ val toStepIndex: Int,
+ val steppedInterpolation: Float
+ )
+
+ private fun getShiftPointRange(
+ stepsCount: Int,
+ shiftPoint: FloatList,
+ interpolation: Float
+ ): ShiftPointRange {
+ var lowerBounds = shiftPoint[0]
+ (1 until stepsCount).forEach { i ->
+ val upperBounds = shiftPoint[i]
+ if (interpolation <= upperBounds) {
+ return ShiftPointRange(
+ fromStepIndex = i - 1,
+ toStepIndex = i,
+ steppedInterpolation = lerp(0f, 1f, lowerBounds, upperBounds, interpolation)
+ )
+ }
+ lowerBounds = upperBounds
+ }
+ return ShiftPointRange(
+ fromStepIndex = 0,
+ toStepIndex = 0,
+ steppedInterpolation = 0f)
+ }
+
+ private fun MutableList<Keyline>.move(srcIndex: Int, dstIndex: Int): MutableList<Keyline> {
+ val keyline = get(srcIndex)
+ removeAt(srcIndex)
+ add(dstIndex, keyline)
+ return this
+ }
+ }
+}
+
+/**
+ * Returns an interpolated [Keyline] whose values are all interpolated based on [fraction]
+ * between the [start] and [end] keylines.
+ */
+@VisibleForTesting
+internal fun lerp(start: Keyline, end: Keyline, fraction: Float): Keyline {
+ return Keyline(
+ size = lerp(start.size, end.size, fraction),
+ offset = lerp(start.offset, end.offset, fraction),
+ unadjustedOffset = lerp(start.unadjustedOffset, end.unadjustedOffset, fraction),
+ isFocal = if (fraction < .5f) start.isFocal else end.isFocal,
+ isAnchor = if (fraction < .5f) start.isAnchor else end.isAnchor,
+ isPivot = if (fraction < .5f) start.isPivot else end.isPivot,
+ cutoff = lerp(start.cutoff, end.cutoff, fraction)
+ )
+}
+
+/**
+ * Returns an interpolated KeylineList between [from] and [to].
+ *
+ * Unlike creating a [KeylineList] using [keylineListOf], this method does not set unadjusted
+ * offsets by calculating them from a pivot index. This method simply interpolates all values of
+ * all keylines between the given pair.
+ */
+@VisibleForTesting
+internal fun lerp(
+ from: KeylineList,
+ to: KeylineList,
+ fraction: Float
+): KeylineList {
+ val interpolatedKeylines = from.fastMapIndexed { i, k ->
+ lerp(k, to[i], fraction)
+ }
+ return KeylineList(interpolatedKeylines)
+}
+
+private fun lerp(
+ outputMin: Float,
+ outputMax: Float,
+ inputMin: Float,
+ inputMax: Float,
+ value: Float
+): Float {
+ if (value <= inputMin) {
+ return outputMin
+ } else if (value >= inputMax) {
+ return outputMax
+ }
+
+ return lerp(outputMin, outputMax, (value - inputMin) / (inputMax - inputMin))
+}
diff --git a/compose/runtime/runtime/api/current.txt b/compose/runtime/runtime/api/current.txt
index 59d20ff..0d02a68 100644
--- a/compose/runtime/runtime/api/current.txt
+++ b/compose/runtime/runtime/api/current.txt
@@ -68,11 +68,11 @@
}
public final class ComposablesKt {
- method @androidx.compose.runtime.Composable public static inline <T extends java.lang.Object, reified E extends androidx.compose.runtime.Applier<?>> void ComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update);
- method @androidx.compose.runtime.Composable public static inline <T extends java.lang.Object, reified E extends androidx.compose.runtime.Applier<?>> void ComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static inline <T, reified E extends androidx.compose.runtime.Applier<?>> void ComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update);
+ method @androidx.compose.runtime.Composable public static inline <T, reified E extends androidx.compose.runtime.Applier<?>> void ComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update, kotlin.jvm.functions.Function0<kotlin.Unit> content);
method @androidx.compose.runtime.Composable @androidx.compose.runtime.ExplicitGroupsComposable public static inline <T, reified E extends androidx.compose.runtime.Applier<?>> void ComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.SkippableUpdater<T>,kotlin.Unit> skippableUpdate, kotlin.jvm.functions.Function0<kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static inline <T extends java.lang.Object, reified E extends androidx.compose.runtime.Applier<?>> void ReusableComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update);
- method @androidx.compose.runtime.Composable public static inline <T extends java.lang.Object, reified E extends androidx.compose.runtime.Applier<?>> void ReusableComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static inline <T, reified E extends androidx.compose.runtime.Applier<?>> void ReusableComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update);
+ method @androidx.compose.runtime.Composable public static inline <T, reified E extends androidx.compose.runtime.Applier<?>> void ReusableComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update, kotlin.jvm.functions.Function0<kotlin.Unit> content);
method @androidx.compose.runtime.Composable @androidx.compose.runtime.ExplicitGroupsComposable public static inline <T, reified E extends androidx.compose.runtime.Applier<?>> void ReusableComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.SkippableUpdater<T>,kotlin.Unit> skippableUpdate, kotlin.jvm.functions.Function0<kotlin.Unit> content);
method @androidx.compose.runtime.Composable public static inline void ReusableContent(Object? key, kotlin.jvm.functions.Function0<kotlin.Unit> content);
method @androidx.compose.runtime.Composable @androidx.compose.runtime.ExplicitGroupsComposable public static inline void ReusableContentHost(boolean active, kotlin.jvm.functions.Function0<kotlin.Unit> content);
diff --git a/compose/runtime/runtime/api/restricted_current.txt b/compose/runtime/runtime/api/restricted_current.txt
index 14cb03b..0f68875 100644
--- a/compose/runtime/runtime/api/restricted_current.txt
+++ b/compose/runtime/runtime/api/restricted_current.txt
@@ -72,11 +72,11 @@
}
public final class ComposablesKt {
- method @androidx.compose.runtime.Composable public static inline <T extends java.lang.Object, reified E extends androidx.compose.runtime.Applier<?>> void ComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update);
- method @androidx.compose.runtime.Composable public static inline <T extends java.lang.Object, reified E extends androidx.compose.runtime.Applier<?>> void ComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static inline <T, reified E extends androidx.compose.runtime.Applier<?>> void ComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update);
+ method @androidx.compose.runtime.Composable public static inline <T, reified E extends androidx.compose.runtime.Applier<?>> void ComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update, kotlin.jvm.functions.Function0<kotlin.Unit> content);
method @androidx.compose.runtime.Composable @androidx.compose.runtime.ExplicitGroupsComposable public static inline <T, reified E extends androidx.compose.runtime.Applier<?>> void ComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.SkippableUpdater<T>,kotlin.Unit> skippableUpdate, kotlin.jvm.functions.Function0<kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static inline <T extends java.lang.Object, reified E extends androidx.compose.runtime.Applier<?>> void ReusableComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update);
- method @androidx.compose.runtime.Composable public static inline <T extends java.lang.Object, reified E extends androidx.compose.runtime.Applier<?>> void ReusableComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @androidx.compose.runtime.Composable public static inline <T, reified E extends androidx.compose.runtime.Applier<?>> void ReusableComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update);
+ method @androidx.compose.runtime.Composable public static inline <T, reified E extends androidx.compose.runtime.Applier<?>> void ReusableComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update, kotlin.jvm.functions.Function0<kotlin.Unit> content);
method @androidx.compose.runtime.Composable @androidx.compose.runtime.ExplicitGroupsComposable public static inline <T, reified E extends androidx.compose.runtime.Applier<?>> void ReusableComposeNode(kotlin.jvm.functions.Function0<? extends T> factory, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.Updater<T>,kotlin.Unit> update, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.SkippableUpdater<T>,kotlin.Unit> skippableUpdate, kotlin.jvm.functions.Function0<kotlin.Unit> content);
method @androidx.compose.runtime.Composable public static inline void ReusableContent(Object? key, kotlin.jvm.functions.Function0<kotlin.Unit> content);
method @androidx.compose.runtime.Composable @androidx.compose.runtime.ExplicitGroupsComposable public static inline void ReusableContentHost(boolean active, kotlin.jvm.functions.Function0<kotlin.Unit> content);
diff --git a/compose/runtime/runtime/build.gradle b/compose/runtime/runtime/build.gradle
index bd9fafc..b07e223 100644
--- a/compose/runtime/runtime/build.gradle
+++ b/compose/runtime/runtime/build.gradle
@@ -81,6 +81,7 @@
dependsOn(jvmMain)
dependencies {
api(libs.kotlinCoroutinesAndroid)
+ api(project(":annotation:annotation-experimental"))
}
}
diff --git a/compose/runtime/runtime/lint-baseline.xml b/compose/runtime/runtime/lint-baseline.xml
index 6acb029..2fce8f0 100644
--- a/compose/runtime/runtime/lint-baseline.xml
+++ b/compose/runtime/runtime/lint-baseline.xml
@@ -1,41 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
-
- <issue
- id="PrimitiveInCollection"
- message="variable useDefault with type List<? extends Integer>: replace with IntList"
- errorLine1=" val useDefault ="
- errorLine2=" ^">
- <location
- file="src/jvmMain/kotlin/androidx/compose/runtime/reflect/ComposableMethod.jvm.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="field groupInfos with type HashMap<Integer, GroupInfo>: replace with IntObjectMap"
- errorLine1=" private val groupInfos = run {"
- errorLine2=" ^">
- <location
- file="src/commonMain/kotlin/androidx/compose/runtime/Composer.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="variable result with type HashMap<Integer, GroupInfo>: replace with IntObjectMap"
- errorLine1=" val result = hashMapOf<Int, GroupInfo>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/runtime/Composer.kt"/>
- </issue>
-
- <issue
- id="ExperimentalPropertyAnnotation"
- message="This property does not have all required annotations to correctly mark it as experimental."
- errorLine1=" @InternalComposeApi"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/runtime/Composer.kt"/>
- </issue>
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanSuppressTag"
@@ -74,66 +38,84 @@
</issue>
<issue
- id="PrimitiveInCollection"
- message="return type List<Integer> of keys: replace with IntList"
- errorLine1="private fun IntArray.keys(len: Int = size) ="
- errorLine2=" ~~~~">
+ id="ExperimentalPropertyAnnotation"
+ message="This property does not have all required annotations to correctly mark it as experimental."
+ errorLine1=" @InternalComposeApi"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
- file="src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt"/>
+ file="src/commonMain/kotlin/androidx/compose/runtime/Composer.kt"/>
+ </issue>
+
+ <issue
+ id="ExperimentalPropertyAnnotation"
+ message="This property does not have all required annotations to correctly mark it as experimental."
+ errorLine1="@InternalComposeApi"
+ errorLine2="~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/runtime/internal/LiveLiteral.kt"/>
</issue>
<issue
id="PrimitiveInCollection"
- message="return type List<Integer> of nodeCounts: replace with IntList"
- errorLine1="private fun IntArray.nodeCounts(len: Int = size) ="
- errorLine2=" ~~~~~~~~~~">
+ message="variable useDefault with type List<? extends Integer>: replace with IntList"
+ errorLine1=" val useDefault ="
+ errorLine2=" ^">
<location
- file="src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt"/>
+ file="src/jvmMain/kotlin/androidx/compose/runtime/reflect/ComposableMethod.jvm.kt"/>
</issue>
<issue
id="PrimitiveInCollection"
- message="return type List<Integer> of parentAnchors: replace with IntList"
- errorLine1="private fun IntArray.parentAnchors(len: Int = size) ="
- errorLine2=" ~~~~~~~~~~~~~">
+ message="field groupInfos with type HashMap<Integer, GroupInfo>: replace with IntObjectMap"
+ errorLine1=" private val groupInfos = run {"
+ errorLine2=" ^">
<location
- file="src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt"/>
+ file="src/commonMain/kotlin/androidx/compose/runtime/Composer.kt"/>
</issue>
<issue
id="PrimitiveInCollection"
- message="return type List<Integer> of slice: replace with IntList"
- errorLine1="private fun IntArray.slice(indices: Iterable<Int>): List<Int> {"
- errorLine2=" ~~~~~~~~~">
+ message="variable result with type HashMap<Integer, GroupInfo>: replace with IntObjectMap"
+ errorLine1=" val result = hashMapOf<Int, GroupInfo>()"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt"/>
+ file="src/commonMain/kotlin/androidx/compose/runtime/Composer.kt"/>
</issue>
<issue
id="PrimitiveInCollection"
- message="variable list with type List<Integer>: replace with IntList"
- errorLine1=" val list = mutableListOf<Int>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ message="field intParams with type List<IntParameter>: replace with IntList"
+ errorLine1=" val intParams = List(ints) { index -> IntParameter(index) }"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt"/>
+ file="src/commonMain/kotlin/androidx/compose/runtime/changelist/Operation.kt"/>
</issue>
<issue
id="PrimitiveInCollection"
- message="return type List<Integer> of groupSizes: replace with IntList"
- errorLine1="private fun IntArray.groupSizes(len: Int = size) ="
- errorLine2=" ~~~~~~~~~~">
+ message="return type List<IntParameter> of getIntParams: replace with IntList"
+ errorLine1=" val intParams = List(ints) { index -> IntParameter(index) }"
+ errorLine2=" ~~~~~~~~~">
<location
- file="src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt"/>
+ file="src/commonMain/kotlin/androidx/compose/runtime/changelist/Operation.kt"/>
</issue>
<issue
id="PrimitiveInCollection"
- message="return type List<Integer> of dataAnchors: replace with IntList"
- errorLine1="private fun IntArray.dataAnchors(len: Int = size) ="
- errorLine2=" ~~~~~~~~~~~">
+ message="field objParams with type List<ObjectParameter<Object>>: replace with IntList"
+ errorLine1=" val objParams = List(objects) { index -> ObjectParameter<Any?>(index) }"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt"/>
+ file="src/commonMain/kotlin/androidx/compose/runtime/changelist/Operation.kt"/>
+ </issue>
+
+ <issue
+ id="PrimitiveInCollection"
+ message="return type List<ObjectParameter<Object>> of getObjParams: replace with IntList"
+ errorLine1=" val objParams = List(objects) { index -> ObjectParameter<Any?>(index) }"
+ errorLine2=" ~~~~~~~~~">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/runtime/changelist/Operation.kt"/>
</issue>
<issue
@@ -201,9 +183,63 @@
<issue
id="PrimitiveInCollection"
- message="field list with type List<Integer>: replace with IntList"
- errorLine1="internal class PrioritySet(private val list: MutableList<Int> = mutableListOf()) {"
- errorLine2=" ~~~~~~~~~~~~~~~~">
+ message="return type List<Integer> of keys: replace with IntList"
+ errorLine1="private fun IntArray.keys(len: Int = size) ="
+ errorLine2=" ~~~~">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt"/>
+ </issue>
+
+ <issue
+ id="PrimitiveInCollection"
+ message="return type List<Integer> of nodeCounts: replace with IntList"
+ errorLine1="private fun IntArray.nodeCounts(len: Int = size) ="
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt"/>
+ </issue>
+
+ <issue
+ id="PrimitiveInCollection"
+ message="return type List<Integer> of parentAnchors: replace with IntList"
+ errorLine1="private fun IntArray.parentAnchors(len: Int = size) ="
+ errorLine2=" ~~~~~~~~~~~~~">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt"/>
+ </issue>
+
+ <issue
+ id="PrimitiveInCollection"
+ message="return type List<Integer> of slice: replace with IntList"
+ errorLine1="private fun IntArray.slice(indices: Iterable<Int>): List<Int> {"
+ errorLine2=" ~~~~~~~~~">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt"/>
+ </issue>
+
+ <issue
+ id="PrimitiveInCollection"
+ message="variable list with type List<Integer>: replace with IntList"
+ errorLine1=" val list = mutableListOf<Int>()"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt"/>
+ </issue>
+
+ <issue
+ id="PrimitiveInCollection"
+ message="return type List<Integer> of groupSizes: replace with IntList"
+ errorLine1="private fun IntArray.groupSizes(len: Int = size) ="
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt"/>
+ </issue>
+
+ <issue
+ id="PrimitiveInCollection"
+ message="return type List<Integer> of dataAnchors: replace with IntList"
+ errorLine1="private fun IntArray.dataAnchors(len: Int = size) ="
+ errorLine2=" ~~~~~~~~~~~">
<location
file="src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt"/>
</issue>
@@ -219,38 +255,20 @@
<issue
id="PrimitiveInCollection"
- message="field intParams with type List<IntParameter>: replace with IntList"
- errorLine1=" val intParams = List(ints) { index -> IntParameter(index) }"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ message="field list with type List<Integer>: replace with IntList"
+ errorLine1="internal class PrioritySet(private val list: MutableList<Int> = mutableListOf()) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
<location
- file="src/commonMain/kotlin/androidx/compose/runtime/changelist/Operation.kt"/>
+ file="src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt"/>
</issue>
<issue
id="PrimitiveInCollection"
- message="field objParams with type List<ObjectParameter<Object>>: replace with IntList"
- errorLine1=" val objParams = List(objects) { index -> ObjectParameter<Any?>(index) }"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ message="variable newBelowBound with type List<Integer>: replace with IntList"
+ errorLine1=" var newBelowBound: MutableList<Int>? = null"
+ errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
- file="src/commonMain/kotlin/androidx/compose/runtime/changelist/Operation.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type List<IntParameter> of getIntParams: replace with IntList"
- errorLine1=" val intParams = List(ints) { index -> IntParameter(index) }"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/runtime/changelist/Operation.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type List<ObjectParameter<Object>> of getObjParams: replace with IntList"
- errorLine1=" val objParams = List(objects) { index -> ObjectParameter<Any?>(index) }"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/runtime/changelist/Operation.kt"/>
+ file="src/commonMain/kotlin/androidx/compose/runtime/snapshots/SnapshotIdSet.kt"/>
</issue>
<issue
@@ -298,22 +316,4 @@
file="src/commonMain/kotlin/androidx/compose/runtime/external/kotlinx/collections/immutable/extensions.kt"/>
</issue>
- <issue
- id="ExperimentalPropertyAnnotation"
- message="This property does not have all required annotations to correctly mark it as experimental."
- errorLine1="@InternalComposeApi"
- errorLine2="~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/runtime/internal/LiveLiteral.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="variable newBelowBound with type List<Integer>: replace with IntList"
- errorLine1=" var newBelowBound: MutableList<Int>? = null"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/runtime/snapshots/SnapshotIdSet.kt"/>
- </issue>
-
</issues>
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Expect.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Expect.kt
index 72ca519..065979a 100644
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Expect.kt
+++ b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Expect.kt
@@ -16,6 +16,9 @@
package androidx.compose.runtime
+import androidx.compose.runtime.snapshots.Snapshot
+import androidx.compose.runtime.snapshots.SnapshotContextElement
+
// TODO(aelias): Mark the typealiases internal when https://youtrack.jetbrains.com/issue/KT-36695 is
// fixed.
// Currently, they behave as internal because the actual is internal, even though the expect is
@@ -130,3 +133,8 @@
internal expect fun currentThreadId(): Long
internal expect fun currentThreadName(): String
+
+@OptIn(ExperimentalComposeApi::class)
+internal expect class SnapshotContextElementImpl(
+ snapshot: Snapshot
+) : SnapshotContextElement
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/snapshots/SnapshotContextElement.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/snapshots/SnapshotContextElement.kt
index b4a7f86..b7640c2 100644
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/snapshots/SnapshotContextElement.kt
+++ b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/snapshots/SnapshotContextElement.kt
@@ -17,8 +17,8 @@
package androidx.compose.runtime.snapshots
import androidx.compose.runtime.ExperimentalComposeApi
+import androidx.compose.runtime.SnapshotContextElementImpl
import kotlin.coroutines.CoroutineContext
-import kotlinx.coroutines.ThreadContextElement
/**
* Return a [SnapshotContextElement] that will [enter][Snapshot.enter] this [Snapshot] whenever
@@ -39,22 +39,3 @@
interface SnapshotContextElement : CoroutineContext.Element {
companion object Key : CoroutineContext.Key<SnapshotContextElement>
}
-
-/**
- * Implementation of [SnapshotContextElement] that enters a single given snapshot when updating
- * the thread context of a resumed coroutine.
- */
-@ExperimentalComposeApi
-private class SnapshotContextElementImpl(
- private val snapshot: Snapshot
-) : SnapshotContextElement, ThreadContextElement<Snapshot?> {
- override val key: CoroutineContext.Key<*>
- get() = SnapshotContextElement
-
- override fun updateThreadContext(context: CoroutineContext): Snapshot? =
- snapshot.unsafeEnter()
-
- override fun restoreThreadContext(context: CoroutineContext, oldState: Snapshot?) {
- snapshot.unsafeLeave(oldState)
- }
-}
diff --git a/compose/runtime/runtime/src/jvmMain/kotlin/androidx/compose/runtime/ActualJvm.jvm.kt b/compose/runtime/runtime/src/jvmMain/kotlin/androidx/compose/runtime/ActualJvm.jvm.kt
index 0a2c617..e4cbdd9 100644
--- a/compose/runtime/runtime/src/jvmMain/kotlin/androidx/compose/runtime/ActualJvm.jvm.kt
+++ b/compose/runtime/runtime/src/jvmMain/kotlin/androidx/compose/runtime/ActualJvm.jvm.kt
@@ -18,7 +18,11 @@
import androidx.compose.runtime.internal.ThreadMap
import androidx.compose.runtime.internal.emptyThreadMap
+import androidx.compose.runtime.snapshots.Snapshot
+import androidx.compose.runtime.snapshots.SnapshotContextElement
import java.util.concurrent.atomic.AtomicInteger
+import kotlin.coroutines.CoroutineContext
+import kotlinx.coroutines.ThreadContextElement
@Suppress("ACTUAL_WITHOUT_EXPECT") // https://youtrack.jetbrains.com/issue/KT-37316
internal actual typealias AtomicReference<V> = java.util.concurrent.atomic.AtomicReference<V>
@@ -117,3 +121,22 @@
internal actual fun currentThreadId(): Long = Thread.currentThread().id
internal actual fun currentThreadName(): String = Thread.currentThread().name
+
+/**
+ * Implementation of [SnapshotContextElement] that enters a single given snapshot when updating
+ * the thread context of a resumed coroutine.
+ */
+@ExperimentalComposeApi
+internal actual class SnapshotContextElementImpl actual constructor(
+ private val snapshot: Snapshot
+) : SnapshotContextElement, ThreadContextElement<Snapshot?> {
+ override val key: CoroutineContext.Key<*>
+ get() = SnapshotContextElement
+
+ override fun updateThreadContext(context: CoroutineContext): Snapshot? =
+ snapshot.unsafeEnter()
+
+ override fun restoreThreadContext(context: CoroutineContext, oldState: Snapshot?) {
+ snapshot.unsafeLeave(oldState)
+ }
+}
diff --git a/compose/test-utils/lint-baseline.xml b/compose/test-utils/lint-baseline.xml
index 513e026..75f580d 100644
--- a/compose/test-utils/lint-baseline.xml
+++ b/compose/test-utils/lint-baseline.xml
@@ -1,14 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.1.0-beta05" type="baseline" client="gradle" dependencies="false" name="AGP (8.1.0-beta05)" variant="all" version="8.1.0-beta05">
-
- <issue
- id="PlatformImportInCommonModule"
- message="Platform-dependent import in a common module"
- errorLine1="import android.view.View"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/testutils/ComposeExecutionControl.kt"/>
- </issue>
+<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
<issue
id="PlatformImportInCommonModule"
@@ -28,13 +19,4 @@
file="src/commonMain/kotlin/androidx/compose/testutils/Expect.kt"/>
</issue>
- <issue
- id="PlatformImportInCommonModule"
- message="Platform-dependent import in a common module"
- errorLine1="import android.annotation.SuppressLint"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/testutils/ModifierTestUtils.kt"/>
- </issue>
-
</issues>
diff --git a/compose/ui/ui-graphics/api/current.txt b/compose/ui/ui-graphics/api/current.txt
index 06055aa..6b5fb34 100644
--- a/compose/ui/ui-graphics/api/current.txt
+++ b/compose/ui/ui-graphics/api/current.txt
@@ -751,6 +751,11 @@
enum_constant public static final androidx.compose.ui.graphics.PathIterator.ConicEvaluation AsQuadratics;
}
+ public final class PathKt {
+ method public static androidx.compose.ui.graphics.Path Path();
+ method public static androidx.compose.ui.graphics.Path copy(androidx.compose.ui.graphics.Path);
+ }
+
@kotlin.jvm.JvmDefaultWithCompatibility public interface PathMeasure {
method public float getLength();
method public long getPosition(float distance);
diff --git a/compose/ui/ui-graphics/api/restricted_current.txt b/compose/ui/ui-graphics/api/restricted_current.txt
index d19c9a5..9ca7f8b 100644
--- a/compose/ui/ui-graphics/api/restricted_current.txt
+++ b/compose/ui/ui-graphics/api/restricted_current.txt
@@ -787,6 +787,11 @@
enum_constant public static final androidx.compose.ui.graphics.PathIterator.ConicEvaluation AsQuadratics;
}
+ public final class PathKt {
+ method public static androidx.compose.ui.graphics.Path Path();
+ method public static androidx.compose.ui.graphics.Path copy(androidx.compose.ui.graphics.Path);
+ }
+
@kotlin.jvm.JvmDefaultWithCompatibility public interface PathMeasure {
method public float getLength();
method public long getPosition(float distance);
diff --git a/compose/ui/ui-graphics/build.gradle b/compose/ui/ui-graphics/build.gradle
index ee6bf60..d44a291 100644
--- a/compose/ui/ui-graphics/build.gradle
+++ b/compose/ui/ui-graphics/build.gradle
@@ -76,6 +76,7 @@
//implementation("androidx.graphics:graphics-path:1.0.0-beta01")
implementation(project(":graphics:graphics-path"))
api(libs.androidx.annotation)
+ api(project(":annotation:annotation-experimental"))
}
}
diff --git a/compose/ui/ui-graphics/lint-baseline.xml b/compose/ui/ui-graphics/lint-baseline.xml
index 71b02e3..d92d59c 100644
--- a/compose/ui/ui-graphics/lint-baseline.xml
+++ b/compose/ui/ui-graphics/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="PrimitiveInCollection"
diff --git a/compose/ui/ui-graphics/src/commonTest/kotlin/androidx/compose/ui/graphics/ColorTest.kt b/compose/ui/ui-graphics/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/ColorTest.kt
similarity index 96%
rename from compose/ui/ui-graphics/src/commonTest/kotlin/androidx/compose/ui/graphics/ColorTest.kt
rename to compose/ui/ui-graphics/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/ColorTest.kt
index cd9b92d..cfe1192 100644
--- a/compose/ui/ui-graphics/src/commonTest/kotlin/androidx/compose/ui/graphics/ColorTest.kt
+++ b/compose/ui/ui-graphics/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/ColorTest.kt
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 The Android Open Source Project
+ * 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.
@@ -18,6 +18,10 @@
import androidx.compose.ui.graphics.colorspace.ColorSpaces
import androidx.compose.ui.util.lerp
+import androidx.core.graphics.blue
+import androidx.core.graphics.green
+import androidx.core.graphics.red
+import kotlin.math.abs
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
@@ -510,7 +514,7 @@
0xff5649cd, 0xff5649ce, 0xff5649ce, 0xff5549ce, 0xff5549ce, 0xff5549ce, 0xff5549cf,
0xff5449cf, 0xff5448cf, 0xff5448cf, 0xff5448cf, 0xff5348cf, 0xff5348d0, 0xff5348d0,
0xff5348d0, 0xff5248d0, 0xff5248d0, 0xff5248d1, 0xff5247d1, 0xff5147d1, 0xff5147d1,
- 0xff5147d1, 0xff5147d2, 0xff5047d2, 0xff5047d2, 0xff5047d2, 0xff5047d2, 0xff4f47d2,
+ 0xff5147d1, 0xff5147d1, 0xff5047d2, 0xff5047d2, 0xff5047d2, 0xff5047d2, 0xff4f47d2,
0xff4f46d3, 0xff4f46d3, 0xff4f46d3, 0xff4e46d3, 0xff4e46d3, 0xff4e46d4, 0xff4e46d4,
0xff4d46d4, 0xff4d46d4, 0xff4d46d4, 0xff4d45d4, 0xff4c45d5, 0xff4c45d5, 0xff4c45d5,
0xff4c45d5, 0xff4b45d5, 0xff4b45d5, 0xff4b45d6, 0xff4b45d6, 0xff4a44d6, 0xff4a44d6,
@@ -551,7 +555,17 @@
repeat(1001) {
val color = lerp(Color.Red, Color.Blue, it / 1000f)
val colorLong = color.toArgb().toLong() and 0xFFFFFFFFL
- assertEquals(expected[it], colorLong,
+ // Check individual color channels to account for possible float and half-float
+ // precision issues across devices. We allow up to 1/255 of difference
+ assertTrue(abs(expected[it].toInt().red - color.toArgb().red) < 2,
+ "Expected fraction $it/1000 to have color " +
+ "0x${expected[it].toString(16)}, but was 0x${colorLong.toString(16)}"
+ )
+ assertTrue(abs(expected[it].toInt().green - color.toArgb().green) < 2,
+ "Expected fraction $it/1000 to have color " +
+ "0x${expected[it].toString(16)}, but was 0x${colorLong.toString(16)}"
+ )
+ assertTrue(abs(expected[it].toInt().blue - color.toArgb().blue) < 2,
"Expected fraction $it/1000 to have color " +
"0x${expected[it].toString(16)}, but was 0x${colorLong.toString(16)}"
)
diff --git a/compose/ui/ui-graphics/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/PathTest.kt b/compose/ui/ui-graphics/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/PathTest.kt
index 1952be6..0f019e5 100644
--- a/compose/ui/ui-graphics/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/PathTest.kt
+++ b/compose/ui/ui-graphics/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/PathTest.kt
@@ -128,6 +128,33 @@
}
}
+ @Test
+ fun testPathCopy() {
+ val r1 = Path().apply {
+ addRect(
+ Rect(0.0f, 0.0f, 10.0f, 10.0f),
+ Path.Direction.ClockWise
+ )
+ }
+ val r2 = r1.copy().apply {
+ addRect(
+ Rect(5.0f, 5.0f, 15.0f, 15.0f),
+ Path.Direction.ClockWise
+ )
+ }
+
+ val r1Bounds = r1.getBounds()
+
+ // Additional changes to a copied path should not mutate the original path
+ val expectedR1Bounds = Rect(0.0f, 0.0f, 10.0f, 10.0f)
+ assertEquals(expectedR1Bounds, r1Bounds)
+
+ val r2bounds = r2.getBounds()
+
+ val expectedR2Bounds = Rect(0.0f, 0.0f, 15.0f, 15.0f)
+ assertEquals(expectedR2Bounds, r2bounds)
+ }
+
class TestAndroidPath : android.graphics.Path() {
var resetCount = 0
diff --git a/compose/ui/ui-graphics/src/androidMain/kotlin/androidx/compose/ui/graphics/AndroidFloat16.android.kt b/compose/ui/ui-graphics/src/androidMain/kotlin/androidx/compose/ui/graphics/AndroidFloat16.android.kt
new file mode 100644
index 0000000..5858e3d
--- /dev/null
+++ b/compose/ui/ui-graphics/src/androidMain/kotlin/androidx/compose/ui/graphics/AndroidFloat16.android.kt
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 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.graphics
+
+import android.os.Build
+import android.util.Half
+import androidx.annotation.DoNotInline
+import androidx.annotation.RequiresApi
+
+// Use the platform version to benefit from ART intrinsics on API 30+
+@Suppress("NOTHING_TO_INLINE")
+internal actual inline fun floatToHalf(f: Float): Short = if (Build.VERSION.SDK_INT >= 26) {
+ Api26Impl.floatToHalf(f)
+} else {
+ softwareFloatToHalf(f)
+}
+
+// Use the platform version to benefit from ART intrinsics on API 30+
+@Suppress("NOTHING_TO_INLINE")
+internal actual inline fun halfToFloat(h: Short): Float = if (Build.VERSION.SDK_INT >= 26) {
+ Api26Impl.halfToFloat(h)
+} else {
+ softwareHalfToFloat(h)
+}
+
+@RequiresApi(26)
+internal object Api26Impl {
+ @JvmStatic
+ @DoNotInline
+ @Suppress("HalfFloat")
+ fun floatToHalf(f: Float) = Half.toHalf(f)
+
+ @JvmStatic
+ @DoNotInline
+ @Suppress("HalfFloat")
+ fun halfToFloat(h: Short) = Half.toFloat(h)
+}
diff --git a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Float16.kt b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Float16.kt
index 8aabeca6..27b2ece 100644
--- a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Float16.kt
+++ b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Float16.kt
@@ -147,37 +147,7 @@
* @return The half-precision float value represented by this object
* converted to type `Float`
*/
- fun toFloat(): Float {
- val bits = halfValue.toInt() and 0xffff
- val s = bits and Fp16SignMask
- val e = bits.ushr(Fp16ExponentShift) and Fp16ExponentMask
- val m = bits and Fp16SignificandMask
-
- var outE = 0
- var outM = 0
-
- if (e == 0) { // Denormal or 0
- if (m != 0) {
- // Convert denorm fp16 into normalized fp32
- var o = floatFromBits(Fp32DenormalMagic + m)
- o -= Fp32DenormalFloat
- return if (s == 0) o else -o
- }
- } else {
- outM = m shl 13
- if (e == 0x1f) { // Infinite or NaN
- outE = 0xff
- if (outM != 0) { // SNaNs are quieted
- outM = outM or Fp32QNaNMask
- }
- } else {
- outE = e - Fp16ExponentBias + Fp32ExponentBias
- }
- }
-
- val out = s shl 16 or (outE shl Fp32ExponentShift) or outM
- return floatFromBits(out)
- }
+ fun toFloat(): Float = halfToFloat(halfValue)
/**
* Returns the value of this `Float16` as a `Double` after
@@ -629,7 +599,11 @@
* Convert a single-precision float to a half-precision float, stored as
* [Short] data type to hold its 16 bits.
*/
-internal fun floatToHalf(f: Float): Short {
+internal expect fun floatToHalf(f: Float): Short
+
+// Provided here as a convenience for `actual` implementations
+@Suppress("NOTHING_TO_INLINE")
+internal inline fun softwareFloatToHalf(f: Float): Short {
val bits = f.toRawBits()
val s = bits.ushr(Fp32SignShift)
var e = bits.ushr(Fp32ExponentShift) and Fp32ExponentMask
@@ -673,7 +647,11 @@
/**
* Convert a half-precision float to a single-precision float.
*/
-internal fun halfToFloat(h: Short): Float {
+internal expect fun halfToFloat(h: Short): Float
+
+// Provided here as a convenience for `actual` implementations
+@Suppress("NOTHING_TO_INLINE")
+internal inline fun softwareHalfToFloat(h: Short): Float {
val bits = h.toInt() and 0xffff
val s = bits and Fp16SignMask
val e = bits.ushr(Fp16ExponentShift) and Fp16ExponentMask
diff --git a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Path.kt b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Path.kt
index 1b339d6..fe975e2 100644
--- a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Path.kt
+++ b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Path.kt
@@ -23,6 +23,11 @@
expect fun Path(): Path
+/**
+ * Create a new path, copying the contents from the src path.
+ */
+fun Path.copy(): Path = Path().apply { addPath(this@copy) }
+
@JvmDefaultWithCompatibility
/* expect class */ interface Path {
/**
diff --git a/compose/ui/ui-graphics/src/desktopMain/kotlin/androidx/compose/ui/graphics/DesktopFloat16.desktop.kt b/compose/ui/ui-graphics/src/desktopMain/kotlin/androidx/compose/ui/graphics/DesktopFloat16.desktop.kt
new file mode 100644
index 0000000..c102496
--- /dev/null
+++ b/compose/ui/ui-graphics/src/desktopMain/kotlin/androidx/compose/ui/graphics/DesktopFloat16.desktop.kt
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 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.graphics
+
+internal actual fun floatToHalf(f: Float): Short = softwareFloatToHalf(f)
+
+internal actual fun halfToFloat(h: Short): Float = softwareHalfToFloat(h)
diff --git a/compose/ui/ui-inspection/lint-baseline.xml b/compose/ui/ui-inspection/lint-baseline.xml
index f313a40..0bc6bc4 100644
--- a/compose/ui/ui-inspection/lint-baseline.xml
+++ b/compose/ui/ui-inspection/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-beta01)" variant="all" version="8.2.0-beta01">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="PrimitiveInCollection"
diff --git a/compose/ui/ui-test-junit4/api/current.txt b/compose/ui/ui-test-junit4/api/current.txt
index 8f15c3f..0364dec 100644
--- a/compose/ui/ui-test-junit4/api/current.txt
+++ b/compose/ui/ui-test-junit4/api/current.txt
@@ -6,6 +6,7 @@
ctor public AndroidComposeTestRule(R activityRule, kotlin.jvm.functions.Function1<? super R,? extends A> activityProvider);
method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public void cancelAndRecreateRecomposer();
method public A getActivity();
method public R getActivityRule();
method public androidx.compose.ui.unit.Density getDensity();
diff --git a/compose/ui/ui-test-junit4/api/restricted_current.txt b/compose/ui/ui-test-junit4/api/restricted_current.txt
index 8f15c3f..0364dec 100644
--- a/compose/ui/ui-test-junit4/api/restricted_current.txt
+++ b/compose/ui/ui-test-junit4/api/restricted_current.txt
@@ -6,6 +6,7 @@
ctor public AndroidComposeTestRule(R activityRule, kotlin.jvm.functions.Function1<? super R,? extends A> activityProvider);
method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public void cancelAndRecreateRecomposer();
method public A getActivity();
method public R getActivityRule();
method public androidx.compose.ui.unit.Density getDensity();
diff --git a/compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/junit4/AndroidComposeTestRule.android.kt b/compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/junit4/AndroidComposeTestRule.android.kt
index 626ca1e3..0ee15e0 100644
--- a/compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/junit4/AndroidComposeTestRule.android.kt
+++ b/compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/junit4/AndroidComposeTestRule.android.kt
@@ -338,6 +338,10 @@
): SemanticsNodeInteractionCollection = composeTest.onAllNodes(matcher, useUnmergedTree)
override fun setContent(composable: @Composable () -> Unit) = composeTest.setContent(composable)
+
+ fun cancelAndRecreateRecomposer() {
+ environment.cancelAndRecreateRecomposer()
+ }
}
private fun <A : ComponentActivity> getActivityFromTestRule(rule: ActivityScenarioRule<A>): A {
diff --git a/compose/ui/ui-test/api/current.txt b/compose/ui/ui-test/api/current.txt
index f71c259..c292274 100644
--- a/compose/ui/ui-test/api/current.txt
+++ b/compose/ui/ui-test/api/current.txt
@@ -29,6 +29,7 @@
@SuppressCompatibility @androidx.compose.ui.test.ExperimentalTestApi public abstract class AndroidComposeUiTestEnvironment<A extends androidx.activity.ComponentActivity> {
ctor public AndroidComposeUiTestEnvironment(optional kotlin.coroutines.CoroutineContext effectContext);
+ method public final void cancelAndRecreateRecomposer();
method protected abstract A? getActivity();
method public final androidx.compose.ui.test.AndroidComposeUiTest<A> getTest();
method public final <R> R runTest(kotlin.jvm.functions.Function1<? super androidx.compose.ui.test.AndroidComposeUiTest<A>,? extends R> block);
diff --git a/compose/ui/ui-test/api/restricted_current.txt b/compose/ui/ui-test/api/restricted_current.txt
index 44fd399..f60a25f 100644
--- a/compose/ui/ui-test/api/restricted_current.txt
+++ b/compose/ui/ui-test/api/restricted_current.txt
@@ -29,6 +29,7 @@
@SuppressCompatibility @androidx.compose.ui.test.ExperimentalTestApi public abstract class AndroidComposeUiTestEnvironment<A extends androidx.activity.ComponentActivity> {
ctor public AndroidComposeUiTestEnvironment(optional kotlin.coroutines.CoroutineContext effectContext);
+ method public final void cancelAndRecreateRecomposer();
method protected abstract A? getActivity();
method public final androidx.compose.ui.test.AndroidComposeUiTest<A> getTest();
method public final <R> R runTest(kotlin.jvm.functions.Function1<? super androidx.compose.ui.test.AndroidComposeUiTest<A>,? extends R> block);
diff --git a/compose/ui/ui-test/lint-baseline.xml b/compose/ui/ui-test/lint-baseline.xml
index ee8ffe4..40df33c 100644
--- a/compose/ui/ui-test/lint-baseline.xml
+++ b/compose/ui/ui-test/lint-baseline.xml
@@ -1,14 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(10)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/test/android/WindowCapture.android.kt"/>
- </issue>
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
@@ -20,6 +11,15 @@
</issue>
<issue
+ id="BanThreadSleep"
+ message="Uses Thread.sleep()"
+ errorLine1=" Thread.sleep(10)"
+ errorLine2=" ~~~~~">
+ <location
+ file="src/androidMain/kotlin/androidx/compose/ui/test/android/WindowCapture.android.kt"/>
+ </issue>
+
+ <issue
id="PrimitiveInCollection"
message="field MouseAsTouchEvents with type List<Integer>: replace with IntList"
errorLine1="private val MouseAsTouchEvents = listOf(ACTION_DOWN, ACTION_MOVE, ACTION_UP)"
diff --git a/compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/ComposeUiTest.android.kt b/compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/ComposeUiTest.android.kt
index e8fd13b..72a79c6 100644
--- a/compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/ComposeUiTest.android.kt
+++ b/compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/ComposeUiTest.android.kt
@@ -219,26 +219,30 @@
@ExperimentalTestApi
@OptIn(InternalTestApi::class, ExperimentalCoroutinesApi::class, ExperimentalComposeUiApi::class)
abstract class AndroidComposeUiTestEnvironment<A : ComponentActivity>(
- effectContext: CoroutineContext = EmptyCoroutineContext
+ private val effectContext: CoroutineContext = EmptyCoroutineContext
) {
private val idlingResourceRegistry = IdlingResourceRegistry()
internal val composeRootRegistry = ComposeRootRegistry()
private val mainClockImpl: MainTestClockImpl
- private val composeIdlingResource: ComposeIdlingResource
+ private lateinit var composeIdlingResource: ComposeIdlingResource
private var idlingStrategy: IdlingStrategy = EspressoLink(idlingResourceRegistry)
- private val recomposer: Recomposer
+ private lateinit var recomposer: Recomposer
// We can only accept a TestDispatcher here because we need to access its scheduler.
private val testCoroutineDispatcher = effectContext[ContinuationInterceptor] as? TestDispatcher
?: UnconfinedTestDispatcher()
private val testCoroutineScope = TestScope(testCoroutineDispatcher)
- private val recomposerCoroutineScope: CoroutineScope
+ private lateinit var recomposerCoroutineScope: CoroutineScope
private val coroutineExceptionHandler = UncaughtExceptionHandler()
+ private val frameClock: TestMonotonicFrameClock
+ private val recomposerContinuationInterceptor: ApplyingContinuationInterceptor
+ private val infiniteAnimationPolicy: InfiniteAnimationPolicy
+
init {
- val frameClock = TestMonotonicFrameClock(
+ frameClock = TestMonotonicFrameClock(
testCoroutineScope,
// This callback will get run at the same time, relative to frame callbacks and
// coroutine resumptions, as the Choreographer's perform traversal frame, where it runs
@@ -252,10 +256,12 @@
)
// The applying interceptor needs to be the outermost wrapper since TestMonotonicFrameClock
// will not delegate if the dispatcher dispatch is not needed at the time of intercept.
- val recomposerContinuationInterceptor =
+ recomposerContinuationInterceptor =
ApplyingContinuationInterceptor(frameClock.continuationInterceptor)
+
mainClockImpl = MainTestClockImpl(testCoroutineDispatcher.scheduler, frameClock)
- val infiniteAnimationPolicy = object : InfiniteAnimationPolicy {
+
+ infiniteAnimationPolicy = object : InfiniteAnimationPolicy {
override suspend fun <R> onInfiniteOperation(block: suspend () -> R): R {
if (mainClockImpl.autoAdvance) {
throw CancellationException("Infinite animations are disabled on tests")
@@ -263,6 +269,11 @@
return block()
}
}
+
+ createRecomposer()
+ }
+
+ private fun createRecomposer() {
recomposerCoroutineScope = CoroutineScope(
effectContext +
recomposerContinuationInterceptor +
@@ -272,11 +283,17 @@
Job()
)
recomposer = Recomposer(recomposerCoroutineScope.coroutineContext)
+
composeIdlingResource = ComposeIdlingResource(
composeRootRegistry, mainClockImpl, recomposer
)
}
+ fun cancelAndRecreateRecomposer() {
+ recomposer.cancel()
+ createRecomposer()
+ }
+
internal val testReceiverScope = AndroidComposeUiTestImpl()
private val testOwner = AndroidTestOwner()
private val testContext = createTestContext(testOwner)
diff --git a/compose/ui/ui-text/api/current.txt b/compose/ui/ui-text/api/current.txt
index fc128af9..4291d29 100644
--- a/compose/ui/ui-text/api/current.txt
+++ b/compose/ui/ui-text/api/current.txt
@@ -10,6 +10,7 @@
ctor public AnnotatedString(String text, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.SpanStyle>> spanStyles, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.ParagraphStyle>> paragraphStyles);
method public operator char get(int index);
method public int getLength();
+ method public java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.LinkAnnotation>> getLinkAnnotations(int start, int end);
method public java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.ParagraphStyle>> getParagraphStyles();
method public java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.SpanStyle>> getSpanStyles();
method public java.util.List<androidx.compose.ui.text.AnnotatedString.Range<java.lang.String>> getStringAnnotations(int start, int end);
@@ -17,6 +18,7 @@
method public String getText();
method public java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.TtsAnnotation>> getTtsAnnotations(int start, int end);
method @SuppressCompatibility @androidx.compose.ui.text.ExperimentalTextApi public java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.UrlAnnotation>> getUrlAnnotations(int start, int end);
+ method public boolean hasLinkAnnotations(int start, int end);
method public boolean hasStringAnnotations(String tag, int start, int end);
method @androidx.compose.runtime.Stable public operator androidx.compose.ui.text.AnnotatedString plus(androidx.compose.ui.text.AnnotatedString other);
method public androidx.compose.ui.text.AnnotatedString subSequence(int startIndex, int endIndex);
@@ -32,6 +34,8 @@
ctor public AnnotatedString.Builder(androidx.compose.ui.text.AnnotatedString text);
ctor public AnnotatedString.Builder(optional int capacity);
ctor public AnnotatedString.Builder(String text);
+ method public void addLink(androidx.compose.ui.text.LinkAnnotation.Clickable clickable, int start, int end);
+ method public void addLink(androidx.compose.ui.text.LinkAnnotation.Url url, int start, int end);
method public void addStringAnnotation(String tag, String annotation, int start, int end);
method public void addStyle(androidx.compose.ui.text.ParagraphStyle style, int start, int end);
method public void addStyle(androidx.compose.ui.text.SpanStyle style, int start, int end);
@@ -47,6 +51,7 @@
method public int getLength();
method public void pop();
method public void pop(int index);
+ method public int pushLink(androidx.compose.ui.text.LinkAnnotation link);
method public int pushStringAnnotation(String tag, String annotation);
method public int pushStyle(androidx.compose.ui.text.ParagraphStyle style);
method public int pushStyle(androidx.compose.ui.text.SpanStyle style);
@@ -87,6 +92,7 @@
method public static androidx.compose.ui.text.AnnotatedString decapitalize(androidx.compose.ui.text.AnnotatedString, optional androidx.compose.ui.text.intl.LocaleList localeList);
method public static androidx.compose.ui.text.AnnotatedString toLowerCase(androidx.compose.ui.text.AnnotatedString, optional androidx.compose.ui.text.intl.LocaleList localeList);
method public static androidx.compose.ui.text.AnnotatedString toUpperCase(androidx.compose.ui.text.AnnotatedString, optional androidx.compose.ui.text.intl.LocaleList localeList);
+ method public static inline <R> R withAnnotation(androidx.compose.ui.text.AnnotatedString.Builder, androidx.compose.ui.text.LinkAnnotation link, kotlin.jvm.functions.Function1<? super androidx.compose.ui.text.AnnotatedString.Builder,? extends R> block);
method @SuppressCompatibility @androidx.compose.ui.text.ExperimentalTextApi public static inline <R> R withAnnotation(androidx.compose.ui.text.AnnotatedString.Builder, androidx.compose.ui.text.TtsAnnotation ttsAnnotation, kotlin.jvm.functions.Function1<? super androidx.compose.ui.text.AnnotatedString.Builder,? extends R> block);
method @SuppressCompatibility @androidx.compose.ui.text.ExperimentalTextApi public static inline <R> R withAnnotation(androidx.compose.ui.text.AnnotatedString.Builder, androidx.compose.ui.text.UrlAnnotation urlAnnotation, kotlin.jvm.functions.Function1<? super androidx.compose.ui.text.AnnotatedString.Builder,? extends R> block);
method @SuppressCompatibility @androidx.compose.ui.text.ExperimentalTextApi public static inline <R> R withAnnotation(androidx.compose.ui.text.AnnotatedString.Builder, String tag, String annotation, kotlin.jvm.functions.Function1<? super androidx.compose.ui.text.AnnotatedString.Builder,? extends R> block);
@@ -111,6 +117,21 @@
@SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.ERROR, message="This is internal API that may change frequently and without warning.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.FUNCTION, kotlin.annotation.AnnotationTarget.PROPERTY}) public @interface InternalTextApi {
}
+ public abstract class LinkAnnotation {
+ }
+
+ public static final class LinkAnnotation.Clickable extends androidx.compose.ui.text.LinkAnnotation {
+ ctor public LinkAnnotation.Clickable(String tag);
+ method public String getTag();
+ property public final String tag;
+ }
+
+ public static final class LinkAnnotation.Url extends androidx.compose.ui.text.LinkAnnotation {
+ ctor public LinkAnnotation.Url(String url);
+ method public String getUrl();
+ property public final String url;
+ }
+
public final class MultiParagraph {
ctor @Deprecated public MultiParagraph(androidx.compose.ui.text.AnnotatedString annotatedString, androidx.compose.ui.text.TextStyle style, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.FontFamily.Resolver fontFamilyResolver, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis);
ctor @Deprecated public MultiParagraph(androidx.compose.ui.text.AnnotatedString annotatedString, androidx.compose.ui.text.TextStyle style, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.Font.ResourceLoader resourceLoader);
diff --git a/compose/ui/ui-text/api/restricted_current.txt b/compose/ui/ui-text/api/restricted_current.txt
index cd07d3f..fb565d4 100644
--- a/compose/ui/ui-text/api/restricted_current.txt
+++ b/compose/ui/ui-text/api/restricted_current.txt
@@ -10,6 +10,7 @@
ctor public AnnotatedString(String text, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.SpanStyle>> spanStyles, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.ParagraphStyle>> paragraphStyles);
method public operator char get(int index);
method public int getLength();
+ method public java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.LinkAnnotation>> getLinkAnnotations(int start, int end);
method public java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.ParagraphStyle>> getParagraphStyles();
method public java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.SpanStyle>> getSpanStyles();
method public java.util.List<androidx.compose.ui.text.AnnotatedString.Range<java.lang.String>> getStringAnnotations(int start, int end);
@@ -17,6 +18,7 @@
method public String getText();
method public java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.TtsAnnotation>> getTtsAnnotations(int start, int end);
method @SuppressCompatibility @androidx.compose.ui.text.ExperimentalTextApi public java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.UrlAnnotation>> getUrlAnnotations(int start, int end);
+ method public boolean hasLinkAnnotations(int start, int end);
method public boolean hasStringAnnotations(String tag, int start, int end);
method @androidx.compose.runtime.Stable public operator androidx.compose.ui.text.AnnotatedString plus(androidx.compose.ui.text.AnnotatedString other);
method public androidx.compose.ui.text.AnnotatedString subSequence(int startIndex, int endIndex);
@@ -32,6 +34,8 @@
ctor public AnnotatedString.Builder(androidx.compose.ui.text.AnnotatedString text);
ctor public AnnotatedString.Builder(optional int capacity);
ctor public AnnotatedString.Builder(String text);
+ method public void addLink(androidx.compose.ui.text.LinkAnnotation.Clickable clickable, int start, int end);
+ method public void addLink(androidx.compose.ui.text.LinkAnnotation.Url url, int start, int end);
method public void addStringAnnotation(String tag, String annotation, int start, int end);
method public void addStyle(androidx.compose.ui.text.ParagraphStyle style, int start, int end);
method public void addStyle(androidx.compose.ui.text.SpanStyle style, int start, int end);
@@ -47,6 +51,7 @@
method public int getLength();
method public void pop();
method public void pop(int index);
+ method public int pushLink(androidx.compose.ui.text.LinkAnnotation link);
method public int pushStringAnnotation(String tag, String annotation);
method public int pushStyle(androidx.compose.ui.text.ParagraphStyle style);
method public int pushStyle(androidx.compose.ui.text.SpanStyle style);
@@ -87,6 +92,7 @@
method public static androidx.compose.ui.text.AnnotatedString decapitalize(androidx.compose.ui.text.AnnotatedString, optional androidx.compose.ui.text.intl.LocaleList localeList);
method public static androidx.compose.ui.text.AnnotatedString toLowerCase(androidx.compose.ui.text.AnnotatedString, optional androidx.compose.ui.text.intl.LocaleList localeList);
method public static androidx.compose.ui.text.AnnotatedString toUpperCase(androidx.compose.ui.text.AnnotatedString, optional androidx.compose.ui.text.intl.LocaleList localeList);
+ method public static inline <R> R withAnnotation(androidx.compose.ui.text.AnnotatedString.Builder, androidx.compose.ui.text.LinkAnnotation link, kotlin.jvm.functions.Function1<? super androidx.compose.ui.text.AnnotatedString.Builder,? extends R> block);
method @SuppressCompatibility @androidx.compose.ui.text.ExperimentalTextApi public static inline <R> R withAnnotation(androidx.compose.ui.text.AnnotatedString.Builder, androidx.compose.ui.text.TtsAnnotation ttsAnnotation, kotlin.jvm.functions.Function1<? super androidx.compose.ui.text.AnnotatedString.Builder,? extends R> block);
method @SuppressCompatibility @androidx.compose.ui.text.ExperimentalTextApi public static inline <R> R withAnnotation(androidx.compose.ui.text.AnnotatedString.Builder, androidx.compose.ui.text.UrlAnnotation urlAnnotation, kotlin.jvm.functions.Function1<? super androidx.compose.ui.text.AnnotatedString.Builder,? extends R> block);
method @SuppressCompatibility @androidx.compose.ui.text.ExperimentalTextApi public static inline <R> R withAnnotation(androidx.compose.ui.text.AnnotatedString.Builder, String tag, String annotation, kotlin.jvm.functions.Function1<? super androidx.compose.ui.text.AnnotatedString.Builder,? extends R> block);
@@ -111,6 +117,21 @@
@SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.ERROR, message="This is internal API that may change frequently and without warning.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.FUNCTION, kotlin.annotation.AnnotationTarget.PROPERTY}) public @interface InternalTextApi {
}
+ public abstract class LinkAnnotation {
+ }
+
+ public static final class LinkAnnotation.Clickable extends androidx.compose.ui.text.LinkAnnotation {
+ ctor public LinkAnnotation.Clickable(String tag);
+ method public String getTag();
+ property public final String tag;
+ }
+
+ public static final class LinkAnnotation.Url extends androidx.compose.ui.text.LinkAnnotation {
+ ctor public LinkAnnotation.Url(String url);
+ method public String getUrl();
+ property public final String url;
+ }
+
public final class MultiParagraph {
ctor @Deprecated public MultiParagraph(androidx.compose.ui.text.AnnotatedString annotatedString, androidx.compose.ui.text.TextStyle style, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.FontFamily.Resolver fontFamilyResolver, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis);
ctor @Deprecated public MultiParagraph(androidx.compose.ui.text.AnnotatedString annotatedString, androidx.compose.ui.text.TextStyle style, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.Font.ResourceLoader resourceLoader);
diff --git a/compose/ui/ui-text/benchmark/lint-baseline.xml b/compose/ui/ui-text/benchmark/lint-baseline.xml
index 6431b9c..2edc98f 100644
--- a/compose/ui/ui-text/benchmark/lint-baseline.xml
+++ b/compose/ui/ui-text/benchmark/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.1.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.1.0-beta01)" variant="all" version="8.1.0-beta01">
+<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
<issue
id="SoonBlockedPrivateApi"
@@ -12,7 +12,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" freeCaches.invoke(null)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
diff --git a/compose/ui/ui-text/build.gradle b/compose/ui/ui-text/build.gradle
index 693ab90..183c508 100644
--- a/compose/ui/ui-text/build.gradle
+++ b/compose/ui/ui-text/build.gradle
@@ -81,6 +81,7 @@
dependsOn(jvmMain)
dependencies {
api("androidx.annotation:annotation:1.1.0")
+ api(project(":annotation:annotation-experimental"))
implementation("androidx.core:core:1.7.0")
implementation("androidx.emoji2:emoji2:1.2.0")
implementation('androidx.collection:collection:1.0.0')
diff --git a/compose/ui/ui-text/lint-baseline.xml b/compose/ui/ui-text/lint-baseline.xml
index 40b9c16..e34eca2 100644
--- a/compose/ui/ui-text/lint-baseline.xml
+++ b/compose/ui/ui-text/lint-baseline.xml
@@ -1,14 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
-
- <issue
- id="NewApi"
- message="Cast from `BlendMode` to `Comparable` requires API level 29 (current min is 21)"
- errorLine1=" assertThat(paragraph.textPaint.blendMode).isEqualTo(BlendMode.SrcOver)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/AndroidParagraphTest.kt"/>
- </issue>
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="NewApi"
@@ -40,10 +31,10 @@
<issue
id="NewApi"
message="Cast from `BlendMode` to `Comparable` requires API level 29 (current min is 21)"
- errorLine1=" assertThat(textPaint.blendMode).isEqualTo(BlendMode.SrcOver)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" assertThat(paragraph.textPaint.blendMode).isEqualTo(BlendMode.SrcOver)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/platform/AndroidTextPaintTest.kt"/>
+ file="src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/AndroidParagraphTest.kt"/>
</issue>
<issue
@@ -57,6 +48,15 @@
<issue
id="NewApi"
+ message="Cast from `BlendMode` to `Comparable` requires API level 29 (current min is 21)"
+ errorLine1=" assertThat(textPaint.blendMode).isEqualTo(BlendMode.SrcOver)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/platform/AndroidTextPaintTest.kt"/>
+ </issue>
+
+ <issue
+ id="NewApi"
message="Call requires API level 29 (current min is 21): `android.graphics.Paint#setBlendMode`"
errorLine1=" textPaint.blendMode = BlendMode.DstOver"
errorLine2=" ~~~~~~~~~">
@@ -66,6 +66,15 @@
<issue
id="NewApi"
+ message="Call requires API level 29 (current min is 21): `android.graphics.Paint#getBlendMode`"
+ errorLine1=" assertThat(textPaint.blendMode).isEqualTo(BlendMode.DstOver)"
+ errorLine2=" ~~~~~~~~~">
+ <location
+ file="src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/platform/AndroidTextPaintTest.kt"/>
+ </issue>
+
+ <issue
+ id="NewApi"
message="Cast from `BlendMode` to `Comparable` requires API level 29 (current min is 21)"
errorLine1=" assertThat(textPaint.blendMode).isEqualTo(BlendMode.DstOver)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
@@ -74,12 +83,48 @@
</issue>
<issue
- id="NewApi"
- message="Call requires API level 29 (current min is 21): `android.graphics.Paint#getBlendMode`"
- errorLine1=" assertThat(textPaint.blendMode).isEqualTo(BlendMode.DstOver)"
- errorLine2=" ~~~~~~~~~">
+ id="ListIterator"
+ message="Creating an unnecessary Iterator to iterate through a List"
+ errorLine1=" "'$key' must be unique. Actual [ [${value.joinToString()}]""
+ errorLine2=" ~~~~~~~~~~~~">
<location
- file="src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/platform/AndroidTextPaintTest.kt"/>
+ file="src/commonMain/kotlin/androidx/compose/ui/text/font/FontVariation.kt"/>
+ </issue>
+
+ <issue
+ id="PrimitiveInCollection"
+ message="return type List<FontStyle> of values: replace with IntList"
+ errorLine1=" fun values(): List<FontStyle> = listOf(Normal, Italic)"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/ui/text/font/FontStyle.kt"/>
+ </issue>
+
+ <issue
+ id="PrimitiveInCollection"
+ message="variable transitions with type TreeSet<Integer>: replace with IntSet"
+ errorLine1=" val transitions = sortedSetOf(0, text.length)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/jvmMain/kotlin/androidx/compose/ui/text/JvmAnnotatedString.jvm.kt"/>
+ </issue>
+
+ <issue
+ id="PrimitiveInCollection"
+ message="variable offsetMap with type Map<Integer, Integer>: replace with IntIntMap"
+ errorLine1=" val offsetMap = mutableMapOf(0 to 0)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/jvmMain/kotlin/androidx/compose/ui/text/JvmAnnotatedString.jvm.kt"/>
+ </issue>
+
+ <issue
+ id="PrimitiveInCollection"
+ message="method collectRangeTransitions has parameter target with type SortedSet<Integer>: replace with IntSet"
+ errorLine1=" target: SortedSet<Int>"
+ errorLine2=" ~~~~~~~~~~~~~~">
+ <location
+ file="src/jvmMain/kotlin/androidx/compose/ui/text/JvmAnnotatedString.jvm.kt"/>
</issue>
<issue
@@ -102,6 +147,15 @@
<issue
id="PrimitiveInCollection"
+ message="variable list with type List<? extends Float>: replace with FloatList"
+ errorLine1=" @Suppress("UNCHECKED_CAST")"
+ errorLine2=" ^">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt"/>
+ </issue>
+
+ <issue
+ id="PrimitiveInCollection"
message="return type List<Integer> of breakInWords: replace with IntList"
errorLine1=" private fun breakInWords(layoutHelper: LayoutHelper): List<Int> {"
errorLine2=" ~~~~~~~~~">
@@ -156,33 +210,6 @@
<issue
id="PrimitiveInCollection"
- message="variable list with type List<? extends Float>: replace with FloatList"
- errorLine1=" @Suppress("UNCHECKED_CAST")"
- errorLine2=" ^">
- <location
- file="src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type List<FontStyle> of values: replace with IntList"
- errorLine1=" fun values(): List<FontStyle> = listOf(Normal, Italic)"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/ui/text/font/FontStyle.kt"/>
- </issue>
-
- <issue
- id="ListIterator"
- message="Creating an unnecessary Iterator to iterate through a List"
- errorLine1=" "'$key' must be unique. Actual [ [${value.joinToString()}]""
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/ui/text/font/FontVariation.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
message="return type List<TextAlign> of values: replace with IntList"
errorLine1=" fun values(): List<TextAlign> = listOf(Left, Right, Center, Justify, Start, End)"
errorLine2=" ~~~~~~~~~~~~~~~">
@@ -190,31 +217,4 @@
file="src/commonMain/kotlin/androidx/compose/ui/text/style/TextAlign.kt"/>
</issue>
- <issue
- id="PrimitiveInCollection"
- message="variable transitions with type TreeSet<Integer>: replace with IntSet"
- errorLine1=" val transitions = sortedSetOf(0, text.length)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/jvmMain/kotlin/androidx/compose/ui/text/JvmAnnotatedString.jvm.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="variable offsetMap with type Map<Integer, Integer>: replace with IntIntMap"
- errorLine1=" val offsetMap = mutableMapOf(0 to 0)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/jvmMain/kotlin/androidx/compose/ui/text/JvmAnnotatedString.jvm.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="method collectRangeTransitions has parameter target with type SortedSet<Integer>: replace with IntSet"
- errorLine1=" target: SortedSet<Int>"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/jvmMain/kotlin/androidx/compose/ui/text/JvmAnnotatedString.jvm.kt"/>
- </issue>
-
</issues>
diff --git a/compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/AnnotatedStringBuilderTest.kt b/compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/AnnotatedStringBuilderTest.kt
index 7e8e019..ec4ea6c 100644
--- a/compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/AnnotatedStringBuilderTest.kt
+++ b/compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/AnnotatedStringBuilderTest.kt
@@ -1125,6 +1125,44 @@
assertThat(buildResult.getStringAnnotations(tag, 10, 11)).isEmpty()
}
+ @OptIn(ExperimentalTextApi::class)
+ @Test
+ fun getAnnotation_separates_linkAnnotation_and_stringAnnotation() {
+ val annotation1 = LinkAnnotation.Url("url")
+ val annotation2 = LinkAnnotation.Clickable("clickable tag")
+ val annotation3 = "annotation"
+ val tag = "tag"
+ val buildResult = AnnotatedString.Builder().apply {
+ pushLink(annotation1)
+ append("ab")
+ pushLink(annotation2)
+ append("cd")
+ pushStringAnnotation(tag, annotation3)
+ append("ef")
+ pop()
+ }.toAnnotatedString()
+
+ // The final result is abcdef
+ // [ ] LinkAnnotation.Url
+ // [ ] LinkAnnotation.Clickable
+ // [] Range<String>
+ assertThat(buildResult.getLinkAnnotations(0, 2)).isEqualTo(
+ listOf(Range(annotation1, 0, 6, ""))
+ )
+ assertThat(buildResult.getLinkAnnotations(3, 5)).isEqualTo(
+ listOf(
+ Range(annotation1, 0, 6, ""),
+ Range(annotation2, 2, 6, "")
+ )
+ )
+
+ assertThat(buildResult.getStringAnnotations(0, 4)).isEmpty()
+ assertThat(buildResult.getStringAnnotations(4, 6)).isEqualTo(
+ listOf(Range(annotation3, 4, 6, tag))
+ )
+ assertThat(buildResult.getStringAnnotations("another tag", 4, 6)).isEmpty()
+ }
+
private fun createAnnotatedString(
text: String,
color: Color = Color.Red,
diff --git a/compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/SaversTest.kt b/compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/SaversTest.kt
index 8365149..a51904d 100644
--- a/compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/SaversTest.kt
+++ b/compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/SaversTest.kt
@@ -348,6 +348,8 @@
withAnnotation(VerbatimTtsAnnotation("verbatim2")) { append("4") }
withAnnotation(UrlAnnotation("url1")) { append("5") }
withAnnotation(UrlAnnotation("url2")) { append("6") }
+ withAnnotation(LinkAnnotation.Url("url3")) { append("7") }
+ withAnnotation(LinkAnnotation.Clickable("tag3")) { append("8") }
}
val saved = with(AnnotatedStringSaver) { defaultSaverScope.save(original) }
@@ -371,6 +373,8 @@
withAnnotation(VerbatimTtsAnnotation("verbatim2")) { append("8") }
withAnnotation(UrlAnnotation("url1")) { append("9") }
withAnnotation(UrlAnnotation("url2")) { append("10") }
+ withAnnotation(LinkAnnotation.Url("url3")) { append("11") }
+ withAnnotation(LinkAnnotation.Clickable("tag3")) { append("12") }
}
val saved = with(AnnotatedStringSaver) { defaultSaverScope.save(original) }
diff --git a/compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/input/TextFieldValueTest.kt b/compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/input/TextFieldValueTest.kt
index 48da0c4..d4934fd 100644
--- a/compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/input/TextFieldValueTest.kt
+++ b/compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/input/TextFieldValueTest.kt
@@ -21,6 +21,7 @@
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shadow
import androidx.compose.ui.text.ExperimentalTextApi
+import androidx.compose.ui.text.LinkAnnotation
import androidx.compose.ui.text.ParagraphStyle
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.TextRange
@@ -177,6 +178,8 @@
withAnnotation(VerbatimTtsAnnotation("verbatim2")) { append("6") }
withAnnotation(UrlAnnotation("url1")) { append("7") }
withAnnotation(UrlAnnotation("url2")) { append("8") }
+ withAnnotation(LinkAnnotation.Url("url3")) { append("9") }
+ withAnnotation(LinkAnnotation.Clickable("tag3")) { append("10") }
withStyle(
SpanStyle(
color = Color.Red,
diff --git a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AnnotatedString.kt b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AnnotatedString.kt
index 6d05c99..10058d2 100644
--- a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AnnotatedString.kt
+++ b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AnnotatedString.kt
@@ -216,6 +216,29 @@
it.item is UrlAnnotation && intersect(start, end, it.start, it.end)
} ?: emptyList()) as List<Range<UrlAnnotation>>)
+ /**
+ * Query all of the [LinkAnnotation]s attached on this [AnnotatedString].
+ *
+ * @param start the start of the query range, inclusive.
+ * @param end the end of the query range, exclusive.
+ * @return a list of annotations stored in [Range]. Notice that All annotations that intersect
+ * with the range [start, end) will be returned. When [start] is bigger than [end], an empty
+ * list will be returned.
+ */
+ @Suppress("UNCHECKED_CAST")
+ fun getLinkAnnotations(start: Int, end: Int): List<Range<LinkAnnotation>> =
+ ((annotations?.fastFilter {
+ it.item is LinkAnnotation && intersect(start, end, it.start, it.end)
+ } ?: emptyList()) as List<Range<LinkAnnotation>>)
+
+ /**
+ * Returns true if [getLinkAnnotations] with the same parameters would return a non-empty list
+ */
+ fun hasLinkAnnotations(start: Int, end: Int): Boolean =
+ annotations?.fastAny {
+ it.item is LinkAnnotation && intersect(start, end, it.start, it.end)
+ } ?: false
+
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other !is AnnotatedString) return false
@@ -512,6 +535,41 @@
}
/**
+ * Set a [LinkAnnotation.Url] for the given [range].
+ *
+ * When clicking on the text in [range], the corresponding URL from the [url] annotation
+ * will be opened using [androidx.compose.ui.platform.UriHandler].
+ *
+ * URLs may be treated specially by screen readers, including being identified while reading text with an audio icon or being
+ * summarized in a links menu. When the text
+ *
+ * @param url A [LinkAnnotation.Url] object that stores the URL being linked to.
+ * @param start the inclusive starting offset of the range
+ * @param end the exclusive end offset of the range
+ * @see getStringAnnotations
+ */
+ @Suppress("SetterReturnsThis")
+ fun addLink(url: LinkAnnotation.Url, start: Int, end: Int) {
+ annotations.add(MutableRange(url, start, end))
+ }
+
+ /**
+ * Set a [LinkAnnotation.Clickable] for the given [range].
+ *
+ * When clicking on the text in [range], the handler will be triggered with the tag
+ * corresponding to the [clickable] object.
+ *
+ * @param clickable A [LinkAnnotation.Clickable] object that stores the tag being linked to.
+ * @param start the inclusive starting offset of the range
+ * @param end the exclusive end offset of the range
+ * @see getStringAnnotations
+ */
+ @Suppress("SetterReturnsThis")
+ fun addLink(clickable: LinkAnnotation.Clickable, start: Int, end: Int) {
+ annotations.add(MutableRange(clickable, start, end))
+ }
+
+ /**
* Applies the given [SpanStyle] to any appended text until a corresponding [pop] is
* called.
*
@@ -602,6 +660,24 @@
}
/**
+ * Attach the given [LinkAnnotation] to any appended text until a corresponding [pop]
+ * is called.
+ *
+ * @param link A [LinkAnnotation] object that stores the URL or clickable tag being
+ * linked to.
+ * @see getStringAnnotations
+ * @see Range
+ */
+ @Suppress("BuilderSetStyle")
+ fun pushLink(link: LinkAnnotation): Int {
+ MutableRange(item = link, start = text.length).also {
+ styleStack.add(it)
+ annotations.add(it)
+ }
+ return styleStack.size - 1
+ }
+
+ /**
* Ends the style or annotation that was added via a push operation before.
*
* @see pushStyle
@@ -1045,6 +1121,30 @@
}
/**
+ * Pushes an [LinkAnnotation] to the [AnnotatedString.Builder], executes [block] and then pops the
+ * annotation.
+ *
+ * @param link A [LinkAnnotation] object that stores the URL or clic being linked to.
+ * @param block function to be executed
+ *
+ * @return result of the [block]
+ *
+ * @see AnnotatedString.Builder.pushStringAnnotation
+ * @see AnnotatedString.Builder.pop
+ */
+inline fun <R : Any> Builder.withAnnotation(
+ link: LinkAnnotation,
+ crossinline block: Builder.() -> R
+): R {
+ val index = pushLink(link)
+ return try {
+ block(this)
+ } finally {
+ pop(index)
+ }
+}
+
+/**
* Filter the range list based on [Range.start] and [Range.end] to include ranges only in the range
* of [start] (inclusive) and [end] (exclusive).
*
diff --git a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/LinkAnnotation.kt b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/LinkAnnotation.kt
new file mode 100644
index 0000000..c46ab75
--- /dev/null
+++ b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/LinkAnnotation.kt
@@ -0,0 +1,68 @@
+/*
+ * 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.compose.ui.text
+
+/**
+ * An annotation that represents a clickable part of the text.
+ *
+ * Disclaimer: This is a no-op at the moment. Continue using [UrlAnnotation] to make your links
+ * visible for the accessibility services like Talkback
+ */
+abstract class LinkAnnotation private constructor() {
+ /**
+ * An annotation that contains a url string. When clicking on the text to which this annotation
+ * is attached, the app will try to open the url using [androidx.compose.ui.platform.UriHandler].
+ */
+ class Url(val url: String) : LinkAnnotation() {
+ override fun equals(other: Any?): Boolean {
+ if (this === other) return true
+ if (other !is Url) return false
+ return url == other.url
+ }
+
+ override fun hashCode(): Int {
+ return url.hashCode()
+ }
+
+ override fun toString(): String {
+ return "LinkAnnotation.Url(url=$url)"
+ }
+ }
+
+ /**
+ * An annotation that contains a clickable marked with [tag]. When clicking on the text to
+ * which this annotation is attached, the app will trigger a handler's callback.
+ *
+ * Disclaimer: This is a no-op at the moment. Continue using
+ * [androidx.compose.foundation.text.ClickableText] to make your text clickable.
+ */
+ class Clickable(val tag: String) : LinkAnnotation() {
+ override fun equals(other: Any?): Boolean {
+ if (this === other) return true
+ if (other !is Clickable) return false
+ return tag == other.tag
+ }
+
+ override fun hashCode(): Int {
+ return tag.hashCode()
+ }
+
+ override fun toString(): String {
+ return "LinkAnnotation.Clickable(tag=$tag)"
+ }
+ }
+}
diff --git a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt
index 52ae369..7a461927 100644
--- a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt
+++ b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt
@@ -115,7 +115,9 @@
Paragraph,
Span,
VerbatimTts,
- Url,
+ Url, // UrlAnnotation
+ Link, // LinkAnnotation.Url
+ Clickable,
String
}
@@ -127,6 +129,8 @@
is SpanStyle -> AnnotationType.Span
is VerbatimTtsAnnotation -> AnnotationType.VerbatimTts
is UrlAnnotation -> AnnotationType.Url
+ is LinkAnnotation.Url -> AnnotationType.Link
+ is LinkAnnotation.Clickable -> AnnotationType.Clickable
else -> AnnotationType.String
}
@@ -143,6 +147,16 @@
UrlAnnotationSaver,
this
)
+ AnnotationType.Link -> save(
+ it.item as LinkAnnotation.Url,
+ LinkSaver,
+ this
+ )
+ AnnotationType.Clickable -> save(
+ it.item as LinkAnnotation.Clickable,
+ ClickableSaver,
+ this
+ )
AnnotationType.String -> save(it.item)
}
@@ -179,6 +193,14 @@
val item: UrlAnnotation = restore(list[1], UrlAnnotationSaver)!!
AnnotatedString.Range(item = item, start = start, end = end, tag = tag)
}
+ AnnotationType.Link -> {
+ val item: LinkAnnotation.Url = restore(list[1], LinkSaver)!!
+ AnnotatedString.Range(item = item, start = start, end = end, tag = tag)
+ }
+ AnnotationType.Clickable -> {
+ val item: LinkAnnotation.Clickable = restore(list[1], ClickableSaver)!!
+ AnnotatedString.Range(item = item, start = start, end = end, tag = tag)
+ }
AnnotationType.String -> {
val item: String = restore(list[1])!!
AnnotatedString.Range(item = item, start = start, end = end, tag = tag)
@@ -198,6 +220,16 @@
restore = { UrlAnnotation(restore(it)!!) }
)
+private val LinkSaver = Saver<LinkAnnotation.Url, Any>(
+ save = { save(it.url) },
+ restore = { LinkAnnotation.Url(restore(it)!!) }
+)
+
+private val ClickableSaver = Saver<LinkAnnotation.Clickable, Any>(
+ save = { save(it.tag) },
+ restore = { LinkAnnotation.Clickable(restore(it)!!) }
+)
+
internal val ParagraphStyleSaver = Saver<ParagraphStyle, Any>(
save = {
arrayListOf(
diff --git a/compose/ui/ui-tooling-data/build.gradle b/compose/ui/ui-tooling-data/build.gradle
index 1a6fcb7..bfae122 100644
--- a/compose/ui/ui-tooling-data/build.gradle
+++ b/compose/ui/ui-tooling-data/build.gradle
@@ -70,6 +70,7 @@
dependsOn(jvmMain)
dependencies {
api("androidx.annotation:annotation:1.1.0")
+ api(project(":annotation:annotation-experimental"))
}
}
diff --git a/compose/ui/ui-unit/build.gradle b/compose/ui/ui-unit/build.gradle
index 5d03e7c..376400a 100644
--- a/compose/ui/ui-unit/build.gradle
+++ b/compose/ui/ui-unit/build.gradle
@@ -66,6 +66,7 @@
dependsOn(jvmMain)
dependencies {
api("androidx.annotation:annotation:1.1.0")
+ api(project(":annotation:annotation-experimental"))
implementation('androidx.collection:collection-ktx:1.2.0')
}
}
diff --git a/compose/ui/ui-util/build.gradle b/compose/ui/ui-util/build.gradle
index 3d2125e..97f170c7 100644
--- a/compose/ui/ui-util/build.gradle
+++ b/compose/ui/ui-util/build.gradle
@@ -61,6 +61,7 @@
dependsOn(jvmMain)
dependencies {
implementation(libs.kotlinStdlib)
+ api(project(":annotation:annotation-experimental"))
}
}
diff --git a/compose/ui/ui/build.gradle b/compose/ui/ui/build.gradle
index 7480380e..2ea3cd1 100644
--- a/compose/ui/ui/build.gradle
+++ b/compose/ui/ui/build.gradle
@@ -82,6 +82,7 @@
dependsOn(jvmMain)
dependencies {
implementation(libs.kotlinStdlib)
+ api(project(":annotation:annotation-experimental"))
// This has stub APIs for access to legacy Android APIs, so we don't want
// any dependency on this module.
compileOnly(project(":compose:ui:ui-android-stubs"))
diff --git a/compose/ui/ui/lint-baseline.xml b/compose/ui/ui/lint-baseline.xml
index a320df3..a00bbef 100644
--- a/compose/ui/ui/lint-baseline.xml
+++ b/compose/ui/ui/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
@@ -75,6 +75,15 @@
<issue
id="PrimitiveInCollection"
+ message="return type Map<LayoutNode, Integer> of getMapOfOriginalDepth: replace with ObjectIntMap"
+ errorLine1=" private val mapOfOriginalDepth by lazy(LazyThreadSafetyMode.NONE) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/ui/node/DepthSortedSet.kt"/>
+ </issue>
+
+ <issue
+ id="PrimitiveInCollection"
message="return type List<HapticFeedbackType> of values: replace with IntList"
errorLine1=" fun values(): List<HapticFeedbackType> = listOf(LongPress, TextHandleMove)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -93,42 +102,6 @@
<issue
id="PrimitiveInCollection"
- message="return type Map<AlignmentLine, Integer> of getAlignmentLines: replace with ObjectIntMap"
- errorLine1=" val alignmentLines: Map<AlignmentLine, Int>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/ui/layout/MeasureResult.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="method layout has parameter alignmentLines with type Map<AlignmentLine, Integer>: replace with ObjectIntMap"
- errorLine1=" alignmentLines: Map<AlignmentLine, Int> = emptyMap(),"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/ui/layout/MeasureScope.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="field alignmentLines with type Map<AlignmentLine, Integer>: replace with ObjectIntMap"
- errorLine1=" override val alignmentLines = alignmentLines"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/ui/layout/MeasureScope.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type Map<LayoutNode, Integer> of getMapOfOriginalDepth: replace with ObjectIntMap"
- errorLine1=" private val mapOfOriginalDepth by lazy(LazyThreadSafetyMode.NONE) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/ui/node/DepthSortedSet.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
message="field alignmentLineMap with type Map<AlignmentLine, Integer>: replace with ObjectIntMap"
errorLine1=" private val alignmentLineMap: MutableMap<AlignmentLine, Int> = hashMapOf()"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -192,11 +165,29 @@
<issue
id="PrimitiveInCollection"
- message="field oldAlignmentLines with type Map<AlignmentLine, Integer>: replace with ObjectIntMap"
- errorLine1=" private var oldAlignmentLines: MutableMap<AlignmentLine, Int>? = null"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ message="return type Map<AlignmentLine, Integer> of getAlignmentLines: replace with ObjectIntMap"
+ errorLine1=" val alignmentLines: Map<AlignmentLine, Int>"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/commonMain/kotlin/androidx/compose/ui/node/NodeCoordinator.kt"/>
+ file="src/commonMain/kotlin/androidx/compose/ui/layout/MeasureResult.kt"/>
+ </issue>
+
+ <issue
+ id="PrimitiveInCollection"
+ message="method layout has parameter alignmentLines with type Map<AlignmentLine, Integer>: replace with ObjectIntMap"
+ errorLine1=" alignmentLines: Map<AlignmentLine, Int> = emptyMap(),"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/ui/layout/MeasureScope.kt"/>
+ </issue>
+
+ <issue
+ id="PrimitiveInCollection"
+ message="field alignmentLines with type Map<AlignmentLine, Integer>: replace with ObjectIntMap"
+ errorLine1=" override val alignmentLines = alignmentLines"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/commonMain/kotlin/androidx/compose/ui/layout/MeasureScope.kt"/>
</issue>
<issue
@@ -219,9 +210,9 @@
<issue
id="PrimitiveInCollection"
- message="variable alignmentLines with type Map<AlignmentLine, ? extends Integer>: replace with ObjectIntMap"
- errorLine1=" val alignmentLines = coordinator._measureResult?.alignmentLines"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ message="field oldAlignmentLines with type Map<AlignmentLine, Integer>: replace with ObjectIntMap"
+ errorLine1=" private var oldAlignmentLines: MutableMap<AlignmentLine, Int>? = null"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/commonMain/kotlin/androidx/compose/ui/node/NodeCoordinator.kt"/>
</issue>
diff --git a/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/layout/TogglePlacementInLookaheadScope.kt b/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/layout/TogglePlacementInLookaheadScope.kt
new file mode 100644
index 0000000..2b79e6d
--- /dev/null
+++ b/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/layout/TogglePlacementInLookaheadScope.kt
@@ -0,0 +1,308 @@
+/*
+ * 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.layout
+
+import androidx.activity.ComponentActivity
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.aspectRatio
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material.Card
+import androidx.compose.material.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.ReusableContent
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.painter.ColorPainter
+import androidx.compose.ui.platform.AndroidOwnerExtraAssertionsRule
+import androidx.compose.ui.test.junit4.createAndroidComposeRule
+import androidx.compose.ui.unit.dp
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.MediumTest
+import kotlin.test.assertTrue
+import org.junit.Assert.assertFalse
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@MediumTest
+@RunWith(AndroidJUnit4::class)
+class TogglePlacementInLookaheadScope {
+ @get:Rule
+ val rule = createAndroidComposeRule<ComponentActivity>()
+
+ @get:Rule
+ val excessiveAssertions = AndroidOwnerExtraAssertionsRule()
+
+ @Test
+ fun togglePlacement() {
+ var place by mutableStateOf(true)
+ var newChildAdded by mutableStateOf(false)
+ val placed = mutableListOf(false, false)
+ rule.setContent {
+ LookaheadScope {
+ Layout(content = {
+ TestItem(
+ newChildAdded,
+ placed = placed
+ )
+ }) { list, constraints ->
+ val placeables = list.map { it.measure(constraints) }
+ layout(placeables[0].width, placeables[0].height) {
+ if (place) {
+ placeables.forEach { it.place(0, 0) }
+ }
+ }
+ }
+ }
+ }
+ rule.runOnIdle {
+ // Avoid placing the children and at the same time add a new child to the subtree
+ newChildAdded = true
+ place = false
+ }
+ rule.waitForIdle()
+ assertFalse(placed[0])
+ assertFalse(placed[1])
+ rule.runOnIdle {
+ place = true
+ }
+ rule.waitForIdle()
+ assertTrue(placed[0])
+ assertTrue(placed[1])
+ }
+
+ @Test
+ fun togglePlacementInModifier() {
+ var place by mutableStateOf(true)
+ var newChildAdded by mutableStateOf(false)
+ rule.setContent {
+ LookaheadScope {
+ TestItem(
+ newChildAdded,
+ Modifier.layout { m, constraints ->
+ val p = m.measure(constraints)
+ layout(p.width, p.height) {
+ if (place) {
+ p.place(0, 0)
+ }
+ }
+ },
+ )
+ }
+ }
+ rule.runOnIdle {
+ // Avoid placing the children and at the same time add a new child to the subtree
+ newChildAdded = true
+ place = false
+ }
+ rule.waitForIdle()
+ rule.runOnIdle {
+ place = true
+ }
+ rule.waitForIdle()
+ }
+
+ @Test
+ fun reusableContentInLookahead() {
+ var place by mutableStateOf(true)
+ var reusableContentKey by mutableStateOf(1)
+ val placed = mutableListOf(false, false)
+ rule.setContent {
+ LookaheadScope {
+ Layout(measurePolicy =
+ { list, constraints ->
+ val placeables = list.map { it.measure(constraints) }
+ layout(placeables[0].width, placeables[0].height) {
+ if (place) {
+ placeables.forEach { it.place(0, 0) }
+ }
+ }
+ }, content = {
+ Card {
+ Column {
+ Image(
+ painter = ColorPainter(Color.Blue),
+ contentDescription = null,
+ contentScale = ContentScale.Crop,
+ modifier = Modifier
+ .fillMaxWidth()
+ .aspectRatio(16f / 9f)
+ )
+
+ ReusableContent(reusableContentKey) {
+ Row(
+ horizontalArrangement = Arrangement.spacedBy(4.dp),
+ verticalAlignment = Alignment.CenterVertically,
+ modifier = Modifier
+ .padding(
+ start = 12.dp,
+ top = 8.dp,
+ end = 12.dp,
+ bottom = 12.dp
+ )
+ .fillMaxWidth()
+ .layout { measurable, constraints ->
+ measurable
+ .measure(constraints)
+ .run {
+ layout(width, height) {
+ if (isLookingAhead) {
+ placed[0] = true
+ } else {
+ placed[1] = true
+ }
+ @Suppress("UNUSED_EXPRESSION")
+ reusableContentKey // force a read
+ place(0, 0)
+ }
+ }
+ }
+ ) {
+
+ Text(
+ text = "Static text",
+ color = Color.White,
+ modifier = Modifier
+ .background(Color.Gray, RoundedCornerShape(2.dp))
+ .padding(
+ start = 3.dp, end = 3.dp,
+ top = 0.5.dp, bottom = 1.dp
+ )
+ )
+
+ val badgeModifier = Modifier
+ .border(0.5f.dp, Color.Black, RoundedCornerShape(2.dp))
+ .padding(
+ start = 3.dp, end = 3.dp,
+ top = 0.5.dp, bottom = 1.dp
+ )
+
+ Text(
+ text = "Updated",
+ modifier = badgeModifier,
+ )
+ }
+ }
+ }
+ }
+ })
+ }
+ }
+ assertTrue(placed[0])
+ assertTrue(placed[1])
+ placed[0] = false
+ placed[1] = false
+
+ rule.runOnIdle {
+ place = false
+ }
+ rule.runOnIdle {
+ reusableContentKey++
+ }
+ assertFalse(placed[0])
+ assertFalse(placed[1])
+
+ rule.runOnIdle {
+ place = true
+ }
+ rule.waitForIdle()
+ assertTrue(placed[0])
+ assertTrue(placed[1])
+ rule.waitForIdle()
+ }
+
+ @Composable
+ private fun TestItem(
+ showNewText: Boolean,
+ modifier: Modifier = Modifier,
+ placed: MutableList<Boolean> = mutableListOf(false, false)
+ ) {
+ Card(modifier) {
+ Column {
+ Image(
+ painter = ColorPainter(Color.Blue),
+ contentDescription = null,
+ contentScale = ContentScale.Crop,
+ modifier = Modifier
+ .fillMaxWidth()
+ .aspectRatio(16f / 9f)
+ )
+
+ Row(
+ horizontalArrangement = Arrangement.spacedBy(4.dp),
+ verticalAlignment = Alignment.CenterVertically,
+ modifier = Modifier
+ .padding(start = 12.dp, top = 8.dp, end = 12.dp, bottom = 12.dp)
+ .fillMaxWidth()
+ ) {
+
+ Text(
+ text = "Static text",
+ color = Color.White,
+ modifier = Modifier
+ .background(Color.Gray, RoundedCornerShape(2.dp))
+ .padding(
+ start = 3.dp, end = 3.dp,
+ top = 0.5.dp, bottom = 1.dp
+ )
+ )
+
+ val badgeModifier = Modifier
+ .border(0.5f.dp, Color.Black, RoundedCornerShape(2.dp))
+ .padding(
+ start = 3.dp, end = 3.dp,
+ top = 0.5.dp, bottom = 1.dp
+ )
+
+ if (showNewText) {
+ Text(
+ text = "New",
+ modifier = badgeModifier.layout { measurable, constraints ->
+ measurable.measure(constraints).run {
+ layout(width, height) {
+ if (isLookingAhead) {
+ placed[0] = true
+ } else {
+ placed[1] = true
+ }
+ place(0, 0)
+ }
+ }
+ },
+ )
+ }
+
+ Text(
+ text = "Updated",
+ modifier = badgeModifier,
+ )
+ }
+ }
+ }
+ }
+}
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 809a2abd4..2abf888 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
@@ -820,6 +820,11 @@
with(Density(newDensity)) { 100.dp.roundToPx() }
)
}
+
+ rule.runOnUiThread {
+ // reset density to initial value to prevent it leaking to other tests
+ rule.activity.resources.displayMetrics.density = density.density
+ }
}
}
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 45abe04..060ebf8 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
@@ -137,6 +137,7 @@
import androidx.compose.ui.input.pointer.PointerKeyboardModifiers
import androidx.compose.ui.input.pointer.PositionCalculator
import androidx.compose.ui.input.pointer.ProcessResult
+import androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNode
import androidx.compose.ui.input.rotary.RotaryScrollEvent
import androidx.compose.ui.input.rotary.onRotaryScrollEvent
import androidx.compose.ui.layout.Placeable
@@ -154,6 +155,7 @@
import androidx.compose.ui.node.Owner
import androidx.compose.ui.node.OwnerSnapshotObserver
import androidx.compose.ui.node.RootForTest
+import androidx.compose.ui.node.visitSubtree
import androidx.compose.ui.platform.MotionEventVerifierApi29.isValidMotionEvent
import androidx.compose.ui.semantics.EmptySemanticsElement
import androidx.compose.ui.semantics.SemanticsOwner
@@ -200,7 +202,7 @@
@OptIn(ExperimentalComposeUiApi::class, InternalComposeUiApi::class)
internal class AndroidComposeView(
context: Context,
- override val coroutineContext: CoroutineContext
+ coroutineContext: CoroutineContext
) : ViewGroup(context), Owner, ViewRootForTest, PositionCalculator, DefaultLifecycleObserver {
/**
@@ -238,6 +240,31 @@
private val dragAndDropModifierOnDragListener = DragAndDropModifierOnDragListener(::startDrag)
+ override var coroutineContext: CoroutineContext = coroutineContext
+ // In some rare cases, the CoroutineContext is cancelled (because the parent
+ // CompositionContext containing the CoroutineContext is no longer associated with this
+ // class). Changing this CoroutineContext to the new CompositionContext's CoroutineContext
+ // needs to cancel all Pointer Input Nodes relying on the old CoroutineContext.
+ // See [Wrapper.android.kt] for more details.
+ set(value) {
+ field = value
+
+ val headModifierNode = root.nodes.head
+
+ // Reset head Modifier.Node's pointer input handler (that is, the underlying
+ // coroutine used to run the handler for input pointer events).
+ if (headModifierNode is SuspendingPointerInputModifierNode) {
+ headModifierNode.resetPointerInputHandler()
+ }
+
+ // Reset all other Modifier.Node's pointer input handler in the chain.
+ headModifierNode.visitSubtree(Nodes.PointerInput) {
+ if (it is SuspendingPointerInputModifierNode) {
+ it.resetPointerInputHandler()
+ }
+ }
+ }
+
override val dragAndDropManager: DragAndDropManager = dragAndDropModifierOnDragListener
private val _windowInfo: WindowInfoImpl = WindowInfoImpl()
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ComposeView.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ComposeView.android.kt
index 0b898b5..90f015a 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ComposeView.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ComposeView.android.kt
@@ -151,7 +151,7 @@
/**
* Enables the display of visual layout bounds for the Compose UI content of this view.
- * This is typically managed
+ * This is typically configured using the system developer setting for "Show layout bounds."
*/
@OptIn(InternalCoreApi::class)
@InternalComposeUiApi
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/Wrapper.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/Wrapper.android.kt
index 3e7ea68..a9e86bc 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/Wrapper.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/Wrapper.android.kt
@@ -98,6 +98,16 @@
owner.view.setTag(R.id.wrapped_composition_tag, it)
}
wrapped.setContent(content)
+
+ // When the CoroutineContext between the owner and parent doesn't match, we need to reset it
+ // to this new parent's CoroutineContext, because the previous CoroutineContext was cancelled.
+ // This usually happens when the owner (AndroidComposeView) wasn't completely torn down during a
+ // config change. That expected scenario occurs when the manifest's configChanges includes
+ // 'screenLayout' and the user selects a pop-up view for the app.
+ if (owner.coroutineContext != parent.effectCoroutineContext) {
+ owner.coroutineContext = parent.effectCoroutineContext
+ }
+
return wrapped
}
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/util/VelocityTracker.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/util/VelocityTracker.kt
index cb2a5a4..6589aea 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/util/VelocityTracker.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/util/VelocityTracker.kt
@@ -16,9 +16,6 @@
package androidx.compose.ui.input.pointer.util
-import androidx.compose.runtime.getValue
-import androidx.compose.runtime.mutableStateOf
-import androidx.compose.runtime.setValue
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.input.pointer.PointerInputChange
@@ -38,17 +35,6 @@
private const val HorizonMilliseconds: Int = 100
/**
- * Selecting flag to enable impulse strategy for the velocity trackers.
- * This should be removed before the next RC release
- */
-@Suppress("GetterSetterNames", "OPT_IN_MARKER_ON_WRONG_TARGET")
-@get:Suppress("GetterSetterNames")
-@get:ExperimentalComposeUiApi
-@set:ExperimentalComposeUiApi
-@ExperimentalComposeUiApi
-var VelocityTrackerStrategyUseImpulse by mutableStateOf(false)
-
-/**
* Computes a pointer's velocity.
*
* The input data is provided by calling [addPosition]. Adding data is cheap.
@@ -257,7 +243,7 @@
val delta: Float =
abs(sample.time - previousSample.time).toFloat()
previousSample = if (strategy == Strategy.Lsq2 || isDataDifferential) {
- sample
+ sample
} else {
newestSample
}
@@ -739,12 +725,28 @@
/**
* A flag to indicate that we'll use the fix of how we add points to the velocity tracker.
*
- * This flag will be removed by 1.6 beta01. If you find any issues with the new fix, flip this
- * flag to false to confirm they are newly introduced then file a bug.
+ * This is an experiment flag and will be removed once the experiments with the fix a finished. The
+ * final goal is that we will use the true path once the flag is removed. If you find any issues
+ * with the new fix, flip this flag to false to confirm they are newly introduced then file a bug.
+ * Tracking bug: (b/318621681)
*/
@Suppress("GetterSetterNames", "OPT_IN_MARKER_ON_WRONG_TARGET")
@get:Suppress("GetterSetterNames")
@get:ExperimentalComposeUiApi
@set:ExperimentalComposeUiApi
@ExperimentalComposeUiApi
-var VelocityTrackerAddPointsFix: Boolean by mutableStateOf(false)
+var VelocityTrackerAddPointsFix: Boolean = false
+
+/**
+ * Selecting flag to enable impulse strategy for the velocity trackers.
+ * This is an experiment flag and will be removed once the experiments with the fix a finished. The
+ * final goal is that we will use the true path once the flag is removed. If you find any issues
+ * with the new fix, flip this flag to false to confirm they are newly introduced then file a bug.
+ * Tracking bug: (b/318621681)
+ */
+@Suppress("GetterSetterNames", "OPT_IN_MARKER_ON_WRONG_TARGET")
+@get:Suppress("GetterSetterNames")
+@get:ExperimentalComposeUiApi
+@set:ExperimentalComposeUiApi
+@ExperimentalComposeUiApi
+var VelocityTrackerStrategyUseImpulse = false
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNode.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNode.kt
index 80114fd..36281ec 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNode.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNode.kt
@@ -978,16 +978,17 @@
// this node was scheduled for remeasure or relayout while it was not
// placed. such requests are ignored for non-placed nodes so we have to
// re-schedule remeasure or relayout.
- if (it.measurePending) {
- it.requestRemeasure(forceRequest = true)
- } else if (it.layoutPending) {
- it.requestRelayout(forceRequest = true)
- } else if (it.lookaheadMeasurePending) {
+ if (it.lookaheadMeasurePending) {
it.requestLookaheadRemeasure(forceRequest = true)
- } else if (it.lookaheadLayoutPending) {
- it.requestLookaheadRelayout(forceRequest = true)
} else {
- // no extra work required and node is ready to be displayed
+ if (it.lookaheadLayoutPending) {
+ it.requestLookaheadRelayout(forceRequest = true)
+ }
+ if (it.measurePending) {
+ it.requestRemeasure(forceRequest = true)
+ } else if (it.layoutPending) {
+ it.requestRelayout(forceRequest = true)
+ }
}
}
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNodeLayoutDelegate.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNodeLayoutDelegate.kt
index 81e0316..fe78904 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNodeLayoutDelegate.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNodeLayoutDelegate.kt
@@ -718,6 +718,10 @@
}
}
+ checkPrecondition(lookaheadPassDelegate?.placedOnce != false) {
+ "Error: Placement happened before lookahead."
+ }
+
// Post-lookahead (if any) placement
placeOuterCoordinator(position, zIndex, layerBlock)
}
@@ -1035,7 +1039,7 @@
internal val measurePassDelegate: MeasurePassDelegate
get() = [email protected]
internal var duringAlignmentLinesQuery: Boolean = false
- private var placedOnce: Boolean = false
+ internal var placedOnce: Boolean = false
private var measuredOnce: Boolean = false
val lastConstraints: Constraints?
get() = lookaheadConstraints
diff --git a/concurrent/concurrent-futures/lint-baseline.xml b/concurrent/concurrent-futures/lint-baseline.xml
index 7d10429..8635b59 100644
--- a/concurrent/concurrent-futures/lint-baseline.xml
+++ b/concurrent/concurrent-futures/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanSynchronizedMethods"
diff --git a/constraintlayout/constraintlayout-compose/lint-baseline.xml b/constraintlayout/constraintlayout-compose/lint-baseline.xml
index 791bdbc..11712b7 100644
--- a/constraintlayout/constraintlayout-compose/lint-baseline.xml
+++ b/constraintlayout/constraintlayout-compose/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-beta01)" variant="all" version="8.2.0-beta01">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanInlineOptIn"
diff --git a/constraintlayout/constraintlayout-core/lint-baseline.xml b/constraintlayout/constraintlayout-core/lint-baseline.xml
index 1c3b73f..1edd959 100644
--- a/constraintlayout/constraintlayout-core/lint-baseline.xml
+++ b/constraintlayout/constraintlayout-core/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.1.0" type="baseline" client="gradle" dependencies="false" name="AGP (8.1.0)" variant="all" version="8.1.0">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="PrivateConstructorForUtilityClass"
diff --git a/constraintlayout/constraintlayout/lint-baseline.xml b/constraintlayout/constraintlayout/lint-baseline.xml
index 70b5c26..b84f60c 100644
--- a/constraintlayout/constraintlayout/lint-baseline.xml
+++ b/constraintlayout/constraintlayout/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanTargetApiAnnotation"
@@ -11,17 +11,8 @@
</issue>
<issue
- id="BanTargetApiAnnotation"
- message="Use `@RequiresApi` instead of `@TargetApi`"
- errorLine1=" @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintLayout.java"/>
- </issue>
-
- <issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" Object val = method.invoke(view);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
@@ -30,7 +21,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, constraintAttribute.mIntegerValue);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -39,7 +30,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, constraintAttribute.mFloatValue);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -48,7 +39,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, drawable);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -57,7 +48,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, constraintAttribute.mColorValue);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -66,7 +57,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, constraintAttribute.mStringValue);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -75,7 +66,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, constraintAttribute.mBooleanValue);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -84,7 +75,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, constraintAttribute.mFloatValue);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -93,7 +84,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, constraintAttribute.mIntegerValue);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -102,7 +93,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, this.mIntegerValue);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -111,7 +102,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, this.mFloatValue);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -120,7 +111,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, drawable);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -129,7 +120,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, this.mColorValue);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -138,7 +129,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, this.mStringValue);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -147,7 +138,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, this.mBooleanValue);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -156,7 +147,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, this.mFloatValue);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -165,7 +156,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, (int) value[0]);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -174,7 +165,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, value[0]);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -183,7 +174,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, drawable);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -192,7 +183,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, color);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -201,7 +192,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, value[0] > 0.5f);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -210,7 +201,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, value[0]);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -219,7 +210,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(call);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
@@ -228,7 +219,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, get(t));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -237,7 +228,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, get(t));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -246,7 +237,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(view, get(t, time, view, cache));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -310,24 +301,6 @@
<issue
id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.constraintlayout.widget.ConstraintSet is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" constraint.transform.translationZ = view.getTranslationZ();"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintSet.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 21; however, the containing class androidx.constraintlayout.widget.ConstraintSet is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" constraint.transform.elevation = view.getElevation();"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintSet.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 21; however, the containing class androidx.constraintlayout.widget.ConstraintSet is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" constraint.transform.translationZ = view.getTranslationZ();"
errorLine2=" ~~~~~~~~~~~~~~~">
<location
@@ -346,8 +319,8 @@
<issue
id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.constraintlayout.widget.ConstraintSet is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" view.setTranslationZ(constraint.transform.translationZ);"
- errorLine2=" ~~~~~~~~~~~~~~~">
+ errorLine1=" constraint.transform.translationZ = view.getTranslationZ();"
+ errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/constraintlayout/widget/ConstraintSet.java"/>
</issue>
@@ -355,8 +328,26 @@
<issue
id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.constraintlayout.widget.ConstraintSet is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" view.setElevation(constraint.transform.elevation);"
- errorLine2=" ~~~~~~~~~~~~">
+ errorLine1=" constraint.transform.elevation = view.getElevation();"
+ errorLine2=" ~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/constraintlayout/widget/ConstraintSet.java"/>
+ </issue>
+
+ <issue
+ id="ClassVerificationFailure"
+ message="This call references a method added in API level 21; however, the containing class androidx.constraintlayout.widget.ConstraintSet is reachable from earlier API levels and will fail run-time class verification."
+ errorLine1=" view.setTranslationZ(constraint.transform.translationZ);"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/constraintlayout/widget/ConstraintSet.java"/>
+ </issue>
+
+ <issue
+ id="ClassVerificationFailure"
+ message="This call references a method added in API level 21; however, the containing class androidx.constraintlayout.widget.ConstraintSet is reachable from earlier API levels and will fail run-time class verification."
+ errorLine1=" view.setElevation(constraint.transform.elevation);"
+ errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/constraintlayout/widget/ConstraintSet.java"/>
</issue>
@@ -893,285 +884,6 @@
</issue>
<issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/Barrier.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/helper/widget/Carousel.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintLayout.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintLayout.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintLayout.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintLayout.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintLayout.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintLayout.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintLayout.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintLayout.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintProperties.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintProperties.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintSet.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintSet.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintSet.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintSet.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintSet.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintSet.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintSet.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintSet.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintSet.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintSet.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/helper/widget/Flow.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/helper/widget/Flow.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/helper/widget/Grid.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT || isAttachedToWindow()) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/motion/widget/MotionLayout.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/motion/widget/MotionLayout.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/motion/widget/MotionLayout.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/motion/widget/MotionLayout.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/motion/widget/MotionLayout.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/motion/widget/MotionLayout.java"/>
- </issue>
-
- <issue
id="KotlinPropertyAccess"
message="The getter return type (`String[]`) and setter parameter type (`String`) getter and setter methods for property `stateLabels` should have exactly the same type to allow be accessed as a property from Kotlin; see https://android.github.io/kotlin-guides/interop.html#property-prefixes"
errorLine1=" public String[] getStateLabels() {"
diff --git a/contentpager/contentpager/lint-baseline.xml b/contentpager/contentpager/lint-baseline.xml
index 2e1fb98..55b8606 100644
--- a/contentpager/contentpager/lint-baseline.xml
+++ b/contentpager/contentpager/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="NewApi"
@@ -38,24 +38,6 @@
</issue>
<issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/contentpager/content/Query.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/contentpager/content/Query.java"/>
- </issue>
-
- <issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public ContentPager(ContentResolver resolver, QueryRunner queryRunner) {"
diff --git a/core/core-animation/lint-baseline.xml b/core/core-animation/lint-baseline.xml
index ee39c90..7a98d97 100644
--- a/core/core-animation/lint-baseline.xml
+++ b/core/core-animation/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="ResourceType"
@@ -246,7 +246,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" Object value = convertBack(mGetter.invoke(target));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -255,7 +255,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" Object value = convertBack(mGetter.invoke(target));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -264,7 +264,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" mSetter.invoke(target, mTmpValueArray);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -273,7 +273,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" mSetter.invoke(target, mTmpValueArray);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -282,7 +282,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" mSetter.invoke(target, mTmpValueArray);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -291,7 +291,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" mSetter.invoke(target, boxedValues);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -300,7 +300,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" mSetter.invoke(target, boxedValues);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -308,24 +308,6 @@
</issue>
<issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/animation/AnimationHandler.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/animation/AnimationHandler.java"/>
- </issue>
-
- <issue
id="KotlinPropertyAccess"
message="The getter return type (`PropertyValuesHolder[]`) and setter parameter type (`PropertyValuesHolder...`) getter and setter methods for property `values` should have exactly the same type to allow be accessed as a property from Kotlin; see https://android.github.io/kotlin-guides/interop.html#property-prefixes"
errorLine1=" public PropertyValuesHolder[] getValues() {"
diff --git a/core/core-graphics-integration-tests/testapp/lint-baseline.xml b/core/core-graphics-integration-tests/testapp/lint-baseline.xml
deleted file mode 100644
index 456d9b8..0000000
--- a/core/core-graphics-integration-tests/testapp/lint-baseline.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.KITKAT)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/sample/GraphicsSampleActivity.kt"/>
- </issue>
-
-</issues>
diff --git a/core/core-ktx/lint-baseline.xml b/core/core-ktx/lint-baseline.xml
deleted file mode 100644
index 0df70ca..0000000
--- a/core/core-ktx/lint-baseline.xml
+++ /dev/null
@@ -1,517 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/animation/Animator.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/animation/Animator.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/animation/Animator.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/animation/Animator.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1="@RequiresApi(17)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/AtomicFile.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1="@RequiresApi(17)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/AtomicFile.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1="@RequiresApi(17)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/AtomicFile.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1="@RequiresApi(17)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/AtomicFile.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1="@RequiresApi(17)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/AtomicFile.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18 && value is IBinder) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/Bundle.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/Bundle.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/Locale.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@get:RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/LongSparseArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/LongSparseArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/LongSparseArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/LongSparseArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/LongSparseArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/LongSparseArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/LongSparseArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/LongSparseArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/LongSparseArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/LongSparseArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/LongSparseArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/LongSparseArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/LongSparseArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/LongSparseArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/LongSparseArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Path.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Path.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Path.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Path.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Path.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@get:RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/SparseLongArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/SparseLongArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/SparseLongArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/SparseLongArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/SparseLongArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/SparseLongArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/SparseLongArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/SparseLongArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/SparseLongArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/SparseLongArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/SparseLongArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/SparseLongArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/SparseLongArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/SparseLongArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/SparseLongArray.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/transition/Transition.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/transition/Transition.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/transition/Transition.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/transition/Transition.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/transition/Transition.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/transition/Transition.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1="@RequiresApi(17)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/View.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/View.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/View.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1="@RequiresApi(17)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewGroup.kt"/>
- </issue>
-
-</issues>
diff --git a/core/core-remoteviews/lint-baseline.xml b/core/core-remoteviews/lint-baseline.xml
deleted file mode 100644
index 959235b..0000000
--- a/core/core-remoteviews/lint-baseline.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" SDK_INT >= 16 -> {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/AppWidgetManagerCompat.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" SDK_INT >= 16 -> {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/AppWidgetManagerCompat.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/AppWidgetManagerCompat.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" val methodName = if (Build.VERSION.SDK_INT >= 16) "setImageAlpha" else "setAlpha""
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/RemoteViewsCompat.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/RemoteViewsCompat.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/RemoteViewsCompat.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/RemoteViewsCompat.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/RemoteViewsCompat.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/RemoteViewsCompat.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/RemoteViewsCompat.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/RemoteViewsCompat.kt"/>
- </issue>
-
-</issues>
diff --git a/core/core-telecom/lint-baseline.xml b/core/core-telecom/lint-baseline.xml
new file mode 100644
index 0000000..f0d5969
--- /dev/null
+++ b/core/core-telecom/lint-baseline.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.core.telecom.util.ExperimentalAppActions` or `@OptIn(markerClass = androidx.core.telecom.util.ExperimentalAppActions.class)`"
+ errorLine1=" val voipParticipantActionRequestsChannel: Channel<VoipParticipantActionRequest> ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/telecom/internal/CallChannels.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.core.telecom.util.ExperimentalAppActions` or `@OptIn(markerClass = androidx.core.telecom.util.ExperimentalAppActions.class)`"
+ errorLine1=" fun toCallCompat(call: Call, scope: CoroutineScope, init: CallCompat.() -> Unit):"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/telecom/internal/CallCompat.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.core.telecom.util.ExperimentalAppActions` or `@OptIn(markerClass = androidx.core.telecom.util.ExperimentalAppActions.class)`"
+ errorLine1=" private var mCapabilities: MutableList<androidx.core.telecom.extensions.Capability> ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/telecom/CallsManager.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.core.telecom.util.ExperimentalAppActions` or `@OptIn(markerClass = androidx.core.telecom.util.ExperimentalAppActions.class)`"
+ errorLine1=" capabilities: List<androidx.core.telecom.extensions.Capability>"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/telecom/CallsManager.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.core.telecom.util.ExperimentalAppActions` or `@OptIn(markerClass = androidx.core.telecom.util.ExperimentalAppActions.class)`"
+ errorLine1=" val participantsStateFlow: StateFlow<Set<Participant>>"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/telecom/extensions/ParticipantClientExtension.kt"/>
+ </issue>
+
+</issues>
diff --git a/core/core/lint-baseline.xml b/core/core/lint-baseline.xml
index a35d552..2df4e9c 100644
--- a/core/core/lint-baseline.xml
+++ b/core/core/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="NewApi"
@@ -678,7 +678,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" performStopActivity3ParamsMethod.invoke(activityThread,"
errorLine2=" ^">
<location
@@ -687,7 +687,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" performStopActivity2ParamsMethod.invoke(activityThread,"
errorLine2=" ^">
<location
@@ -696,7 +696,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" return (String) getMethod.invoke(systemProperties, name);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -705,7 +705,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" Object value = sActionBarOnMenuKeyMethod.invoke(actionBar, event);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -714,7 +714,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" Boolean result = (Boolean) sMethodUserHandleIsAppMethod.invoke(null, uid);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -723,16 +723,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
- errorLine1=" Boolean result = (Boolean) sMethodUserIdIsAppMethod.invoke(null, uid);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/ProcessCompat.java"/>
- </issue>
-
- <issue
- id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" removeItemAtMethod.invoke(menu, i);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -741,7 +732,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" return (Typeface) sCreateFromFamiliesWithDefault.invoke("
errorLine2=" ^">
<location
@@ -750,7 +741,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" final Boolean result = (Boolean) sAddFontWeightStyle.invoke("
errorLine2=" ^">
<location
@@ -759,7 +750,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" final Boolean result = (Boolean) sAddFontWeightStyle.invoke("
errorLine2=" ^">
<location
@@ -768,7 +759,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" return (Typeface) sCreateFromFamiliesWithDefault.invoke("
errorLine2=" ^">
<location
@@ -777,7 +768,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" return (Boolean) mAddFontFromAssetManager.invoke(family,"
errorLine2=" ^">
<location
@@ -786,7 +777,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" return (Boolean) mAddFontFromBuffer.invoke(family,"
errorLine2=" ^">
<location
@@ -795,7 +786,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" return (Typeface) mCreateFromFamiliesWithDefault.invoke(null /* static method */,"
errorLine2=" ^">
<location
@@ -804,7 +795,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" return (Boolean) mFreeze.invoke(family);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -813,7 +804,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" mAbortCreation.invoke(family);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -822,7 +813,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" return (Typeface) mCreateFromFamiliesWithDefault.invoke(null /* static method */,"
errorLine2=" ^">
<location
@@ -831,7 +822,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" return (Boolean) sIsProjectedDrawableMethod.invoke(mDrawable);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2559,555 +2550,6 @@
<issue
id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/AccessibilityDelegateCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/AccessibilityDelegateCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (!success && Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/AccessibilityDelegateCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/AccessibilityDelegateCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityEventCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityEventCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityEventCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityEventCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityEventCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityEventCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityEventCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityEventCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19 && Build.VERSION.SDK_INT < 26) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 19"
errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -3118,1086 +2560,6 @@
<issue
id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeProviderCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeProviderCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeProviderCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeProviderCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityRecordCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 15) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityRecordCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 15) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityRecordCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 15) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityRecordCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 15) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityRecordCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityRecordCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 15"
- errorLine1=" @RequiresApi(15)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityRecordCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/accessibilityservice/AccessibilityServiceInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/accessibilityservice/AccessibilityServiceInfoCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ActivityCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ActivityCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ActivityCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ActivityCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ActivityManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ActivityOptionsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ActivityOptionsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ActivityOptionsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ActivityOptionsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ActivityOptionsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/AlarmManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/AlarmManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/AppOpsManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/AppOpsManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/AppOpsManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/BitmapCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/BitmapCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/BitmapCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/BitmapCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/BitmapCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/BundleCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/BundleCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/BundleCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (obj != null && Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/CancellationSignal.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/CancellationSignal.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/CancellationSignal.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/CheckedTextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/CheckedTextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/ConfigurationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/ConfigurationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/res/ConfigurationHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/net/ConnectivityManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/net/ConnectivityManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContentResolverCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContentResolverCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT <= 32 && Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 15) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/database/CursorWindowCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 15"
- errorLine1=" @RequiresApi(15)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/database/CursorWindowCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/DisplayCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/DisplayCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/hardware/display/DisplayManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/hardware/display/DisplayManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/hardware/display/DisplayManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/hardware/display/DisplayManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/provider/DocumentsContractCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/provider/DocumentsContractCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/provider/DocumentsContractCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/provider/DocumentsContractCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/provider/DocumentsContractCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/drawable/DrawableCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/drawable/DrawableCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/drawable/DrawableCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
errorLine1=" } else if (Build.VERSION.SDK_INT >= 17) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -4216,60 +2578,6 @@
<issue
id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/drawable/DrawableCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/EnvironmentCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/EnvironmentCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/provider/FontProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/provider/FontProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/provider/FontsContractCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
errorLine1=" if (Build.VERSION.SDK_INT > 17) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -4279,51 +2587,6 @@
<issue
id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/GravityCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/GravityCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/GravityCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/GravityCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/GravityCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
errorLine1=" } else if (Build.VERSION.SDK_INT >= 17) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -4341,330 +2604,6 @@
<issue
id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/HandlerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/HandlerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 15) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/IntentCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 15"
- errorLine1=" @RequiresApi(15)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/IntentCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/IntentSanitizer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/IntentSanitizer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 15"
- errorLine1=" @RequiresApi(15)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/IntentSanitizer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/IntentSanitizer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/ListPopupWindowCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/ListPopupWindowCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/ListViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/ListViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/ListViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/LocationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/LocationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/LocationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/LocationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/LocationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/LocationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (VERSION.SDK_INT >= 19 && Api19Impl.tryRequestLocationUpdates("
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/LocationManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (VERSION.SDK_INT >= 19 && Api19Impl.tryRequestLocationUpdates("
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/LocationManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/LocationManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (VERSION.SDK_INT >= 19) { // Satisfy reflection lint check"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/LocationManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (VERSION.SDK_INT >= 19) { // Satisfy reflection lint check"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/LocationManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/LocationRequestCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/LocationRequestCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (VERSION.SDK_INT >= 19) { // Satisfy reflection lint check"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/LocationRequestCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/MarginLayoutParamsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/MarginLayoutParamsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/MarginLayoutParamsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/MarginLayoutParamsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/MarginLayoutParamsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/MarginLayoutParamsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/MarginLayoutParamsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/MarginLayoutParamsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/MarginLayoutParamsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 19"
errorLine1=" if (sTrySetAsynchronous && Build.VERSION.SDK_INT >= 16) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -4693,69 +2632,6 @@
<issue
id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NavUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NavUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NavUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NavUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -4792,429 +2668,6 @@
<issue
id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (showLine2 && Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (mBuilder.mUseChronometer && Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 15) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 15"
- errorLine1=" @RequiresApi(15)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16 && parcelables != null) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompatBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompatBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompatBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
errorLine1=" if (Build.VERSION.SDK_INT >= 16 && style != null) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -5233,681 +2686,6 @@
<issue
id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompatBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompatBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompatBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompatBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompatBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompatBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompatJellybean.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/ObjectsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/ObjectsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/ObjectsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/PendingIntentCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/PendingIntentCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/PendingIntentCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/PopupMenuCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/PopupMenuCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/PopupWindowCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/PopupWindowCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/PrecomputedTextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/PrecomputedTextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/PrecomputedTextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/PrecomputedTextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/PrecomputedTextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/PrecomputedTextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/PrecomputedTextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/PrecomputedTextCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/ProcessCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT == 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/ProcessCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/ProcessCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/ProcessCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/RemoteInput.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/RemoteInput.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/RemoteInput.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/RemoteInput.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/RemoteInput.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/RemoteInput.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/RemoteInput.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/RemoteInput.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (SDK_INT >= 15) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/res/ResourcesCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 15"
- errorLine1=" @RequiresApi(15)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/res/ResourcesCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ScaleGestureDetectorCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ScaleGestureDetectorCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ScaleGestureDetectorCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (SDK_INT < 16) {"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ShareCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ShareCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ShareCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ShareCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ShareCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ShareCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" Build.VERSION.SDK_INT < 19 || am == null || am.isLowRamDevice();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/TaskStackBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/TaskStackBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/TextUtilsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/TextUtilsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/TextUtilsCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewOnReceiveContentListener.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16) // For ClipData.Item.coerceToStyledText()"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/widget/TextViewOnReceiveContentListener.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
errorLine1=" if (Build.VERSION.SDK_INT >= 18 && Build.VERSION.SDK_INT < 29) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -5917,672 +2695,6 @@
<issue
id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/TraceCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/TraceCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/TraceCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/TraceCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/TraceCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/TraceCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/TraceCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/TypefaceCompatUtil.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/TypefaceCompatUtil.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/TypefaceCompatUtil.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/TypefaceCompatUtil.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/TypefaceCompatUtil.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1="@RequiresApi(17)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/os/UserHandleCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 15) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" return Build.VERSION.SDK_INT >= 19;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 15"
- errorLine1=" @RequiresApi(15)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewGroupCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewGroupCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewGroupCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewParentCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewParentCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
errorLine1=" if (Build.VERSION.SDK_INT >= 16 || !mAnimEndCalled) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -6591,123 +2703,6 @@
<issue
id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewPropertyAnimatorCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewPropertyAnimatorCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewPropertyAnimatorCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewPropertyAnimatorCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewPropertyAnimatorCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewPropertyAnimatorCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewPropertyAnimatorCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewPropertyAnimatorCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewPropertyAnimatorCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/WindowCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/WindowCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/drawable/WrappedDrawableApi14.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/drawable/WrappedDrawableApi14.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
message="This folder configuration (`v16`) is unnecessary; `minSdkVersion` is 19. Merge all the resources in this folder into `layout`.">
<location
file="src/main/res/layout-v16"/>
diff --git a/core/core/src/main/java/androidx/core/app/NotificationCompat.java b/core/core/src/main/java/androidx/core/app/NotificationCompat.java
index 621e11f..82aa643 100644
--- a/core/core/src/main/java/androidx/core/app/NotificationCompat.java
+++ b/core/core/src/main/java/androidx/core/app/NotificationCompat.java
@@ -1089,7 +1089,6 @@
.setSubText(NotificationCompat.getSubText(notification))
.setSettingsText(NotificationCompat.getSettingsText(notification))
.setStyle(style)
- .setContentIntent(notification.contentIntent)
.setGroup(NotificationCompat.getGroup(notification))
.setGroupSummary(NotificationCompat.isGroupSummary(notification))
.setLocusId(NotificationCompat.getLocusId(notification))
diff --git a/core/uwb/uwb/src/main/java/androidx/core/uwb/impl/UwbManagerImpl.kt b/core/uwb/uwb/src/main/java/androidx/core/uwb/impl/UwbManagerImpl.kt
index 157369b..9cd3a5d 100644
--- a/core/uwb/uwb/src/main/java/androidx/core/uwb/impl/UwbManagerImpl.kt
+++ b/core/uwb/uwb/src/main/java/androidx/core/uwb/impl/UwbManagerImpl.kt
@@ -106,7 +106,7 @@
val nearbyLocalAddress = uwbClient.localAddress.await()
val nearbyRangingCapabilities = uwbClient.rangingCapabilities.await()
val localAddress = UwbAddress(nearbyLocalAddress.address)
- val supportedConfigIds = nearbyRangingCapabilities.supportedConfigIds
+ val supportedConfigIds = nearbyRangingCapabilities.supportedConfigIds.toMutableList()
supportedConfigIds.retainAll(PUBLIC_AVAILABLE_CONFIG_IDS)
val rangingCapabilities = RangingCapabilities(
nearbyRangingCapabilities.supportsDistance(),
@@ -161,7 +161,8 @@
it.minRangingInterval,
it.supportedChannels.toSet(),
it.supportedNtfConfigs.toSet(),
- it.supportedConfigIds.filter { it in PUBLIC_AVAILABLE_CONFIG_IDS }.toSet(),
+ it.supportedConfigIds.toMutableList()
+ .filter { it in PUBLIC_AVAILABLE_CONFIG_IDS }.toSet(),
it.supportedSlotDurations.toSet(),
it.supportedRangingUpdateRates.toSet(),
it.supportsRangingIntervalReconfigure,
diff --git a/credentials/credentials/lint-baseline.xml b/credentials/credentials/lint-baseline.xml
index 491e7c4..71eb501 100644
--- a/credentials/credentials/lint-baseline.xml
+++ b/credentials/credentials/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-alpha14" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-alpha14)" variant="all" version="8.2.0-alpha14">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="ClassVerificationFailure"
diff --git a/development/update_studio.sh b/development/update_studio.sh
index 3e74904..d9b419b 100755
--- a/development/update_studio.sh
+++ b/development/update_studio.sh
@@ -7,8 +7,8 @@
# Versions that the user should update when running this script
echo Getting Studio version and link
-AGP_VERSION=${1:-8.3.0-alpha10}
-STUDIO_VERSION_STRING=${2:-"Android Studio Iguana | 2023.2.1 Canary 10"}
+AGP_VERSION=${1:-8.3.0-beta01}
+STUDIO_VERSION_STRING=${2:-"Android Studio Iguana | 2023.2.1 Beta 1"}
# Get studio version number from version name
STUDIO_IFRAME_LINK=`curl "https://developer.android.com/studio/archive.html" | grep "<iframe " | sed "s/.* src=\"\([^\"]*\)\".*/\1/g"`
@@ -56,7 +56,7 @@
| tail -n +3 \
| head -n -1)
-ATP_VERSION=${4:-0.0.9-alpha01}
+ATP_VERSION=${4:-0.0.9-alpha02}
ARTIFACTS_TO_DOWNLOAD+="com.google.testing.platform:android-test-plugin:$ATP_VERSION,"
ARTIFACTS_TO_DOWNLOAD+="com.google.testing.platform:launcher:$ATP_VERSION,"
ARTIFACTS_TO_DOWNLOAD+="com.google.testing.platform:android-driver-instrumentation:$ATP_VERSION,"
diff --git a/docs-public/build.gradle b/docs-public/build.gradle
index 6cdb2b3..5be2e23 100644
--- a/docs-public/build.gradle
+++ b/docs-public/build.gradle
@@ -24,7 +24,7 @@
docsWithoutApiSince("androidx.ads:ads-identifier-common:1.0.0-alpha05")
docsWithoutApiSince("androidx.ads:ads-identifier-provider:1.0.0-alpha05")
kmpDocs("androidx.annotation:annotation:1.7.1")
- docs("androidx.annotation:annotation-experimental:1.4.0-beta01")
+ docs("androidx.annotation:annotation-experimental:1.4.0-rc01")
docs("androidx.appcompat:appcompat:1.7.0-alpha03")
docs("androidx.appcompat:appcompat-resources:1.7.0-alpha03")
docs("androidx.appsearch:appsearch:1.1.0-alpha04")
@@ -66,31 +66,31 @@
docs("androidx.car.app:app-projected:1.4.0-rc02")
docs("androidx.car.app:app-testing:1.4.0-rc02")
docs("androidx.cardview:cardview:1.0.0")
- kmpDocs("androidx.collection:collection:1.4.0-beta02")
- docs("androidx.collection:collection-ktx:1.4.0-beta02")
- kmpDocs("androidx.compose.animation:animation:1.6.0-beta03")
- kmpDocs("androidx.compose.animation:animation-core:1.6.0-beta03")
- kmpDocs("androidx.compose.animation:animation-graphics:1.6.0-beta03")
- samples("androidx.compose.animation:animation-samples:1.6.0-beta03")
- samples("androidx.compose.animation:animation-core-samples:1.6.0-beta03")
- samples("androidx.compose.animation:animation-graphics-samples:1.6.0-beta03")
- kmpDocs("androidx.compose.foundation:foundation:1.6.0-beta03")
- kmpDocs("androidx.compose.foundation:foundation-layout:1.6.0-beta03")
- samples("androidx.compose.foundation:foundation-layout-samples:1.6.0-beta03")
- samples("androidx.compose.foundation:foundation-samples:1.6.0-beta03")
- kmpDocs("androidx.compose.material3:material3:1.2.0-beta01")
- kmpDocs("androidx.compose.material3:material3-adaptive:1.0.0-alpha03")
+ kmpDocs("androidx.collection:collection:1.4.0-rc01")
+ docs("androidx.collection:collection-ktx:1.4.0-rc01")
+ kmpDocs("androidx.compose.animation:animation:1.6.0-rc01")
+ kmpDocs("androidx.compose.animation:animation-core:1.6.0-rc01")
+ kmpDocs("androidx.compose.animation:animation-graphics:1.6.0-rc01")
+ samples("androidx.compose.animation:animation-samples:1.6.0-rc01")
+ samples("androidx.compose.animation:animation-core-samples:1.6.0-rc01")
+ samples("androidx.compose.animation:animation-graphics-samples:1.6.0-rc01")
+ kmpDocs("androidx.compose.foundation:foundation:1.6.0-rc01")
+ kmpDocs("androidx.compose.foundation:foundation-layout:1.6.0-rc01")
+ samples("androidx.compose.foundation:foundation-layout-samples:1.6.0-rc01")
+ samples("androidx.compose.foundation:foundation-samples:1.6.0-rc01")
+ kmpDocs("androidx.compose.material3:material3:1.2.0-beta02")
+ kmpDocs("androidx.compose.material3:material3-adaptive:1.0.0-alpha04")
kmpDocs("androidx.compose.material3:material3-adaptive-navigation-suite:1.0.0-alpha02")
- samples("androidx.compose.material3:material3-adaptive-navigation-suite-samples:1.2.0-beta01")
- samples("androidx.compose.material3:material3-adaptive-samples:1.2.0-beta01")
- samples("androidx.compose.material3:material3-samples:1.2.0-beta01")
- kmpDocs("androidx.compose.material3:material3-window-size-class:1.2.0-beta01")
- samples("androidx.compose.material3:material3-window-size-class-samples:1.2.0-beta01")
- kmpDocs("androidx.compose.material:material:1.6.0-beta03")
- kmpDocs("androidx.compose.material:material-icons-core:1.6.0-beta03")
- samples("androidx.compose.material:material-icons-core-samples:1.6.0-beta03")
- kmpDocs("androidx.compose.material:material-ripple:1.6.0-beta03")
- samples("androidx.compose.material:material-samples:1.6.0-beta03")
+ samples("androidx.compose.material3:material3-adaptive-navigation-suite-samples:1.2.0-beta02")
+ samples("androidx.compose.material3:material3-adaptive-samples:1.2.0-beta02")
+ samples("androidx.compose.material3:material3-samples:1.2.0-beta02")
+ kmpDocs("androidx.compose.material3:material3-window-size-class:1.2.0-beta02")
+ samples("androidx.compose.material3:material3-window-size-class-samples:1.2.0-beta02")
+ kmpDocs("androidx.compose.material:material:1.6.0-rc01")
+ kmpDocs("androidx.compose.material:material-icons-core:1.6.0-rc01")
+ samples("androidx.compose.material:material-icons-core-samples:1.6.0-rc01")
+ kmpDocs("androidx.compose.material:material-ripple:1.6.0-rc01")
+ samples("androidx.compose.material:material-samples:1.6.0-rc01")
kmpDocs("androidx.compose.runtime:runtime:1.7.0-alpha01")
docs("androidx.compose.runtime:runtime-livedata:1.7.0-alpha01")
samples("androidx.compose.runtime:runtime-livedata-samples:1.7.0-alpha01")
@@ -102,25 +102,25 @@
samples("androidx.compose.runtime:runtime-saveable-samples:1.7.0-alpha01")
samples("androidx.compose.runtime:runtime-samples:1.7.0-alpha01")
docs("androidx.compose.runtime:runtime-tracing:1.0.0-beta01")
- kmpDocs("androidx.compose.ui:ui:1.6.0-beta03")
- kmpDocs("androidx.compose.ui:ui-geometry:1.6.0-beta03")
- kmpDocs("androidx.compose.ui:ui-graphics:1.6.0-beta03")
- samples("androidx.compose.ui:ui-graphics-samples:1.6.0-beta03")
- kmpDocs("androidx.compose.ui:ui-test:1.6.0-beta03")
- kmpDocs("androidx.compose.ui:ui-test-junit4:1.6.0-beta03")
- samples("androidx.compose.ui:ui-test-samples:1.6.0-beta03")
- kmpDocs("androidx.compose.ui:ui-text:1.6.0-beta03")
- docs("androidx.compose.ui:ui-text-google-fonts:1.6.0-beta03")
- samples("androidx.compose.ui:ui-text-samples:1.6.0-beta03")
- kmpDocs("androidx.compose.ui:ui-tooling:1.6.0-beta03")
- kmpDocs("androidx.compose.ui:ui-tooling-data:1.6.0-beta03")
- kmpDocs("androidx.compose.ui:ui-tooling-preview:1.6.0-beta03")
- kmpDocs("androidx.compose.ui:ui-unit:1.6.0-beta03")
- samples("androidx.compose.ui:ui-unit-samples:1.6.0-beta03")
- kmpDocs("androidx.compose.ui:ui-util:1.6.0-beta03")
- docs("androidx.compose.ui:ui-viewbinding:1.6.0-beta03")
- samples("androidx.compose.ui:ui-viewbinding-samples:1.6.0-beta03")
- samples("androidx.compose.ui:ui-samples:1.6.0-beta03")
+ kmpDocs("androidx.compose.ui:ui:1.6.0-rc01")
+ kmpDocs("androidx.compose.ui:ui-geometry:1.6.0-rc01")
+ kmpDocs("androidx.compose.ui:ui-graphics:1.6.0-rc01")
+ samples("androidx.compose.ui:ui-graphics-samples:1.6.0-rc01")
+ kmpDocs("androidx.compose.ui:ui-test:1.6.0-rc01")
+ kmpDocs("androidx.compose.ui:ui-test-junit4:1.6.0-rc01")
+ samples("androidx.compose.ui:ui-test-samples:1.6.0-rc01")
+ kmpDocs("androidx.compose.ui:ui-text:1.6.0-rc01")
+ docs("androidx.compose.ui:ui-text-google-fonts:1.6.0-rc01")
+ samples("androidx.compose.ui:ui-text-samples:1.6.0-rc01")
+ kmpDocs("androidx.compose.ui:ui-tooling:1.6.0-rc01")
+ kmpDocs("androidx.compose.ui:ui-tooling-data:1.6.0-rc01")
+ kmpDocs("androidx.compose.ui:ui-tooling-preview:1.6.0-rc01")
+ kmpDocs("androidx.compose.ui:ui-unit:1.6.0-rc01")
+ samples("androidx.compose.ui:ui-unit-samples:1.6.0-rc01")
+ kmpDocs("androidx.compose.ui:ui-util:1.6.0-rc01")
+ docs("androidx.compose.ui:ui-viewbinding:1.6.0-rc01")
+ samples("androidx.compose.ui:ui-viewbinding-samples:1.6.0-rc01")
+ samples("androidx.compose.ui:ui-samples:1.6.0-rc01")
docs("androidx.concurrent:concurrent-futures:1.2.0-alpha02")
docs("androidx.concurrent:concurrent-futures-ktx:1.2.0-alpha02")
docs("androidx.constraintlayout:constraintlayout:2.2.0-alpha13")
@@ -128,23 +128,23 @@
docs("androidx.constraintlayout:constraintlayout-core:1.1.0-alpha13")
docs("androidx.contentpager:contentpager:1.0.0")
docs("androidx.coordinatorlayout:coordinatorlayout:1.3.0-alpha02")
- docs("androidx.core:core:1.13.0-alpha02")
+ docs("androidx.core:core:1.13.0-alpha03")
// TODO(b/294531403): Turn on apiSince for core-animation when it releases as alpha
docsWithoutApiSince("androidx.core:core-animation:1.0.0-rc01")
docsWithoutApiSince("androidx.core:core-animation-testing:1.0.0-rc01")
docs("androidx.core:core-google-shortcuts:1.2.0-alpha01")
docs("androidx.core:core-i18n:1.0.0-alpha01")
- docs("androidx.core:core-ktx:1.13.0-alpha02")
+ docs("androidx.core:core-ktx:1.13.0-alpha03")
docs("androidx.core:core-location-altitude:1.0.0-alpha01")
- docs("androidx.core:core-performance:1.0.0-rc01")
- docs("androidx.core:core-performance-play-services:1.0.0-rc01")
- samples("androidx.core:core-performance-samples:1.0.0-rc01")
- docs("androidx.core:core-performance-testing:1.0.0-rc01")
+ docs("androidx.core:core-performance:1.0.0")
+ docs("androidx.core:core-performance-play-services:1.0.0")
+ samples("androidx.core:core-performance-samples:1.0.0")
+ docs("androidx.core:core-performance-testing:1.0.0")
docs("androidx.core:core-remoteviews:1.0.0-rc01")
docs("androidx.core:core-role:1.2.0-alpha01")
docs("androidx.core:core-splashscreen:1.1.0-alpha02")
docs("androidx.core:core-telecom:1.0.0-alpha02")
- docs("androidx.core:core-testing:1.13.0-alpha02")
+ docs("androidx.core:core-testing:1.13.0-alpha03")
docs("androidx.core.uwb:uwb:1.0.0-alpha07")
docs("androidx.core.uwb:uwb-rxjava3:1.0.0-alpha07")
docs("androidx.credentials:credentials:1.3.0-alpha01")
@@ -155,15 +155,15 @@
docs("androidx.customview:customview:1.2.0-alpha02")
// TODO(b/294531403): Turn on apiSince for customview-poolingcontainer when it releases as alpha
docsWithoutApiSince("androidx.customview:customview-poolingcontainer:1.0.0-rc01")
- kmpDocs("androidx.datastore:datastore:1.1.0-alpha07")
- kmpDocs("androidx.datastore:datastore-core:1.1.0-alpha07")
- kmpDocs("androidx.datastore:datastore-core-okio:1.1.0-alpha07")
- kmpDocs("androidx.datastore:datastore-preferences:1.1.0-alpha07")
- kmpDocs("androidx.datastore:datastore-preferences-core:1.1.0-alpha07")
- docs("androidx.datastore:datastore-preferences-rxjava2:1.1.0-alpha07")
- docs("androidx.datastore:datastore-preferences-rxjava3:1.1.0-alpha07")
- docs("androidx.datastore:datastore-rxjava2:1.1.0-alpha07")
- docs("androidx.datastore:datastore-rxjava3:1.1.0-alpha07")
+ kmpDocs("androidx.datastore:datastore:1.1.0-beta01")
+ kmpDocs("androidx.datastore:datastore-core:1.1.0-beta01")
+ kmpDocs("androidx.datastore:datastore-core-okio:1.1.0-beta01")
+ kmpDocs("androidx.datastore:datastore-preferences:1.1.0-beta01")
+ kmpDocs("androidx.datastore:datastore-preferences-core:1.1.0-beta01")
+ docs("androidx.datastore:datastore-preferences-rxjava2:1.1.0-beta01")
+ docs("androidx.datastore:datastore-preferences-rxjava3:1.1.0-beta01")
+ docs("androidx.datastore:datastore-rxjava2:1.1.0-beta01")
+ docs("androidx.datastore:datastore-rxjava3:1.1.0-beta01")
docs("androidx.documentfile:documentfile:1.1.0-alpha01")
docs("androidx.draganddrop:draganddrop:1.0.0")
docs("androidx.drawerlayout:drawerlayout:1.2.0")
@@ -180,9 +180,9 @@
docs("androidx.enterprise:enterprise-feedback:1.1.0")
docs("androidx.enterprise:enterprise-feedback-testing:1.1.0")
docs("androidx.exifinterface:exifinterface:1.3.6")
- docs("androidx.fragment:fragment:1.7.0-alpha07")
- docs("androidx.fragment:fragment-ktx:1.7.0-alpha07")
- docs("androidx.fragment:fragment-testing:1.7.0-alpha07")
+ docs("androidx.fragment:fragment:1.7.0-alpha08")
+ docs("androidx.fragment:fragment-ktx:1.7.0-alpha08")
+ docs("androidx.fragment:fragment-testing:1.7.0-alpha08")
docs("androidx.glance:glance:1.0.0")
docs("androidx.glance:glance-appwidget:1.0.0")
samples("androidx.glance:glance-appwidget-samples:1.0.0")
@@ -195,11 +195,11 @@
docs("androidx.glance:glance-wear-tiles-preview:1.0.0-alpha06")
docs("androidx.graphics:graphics-core:1.0.0-beta01")
samples("androidx.graphics:graphics-core-samples:1.0.0-beta01")
- docs("androidx.graphics:graphics-path:1.0.0-beta01")
+ docs("androidx.graphics:graphics-path:1.0.0-beta02")
docs("androidx.graphics:graphics-shapes:1.0.0-alpha04")
docs("androidx.gridlayout:gridlayout:1.1.0-beta01")
- docs("androidx.health.connect:connect-client:1.1.0-alpha06")
- samples("androidx.health.connect:connect-client-samples:1.1.0-alpha06")
+ docs("androidx.health.connect:connect-client:1.1.0-alpha07")
+ samples("androidx.health.connect:connect-client-samples:1.1.0-alpha07")
docs("androidx.health:health-services-client:1.1.0-alpha02")
docs("androidx.heifwriter:heifwriter:1.1.0-alpha02")
docs("androidx.hilt:hilt-common:1.2.0-alpha01")
@@ -216,34 +216,34 @@
docs("androidx.leanback:leanback-paging:1.1.0-alpha11")
docs("androidx.leanback:leanback-preference:1.2.0-alpha04")
docs("androidx.leanback:leanback-tab:1.1.0-beta01")
- docs("androidx.lifecycle:lifecycle-common:2.7.0-rc02")
- docs("androidx.lifecycle:lifecycle-common-java8:2.7.0-rc02")
+ docs("androidx.lifecycle:lifecycle-common:2.7.0")
+ docs("androidx.lifecycle:lifecycle-common-java8:2.7.0")
docs("androidx.lifecycle:lifecycle-extensions:2.2.0")
- docs("androidx.lifecycle:lifecycle-livedata:2.7.0-rc02")
- docs("androidx.lifecycle:lifecycle-livedata-core:2.7.0-rc02")
- docs("androidx.lifecycle:lifecycle-livedata-core-ktx:2.7.0-rc02")
- docs("androidx.lifecycle:lifecycle-livedata-ktx:2.7.0-rc02")
- docs("androidx.lifecycle:lifecycle-process:2.7.0-rc02")
- docs("androidx.lifecycle:lifecycle-reactivestreams:2.7.0-rc02")
- docs("androidx.lifecycle:lifecycle-reactivestreams-ktx:2.7.0-rc02")
- docs("androidx.lifecycle:lifecycle-runtime:2.7.0-rc02")
- docs("androidx.lifecycle:lifecycle-runtime-compose:2.7.0-rc02")
- samples("androidx.lifecycle:lifecycle-runtime-compose-samples:2.7.0-rc02")
- docs("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0-rc02")
- docs("androidx.lifecycle:lifecycle-runtime-testing:2.7.0-rc02")
- docs("androidx.lifecycle:lifecycle-service:2.7.0-rc02")
- docs("androidx.lifecycle:lifecycle-viewmodel:2.7.0-rc02")
- docs("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0-rc02")
- samples("androidx.lifecycle:lifecycle-viewmodel-compose-samples:2.7.0-rc02")
- docs("androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0-rc02")
- docs("androidx.lifecycle:lifecycle-viewmodel-savedstate:2.7.0-rc02")
+ docs("androidx.lifecycle:lifecycle-livedata:2.7.0")
+ docs("androidx.lifecycle:lifecycle-livedata-core:2.7.0")
+ docs("androidx.lifecycle:lifecycle-livedata-core-ktx:2.7.0")
+ docs("androidx.lifecycle:lifecycle-livedata-ktx:2.7.0")
+ docs("androidx.lifecycle:lifecycle-process:2.7.0")
+ docs("androidx.lifecycle:lifecycle-reactivestreams:2.7.0")
+ docs("androidx.lifecycle:lifecycle-reactivestreams-ktx:2.7.0")
+ docs("androidx.lifecycle:lifecycle-runtime:2.7.0")
+ docs("androidx.lifecycle:lifecycle-runtime-compose:2.7.0")
+ samples("androidx.lifecycle:lifecycle-runtime-compose-samples:2.7.0")
+ docs("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
+ docs("androidx.lifecycle:lifecycle-runtime-testing:2.7.0")
+ docs("androidx.lifecycle:lifecycle-service:2.7.0")
+ docs("androidx.lifecycle:lifecycle-viewmodel:2.7.0")
+ docs("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0")
+ samples("androidx.lifecycle:lifecycle-viewmodel-compose-samples:2.7.0")
+ docs("androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0")
+ docs("androidx.lifecycle:lifecycle-viewmodel-savedstate:2.7.0")
docs("androidx.loader:loader:1.1.0")
// localbroadcastmanager is deprecated
docsWithoutApiSince("androidx.localbroadcastmanager:localbroadcastmanager:1.1.0")
- docs("androidx.media2:media2-common:1.3.0-rc01")
- docs("androidx.media2:media2-player:1.3.0-rc01")
- docs("androidx.media2:media2-session:1.3.0-rc01")
- docs("androidx.media2:media2-widget:1.3.0-rc01")
+ docs("androidx.media2:media2-common:1.3.0")
+ docs("androidx.media2:media2-player:1.3.0")
+ docs("androidx.media2:media2-session:1.3.0")
+ docs("androidx.media2:media2-widget:1.3.0")
docs("androidx.media:media:1.7.0")
// androidx.media3 is not hosted in androidx
docsWithoutApiSince("androidx.media3:media3-cast:1.2.0")
@@ -273,7 +273,7 @@
docsWithoutApiSince("androidx.media3:media3-ui-leanback:1.2.0")
docs("androidx.mediarouter:mediarouter:1.7.0-alpha01")
docs("androidx.mediarouter:mediarouter-testing:1.7.0-alpha01")
- docs("androidx.metrics:metrics-performance:1.0.0-alpha04")
+ docs("androidx.metrics:metrics-performance:1.0.0-beta01")
docs("androidx.navigation:navigation-common:2.7.6")
docs("androidx.navigation:navigation-common-ktx:2.7.6")
docs("androidx.navigation:navigation-compose:2.7.6")
@@ -382,8 +382,8 @@
// TODO(243405142) clean-up
docsWithoutApiSince("androidx.tracing:tracing-perfetto-common:1.0.0-alpha16")
docs("androidx.tracing:tracing-perfetto-handshake:1.0.0")
- docs("androidx.transition:transition:1.5.0-alpha05")
- docs("androidx.transition:transition-ktx:1.5.0-alpha05")
+ docs("androidx.transition:transition:1.5.0-alpha06")
+ docs("androidx.transition:transition-ktx:1.5.0-alpha06")
docs("androidx.tv:tv-foundation:1.0.0-alpha10")
docs("androidx.tv:tv-material:1.0.0-alpha10")
samples("androidx.tv:tv-samples:1.0.0-alpha10")
@@ -391,31 +391,31 @@
docs("androidx.vectordrawable:vectordrawable:1.2.0-beta01")
docs("androidx.vectordrawable:vectordrawable-animated:1.2.0-alpha01")
docs("androidx.vectordrawable:vectordrawable-seekable:1.0.0-beta01")
- docs("androidx.versionedparcelable:versionedparcelable:1.2.0-rc01")
+ docs("androidx.versionedparcelable:versionedparcelable:1.2.0")
docs("androidx.viewpager2:viewpager2:1.1.0-beta02")
docs("androidx.viewpager:viewpager:1.1.0-alpha01")
- docs("androidx.wear.compose:compose-foundation:1.3.0-beta02")
- samples("androidx.wear.compose:compose-foundation-samples:1.3.0-beta02")
- docs("androidx.wear.compose:compose-material:1.3.0-beta02")
- docs("androidx.wear.compose:compose-material-core:1.3.0-beta02")
- samples("androidx.wear.compose:compose-material-samples:1.3.0-beta02")
+ docs("androidx.wear.compose:compose-foundation:1.3.0-rc01")
+ samples("androidx.wear.compose:compose-foundation-samples:1.3.0-rc01")
+ docs("androidx.wear.compose:compose-material:1.3.0-rc01")
+ docs("androidx.wear.compose:compose-material-core:1.3.0-rc01")
+ samples("androidx.wear.compose:compose-material-samples:1.3.0-rc01")
docs("androidx.wear.compose:compose-material3:1.0.0-alpha16")
- samples("androidx.wear.compose:compose-material3-samples:1.3.0-beta02")
- docs("androidx.wear.compose:compose-navigation:1.3.0-beta02")
- samples("androidx.wear.compose:compose-navigation-samples:1.3.0-beta02")
- docs("androidx.wear.compose:compose-ui-tooling:1.3.0-beta02")
- docs("androidx.wear.protolayout:protolayout:1.1.0-alpha04")
- docs("androidx.wear.protolayout:protolayout-expression:1.1.0-alpha04")
- docs("androidx.wear.protolayout:protolayout-expression-pipeline:1.1.0-alpha04")
- docs("androidx.wear.protolayout:protolayout-material:1.1.0-alpha04")
- docs("androidx.wear.protolayout:protolayout-material-core:1.1.0-alpha04")
- docs("androidx.wear.protolayout:protolayout-renderer:1.1.0-alpha04")
- docs("androidx.wear.tiles:tiles:1.3.0-alpha04")
- docs("androidx.wear.tiles:tiles-material:1.3.0-alpha04")
- docs("androidx.wear.tiles:tiles-renderer:1.3.0-alpha04")
- docs("androidx.wear.tiles:tiles-testing:1.3.0-alpha04")
- docs("androidx.wear.tiles:tiles-tooling:1.3.0-alpha04")
- docs("androidx.wear.tiles:tiles-tooling-preview:1.3.0-alpha04")
+ samples("androidx.wear.compose:compose-material3-samples:1.3.0-rc01")
+ docs("androidx.wear.compose:compose-navigation:1.3.0-rc01")
+ samples("androidx.wear.compose:compose-navigation-samples:1.3.0-rc01")
+ docs("androidx.wear.compose:compose-ui-tooling:1.3.0-rc01")
+ docs("androidx.wear.protolayout:protolayout:1.1.0-beta01")
+ docs("androidx.wear.protolayout:protolayout-expression:1.1.0-beta01")
+ docs("androidx.wear.protolayout:protolayout-expression-pipeline:1.1.0-beta01")
+ docs("androidx.wear.protolayout:protolayout-material:1.1.0-beta01")
+ docs("androidx.wear.protolayout:protolayout-material-core:1.1.0-beta01")
+ docs("androidx.wear.protolayout:protolayout-renderer:1.1.0-beta01")
+ docs("androidx.wear.tiles:tiles:1.3.0-beta01")
+ docs("androidx.wear.tiles:tiles-material:1.3.0-beta01")
+ docs("androidx.wear.tiles:tiles-renderer:1.3.0-beta01")
+ docs("androidx.wear.tiles:tiles-testing:1.3.0-beta01")
+ docs("androidx.wear.tiles:tiles-tooling:1.3.0-beta01")
+ docs("androidx.wear.tiles:tiles-tooling-preview:1.3.0-beta01")
docs("androidx.wear.watchface:watchface:1.2.0")
docs("androidx.wear.watchface:watchface-client:1.2.0")
docs("androidx.wear.watchface:watchface-client-guava:1.2.0")
@@ -438,10 +438,12 @@
samples("androidx.wear:wear-input-samples:1.2.0-alpha01")
docs("androidx.wear:wear-input-testing:1.2.0-alpha02")
docs("androidx.wear:wear-ongoing:1.1.0-alpha01")
- docs("androidx.wear:wear-phone-interactions:1.1.0-alpha03")
- docs("androidx.wear:wear-remote-interactions:1.1.0-alpha01")
+ docs("androidx.wear:wear-phone-interactions:1.1.0-alpha04")
+ samples("androidx.wear:wear-phone-interactions-samples:1.1.0-alpha04")
+ docs("androidx.wear:wear-remote-interactions:1.1.0-alpha02")
+ samples("androidx.wear:wear-remote-interactions-samples:1.1.0-alpha02")
docs("androidx.wear:wear-tooling-preview:1.0.0")
- docs("androidx.webkit:webkit:1.10.0-beta01")
+ docs("androidx.webkit:webkit:1.10.0-rc01")
docs("androidx.window.extensions.core:core:1.0.0")
docs("androidx.window:window:1.3.0-alpha01")
stubs(fileTree(dir: "../window/stubs/", include: ["window-sidecar-release-0.1.0-alpha01.aar"]))
diff --git a/documentfile/documentfile/lint-baseline.xml b/documentfile/documentfile/lint-baseline.xml
deleted file mode 100644
index 523b7bb..0000000
--- a/documentfile/documentfile/lint-baseline.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/documentfile/provider/DocumentFile.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/documentfile/provider/DocumentsContractApi19.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/documentfile/provider/SingleDocumentFile.java"/>
- </issue>
-
-</issues>
diff --git a/drawerlayout/drawerlayout/lint-baseline.xml b/drawerlayout/drawerlayout/lint-baseline.xml
deleted file mode 100644
index 86a0e10..0000000
--- a/drawerlayout/drawerlayout/lint-baseline.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" static final boolean CAN_HIDE_DESCENDANTS = Build.VERSION.SDK_INT >= 19;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/drawerlayout/widget/DrawerLayout.java"/>
- </issue>
-
-</issues>
diff --git a/dynamicanimation/dynamicanimation/lint-baseline.xml b/dynamicanimation/dynamicanimation/lint-baseline.xml
index 138871e..e438e8b 100644
--- a/dynamicanimation/dynamicanimation/lint-baseline.xml
+++ b/dynamicanimation/dynamicanimation/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
@@ -47,24 +47,6 @@
</issue>
<issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/dynamicanimation/animation/AnimationHandler.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/dynamicanimation/animation/AnimationHandler.java"/>
- </issue>
-
- <issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public T addEndListener(OnAnimationEndListener listener) {"
diff --git a/emoji/emoji-bundled/lint-baseline.xml b/emoji/emoji-bundled/lint-baseline.xml
deleted file mode 100644
index 90a60bc..0000000
--- a/emoji/emoji-bundled/lint-baseline.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/bundled/BundledEmojiCompatConfig.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/bundled/BundledEmojiCompatConfig.java"/>
- </issue>
-
-</issues>
diff --git a/emoji/emoji/lint-baseline.xml b/emoji/emoji/lint-baseline.xml
index 8980a86..42964c9 100644
--- a/emoji/emoji/lint-baseline.xml
+++ b/emoji/emoji/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="ClassVerificationFailure"
@@ -56,213 +56,6 @@
</issue>
<issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" mHelper = Build.VERSION.SDK_INT < 19 ? new CompatInternal(this) : new CompatInternal19("
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/text/EmojiCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/text/EmojiCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/text/EmojiCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/text/EmojiCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/text/EmojiCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" mHelper = Build.VERSION.SDK_INT >= 19 ? new HelperInternal19(editText)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/widget/EmojiEditTextHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/widget/EmojiEditTextHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/widget/EmojiInputConnection.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/widget/EmojiInputFilter.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/widget/EmojiKeyListener.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/text/EmojiMetadata.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/text/EmojiProcessor.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/text/EmojiSpan.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" mHelper = Build.VERSION.SDK_INT >= 19 ? new HelperInternal19(textView)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/widget/EmojiTextViewHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/widget/EmojiTextViewHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/widget/EmojiTextWatcher.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/widget/EmojiTransformationMethod.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/text/FontRequestEmojiCompatConfig.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/text/FontRequestEmojiCompatConfig.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/text/FontRequestEmojiCompatConfig.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/text/MetadataListReader.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/text/MetadataRepo.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/text/TypefaceEmojiSpan.java"/>
- </issue>
-
- <issue
id="KotlinPropertyAccess"
message="The getter return type (`int`) and setter parameter type (`boolean`) getter and setter methods for property `hasGlyph` should have exactly the same type to allow be accessed as a property from Kotlin; see https://android.github.io/kotlin-guides/interop.html#property-prefixes"
errorLine1=" public int getHasGlyph() {"
diff --git a/emoji2/emoji2-bundled/lint-baseline.xml b/emoji2/emoji2-bundled/lint-baseline.xml
deleted file mode 100644
index 575575b..0000000
--- a/emoji2/emoji2-bundled/lint-baseline.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/bundled/BundledEmojiCompatConfig.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/bundled/BundledEmojiCompatConfig.java"/>
- </issue>
-
-</issues>
diff --git a/emoji2/emoji2-views-helper/lint-baseline.xml b/emoji2/emoji2-views-helper/lint-baseline.xml
deleted file mode 100644
index d43ba3e..0000000
--- a/emoji2/emoji2-views-helper/lint-baseline.xml
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/viewsintegration/EmojiEditTextHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/viewsintegration/EmojiEditTextHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/viewsintegration/EmojiInputConnection.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/viewsintegration/EmojiInputFilter.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/viewsintegration/EmojiInputFilter.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/viewsintegration/EmojiKeyListener.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/viewsintegration/EmojiTextViewHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/viewsintegration/EmojiTextViewHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/viewsintegration/EmojiTextViewHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/viewsintegration/EmojiTextWatcher.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/viewsintegration/EmojiTextWatcher.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/viewsintegration/EmojiTransformationMethod.java"/>
- </issue>
-
-</issues>
diff --git a/emoji2/emoji2/lint-baseline.xml b/emoji2/emoji2/lint-baseline.xml
deleted file mode 100644
index 105508c..0000000
--- a/emoji2/emoji2/lint-baseline.xml
+++ /dev/null
@@ -1,220 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/DefaultEmojiCompatConfig.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/DefaultEmojiCompatConfig.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" mHelper = Build.VERSION.SDK_INT < 19 ? new CompatInternal(this) : new CompatInternal19("
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/EmojiCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/EmojiCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/EmojiCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/EmojiCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/EmojiCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/EmojiCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/EmojiCompatInitializer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/EmojiCompatInitializer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/EmojiCompatInitializer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/EmojiCompatInitializer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/EmojiCompatInitializer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/EmojiProcessor.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/EmojiProcessor.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/EmojiSpan.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/FontRequestEmojiCompatConfig.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/FontRequestEmojiCompatConfig.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/FontRequestEmojiCompatConfig.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/FontRequestEmojiCompatConfig.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/MetadataListReader.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/MetadataRepo.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/TypefaceEmojiRasterizer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji2/text/TypefaceEmojiSpan.java"/>
- </issue>
-
-</issues>
diff --git a/fragment/fragment/lint-baseline.xml b/fragment/fragment/lint-baseline.xml
deleted file mode 100644
index 047bc0e..0000000
--- a/fragment/fragment/lint-baseline.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/fragment/app/Fragment.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/fragment/app/Fragment.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/fragment/app/FragmentContainerView.kt"/>
- </issue>
-
-</issues>
diff --git a/fragment/fragment/src/androidTest/java/androidx/fragment/app/DialogFragmentDismissTest.kt b/fragment/fragment/src/androidTest/java/androidx/fragment/app/DialogFragmentDismissTest.kt
index 9e8b4e4..e449520 100644
--- a/fragment/fragment/src/androidTest/java/androidx/fragment/app/DialogFragmentDismissTest.kt
+++ b/fragment/fragment/src/androidTest/java/androidx/fragment/app/DialogFragmentDismissTest.kt
@@ -19,7 +19,6 @@
import android.app.AlertDialog
import android.app.Dialog
import android.content.DialogInterface
-import android.os.Build
import android.os.Bundle
import android.os.Looper
import androidx.fragment.app.test.EmptyFragmentTestActivity
@@ -112,12 +111,6 @@
@Test
fun testDialogFragmentDismiss() {
- // There is a leak in API 30 InputMethodManager that causes this test to be flaky.
- // Once https://github.com/square/leakcanary/issues/2592 is addressed we can upgrade
- // leak canary and remove this.
- if (Build.VERSION.SDK_INT == Build.VERSION_CODES.R) {
- return
- }
val fragment = TestDialogFragment()
activityTestRule.runOnUiThread {
fragment.showNow(activityTestRule.activity.supportFragmentManager, null)
diff --git a/fragment/fragment/src/androidTest/java/androidx/fragment/app/DialogFragmentTest.kt b/fragment/fragment/src/androidTest/java/androidx/fragment/app/DialogFragmentTest.kt
index ec9f1a4..8060409 100644
--- a/fragment/fragment/src/androidTest/java/androidx/fragment/app/DialogFragmentTest.kt
+++ b/fragment/fragment/src/androidTest/java/androidx/fragment/app/DialogFragmentTest.kt
@@ -20,7 +20,6 @@
import android.app.Dialog
import android.content.Context
import android.content.DialogInterface
-import android.os.Build
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
@@ -534,12 +533,6 @@
@Test
fun testRequireDialog() {
- // There is a leak in API 30 InputMethodManager that causes this test to be flaky.
- // Once https://github.com/square/leakcanary/issues/2592 is addressed we can upgrade
- // leak canary and remove this.
- if (Build.VERSION.SDK_INT == Build.VERSION_CODES.R) {
- return
- }
val dialogFragment = TestDialogFragment()
val fm = activityTestRule.activity.supportFragmentManager
diff --git a/glance/glance-appwidget/api/current.ignore b/glance/glance-appwidget/api/current.ignore
index aeea2e8..72eabcf 100644
--- a/glance/glance-appwidget/api/current.ignore
+++ b/glance/glance-appwidget/api/current.ignore
@@ -97,5 +97,5 @@
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>)
+RemovedMethod: androidx.glance.appwidget.GlanceAppWidgetKt#updateIf(androidx.glance.appwidget.GlanceAppWidget, android.content.Context, kotlin.jvm.functions.Function1<? super State,java.lang.Boolean>):
+ Removed method androidx.glance.appwidget.GlanceAppWidgetKt.updateIf(androidx.glance.appwidget.GlanceAppWidget,android.content.Context,kotlin.jvm.functions.Function1<? super State,java.lang.Boolean>)
diff --git a/glance/glance-appwidget/api/restricted_current.ignore b/glance/glance-appwidget/api/restricted_current.ignore
index aeea2e8..72eabcf 100644
--- a/glance/glance-appwidget/api/restricted_current.ignore
+++ b/glance/glance-appwidget/api/restricted_current.ignore
@@ -97,5 +97,5 @@
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>)
+RemovedMethod: androidx.glance.appwidget.GlanceAppWidgetKt#updateIf(androidx.glance.appwidget.GlanceAppWidget, android.content.Context, kotlin.jvm.functions.Function1<? super State,java.lang.Boolean>):
+ Removed method androidx.glance.appwidget.GlanceAppWidgetKt.updateIf(androidx.glance.appwidget.GlanceAppWidget,android.content.Context,kotlin.jvm.functions.Function1<? super State,java.lang.Boolean>)
diff --git a/glance/glance-appwidget/integration-tests/demos/lint-baseline.xml b/glance/glance-appwidget/integration-tests/demos/lint-baseline.xml
index cf3f685..44bd1e8 100644
--- a/glance/glance-appwidget/integration-tests/demos/lint-baseline.xml
+++ b/glance/glance-appwidget/integration-tests/demos/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha02" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="RestrictedApiAndroidX"
diff --git a/glance/glance-appwidget/lint-baseline.xml b/glance/glance-appwidget/lint-baseline.xml
index be46adf..dd9d0f5 100644
--- a/glance/glance-appwidget/lint-baseline.xml
+++ b/glance/glance-appwidget/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha02" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
@@ -49,24 +49,6 @@
<issue
id="ListIterator"
message="Creating an unnecessary Iterator to iterate through a List"
- errorLine1=" sizes.map { DpSize(it.width.dp, it.height.dp) }"
- errorLine2=" ~~~">
- <location
- file="src/main/java/androidx/glance/appwidget/AppWidgetUtils.kt"/>
- </issue>
-
- <issue
- id="ListIterator"
- message="Creating an unnecessary Iterator to iterate through a List"
- errorLine1=" }.minByOrNull { it.second }?.first"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/glance/appwidget/AppWidgetUtils.kt"/>
- </issue>
-
- <issue
- id="ListIterator"
- message="Creating an unnecessary Iterator to iterate through a List"
errorLine1=" rv.setContentDescription(viewDef.mainViewId, contentDescription.joinToString())"
errorLine2=" ~~~~~~~~~~~~">
<location
@@ -489,42 +471,6 @@
<issue
id="PrimitiveInCollection"
- message="return type List<DpSize> of extractAllSizes: replace with LongList"
- errorLine1="internal fun Bundle.extractAllSizes(minSize: () -> DpSize): List<DpSize> {"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/glance/appwidget/AppWidgetUtils.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type List<DpSize> of estimateSizes: replace with LongList"
- errorLine1="private fun Bundle.estimateSizes(minSize: () -> DpSize): List<DpSize> {"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/glance/appwidget/AppWidgetUtils.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type List<DpSize> of extractOrientationSizes: replace with LongList"
- errorLine1="internal fun Bundle.extractOrientationSizes() ="
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/glance/appwidget/AppWidgetUtils.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type List<DpSize> of sortedBySize: replace with LongList"
- errorLine1="internal fun Collection<DpSize>.sortedBySize() ="
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/glance/appwidget/AppWidgetUtils.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
message="constructor InsertedViewInfo has parameter children with type Map<Integer, ? extends Map<SizeSelector, Integer>>: replace with IntObjectMap"
errorLine1=" val children: Map<Int, Map<SizeSelector, Int>> = emptyMap(),"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
diff --git a/glance/glance-testing/lint-baseline.xml b/glance/glance-testing/lint-baseline.xml
index bc6854b..8f05566 100644
--- a/glance/glance-testing/lint-baseline.xml
+++ b/glance/glance-testing/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-beta01)" variant="all" version="8.2.0-beta01">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="ListIterator"
@@ -49,15 +49,6 @@
<issue
id="ListIterator"
message="Creating an unnecessary Iterator to iterate through a List"
- errorLine1=" ?.joinToString()"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/glance/testing/unit/UnitTestFilters.kt"/>
- </issue>
-
- <issue
- id="ListIterator"
- message="Creating an unnecessary Iterator to iterate through a List"
errorLine1=" return node.children().any { checkIfSubtreeMatchesRecursive(matcher, it) }"
errorLine2=" ~~~">
<location
diff --git a/glance/glance-wear-tiles/lint-baseline.xml b/glance/glance-wear-tiles/lint-baseline.xml
index 336a7a1..dc51b1c 100644
--- a/glance/glance-wear-tiles/lint-baseline.xml
+++ b/glance/glance-wear-tiles/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha02" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="ListIterator"
diff --git a/glance/glance/lint-baseline.xml b/glance/glance/lint-baseline.xml
index 6d55209..523dde1 100644
--- a/glance/glance/lint-baseline.xml
+++ b/glance/glance/lint-baseline.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha02" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="RestrictedApiAndroidX"
message="ListenableFutureKt.await can only be called from within the same library group (referenced groupId=`androidx.work` from groupId=`androidx.glance`)"
- errorLine1=" .result.await()"
- errorLine2=" ~~~~~">
+ errorLine1=" .result.await()"
+ errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/glance/session/SessionManager.kt"/>
</issue>
@@ -13,8 +13,8 @@
<issue
id="RestrictedApiAndroidX"
message="ListenableFutureKt.await can only be called from within the same library group (referenced groupId=`androidx.work` from groupId=`androidx.glance`)"
- errorLine1=" (WorkManager.getInstance(context).getWorkInfosForUniqueWork(key).await()"
- errorLine2=" ~~~~~">
+ errorLine1=" .await()"
+ errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/glance/session/SessionManager.kt"/>
</issue>
@@ -76,15 +76,6 @@
<issue
id="ListIterator"
message="Creating an unnecessary Iterator to iterate through a List"
- errorLine1=" .any { it.state == WorkInfo.State.RUNNING } && synchronized(sessions) {"
- errorLine2=" ~~~">
- <location
- file="src/main/java/androidx/glance/session/SessionManager.kt"/>
- </issue>
-
- <issue
- id="ListIterator"
- message="Creating an unnecessary Iterator to iterate through a List"
errorLine1=" val mask = decorations.fold(0) { acc, decoration ->"
errorLine2=" ~~~~">
<location
diff --git a/gradle.properties b/gradle.properties
index 470ef1a3..304a327 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -52,10 +52,11 @@
# Enable adding baseline-prof.txt files to AAR artifacts
android.experimental.enableArtProfiles=true
-
+# Disables dependency constraints for libraries (b/276714425)
+android.experimental.dependency.excludeLibraryComponentsFromConstraints=true
# Disallow resolving dependencies at configuration time, which is a slight performance problem
android.dependencyResolutionAtConfigurationTime.disallow=true
-android.suppressUnsupportedOptionWarnings=android.suppressUnsupportedOptionWarnings,android.dependencyResolutionAtConfigurationTime.disallow,android.experimental.lint.missingBaselineIsEmptyBaseline,android.lint.printStackTrace,android.lint.baselineOmitLineNumbers,android.experimental.disableCompileSdkChecks,android.overrideVersionCheck,android.r8.maxWorkers,android.experimental.privacysandboxsdk.enable,android.experimental.lint.reservedMemoryPerTask
+android.suppressUnsupportedOptionWarnings=android.suppressUnsupportedOptionWarnings,android.dependencyResolutionAtConfigurationTime.disallow,android.experimental.lint.missingBaselineIsEmptyBaseline,android.lint.printStackTrace,android.lint.baselineOmitLineNumbers,android.experimental.disableCompileSdkChecks,android.overrideVersionCheck,android.r8.maxWorkers,android.experimental.privacysandboxsdk.enable,android.experimental.lint.reservedMemoryPerTask,android.experimental.dependency.excludeLibraryComponentsFromConstraints
# Workaround for b/162074215
android.includeDependencyInfoInApks=false
# Allow multiple r8 tasks at once because otherwise they can make the critical path longer: b/256187923
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 75b96f0c..a66c24c 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -2,13 +2,13 @@
# -----------------------------------------------------------------------------
# All of the following should be updated in sync.
# -----------------------------------------------------------------------------
-androidGradlePlugin = "8.3.0-alpha10"
+androidGradlePlugin = "8.3.0-beta01"
# NOTE: When updating the lint version we also need to update the `api` version
# supported by `IssueRegistry`'s.' For e.g. r.android.com/1331903
-androidLint = "31.3.0-alpha10"
+androidLint = "31.3.0-beta01"
# Once you have a chosen version of AGP to upgrade to, go to
# https://developer.android.com/studio/archive and find the matching version of Studio.
-androidStudio = "2023.2.1.10"
+androidStudio = "2023.2.1.19"
# -----------------------------------------------------------------------------
androidGradlePluginMin = "7.0.4"
@@ -49,7 +49,7 @@
ksp = "1.9.21-1.0.15"
ktfmt = "0.45"
ktlint = "0.49.1"
-leakcanary = "2.12"
+leakcanary = "2.13"
media3 = "1.1.0"
metalava = "1.0.0-alpha10"
mockito = "2.25.0"
diff --git a/gradle/verification-keyring.keys b/gradle/verification-keyring.keys
index 24c39b0..35cbf8c 100644
--- a/gradle/verification-keyring.keys
+++ b/gradle/verification-keyring.keys
@@ -8897,6 +8897,201 @@
=ajY9
-----END PGP PUBLIC KEY BLOCK-----
+pub 7721F63BD38B4796
+sub 4EB27DB2A3B88B8B
+sub 1397BC53640DB551
+sub 78BD65473CB3BD13
+sub 6494C6D6997C215E
+sub E88979FB9B30ACF2
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: BCPG v1.68
+
+mQINBFcMjNMBEAC6Wr5QuLIFgz1V1EFPlg8ty2TsjQEl4VWftUAqWlMevJFWvYEx
+BOsOZ6kNFfBfjAxgJNWTkxZrHzDl74R7KW/nUx6X57bpFjUyRaB8F3/NpWKSeIGS
+pJT+0m2SgUNhLAn1WY/iNJGNaMl7lgUnaP+/ZsSNT9hyTBiH3Ev5VvAtMGhVI/u8
+P0EtTjXp4o2U+VqFTBGmZ6PJVhCFjZUeRByloHw8dGOshfXKgriebpioHvU8iQ2U
+GV3WNIirB2Rq1wkKxXJ/9Iw+4l5m4GmXMs7n3XaYQoBj28H86YA1cYWSm5LR5iU2
+TneI1fJ3vwF2vpSXVBUUDk67PZhg6ZwGRT7GFWskC0z8PsWd5jwK20mA8EVKq0vN
+BFmMK6i4fJU+ux17Rgvnc9tDSCzFZ1/4f43EZ41uTmmNXIDsaPCqwjvSS5ICadt2
+xeqTWDlzONUpOs5yBjF1cfJSdVxsfshvln2JXUwgIdKl4DLbZybuNFXnPffNLb2v
+PtRJHO48O2UbeXS8n27PcuMoLRd7+r7TsqG2vBH4t/cB/1vsvWMbqnQlaJ5VsjeW
+Tp8Gv9FJiKuU8PKiWsF4EGR/kAFyCB8QbJeQ6HrOT0CXLOaYHRu2TvJ4taY9doXn
+98TgU03XTLcYoSp49cdkkis4K+9hd2dUqARVCG7UVd9PY60VVCKi47BVKQARAQAB
+uQINBGF4DJ8BEACk2Gwau+s/pKmOTnGLMnB3ybQsiVGLRhsw2SqSTvSyBthAyW1U
+AqdRqNA8/FdMlvVuppG8+vCLXPmpP63C+9M2tyQeOR2aVQp+u1EIwN4lPu4wrh6v
+dtgSRim8uxBdLIHG16z0xxVhE2rM/Ot/gucfkpoEw289VaR7sPmIxfVTm1QcqCGi
+FQl3rZnma6Bz8UOXJoE8wO+LK5WkcdmFz6+Z3BLSb5IL9lhsArFToNq5dN2SSTbC
+TdHRzrRuoCdefYHdxoLCM4kJfggRRgWhKoEJro+ZipESq1T5yHV/iAJy+3DuC8Lb
+YLvsjt9VZYARw8xIGb90Vj3ThWuMoVr/IVmKT7foC5Whe0PTI/b2frNaWCxxC4cR
+VxMusiBX66mclQ4Mvzwj50G1WKygULYcvPQ81Tg0pvgTKqgxwL9luN9MiDVtkn9C
+Zx7NFlszVr+ic7nVJjANnJebFHCEZfJbQo4uIwKfYbhopUkCa41iXpesbVzAKqNw
+ePgyNTAMFyYnjAUE8FVUmx7ZJVb15iEbMs38gJKJ/Wb8wtJRflAfkhrEzh1M/43W
+UAU3RfPmXTrGeyDCYKTHiXTnj748uH6U40sB9q+qeEhZdTj0KufjgtWaFWsZTkVr
+tGOaI6xfX6py/k3hjU3es+7ddElxhPBcqNE3pkPRqb9wz+exSdM7hiUzNwARAQAB
+iQRbBBgBCAAPBQJheAyfAhsCBQkFo5qAAkAJEHch9jvTi0eWwV0gBBkBCAAGBQJh
+eAyfAAoJEE6yfbKjuIuLggkP/1INRyRToLmY1ms9DTWMQ0lwbBL8J3xu/neKIOKV
+GOdw9zcWlGugUoOthSbT8bjvuybH1Vjx4wFM+cnuMVfjD58Xu6ZpgCHN1wXYMuzY
+weBFKaMg4oSwTKuAJBJ2IhfEm/cAryVvKY2zY+uyzgizx3vAg3sjkAPDcrSCJP2n
+kuHcJ3nzUbKNAjmdMsnWDrqqZVwP99nuyMk8bAtueZ0SKvIpCv2wIeYO7zkj61vu
+QOFOGhl98OBui5wUhtgQw//esTWYiGNKSmD3derd2JHVA01tBmCWV4KMLDbg3CcM
+MQ1x3V1me6EG3giwBL1I9xTsBUbEa6eEN9U0zdKvoMbSogON5wCuxAzO/CXGMreJ
+tBUupHEc69oTuwe426Ihi3AbRrPAg3tnGGFCt11HoQFNnRPWb3unF8UlA2rSytvw
+FyQi3pzBYt5VsTIA7NEHGuJs+/Oor6AOInzht1cp7AfmDGfGy2N5ow+4GI6FPe2U
+qIg2+nFiGr9hRZOvXRgLQL8dlDnFChymldxm/J/UFdJGSWRldEDsPrzHQESKvsV9
+EjnJQR5p5zkQK6jx0zqSlDgiNG2GT3/CSvwIdCih6Cl9HThHtYNm3ZYN0bU9W2je
+oLh3AINNTcrp0tAHZuQLFxukbj56O5eB+nfk67/X2iNii46ZdJQNwbT9YN6CstQz
++CnqFiEE60wb/U8EL23dzOyRdyH2O9OLR5aDtg//cbpjo0chCCBeeVgiLeLA3vaE
+SASrPq8hErzuUEZbavd5DRwNm4Tf7lDgVhyLD4HZEp4OGN2Y8fKkDmj5GIDIjsk5
+nAlqWoc7efAkbmyvStHNwmxsa+lvOyjYm5PJNRG/i0E2rjlv3LRB3O3k+k2s8ltA
+AMlaf4daxtUkHmBYFN2hBiCnJOvzidDKxxYBQVNFuYe+2MIJ8t29TzAzu5sBDkPC
+LWkAFG21EAy48D3gfNoEXnJeSCHEemdbQhxcaLCByH0tDJo71VJGGI8fqvlm6Tsq
+8aEemHtILkmBSf28maanXNx3SZdDZmHwzzUndGLeIY8czYKqmUDFc1siufO1sQmE
+3Yj7vubvdnh34rWK+DrFCG15JmHCHHv9ndOX5TaNg4QUif9QWZXdTFFIlr+NBFyO
+8wqmtKni0BnbIkjdtpuNFuLGBQS2UrXTn8l6nFwB3D2+izE7+tHtWoLO7Ryil3EL
+QYAfyiD4D3/cs+GVEbLdCF/OPL0kdYePgQiyiXTYFLz51a8Chh6uS970736Hr8Hn
+Az9ieD0GNP46s2+R+aorZyykFfBh506sLi5ZxSa54RWu/k/gUXfrAn56O89Lq91P
+FVN0teOi5QfBNBBlWU2NZjdwjKPTednX1z5vfT7YXMb+5Kdv949axEtjsjLPjKCv
+x63B4E+cQi+PCkBnE665Ag0EVwyNyAEQAKsv2AeF2vqBBfhkwDmyWnrbzE6scKx0
+s7nhY109Ep4UdcmpJImLd+zwXEFYjgWd6N4pQZsX4ys6UWkqoQvFoyN7tvBnJqne
+LPO1kezM/diY6hMEm9EQYp0KQvzZwuwKFgP8+uATxyu+SFKer169ywoCfOIzGD/A
+MIKFQvcS+qjb0F6gHzV/4T3CStRMwJP+RXG3ekZFqUpfRSGu0qumbzJF+O58l/CO
+R3CC+KeREZnYatYePgvMxuL3+51holnrpjDSERThRLFQH2822ZIWtvgQH3VPauFz
+rx2BDiNgEjsrgRtvxdpYDFv4gCrfWXVSSIQDfYXipQygvqsKEHjLqcfE6dO+z5cR
+vlMHBdWiCMtEpNCzlT8dX2XuP4cByGTnLeKbY3ZQqYzEeqi289llRk91oJHFR51B
+/2BHTItlX5T0FwO7CPMv/OOu2E1liUQYnodn9MtJOnh0Mf65e4uoxVbLmKq4q2du
+uc1NC2/m3AP4COmDLrRgs4n1hqIngaOJ86nNKTzd7Wsnen+lfoHk1ZCKdUtknPHJ
+46iHeIyN2YINKcRcusKZi/mDqPJX9Zt3gZgW4wrxNPv49B1Ytxtn8vFznDSz5zv5
+/k5+Ypc7ko8eedSysXkMFopE+NJynB49CK3F4iCVSAQwOQ2u4GG7U/MLF3cG1eC7
+74rdZ2gfdVyDABEBAAGJBFsEGAECAA8FAlcMjcgCGwIFCQWjmoACQAkQdyH2O9OL
+R5bBXSAEGQECAAYFAlcMjcgACgkQE5e8U2QNtVFBJg//QTCvdPt7SyhPPyDhAkst
+WpkNl1fwh7PTiJ00e68C7QDB1nbCXQL60yQPuXhHZojoEp7/3A+d2T80l75lhwP+
+7PKIoglAPjw+uJ82fC8e70DzSsTgGmlCemUQ16GJttZoY0lA40YUnHtBNiUWNLks
+2UbUBfqZCPG9vjbfM5ZI6YRqZhdgGZjIwbq+Sv9dM/OyV2TLxcW4+slRmyUv9aXH
+fVdDUiu2Qcc5ipbCvSFNznT/Y7wfR7CX90FkurcSaKdln62xO6Ch/SPhJvFiGmXD
+32cbBs3W5fLgvz91Y5Redjk6BpMpk8XXnNEzFc30V7KUFVimnmTOt7+tEjqZDaVp
+9gd1uO93uvIcXkm9hOhINd3SbMXacvObqPCw7zjtk13kZ1MPr+9x5/Ugm1rWdLAD
++GEu2C2XPr+02dyneUR0KMAzHb2Ng8Nf4uqz0kDFwke5+vzajrAz1MXbhDytrw1u
+8Hreh1WJ0J+Ieg6wgUNStrMfxe5pDPJmQjRtvMuaAwC8w7q7XM9979Mrot0mDsB4
+ApJw4lLfwPmabBoPVsAGvrt5sD9fkd1qiZIMpV1Rhp7B9MYEiytaYKYql1v5Z9fi
+h0Wk3Ndb+qySIGnlZJ6wq83VBSQslkNkPWTPb75e6XkH3uzkvEtMtHC+Aug1pQWv
+eWd6PM0uB0Gl/oWeQDn2zJEWIQTrTBv9TwQvbd3M7JF3IfY704tHllLiD/44gGdr
+ic11Sj3kSajBi/lHth4lRHvIpmt0kCHHqlvIyku3OzYnOnTFsYJw6ZObSZlY64H3
+NGvXNRWOBqJlAW2RY/o+9/lkZNxGlSiLLcvsc+PPq5SY3WBVQiaNCaeu4441zreh
+Dh054jgPwDbc0SMwzJ1q8CWewMQhieGIy0oZHETPUt9F9IrgJMTSC1/vkjTnfGqn
+NmxaH8kwpHG5OgiHNVtNL3379UBkzY7LTaVUpffm0ZpSQ6iVpwxpOTZeDXKnfF+d
+VdLWBIOlhCuDjPN8MeRMP03U0auYyZGwrthmDWjTTYF1u210r0+VSDW7j+nZm4tf
+/LNIyiUDhASN0ccaAftNQ4MfWHTX47AjN4b0L8pGljAC3mSKc218VddfGPUEFCEX
+ti/uF2QAhAIVo49itcD+zgxk0K6zOKuLCMNZd5e8jvWl1ze5YpAAHXU+FhKRldAo
+qK0Xjidcv7CiUSUiP56TdVCu8DGs2fss4cTdKsxvLKkRCiUJzbrhkEP6iBm/6HuH
+TztBYoQFBpFqGtG4LRlYozeX0EmzG1edJGWKmmvRpzUEZ3IZmW/qStsS3CvOYQ9Z
+6d+/wJuaNoIKDjY96iNyWkR7GWjrNaj0HMneOjsiBVKRySH5OJ3swwqEGHfd21lB
+qg8MSP5/wrHTtN+ucqgzvwA7HHoZVanQLqVb9rkCDQRdNfyuARAArJGS9PHK6yn1
+9mg9sPDlEt41RkluytdCa/3YJemQe18f8t3PZYQYpu6ESLJeraUfwwT+dFJ0yIAW
+78p2yerW1hqbbeuAM5yO3pfaR9JOtwzinH6kVICSkzODlGUpHLqkNqp5L5/oNKIi
+d1YWlWDiXSXyRf6S4+Tot1BC9mn6BHdOPP5WRGgE0bxKi4/odqUnxExJecAlskZ7
+jErumsvTZlc0cYiYTwxltqaUE8Sbmio/ulasOViErvZ7EcUzxNQ1vH+y2MjwcILp
+bbkmCmaAnX6GBPH3+O9aGSLginBkkgR0G0ejAUw+iibaswc6XyfM2SZlTuJYNAiY
+KfcV9kGfIT5KWgW56tiQjEtc64gjDfIhoVumR2JmUCbVrrm7mbedVS/UJhFFIQhd
+bft5XddUmqMGODRSiC1HWGwtswDkCBBCZFkSBypXrnNs2EjUqF5dOqBoMAikG+Zf
+i5XGB8ePvxd/is8gKtDagQtazJ4W597XHJHWcoSxKZ8ff8t98qaOmWdLOnSxq5kq
+SaXnRM+s6/LIgWuLk9yL1ReMY36c0rd3DA/y84W55OaJ1H5JqApkP6ZLiqTK9+YR
+7XQ8bIS3CzxZE53DIxFQDgU6Bw2yg0qZbnsiZuPBCz4vWZrsjbu1rAfE1lRAJFEo
+cXXhwC1aWNQ/jI1yvmeWqev7aaY/n5sAEQEAAYkEWwQYAQgADwUCXTX8rgIbAgUJ
+BaOagAJACRB3IfY704tHlsFdIAQZAQgABgUCXTX8rgAKCRB4vWVHPLO9E81AD/9U
+KuvTNQjHd9NkzJ6dWIdTtOsJAjxRpzBTFcGEVx+YIKGFG9yKAjpiABzhJ+r/X4aN
+K2CJkvqEQxXhNPHTsXiPgqNMVYrFRydSSb3Z7ttegWlxLM7WdChslJRYnV0Tq8J3
+ZaRN6pc+LdcIfxBGlB9k2kI0SfjtZlybRerywdfmLzEzM9/v92nl/3pQ8/WmrR0q
+YwVUtjc2x7q2/YO5qg+OZwfNMkwbD2E++N/TvZu9DqrMY6A6ntGy/15SF7DPcN3o
+v1LO60n0mOc4CCn+/4rvmiXDAEAvWYq+1wElFbGwWcsH6aNr+PwAlghyet5RUk9k
+K5X+EY49T4RdIn7wdlzEeknsDZA4FZUFfmETztV8EzppaBVPKnqZLfJ5tEDNZYXT
+kHSlXtEMjZ+m7clAiiO6eKSnPP8n2ZuY+hG6F4hgG91wnEhYUeqRa2nddmDHCgYR
+WLywmgjeoNaubEg8b8an0RE7xBVcKjs5X4lB/SlWN1iXDmdwqW3rt0AqT5E4lWYG
+50fllPSUhkBRIu4mU60/LXLeISINT2t+QdZRmSJaWJs73TeWKFfaISaGtQcY+6om
+pU0/0rtRG/7aDjpDpakOwftTQV87/RZogZ7QuGn8pByHhCBEjV/S3ZrwfpEDFu3d
+XewbNGltqJDw7dNr4MB9lRLUE7X6uQffI28DVvZm1xYhBOtMG/1PBC9t3czskXch
+9jvTi0eWTvMQAKKCKl+H8T72WdueqgPKHEkXDZtJmTn6nyneYlETvdmHGEIb1ejx
+uJ5URlAYnciY+kvSQ/boKjVHNGmf6+JBexd+HqPhkeextV6Jcnmi47HDvIU/TSyn
+huqZeK/3SZAV7ESqQl42q7wm7Pqw0dkv4jjFCRxDA+Qq2aH6szJ7DZxTRWqfR3Zb
+e78NyFVXKxhFQO72zHzC3pFu/Ak59hmTU23yoXVo5t+5O+Q21kX2dbuLd6Px1bnT
++EmyneoPP1Emea5jgsw2/ECqHnvNt6cbp+42XYldGh+PBHBmucC3Mn7sALajHe5k
+2XkNlfbjSNlmutxQFH1qq9rh/JVyxJNHeGzV5G0timAwfdJFUzE1vNU5P0w4O8Hr
+CsX5Ecfgcw2BQ9vPCE3OfG+11xp6oiNMRVsR5pTu7RiI1BQAyICWUW/wXuhhHkkw
+NTiwfciJfVA8ckOiRubik8geEH5boOxgeAaBu6yusQVHnRRyG4wjQ+qsWo+wDI9W
+MdtpNG1toJrSUL4OYa4oX3YogSv5hGrbYIaP4HwO6O2oTMnS0lRIGJOqbEQcmKUa
+/nWT/3NipTnYzyMjMlEQe89YKjd+32tjMfOSdIOvwCGaTizdWnKPF77qB9D0v8C/
+7AdHmEFqf2ZX8vK31aaY+ZpPWG5IHlf6f/buIMBalJOxIBeveBqxcHwQuQINBFiG
+v8wBEACtrmK7c12DfxkPAJSD12VanxLLvvjYW0KEWKxN6TMRQCawLhGwFf7FLNpa
+b829DFMhBcNVgJ8aU0YIIu9fHroIaGi+bkBkDkSWEhSTlYa6ISfBn6Zk9AGBWB/S
+IelOncuAcI/Ik6BdDzIXnDN7cXsMgV1ql7jIbdbsdX63wZEFwqbaiL1GWd4BUKhj
+0H46ZTEVBLl0MfHNlYl+X3ib9WpRS6iBAGOWs8Kqw5xVE7oJm9DDXXWOdPUE8/FV
+ti+bmOz+ICwQETY9I2EmyNXyUG3iaKs07VAf7SPHhgyBEkMngt5ZGcH4gs1m2l/H
+FQ0StNFNhXuzlHvQhDzd9M1nqpstEe+f8AZMgyNnM+uGHJq9VVtaNnwtMDastvNk
+UOs+auMXbNwsl5y/O6ZPX5I5IvJmUhbSh0UOguGPJKUu/bl65theahz4HGBA0Q5n
+zgNLXVmU6aic143iixxMk+/qA59I6KelgWGj9QBPAHU68//J4dPFtlsRKZ7vI0vD
+14wnMvaJFv6tyTSgNdWsQOCWi+n16rGfMx1LNZTO1bO6TE6+ZLuvOchGJTYP4LbC
+eWLL8qDbdfz3oSKHUpyalELJljzin6r3qoA3TqvoGK5OWrFozuhWrWt3tIto53oJ
+34vJCsRZ0qvKDn9PQX9r3o56hKhn8G9z/X5tNlfrzeSYikWQcQARAQABiQRbBBgB
+AgAPBQJYhr/MAhsCBQkFo5qAAkAJEHch9jvTi0eWwV0gBBkBAgAGBQJYhr/MAAoJ
+EGSUxtaZfCFeW4kP/iZq+blRDzgRzOw16x80vyBjfPOUKd++dSUkcr4Khi5vjByg
+NdVSWcKZaBKVkdBmCvf+p9bYwzfL+RdxvGEv8WKNTNjdaWcJ2chU2O4H5Am3Qsdu
+Q/sSf+jTzlnMe7NpfF9n3uo34o+xEFOOcnyF3cHrhxWOCde9rX6kbnUQriIMXZte
+JY8e9Rs+Iv46DoL1eOlavAgDUJbIf/iLt219OdtWI7ZqopA0d+tcn7FL3fwuvyvn
+5WZRYHIerB4EYgBI6bCwl5JQejORlhuYx1oknyPjnzPJ9Los74chrf7OHOJ06iIQ
+f1zlC9V/niA2xiM9NwePtTQOCTEJVB6IEoEtH6rozpAdriprH9fRnZkJxINNnCoY
+k1op9wVh3xfUHbOCvGQbB54cqN+amp9dEquCAe6Yt1WodTspL1zPXJ5Mv43Dud76
+TNEwQDywuebg4NFQnBTPXZGpLQYbUVhXSuMlVZXNEUx8xSz7vECm0S4x2h12RBKb
+K2RfI4oCq/wpD1dQRsZaKSYLFbZw5j2yk6nBBrtfahd7sWVX1F+YdisbTeT5iUhE
+SAWqW9bCyCnNRFy6V34IgW9Pe9yLu8WbVSJAFvnALxsc6hGyvs5dbXbruWKmi5mv
+k6tCFWdFlBVrrhx1QgqMtcS3jv3S7GHyCA3CS1lEgsifYkeOARAgJ1hZ5BvUFiEE
+60wb/U8EL23dzOyRdyH2O9OLR5a6tQ/7BvrqUiEMHRT024V0lRNzqc7/VzLeL2YY
+JWirCZNwHUEn0TWGdwxQ/X8y+sCCQEGsBYmIPZeP1BX+4GjMDucvGtXtx/V1704u
+Afh40R9fbnGPwEE9ifJXIezKTlkcOGOP1Jq6t++UVZiLXeLmJ4ynItUlXj6vZaLX
+HVSApUCUHvywdidsPNKgc8sFwjG0gqnfQsnQ8SRq3xIbsbbCC2/VF2GZxkQFXTm8
+yesYY733V76krNE09gfysPdVAomW9oXCwm4FNbjaBncp+lQ0oja6AJydE2mgcVY0
+KvOUnQIUjjwsyWZRKz7uL+X5AaV5ospDFFM02kCZ68utLuBrgirQgSrF7LpVbpFK
+T9nVnfsnwHs8hJJHStmfpN7JCAVZ/8U4vDo63A6q4aYx4ZKqPZTPHJvKC2y9RnPQ
+HFjKahYV3gXyynjegvZNdTpantAikFoWCRJ/9RDF9HrBxDeK9p95LWWDy9QW4x+4
+wu2jpPQmJnDy4pK4NaW1JF4X4VdWeFrDPvYFkzLxEiiyEZ2lYef9hs3ov4k67Fme
++QwBm9ItPdzQfhcINi0R8raYkyoPbKdfm0ZHwXLcYBoSOHHfpO/NOMJdGYn4WeVJ
+bWnvvH5SMVQVyljyyS/5/QaKnfSLKcBvWGgB2JsgNpvrXY5aL/i9fQNozq3rxSry
+uxpt4lixkbi5Ag0EY+z5WAEQAMpuAsv68BpspXasZIOBj4i21MC2D3D1SivX5D8I
+hYbGL8lDLuXtdMqOZLTC93BT71/94ayPGKBu8BxKxXWzPIp9VBAVPab0qEOsGo0I
+C9DlODplB017nWgfCOIhDWLvPxChPbZW5x1NipwwsAd76DRo2ostJJYsCJbjP6d6
+tyWKeOJNELD9pZklHWjNB3Z4rADDquTX1sdyKFejYTQrUQOZ0dw0DzK3KnHBZZcF
++0JhFZeLknTYZ5lrPGbH8NQucWDLYngbRQtOoZaxt/+0K3baOqDJf68WP+wk+f6X
+cgmqnI1jnIEboZx6N4/29GhCtqkaoeRzH7ft/a+PCamPnnjwkjnYoQLXJl4XCnwe
+MYun7MZqOmeiSsp3hckeeJb35s8urtins82frkxpi9lSO/l6cp3jl8Urq8ndiz9/
+Ho8FcooGz1+VEiB1c4pK+1X5sYgbQj+n8kRn/A/FGDEc8MrmNtwjooFWbdST4IcU
+LggEC3N1KHofhl/DUQfd1BkwtUEH9KPfhRCGXAA6UBe1kfe+Sz8qlyVYryCerPeL
+wc3R7O9ydCVGJE7wiqU338+YWpl41N6uSVPtO3SNeqKikscvQVdHYuyd145F/EMT
+WuFU5TGWh64ixjzHqA7yHZsaDjVhqlE6NjFlkRxqSD01yHhcCXF6oHghK219uJXF
+4vYNABEBAAGJBFsEGAEIAA8FAmPs+VgCGwIFCQWjmoACQAkQdyH2O9OLR5bBXSAE
+GQEIAAYFAmPs+VgACgkQ6Il5+5swrPJG5Q/+PMhN1qYugsPEQc6trsy3ZLql4evd
+cxulYR1GUDW/OXsBoxg7vw9ubtiRa4QHJpczq8YILy+GvFmrT10Gj6g2WkoeNXpT
+NWGtAu3DUKu8TVQNKXDeW0Pil12TLkGgPPQQpU0lyE8+o+DuKb4QBvMvENhPTL+1
+GGrNDoQ4M1SK8trNaNj5pdao5W/Y3LTvXK0VIher/UbvWkJIBh2LeLsj9x8yg36D
+bs1/1l9ztBZvDTaZyZOqmbCysIO7pFHSTiBCGyyzS1PWWJsrN8DbQyjH5uE+/Wm0
+jcDSJ+HXeYWqR/QQLgyZ5OFpxTmqfQEGT4CV9llygtg10GXkl9VV6SN66+xUm0nn
+PHeW4rcO7NtF1skAdvmaHrUcTYEddOBiIfy2o7WrSyhXPTZz/UpoXsvJ68VWRceh
+7l7Jxjj5G47IhWDLMbT1WJzu9pwQ0wz+GXoyzmmstirQm/KSZAh/FNILqrgxlXfk
+tNl8feO3r8rx6hreVdMlRTw+7gLuwOUAWF77XLc6vd0tY2QyKDD/dznvFaVK1wQX
+4s8x1cT+lVJsTPeyBPoI1UajfT7jK6dg/chAVBpOOH0Fuc8rrqJmGnOzKcdn51oB
+gPwJfboNrr0uKCM1MixCcaXOjPEWJbmnEiIxYAooLnEbL0wcupaGxtRTL50Ms3uv
+nwHim26yvOTrgNQWIQTrTBv9TwQvbd3M7JF3IfY704tHlqW3EACfsMyLwntqn+Qu
+8r3k/6IRn0i9XV/bhStE2y6iHUmqs5sd7dfkmVI7bspoOuDKFIErdTephH09E0hv
+QDJERnMm+rh8TlZtOS/wYywx+2ahSh5Jt3dI5L48ozR+WJbExiXq8ZqTnpn/EQGQ
+8MoM+S2dS+czX85ZL+m3ig+tKHwaaXdvGcYI3h8WwQnX3IBUFCur8WSdfcoGyiQ4
+cpTXcI11GgGgkypxM8wxxoLVCTttpCBRCpPf8/PLKMCK0/k3u4QShtp1WDDQVhFm
+/E6ofG9TSGIKcJmsHHQY7rukEp6lSIvmL0ZjByRah4nK5zoc2j89sNpyuemZwr9X
++V9LOjF7vQTO/8y3cBBNCt0R5lrxeBvRze15k0DzShuHyPhg2PBqfPOS7RnUiF2F
+eI+zQ7xFnLqoD6ckI76RRAf7w0sqnvMlDRpjVU+cDyupR5NdB79oPXJpHltKg4ka
+Q4O5x6BXHVEpAMhJc8bPvmfAiTFac5f0ycibf2R5tNlzbKMD/BxVrzXMghsJ5PWm
+AiUbqPv1II5kLw51b6Bzvl8KzJI0h+ySiUGb86yecfHGbF7zPRch2Kt5+7t0fgEj
+AVcMRfcgHsfQn8EYP9zoczp5Gw7LvR8BBDq1dsTEEEPTDre+HyGxpDN4c8LNGrDa
+CFdXnOdlNV/zT9VvBk/RkV+Tl/Lk4g==
+=Fp5i
+-----END PGP PUBLIC KEY BLOCK-----
+
pub 78178478013521D0
uid Ktfmt Team <[email protected]>
diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml
index e61e69d..7fc0903 100644
--- a/gradle/verification-metadata.xml
+++ b/gradle/verification-metadata.xml
@@ -277,6 +277,7 @@
<trusted-key id="82F833963889D7ED06F1E4DC6525FD70CC303655" group="org.codehaus.mojo"/>
<trusted-key id="835A685C8C6F49C54980E5CAF406F31BC1468EBA" group="org.jcodec"/>
<trusted-key id="842AFB86375D805422835BFD82B5574242C20D6F" group="org.antlr"/>
+ <trusted-key id="8461EFA0E74ABAE010DE66994EB27DB2A3B88B8B" group="^androidx[.]test($|([.].*))" regex="true"/>
<trusted-key id="84789D24DF77A32433CE1F079EB80E92EB2135B1">
<trusting group="org.apache"/>
<trusting group="org.apache.maven" name="maven-parent"/>
@@ -786,6 +787,14 @@
<sha256 value="4018b25ecf91e9dec4e240d896b95d12009640e3b1ce9b8efed2323e7ac65b07" origin="Generated by Gradle"/>
</artifact>
</component>
+ <component group="org.jetbrains.kotlin" name="kotlin-stdlib" version="1.3.11">
+ <artifact name="kotlin-stdlib-1.3.11.jar">
+ <sha256 value="4ff0fcb97f4983b4aaba12668c24ad21b08460915db1b021d8f1d8bee687f21c" origin="Generated by Gradle"/>
+ </artifact>
+ <artifact name="kotlin-stdlib-1.3.11.pom">
+ <sha256 value="ef1da200c453383dadf9e4935f23a4e0f7bf6b8a5bd436b867dfe895bc43ad2e" origin="Generated by Gradle"/>
+ </artifact>
+ </component>
<component group="org.jetbrains.kotlin" name="kotlin-stdlib-common" version="1.3.0">
<artifact name="kotlin-stdlib-common-1.3.0.jar">
<sha256 value="4b161ef619eee0d1a49b1c4f0c4a8e46f4e342573efd8e0106a765f47475fe39" origin="Generated by Gradle"/>
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 570dfce..96d76c1 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=../../../../tools/external/gradle/gradle-8.5-bin.zip
-distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026
+distributionUrl=../../../../tools/external/gradle/gradle-8.6-rc-1-bin.zip
+distributionSha256Sum=a2da4ba435f6728b43554c5845f6f88f79589c3e0018c29ab33eb23bd781255b
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/graphics/filters/filters/lint-baseline.xml b/graphics/filters/filters/lint-baseline.xml
index 9a42e316..7b4b9b9d 100644
--- a/graphics/filters/filters/lint-baseline.xml
+++ b/graphics/filters/filters/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.1.0-alpha07" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.0-beta03)" variant="all" version="8.1.0-alpha07">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="UnsafeOptInUsageError"
@@ -49,6 +49,15 @@
<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@androidx.media3.common.util.UnstableApi` or `@OptIn(markerClass = androidx.media3.common.util.UnstableApi.class)`"
+ errorLine1=" ): SingleFrameGlTextureProcessor {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/graphics/filters/Vignette.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.media3.common.util.UnstableApi` or `@OptIn(markerClass = androidx.media3.common.util.UnstableApi.class)`"
errorLine1=" SingleFrameGlTextureProcessor(useHdr) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -67,6 +76,15 @@
<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@androidx.media3.common.util.UnstableApi` or `@OptIn(markerClass = androidx.media3.common.util.UnstableApi.class)`"
+ errorLine1=" private var glProgram: GlProgram? = null"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/graphics/filters/VignetteProcessor.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.media3.common.util.UnstableApi` or `@OptIn(markerClass = androidx.media3.common.util.UnstableApi.class)`"
errorLine1=" GlProgram(context!!, VERTEX_SHADER_PATH, FRAGMENT_SHADER_PATH)"
errorLine2=" ~~~~~~~~~">
<location
@@ -85,6 +103,15 @@
<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@androidx.media3.common.util.UnstableApi` or `@OptIn(markerClass = androidx.media3.common.util.UnstableApi.class)`"
+ errorLine1=" } catch (e: GlUtil.GlException) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/graphics/filters/VignetteProcessor.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.media3.common.util.UnstableApi` or `@OptIn(markerClass = androidx.media3.common.util.UnstableApi.class)`"
errorLine1=" throw FrameProcessingException(e)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -247,6 +274,15 @@
<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@androidx.media3.common.util.UnstableApi` or `@OptIn(markerClass = androidx.media3.common.util.UnstableApi.class)`"
+ errorLine1=" } catch (e: GlUtil.GlException) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/graphics/filters/VignetteProcessor.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.media3.common.util.UnstableApi` or `@OptIn(markerClass = androidx.media3.common.util.UnstableApi.class)`"
errorLine1=" throw FrameProcessingException(e, presentationTimeUs)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -292,6 +328,15 @@
<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with `@androidx.media3.common.util.UnstableApi` or `@OptIn(markerClass = androidx.media3.common.util.UnstableApi.class)`"
+ errorLine1=" } catch (e: GlUtil.GlException) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/graphics/filters/VignetteProcessor.kt"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.media3.common.util.UnstableApi` or `@OptIn(markerClass = androidx.media3.common.util.UnstableApi.class)`"
errorLine1=" throw FrameProcessingException(e)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
diff --git a/graphics/graphics-core/lint-baseline.xml b/graphics/graphics-core/lint-baseline.xml
index fc2cfd6..2e01a7f 100644
--- a/graphics/graphics-core/lint-baseline.xml
+++ b/graphics/graphics-core/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
<issue
id="NewApi"
@@ -145,76 +145,4 @@
file="src/main/java/androidx/graphics/lowlatency/BufferTransformHintResolver.kt"/>
</issue>
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.KITKAT)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/opengl/EGLExt.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.KITKAT)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/opengl/EGLExt.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.KITKAT)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/graphics/opengl/FrameBufferRenderer.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.KITKAT)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/graphics/opengl/FrameBufferRenderer.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.KITKAT)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/graphics/lowlatency/FrontBufferSyncStrategy.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.KITKAT)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/graphics/surface/SurfaceControlImpl.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(Build.VERSION_CODES.KITKAT)"
- errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/hardware/SyncFenceCompat.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(Build.VERSION_CODES.KITKAT)"
- errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/hardware/SyncFenceV19.kt"/>
- </issue>
-
</issues>
diff --git a/graphics/graphics-core/src/androidTest/java/androidx/graphics/SurfaceTextureRendererTest.kt b/graphics/graphics-core/src/androidTest/java/androidx/graphics/SurfaceTextureRendererTest.kt
index 61c2797..be2f518 100644
--- a/graphics/graphics-core/src/androidTest/java/androidx/graphics/SurfaceTextureRendererTest.kt
+++ b/graphics/graphics-core/src/androidTest/java/androidx/graphics/SurfaceTextureRendererTest.kt
@@ -36,6 +36,7 @@
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Assert.fail
+import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
@@ -62,6 +63,7 @@
}
}
+ @Ignore("b/314825888")
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.Q)
@Test
fun testRenderAfterReleaseDoesNotRender() {
diff --git a/gridlayout/gridlayout/lint-baseline.xml b/gridlayout/gridlayout/lint-baseline.xml
index 7ead648..01f9dd4 100644
--- a/gridlayout/gridlayout/lint-baseline.xml
+++ b/gridlayout/gridlayout/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 7.4.0-alpha08" type="baseline" client="gradle" dependencies="false" name="AGP (7.4.0-alpha08)" variant="all" version="7.4.0-alpha08">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="UnknownNullness"
diff --git a/health/connect/connect-client/lint-baseline.xml b/health/connect/connect-client/lint-baseline.xml
index 0bd9e4c..d70d8fa 100644
--- a/health/connect/connect-client/lint-baseline.xml
+++ b/health/connect/connect-client/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanSuppressTag"
diff --git a/health/health-services-client/lint-baseline.xml b/health/health-services-client/lint-baseline.xml
index f42a2d4..79c2ac7 100644
--- a/health/health-services-client/lint-baseline.xml
+++ b/health/health-services-client/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.1.0" type="baseline" client="gradle" dependencies="false" name="AGP (8.1.0)" variant="all" version="8.1.0">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanParcelableUsage"
diff --git a/heifwriter/heifwriter/lint-baseline.xml b/heifwriter/heifwriter/lint-baseline.xml
index cd4e8c5..b1c02fb 100644
--- a/heifwriter/heifwriter/lint-baseline.xml
+++ b/heifwriter/heifwriter/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.1.0-beta02" type="baseline" client="gradle" dependencies="false" name="AGP (8.1.0-beta02)" variant="all" version="8.1.0-beta02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanSynchronizedMethods"
diff --git a/hilt/hilt-common/api/1.2.0-beta01.txt b/hilt/hilt-common/api/1.2.0-beta01.txt
new file mode 100644
index 0000000..5b7216f
--- /dev/null
+++ b/hilt/hilt-common/api/1.2.0-beta01.txt
@@ -0,0 +1,8 @@
+// Signature format: 4.0
+package androidx.hilt.work {
+
+ @dagger.hilt.GeneratesRootInput @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE) public @interface HiltWorker {
+ }
+
+}
+
diff --git a/hilt/hilt-common/api/restricted_1.2.0-beta01.txt b/hilt/hilt-common/api/restricted_1.2.0-beta01.txt
new file mode 100644
index 0000000..5b7216f
--- /dev/null
+++ b/hilt/hilt-common/api/restricted_1.2.0-beta01.txt
@@ -0,0 +1,8 @@
+// Signature format: 4.0
+package androidx.hilt.work {
+
+ @dagger.hilt.GeneratesRootInput @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE) public @interface HiltWorker {
+ }
+
+}
+
diff --git a/hilt/hilt-navigation-compose/api/1.2.0-beta01.txt b/hilt/hilt-navigation-compose/api/1.2.0-beta01.txt
new file mode 100644
index 0000000..b34c1d5
--- /dev/null
+++ b/hilt/hilt-navigation-compose/api/1.2.0-beta01.txt
@@ -0,0 +1,10 @@
+// Signature format: 4.0
+package androidx.hilt.navigation.compose {
+
+ public final class HiltViewModelKt {
+ method @androidx.compose.runtime.Composable public static inline <reified VM extends androidx.lifecycle.ViewModel> VM hiltViewModel(optional androidx.lifecycle.ViewModelStoreOwner viewModelStoreOwner, optional String? key);
+ method @androidx.compose.runtime.Composable public static inline <reified VM extends androidx.lifecycle.ViewModel, reified VMF> VM hiltViewModel(optional androidx.lifecycle.ViewModelStoreOwner viewModelStoreOwner, optional String? key, kotlin.jvm.functions.Function1<? super VMF,? extends VM> creationCallback);
+ }
+
+}
+
diff --git a/hilt/hilt-navigation-compose/api/res-1.2.0-beta01.txt b/hilt/hilt-navigation-compose/api/res-1.2.0-beta01.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/hilt/hilt-navigation-compose/api/res-1.2.0-beta01.txt
diff --git a/hilt/hilt-navigation-compose/api/restricted_1.2.0-beta01.txt b/hilt/hilt-navigation-compose/api/restricted_1.2.0-beta01.txt
new file mode 100644
index 0000000..8ff83a6
--- /dev/null
+++ b/hilt/hilt-navigation-compose/api/restricted_1.2.0-beta01.txt
@@ -0,0 +1,11 @@
+// Signature format: 4.0
+package androidx.hilt.navigation.compose {
+
+ public final class HiltViewModelKt {
+ method @androidx.compose.runtime.Composable @kotlin.PublishedApi internal static androidx.lifecycle.ViewModelProvider.Factory? createHiltViewModelFactory(androidx.lifecycle.ViewModelStoreOwner viewModelStoreOwner);
+ method @androidx.compose.runtime.Composable public static inline <reified VM extends androidx.lifecycle.ViewModel> VM hiltViewModel(optional androidx.lifecycle.ViewModelStoreOwner viewModelStoreOwner, optional String? key);
+ method @androidx.compose.runtime.Composable public static inline <reified VM extends androidx.lifecycle.ViewModel, reified VMF> VM hiltViewModel(optional androidx.lifecycle.ViewModelStoreOwner viewModelStoreOwner, optional String? key, kotlin.jvm.functions.Function1<? super VMF,? extends VM> creationCallback);
+ }
+
+}
+
diff --git a/hilt/hilt-navigation-fragment/api/1.2.0-beta01.txt b/hilt/hilt-navigation-fragment/api/1.2.0-beta01.txt
new file mode 100644
index 0000000..abbed0e
--- /dev/null
+++ b/hilt/hilt-navigation-fragment/api/1.2.0-beta01.txt
@@ -0,0 +1,10 @@
+// Signature format: 4.0
+package androidx.hilt.navigation.fragment {
+
+ public final class HiltNavGraphViewModelLazyKt {
+ method @MainThread public static inline <reified VM extends androidx.lifecycle.ViewModel> kotlin.Lazy<VM> hiltNavGraphViewModels(androidx.fragment.app.Fragment, @IdRes int navGraphId);
+ method @MainThread public static inline <reified VM extends androidx.lifecycle.ViewModel, reified VMF> kotlin.Lazy<VM> hiltNavGraphViewModels(androidx.fragment.app.Fragment, @IdRes int navGraphId, kotlin.jvm.functions.Function1<? super VMF,? extends VM> creationCallback);
+ }
+
+}
+
diff --git a/hilt/hilt-navigation-fragment/api/res-1.2.0-beta01.txt b/hilt/hilt-navigation-fragment/api/res-1.2.0-beta01.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/hilt/hilt-navigation-fragment/api/res-1.2.0-beta01.txt
diff --git a/hilt/hilt-navigation-fragment/api/restricted_1.2.0-beta01.txt b/hilt/hilt-navigation-fragment/api/restricted_1.2.0-beta01.txt
new file mode 100644
index 0000000..abbed0e
--- /dev/null
+++ b/hilt/hilt-navigation-fragment/api/restricted_1.2.0-beta01.txt
@@ -0,0 +1,10 @@
+// Signature format: 4.0
+package androidx.hilt.navigation.fragment {
+
+ public final class HiltNavGraphViewModelLazyKt {
+ method @MainThread public static inline <reified VM extends androidx.lifecycle.ViewModel> kotlin.Lazy<VM> hiltNavGraphViewModels(androidx.fragment.app.Fragment, @IdRes int navGraphId);
+ method @MainThread public static inline <reified VM extends androidx.lifecycle.ViewModel, reified VMF> kotlin.Lazy<VM> hiltNavGraphViewModels(androidx.fragment.app.Fragment, @IdRes int navGraphId, kotlin.jvm.functions.Function1<? super VMF,? extends VM> creationCallback);
+ }
+
+}
+
diff --git a/hilt/hilt-navigation/api/1.2.0-beta01.txt b/hilt/hilt-navigation/api/1.2.0-beta01.txt
new file mode 100644
index 0000000..551dabc
--- /dev/null
+++ b/hilt/hilt-navigation/api/1.2.0-beta01.txt
@@ -0,0 +1,10 @@
+// Signature format: 4.0
+package androidx.hilt.navigation {
+
+ public final class HiltViewModelFactory {
+ method public static androidx.lifecycle.ViewModelProvider.Factory create(android.content.Context context, androidx.lifecycle.ViewModelProvider.Factory delegateFactory);
+ method public static androidx.lifecycle.ViewModelProvider.Factory create(android.content.Context context, androidx.navigation.NavBackStackEntry navBackStackEntry);
+ }
+
+}
+
diff --git a/hilt/hilt-navigation/api/res-1.2.0-beta01.txt b/hilt/hilt-navigation/api/res-1.2.0-beta01.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/hilt/hilt-navigation/api/res-1.2.0-beta01.txt
diff --git a/hilt/hilt-navigation/api/restricted_1.2.0-beta01.txt b/hilt/hilt-navigation/api/restricted_1.2.0-beta01.txt
new file mode 100644
index 0000000..551dabc
--- /dev/null
+++ b/hilt/hilt-navigation/api/restricted_1.2.0-beta01.txt
@@ -0,0 +1,10 @@
+// Signature format: 4.0
+package androidx.hilt.navigation {
+
+ public final class HiltViewModelFactory {
+ method public static androidx.lifecycle.ViewModelProvider.Factory create(android.content.Context context, androidx.lifecycle.ViewModelProvider.Factory delegateFactory);
+ method public static androidx.lifecycle.ViewModelProvider.Factory create(android.content.Context context, androidx.navigation.NavBackStackEntry navBackStackEntry);
+ }
+
+}
+
diff --git a/hilt/hilt-work/api/1.2.0-beta01.txt b/hilt/hilt-work/api/1.2.0-beta01.txt
new file mode 100644
index 0000000..09dc5535
--- /dev/null
+++ b/hilt/hilt-work/api/1.2.0-beta01.txt
@@ -0,0 +1,9 @@
+// Signature format: 4.0
+package androidx.hilt.work {
+
+ public final class HiltWorkerFactory extends androidx.work.WorkerFactory {
+ method public androidx.work.ListenableWorker? createWorker(android.content.Context, String, androidx.work.WorkerParameters);
+ }
+
+}
+
diff --git a/hilt/hilt-work/api/res-1.2.0-beta01.txt b/hilt/hilt-work/api/res-1.2.0-beta01.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/hilt/hilt-work/api/res-1.2.0-beta01.txt
diff --git a/hilt/hilt-work/api/restricted_1.2.0-beta01.txt b/hilt/hilt-work/api/restricted_1.2.0-beta01.txt
new file mode 100644
index 0000000..db6037f
--- /dev/null
+++ b/hilt/hilt-work/api/restricted_1.2.0-beta01.txt
@@ -0,0 +1,13 @@
+// Signature format: 4.0
+package androidx.hilt.work {
+
+ public final class HiltWorkerFactory extends androidx.work.WorkerFactory {
+ method public androidx.work.ListenableWorker? createWorker(android.content.Context, String, androidx.work.WorkerParameters);
+ }
+
+ @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public interface WorkerAssistedFactory<T extends androidx.work.ListenableWorker> {
+ method public T create(android.content.Context, androidx.work.WorkerParameters);
+ }
+
+}
+
diff --git a/leanback/leanback-preference/lint-baseline.xml b/leanback/leanback-preference/lint-baseline.xml
index b442697..b938077 100644
--- a/leanback/leanback-preference/lint-baseline.xml
+++ b/leanback/leanback-preference/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-alpha15" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-alpha15)" variant="all" version="8.2.0-alpha15">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="RestrictedApiAndroidX"
diff --git a/leanback/leanback/lint-baseline.xml b/leanback/leanback/lint-baseline.xml
index 233e326..2a61548 100644
--- a/leanback/leanback/lint-baseline.xml
+++ b/leanback/leanback/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
@@ -1452,312 +1452,6 @@
<issue
id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/widget/BackgroundHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" int alpha = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/app/BackgroundManager.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="kitkat/androidx/leanback/transition/CustomChangeBounds.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 19 || Build.VERSION.SDK_INT >= 21) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/LeanbackTransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 19 || Build.VERSION.SDK_INT >= 21) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/LeanbackTransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/widget/picker/PickerUtility.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="kitkat/androidx/leanback/transition/Scale.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="kitkat/androidx/leanback/transition/SlideKitkat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/TransitionHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
message="This folder configuration (`v19`) is unnecessary; `minSdkVersion` is 19. Merge all the resources in this folder into `transition`.">
<location
file="src/main/res/transition-v19"/>
diff --git a/libraryversions.toml b/libraryversions.toml
index 7028b24..1a8a362 100644
--- a/libraryversions.toml
+++ b/libraryversions.toml
@@ -23,7 +23,7 @@
CAMERA_VIEWFINDER_COMPOSE = "1.0.0-alpha01"
CARDVIEW = "1.1.0-alpha01"
CAR_APP = "1.7.0-alpha01"
-COLLECTION = "1.4.0-beta02"
+COLLECTION = "1.5.0-alpha01"
COMPOSE = "1.7.0-alpha01"
COMPOSE_COMPILER = "1.5.8"
COMPOSE_MATERIAL3 = "1.2.0-beta02"
@@ -79,9 +79,9 @@
HEALTH_CONNECT = "1.1.0-alpha07"
HEALTH_SERVICES_CLIENT = "1.1.0-alpha02"
HEIFWRITER = "1.1.0-alpha03"
-HILT = "1.2.0-alpha01"
-HILT_NAVIGATION = "1.2.0-alpha01"
-HILT_NAVIGATION_COMPOSE = "1.2.0-alpha01"
+HILT = "1.2.0-beta01"
+HILT_NAVIGATION = "1.2.0-beta01"
+HILT_NAVIGATION_COMPOSE = "1.2.0-beta01"
INPUT_MOTIONPREDICTION = "1.0.0-beta03"
INSPECTION = "1.0.0"
INTERPOLATOR = "1.1.0-alpha01"
diff --git a/lint-checks/integration-tests/lint-baseline.xml b/lint-checks/integration-tests/lint-baseline.xml
index 0377685..99036fe 100644
--- a/lint-checks/integration-tests/lint-baseline.xml
+++ b/lint-checks/integration-tests/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="MissingClass"
@@ -111,7 +111,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" performStopActivity3ParamsMethod.invoke(activityThread,"
errorLine2=" ^">
<location
@@ -120,7 +120,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" performStopActivity2ParamsMethod.invoke(activityThread,"
errorLine2=" ^">
<location
@@ -129,7 +129,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" performStopActivity3ParamsMethod!!.invoke("
errorLine2=" ^">
<location
@@ -138,7 +138,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" performStopActivity2ParamsMethod!!.invoke("
errorLine2=" ^">
<location
diff --git a/lint-checks/src/main/java/androidx/build/lint/BanRestrictToTestsScope.kt b/lint-checks/src/main/java/androidx/build/lint/BanRestrictToTestsScope.kt
index 487fd61..5fed4c2 100644
--- a/lint-checks/src/main/java/androidx/build/lint/BanRestrictToTestsScope.kt
+++ b/lint-checks/src/main/java/androidx/build/lint/BanRestrictToTestsScope.kt
@@ -18,7 +18,6 @@
package androidx.build.lint
-import com.android.tools.lint.checks.getFqName
import com.android.tools.lint.client.api.UElementHandler
import com.android.tools.lint.detector.api.Category
import com.android.tools.lint.detector.api.Detector
diff --git a/lint-checks/src/main/java/androidx/build/lint/BanUncheckedReflection.kt b/lint-checks/src/main/java/androidx/build/lint/BanUncheckedReflection.kt
index 7bab6f3..b448426 100644
--- a/lint-checks/src/main/java/androidx/build/lint/BanUncheckedReflection.kt
+++ b/lint-checks/src/main/java/androidx/build/lint/BanUncheckedReflection.kt
@@ -71,7 +71,8 @@
val incident = Incident(context)
.issue(ISSUE)
.location(context.getLocation(node))
- .message("Calling `Method.invoke` without an SDK check")
+ .message("Method.invoke requires both an upper and lower SDK bounds checks to be" +
+ " safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API.")
.scope(node)
context.report(incident)
}
diff --git a/lint-checks/src/main/java/androidx/build/lint/BanVisibleForTestingParams.kt b/lint-checks/src/main/java/androidx/build/lint/BanVisibleForTestingParams.kt
index d2bc33d..d668982 100644
--- a/lint-checks/src/main/java/androidx/build/lint/BanVisibleForTestingParams.kt
+++ b/lint-checks/src/main/java/androidx/build/lint/BanVisibleForTestingParams.kt
@@ -18,7 +18,6 @@
package androidx.build.lint
-import com.android.tools.lint.checks.getFqName
import com.android.tools.lint.client.api.UElementHandler
import com.android.tools.lint.detector.api.Category
import com.android.tools.lint.detector.api.Detector
diff --git a/lint-checks/src/main/java/androidx/build/lint/LintUtils.kt b/lint-checks/src/main/java/androidx/build/lint/LintUtils.kt
new file mode 100644
index 0000000..ab0ba70
--- /dev/null
+++ b/lint-checks/src/main/java/androidx/build/lint/LintUtils.kt
@@ -0,0 +1,38 @@
+/*
+ * 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.build.lint
+
+import com.intellij.psi.PsiElement
+import com.intellij.psi.PsiMember
+import org.jetbrains.kotlin.asJava.namedUnwrappedElement
+import org.jetbrains.kotlin.psi.KtNamedDeclaration
+
+/*
+ * See ag/25264517. This was previously a public extension function that is now private.
+ * It's currently used by [BanRestrictToTestsScope] and [BanVisibleForTestingParams].
+ */
+internal fun PsiElement.getFqName(): String? =
+ when (val element = namedUnwrappedElement) {
+ is PsiMember ->
+ element.getName()?.let { name ->
+ val prefix = element.containingClass?.qualifiedName
+ (if (prefix != null) "$prefix.$name" else name)
+ }
+
+ is KtNamedDeclaration -> element.fqName.toString()
+ else -> null
+ }
diff --git a/lint-checks/src/test/java/androidx/build/lint/BanUncheckedReflectionTest.kt b/lint-checks/src/test/java/androidx/build/lint/BanUncheckedReflectionTest.kt
index 2178918..130f667 100644
--- a/lint-checks/src/test/java/androidx/build/lint/BanUncheckedReflectionTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/BanUncheckedReflectionTest.kt
@@ -39,10 +39,10 @@
/* ktlint-disable max-line-length */
val expected = """
-src/androidx/sample/core/app/ActivityRecreator.java:261: Error: Calling Method.invoke without an SDK check [BanUncheckedReflection]
+src/androidx/sample/core/app/ActivityRecreator.java:261: Error: Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API. [BanUncheckedReflection]
performStopActivity3ParamsMethod.invoke(activityThread,
^
-src/androidx/sample/core/app/ActivityRecreator.java:264: Error: Calling Method.invoke without an SDK check [BanUncheckedReflection]
+src/androidx/sample/core/app/ActivityRecreator.java:264: Error: Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API. [BanUncheckedReflection]
performStopActivity2ParamsMethod.invoke(activityThread,
^
2 errors, 0 warnings
@@ -61,10 +61,10 @@
/* ktlint-disable max-line-length */
val expected = """
-src/androidx/sample/core/app/ActivityRecreatorKt.kt:176: Error: Calling Method.invoke without an SDK check [BanUncheckedReflection]
+src/androidx/sample/core/app/ActivityRecreatorKt.kt:176: Error: Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API. [BanUncheckedReflection]
performStopActivity3ParamsMethod!!.invoke(
^
-src/androidx/sample/core/app/ActivityRecreatorKt.kt:181: Error: Calling Method.invoke without an SDK check [BanUncheckedReflection]
+src/androidx/sample/core/app/ActivityRecreatorKt.kt:181: Error: Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API. [BanUncheckedReflection]
performStopActivity2ParamsMethod!!.invoke(
^
2 errors, 0 warnings
diff --git a/lint-checks/src/test/java/androidx/build/lint/RestrictToDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/RestrictToDetectorTest.kt
index 3dbe698..8b703e9 100644
--- a/lint-checks/src/test/java/androidx/build/lint/RestrictToDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/RestrictToDetectorTest.kt
@@ -553,10 +553,13 @@
.run()
.expect(
"""
+ src/test/pkg/Outer.java:8: Error: Inner can only be accessed from tests [RestrictedApiAndroidX]
+ private Inner innerInstance;
+ ~~~~~
src/test/pkg/Outer.java:18: Error: Inner.method can only be called from tests [RestrictedApiAndroidX]
innerInstance.method();
~~~~~~
- 1 errors, 0 warnings
+ 2 errors, 0 warnings
"""
)
}
diff --git a/media/media/lint-baseline.xml b/media/media/lint-baseline.xml
index 8f842ee..5604b10 100644
--- a/media/media/lint-baseline.xml
+++ b/media/media/lint-baseline.xml
@@ -1,122 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media/AudioFocusRequestCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media/session/MediaButtonReceiver.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/android/support/v4/media/MediaMetadataCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/android/support/v4/media/MediaMetadataCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (android.os.Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (android.os.Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 15) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 15"
- errorLine1=" @RequiresApi(15)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media/app/NotificationCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (ratingObj != null && Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/android/support/v4/media/RatingCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (mRatingObj == null && Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/android/support/v4/media/RatingCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/android/support/v4/media/RatingCompat.java"/>
- </issue>
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="LambdaLast"
diff --git a/media/version-compat-tests/lib/lint-baseline.xml b/media/version-compat-tests/lib/lint-baseline.xml
index 42ca34d..32be4ad 100644
--- a/media/version-compat-tests/lib/lint-baseline.xml
+++ b/media/version-compat-tests/lib/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
@@ -11,42 +11,6 @@
</issue>
<issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/android/support/mediacompat/testlib/util/IntentUtil.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/android/support/mediacompat/testlib/util/IntentUtil.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/android/support/mediacompat/testlib/util/IntentUtil.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/android/support/mediacompat/testlib/util/IntentUtil.java"/>
- </issue>
-
- <issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public void writeToParcel(Parcel dest, int flags) {"
diff --git a/media2/integration-tests/testapp/lint-baseline.xml b/media2/integration-tests/testapp/lint-baseline.xml
index 7db1f02..22825866 100644
--- a/media2/integration-tests/testapp/lint-baseline.xml
+++ b/media2/integration-tests/testapp/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-alpha15" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-alpha15)" variant="all" version="8.2.0-alpha15">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="ClassVerificationFailure"
diff --git a/media2/media2-common/lint-baseline.xml b/media2/media2-common/lint-baseline.xml
index bb07e11..524d60d 100644
--- a/media2/media2-common/lint-baseline.xml
+++ b/media2/media2-common/lint-baseline.xml
@@ -1,5 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" List<ParcelImpl> parcelImplList = new ArrayList<>();"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/common/MediaMetadata.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" List<ParcelImpl> parcelImplList = mBitmapListSlice.getList();"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/common/MediaMetadata.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public static ParcelImpl toParcelable(@Nullable VersionedParcelable item) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/common/MediaParcelUtils.java"/>
+ </issue>
<issue
id="RestrictedApiAndroidX"
@@ -13,6 +40,42 @@
<issue
id="RestrictedApiAndroidX"
message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public static List<ParcelImpl> toParcelableList("
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/common/MediaParcelUtils.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" List<ParcelImpl> list = new ArrayList<>();"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/common/MediaParcelUtils.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public static <T extends VersionedParcelable> T fromParcelable(@NonNull ParcelImpl p) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/common/MediaParcelUtils.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" @NonNull List<ParcelImpl> parcelList) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/common/MediaParcelUtils.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
errorLine1=" private static class MediaItemParcelImpl extends ParcelImpl {"
errorLine2=" ~~~~~~~~~~">
<location
@@ -47,12 +110,66 @@
</issue>
<issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final List<ParcelImpl> mList;"
+ errorLine2=" ~~~~~~~~~~">
<location
- file="src/main/java/androidx/media2/common/ClassVerificationHelper.java"/>
+ file="src/main/java/androidx/media2/common/ParcelImplListSlice.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public ParcelImplListSlice(@NonNull List<ParcelImpl> list) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/common/ParcelImplListSlice.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl parcelImpl = p.readParcelable(ParcelImpl.class.getClassLoader());"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/common/ParcelImplListSlice.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl parcelImpl = reply.readParcelable("
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/common/ParcelImplListSlice.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public @NonNull List<ParcelImpl> getList() {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/common/ParcelImplListSlice.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl parcelable = mList.get(i);"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/common/ParcelImplListSlice.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl parcelable = mList.get(i);"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/common/ParcelImplListSlice.java"/>
</issue>
<issue
@@ -67,33 +184,6 @@
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" Executor executor, OnMetadataChangedListener listener) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/common/MediaItem.java"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" Executor executor, OnMetadataChangedListener listener) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/common/MediaItem.java"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" public void removeOnMetadataChangedListener(OnMetadataChangedListener listener) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/common/MediaItem.java"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public void writeToParcel(Parcel dest, int flags) {"
errorLine2=" ~~~~~~">
<location
diff --git a/media2/media2-player/lint-baseline.xml b/media2/media2-player/lint-baseline.xml
index 98ca85a..0eb9903 100644
--- a/media2/media2-player/lint-baseline.xml
+++ b/media2/media2-player/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="NewApi"
@@ -471,7 +471,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" return (FileDescriptor) method.invoke(object, fileDescriptor);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -480,7 +480,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" method.invoke(object, fileDescriptor, position, /* whence= */ SEEK_SET);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -489,7 +489,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" return (FileDescriptor) method.invoke(object, fileDescriptor);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -643,15 +643,6 @@
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" public PersistableBundle getMetrics() {"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/player/MediaPlayer.java"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" MediaPlayer2 mp, MediaItem item, int width, int height) { }"
errorLine2=" ~~~~~~~~~~~~">
<location
@@ -868,46 +859,10 @@
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" public android.media.PlaybackParams getPlaybackParams() {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/player/PlaybackParams.java"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" public Builder(android.media.PlaybackParams playbackParams) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/player/PlaybackParams.java"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" void onCcData(byte[] data, long timeUs);"
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/media2/player/TextRenderer.java"/>
</issue>
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" public TimedMetaData(long timestampUs, byte[] metaData) {"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/media2/player/TimedMetaData.java"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" public byte[] getMetaData() {"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/media2/player/TimedMetaData.java"/>
- </issue>
-
</issues>
diff --git a/media2/media2-session/lint-baseline.xml b/media2/media2-session/lint-baseline.xml
index 910c728..c66e18b 100644
--- a/media2/media2-session/lint-baseline.xml
+++ b/media2/media2-session/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="WrongConstant"
@@ -48,6 +48,231 @@
<issue
id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onSessionResult(final int seq, final ParcelImpl sessionResult) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onLibraryResult(final int seq, final ParcelImpl libraryResult) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onCurrentMediaItemChanged(int seq, final ParcelImpl item, final int currentIdx,"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onBufferingStateChanged(int seq, final ParcelImpl item, @BuffState final int state,"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl metadata, final int currentIdx, final int previousIdx,"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onPlaylistMetadataChanged(int seq, final ParcelImpl metadata)"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onPlaybackInfoChanged(int seq, final ParcelImpl playbackInfo)"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onVideoSizeChanged(int seq, final ParcelImpl item, final ParcelImpl videoSize) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onVideoSizeChanged(int seq, final ParcelImpl item, final ParcelImpl videoSize) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onSubtitleData(int seq, final ParcelImpl item, final ParcelImpl track,"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onSubtitleData(int seq, final ParcelImpl item, final ParcelImpl track,"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl data) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onConnected(int seq, ParcelImpl connectionResult) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onSetCustomLayout(final int seq, final List<ParcelImpl> commandButtonList) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onAllowedCommandsChanged(int seq, final ParcelImpl commands) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onCustomCommand(final int seq, final ParcelImpl commandParcel, final Bundle args) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onTrackInfoChanged(final int seq, final List<ParcelImpl> trackInfoList,"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl selectedVideoParcel, final ParcelImpl selectedAudioParcel,"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl selectedVideoParcel, final ParcelImpl selectedAudioParcel,"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl selectedSubtitleParcel, final ParcelImpl selectedMetadataParcel) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl selectedSubtitleParcel, final ParcelImpl selectedMetadataParcel) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onTrackSelected(final int seq, final ParcelImpl trackInfoParcel) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void onTrackDeselected(final int seq, final ParcelImpl trackInfoParcel) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl libraryParams) throws RuntimeException {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl libraryParams) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaControllerStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="MediaBrowserServiceCompat.onSubscribe can only be called from within the same library (androidx.media:media)"
errorLine1=" public void onSubscribe(final String id, final Bundle option) {"
errorLine2=" ~~~~~~~~~~~">
@@ -65,66 +290,228 @@
</issue>
<issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void connect(final IMediaController caller, final ParcelImpl connectionRequest) {"
+ errorLine2=" ~~~~~~~~~~">
<location
- file="src/main/java/androidx/media2/session/MediaControllerImplLegacy.java"/>
+ file="src/main/java/androidx/media2/session/MediaSessionServiceImplBase.java"/>
</issue>
<issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void connect(final IMediaController caller, int seq, ParcelImpl connectionRequest)"
+ errorLine2=" ~~~~~~~~~~">
<location
- file="src/main/java/androidx/media2/session/MediaSessionImplBase.java"/>
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
</issue>
<issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" || (Build.VERSION.SDK_INT >= 19 && value instanceof android.media.Rating)) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl sessionResult) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl command, final Bundle args) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl ratingParcelable) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl metadata) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl metadata) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void selectTrack(IMediaController caller, int seq, final ParcelImpl trackInfoParcel) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public void deselectTrack(IMediaController caller, int seq, final ParcelImpl trackInfoParcel) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl libraryParams) throws RuntimeException {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final int page, final int pageSize, final ParcelImpl libraryParams)"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl libraryParams) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final int page, final int pageSize, final ParcelImpl libraryParams) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl libraryParams) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" ParcelImpl videoSizeParcel = MediaParcelUtils.toParcelable(videoSize);"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" List<ParcelImpl> trackInfoList = MediaParcelUtils.toParcelableList(tracks);"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" ParcelImpl itemParcel = MediaParcelUtils.toParcelable(item);"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" ParcelImpl trackParcel = MediaParcelUtils.toParcelable(track);"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" ParcelImpl dataParcel = MediaParcelUtils.toParcelable(data);"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaSessionStub.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" List<ParcelImpl> parcelImplList = listSlice.getList();"
+ errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/media2/session/MediaUtils.java"/>
</issue>
<issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl itemParcelImpl = parcelImplList.get(i);"
+ errorLine2=" ~~~~~~~~~~">
<location
- file="src/main/java/androidx/media2/session/SessionToken.java"/>
+ file="src/main/java/androidx/media2/session/MediaUtils.java"/>
</issue>
<issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" public void setTimeDiff(Long timeDiff) {"
- errorLine2=" ~~~~">
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" public static List<ParcelImpl> convertCommandButtonListToParcelImplList("
+ errorLine2=" ~~~~~~~~~~">
<location
- file="src/main/java/androidx/media2/session/MediaController.java"/>
+ file="src/main/java/androidx/media2/session/MediaUtils.java"/>
</issue>
<issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" public IBinder onBind(@NonNull Intent intent) {"
- errorLine2=" ~~~~~~~">
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" List<ParcelImpl> parcelImplList = new ArrayList<>();"
+ errorLine2=" ~~~~~~~~~~">
<location
- file="src/main/java/androidx/media2/session/MediaLibraryService.java"/>
+ file="src/main/java/androidx/media2/session/MediaUtils.java"/>
</issue>
<issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" public MediaSessionCompat getSessionCompat() {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" List<ParcelImpl> itemParcelableList = new ArrayList<>();"
+ errorLine2=" ~~~~~~~~~~">
<location
- file="src/main/java/androidx/media2/session/MediaSession.java"/>
+ file="src/main/java/androidx/media2/session/MediaUtils.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ParcelImpl can only be accessed from within the same library (androidx.versionedparcelable:versionedparcelable)"
+ errorLine1=" final ParcelImpl itemParcelImpl = MediaParcelUtils.toParcelable(item);"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/session/MediaUtils.java"/>
</issue>
<issue
@@ -424,40 +811,4 @@
file="src/main/java/androidx/media2/session/MediaUtils.java"/>
</issue>
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" public ComponentName getComponentName() {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/session/SessionToken.java"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" public Object getBinder() {"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/media2/session/SessionToken.java"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" void onSessionTokenCreated(MediaSessionCompat.Token compatToken, SessionToken sessionToken);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/session/SessionToken.java"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
- errorLine1=" void onSessionTokenCreated(MediaSessionCompat.Token compatToken, SessionToken sessionToken);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/session/SessionToken.java"/>
- </issue>
-
</issues>
diff --git a/media2/media2-session/version-compat-tests/common/lint-baseline.xml b/media2/media2-session/version-compat-tests/common/lint-baseline.xml
index 67787e2..4a84ecd 100644
--- a/media2/media2-session/version-compat-tests/common/lint-baseline.xml
+++ b/media2/media2-session/version-compat-tests/common/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
<issue
id="BanThreadSleep"
@@ -11,15 +11,6 @@
</issue>
<issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/test/common/TestUtils.java"/>
- </issue>
-
- <issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public static void waitFor(final PollingCheckCondition condition) {"
diff --git a/media2/media2-widget/lint-baseline.xml b/media2/media2-widget/lint-baseline.xml
index 1ad87ad..e66d3e9 100644
--- a/media2/media2-widget/lint-baseline.xml
+++ b/media2/media2-widget/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="NewApi"
@@ -82,157 +82,4 @@
file="src/main/java/androidx/media2/widget/SubtitleController.java"/>
</issue>
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/CaptionStyle.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/CaptionStyle.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/CaptioningManagerHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/Cea708CaptionRenderer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/ClosedCaptionWidget.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/ClosedCaptionWidget.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/ClosedCaptionWidget.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (VERSION.SDK_INT < 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/ClosedCaptionWidget.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/SubtitleController.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/SubtitleController.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/SubtitleController.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/SubtitleController.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" Locale selectedLocale = VERSION.SDK_INT >= 19"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/SubtitleController.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" boolean selectForced = VERSION.SDK_INT >= 19"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/SubtitleController.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" boolean captionIsEnabledOnSystem = VERSION.SDK_INT >= 19"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/SubtitleController.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/SubtitleController.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (mTracks.size() == 0 && VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media2/widget/SubtitleController.java"/>
- </issue>
-
</issues>
diff --git a/mediarouter/mediarouter/lint-baseline.xml b/mediarouter/mediarouter/lint-baseline.xml
index a65aeb4..5c1cb4f 100644
--- a/mediarouter/mediarouter/lint-baseline.xml
+++ b/mediarouter/mediarouter/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
@@ -46,184 +46,4 @@
file="src/main/java/androidx/mediarouter/media/RemotePlaybackClient.java"/>
</issue>
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/app/MediaRouteDynamicControllerDialog.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/app/MediaRouteDynamicControllerDialog.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRouterApi16Impl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRouterApi16Impl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRouterApi16Impl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 16 || Build.VERSION.SDK_INT > 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRouterApi16Impl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 16 || Build.VERSION.SDK_INT > 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRouterApi16Impl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 16 || Build.VERSION.SDK_INT > 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRouterApi16Impl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 16 || Build.VERSION.SDK_INT > 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRouterApi16Impl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1="@RequiresApi(17)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRouterApi17Impl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT != 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRouterApi17Impl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT != 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRouterApi17Impl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/RemoteControlClientCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/RemoteControlClientCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/SystemMediaRouteProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/SystemMediaRouteProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/SystemMediaRouteProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/SystemMediaRouteProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/SystemMediaRouteProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/SystemMediaRouteProvider.java"/>
- </issue>
-
</issues>
diff --git a/metrics/metrics-performance/lint-baseline.xml b/metrics/metrics-performance/lint-baseline.xml
index 136717c..69b94ed 100644
--- a/metrics/metrics-performance/lint-baseline.xml
+++ b/metrics/metrics-performance/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
<issue
id="BanThreadSleep"
@@ -19,49 +19,4 @@
file="src/androidTest/java/androidx/metrics/performance/test/MyCustomView.kt"/>
</issue>
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" Build.VERSION.SDK_INT >= 16 -> {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/metrics/performance/JankStats.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/metrics/performance/JankStatsApi16Impl.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(16)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/metrics/performance/JankStatsApi16Impl.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/metrics/performance/JankStatsInternalsForTesting.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/metrics/performance/JankStatsInternalsForTesting.kt"/>
- </issue>
-
</issues>
diff --git a/navigation/navigation-runtime/build.gradle b/navigation/navigation-runtime/build.gradle
index 9976f83..443a46b 100644
--- a/navigation/navigation-runtime/build.gradle
+++ b/navigation/navigation-runtime/build.gradle
@@ -36,7 +36,7 @@
api("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
api("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2")
api(projectOrArtifact(":annotation:annotation-experimental"))
- implementation('androidx.collection:collection:1.0.0')
+ implementation('androidx.collection:collection:1.1.0')
api(libs.kotlinStdlib)
androidTestImplementation(projectOrArtifact(":lifecycle:lifecycle-runtime-testing"))
diff --git a/paging/integration-tests/testapp/lint-baseline.xml b/paging/integration-tests/testapp/lint-baseline.xml
index 2058561..f0674aa 100644
--- a/paging/integration-tests/testapp/lint-baseline.xml
+++ b/paging/integration-tests/testapp/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha02" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="MissingInflatedId"
diff --git a/paging/paging-common/api/current.txt b/paging/paging-common/api/current.txt
index 08d8a615..9640e44 100644
--- a/paging/paging-common/api/current.txt
+++ b/paging/paging-common/api/current.txt
@@ -269,7 +269,7 @@
}
public final class PagedListKt {
- method @Deprecated @kotlin.jvm.JvmSynthetic public static <Key extends java.lang.Object, Value> androidx.paging.PagedList<Value> PagedList(androidx.paging.DataSource<Key,Value> dataSource, androidx.paging.PagedList.Config config, java.util.concurrent.Executor notifyExecutor, java.util.concurrent.Executor fetchExecutor, optional androidx.paging.PagedList.BoundaryCallback<Value>? boundaryCallback, optional Key? initialKey);
+ method @Deprecated @kotlin.jvm.JvmSynthetic public static <Key, Value> androidx.paging.PagedList<Value> PagedList(androidx.paging.DataSource<Key,Value> dataSource, androidx.paging.PagedList.Config config, java.util.concurrent.Executor notifyExecutor, java.util.concurrent.Executor fetchExecutor, optional androidx.paging.PagedList.BoundaryCallback<Value>? boundaryCallback, optional Key? initialKey);
}
public final class Pager<Key, Value> {
@@ -323,7 +323,7 @@
method @CheckResult public static <T> androidx.paging.PagingData<T> filter(androidx.paging.PagingData<T>, java.util.concurrent.Executor executor, kotlin.jvm.functions.Function1<? super T,java.lang.Boolean> predicate);
method @CheckResult @kotlin.jvm.JvmSynthetic public static <T> androidx.paging.PagingData<T> filter(androidx.paging.PagingData<T>, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super java.lang.Boolean>,?> predicate);
method @CheckResult public static <T, R> androidx.paging.PagingData<R> flatMap(androidx.paging.PagingData<T>, java.util.concurrent.Executor executor, kotlin.jvm.functions.Function1<? super T,? extends java.lang.Iterable<? extends R>> transform);
- method @CheckResult @kotlin.jvm.JvmSynthetic public static <T extends java.lang.Object, R> androidx.paging.PagingData<R> flatMap(androidx.paging.PagingData<T>, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super java.lang.Iterable<? extends R>>,?> transform);
+ method @CheckResult @kotlin.jvm.JvmSynthetic public static <T, R> androidx.paging.PagingData<R> flatMap(androidx.paging.PagingData<T>, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super java.lang.Iterable<? extends R>>,?> transform);
method @CheckResult public static <T> androidx.paging.PagingData<T> insertFooterItem(androidx.paging.PagingData<T>, optional androidx.paging.TerminalSeparatorType terminalSeparatorType, T item);
method @CheckResult public static <T> androidx.paging.PagingData<T> insertFooterItem(androidx.paging.PagingData<T>, T item);
method @CheckResult public static <T> androidx.paging.PagingData<T> insertHeaderItem(androidx.paging.PagingData<T>, optional androidx.paging.TerminalSeparatorType terminalSeparatorType, T item);
@@ -332,7 +332,7 @@
method @CheckResult @kotlin.jvm.JvmSynthetic public static <T extends R, R> androidx.paging.PagingData<R> insertSeparators(androidx.paging.PagingData<T>, optional androidx.paging.TerminalSeparatorType terminalSeparatorType, kotlin.jvm.functions.Function3<? super T?,? super T?,? super kotlin.coroutines.Continuation<? super R>?,?> generator);
method @CheckResult public static <R, T extends R> androidx.paging.PagingData<R> insertSeparators(androidx.paging.PagingData<T>, java.util.concurrent.Executor executor, kotlin.jvm.functions.Function2<? super T?,? super T?,? extends R?> generator);
method @CheckResult public static <T, R> androidx.paging.PagingData<R> map(androidx.paging.PagingData<T>, java.util.concurrent.Executor executor, kotlin.jvm.functions.Function1<? super T,? extends R> transform);
- method @CheckResult @kotlin.jvm.JvmSynthetic public static <T extends java.lang.Object, R> androidx.paging.PagingData<R> map(androidx.paging.PagingData<T>, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super R>,?> transform);
+ method @CheckResult @kotlin.jvm.JvmSynthetic public static <T, R> androidx.paging.PagingData<R> map(androidx.paging.PagingData<T>, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super R>,?> transform);
}
public abstract class PagingSource<Key, Value> {
diff --git a/paging/paging-common/api/restricted_current.txt b/paging/paging-common/api/restricted_current.txt
index 08d8a615..9640e44 100644
--- a/paging/paging-common/api/restricted_current.txt
+++ b/paging/paging-common/api/restricted_current.txt
@@ -269,7 +269,7 @@
}
public final class PagedListKt {
- method @Deprecated @kotlin.jvm.JvmSynthetic public static <Key extends java.lang.Object, Value> androidx.paging.PagedList<Value> PagedList(androidx.paging.DataSource<Key,Value> dataSource, androidx.paging.PagedList.Config config, java.util.concurrent.Executor notifyExecutor, java.util.concurrent.Executor fetchExecutor, optional androidx.paging.PagedList.BoundaryCallback<Value>? boundaryCallback, optional Key? initialKey);
+ method @Deprecated @kotlin.jvm.JvmSynthetic public static <Key, Value> androidx.paging.PagedList<Value> PagedList(androidx.paging.DataSource<Key,Value> dataSource, androidx.paging.PagedList.Config config, java.util.concurrent.Executor notifyExecutor, java.util.concurrent.Executor fetchExecutor, optional androidx.paging.PagedList.BoundaryCallback<Value>? boundaryCallback, optional Key? initialKey);
}
public final class Pager<Key, Value> {
@@ -323,7 +323,7 @@
method @CheckResult public static <T> androidx.paging.PagingData<T> filter(androidx.paging.PagingData<T>, java.util.concurrent.Executor executor, kotlin.jvm.functions.Function1<? super T,java.lang.Boolean> predicate);
method @CheckResult @kotlin.jvm.JvmSynthetic public static <T> androidx.paging.PagingData<T> filter(androidx.paging.PagingData<T>, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super java.lang.Boolean>,?> predicate);
method @CheckResult public static <T, R> androidx.paging.PagingData<R> flatMap(androidx.paging.PagingData<T>, java.util.concurrent.Executor executor, kotlin.jvm.functions.Function1<? super T,? extends java.lang.Iterable<? extends R>> transform);
- method @CheckResult @kotlin.jvm.JvmSynthetic public static <T extends java.lang.Object, R> androidx.paging.PagingData<R> flatMap(androidx.paging.PagingData<T>, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super java.lang.Iterable<? extends R>>,?> transform);
+ method @CheckResult @kotlin.jvm.JvmSynthetic public static <T, R> androidx.paging.PagingData<R> flatMap(androidx.paging.PagingData<T>, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super java.lang.Iterable<? extends R>>,?> transform);
method @CheckResult public static <T> androidx.paging.PagingData<T> insertFooterItem(androidx.paging.PagingData<T>, optional androidx.paging.TerminalSeparatorType terminalSeparatorType, T item);
method @CheckResult public static <T> androidx.paging.PagingData<T> insertFooterItem(androidx.paging.PagingData<T>, T item);
method @CheckResult public static <T> androidx.paging.PagingData<T> insertHeaderItem(androidx.paging.PagingData<T>, optional androidx.paging.TerminalSeparatorType terminalSeparatorType, T item);
@@ -332,7 +332,7 @@
method @CheckResult @kotlin.jvm.JvmSynthetic public static <T extends R, R> androidx.paging.PagingData<R> insertSeparators(androidx.paging.PagingData<T>, optional androidx.paging.TerminalSeparatorType terminalSeparatorType, kotlin.jvm.functions.Function3<? super T?,? super T?,? super kotlin.coroutines.Continuation<? super R>?,?> generator);
method @CheckResult public static <R, T extends R> androidx.paging.PagingData<R> insertSeparators(androidx.paging.PagingData<T>, java.util.concurrent.Executor executor, kotlin.jvm.functions.Function2<? super T?,? super T?,? extends R?> generator);
method @CheckResult public static <T, R> androidx.paging.PagingData<R> map(androidx.paging.PagingData<T>, java.util.concurrent.Executor executor, kotlin.jvm.functions.Function1<? super T,? extends R> transform);
- method @CheckResult @kotlin.jvm.JvmSynthetic public static <T extends java.lang.Object, R> androidx.paging.PagingData<R> map(androidx.paging.PagingData<T>, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super R>,?> transform);
+ method @CheckResult @kotlin.jvm.JvmSynthetic public static <T, R> androidx.paging.PagingData<R> map(androidx.paging.PagingData<T>, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super R>,?> transform);
}
public abstract class PagingSource<Key, Value> {
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 d928c65..3167150 100644
--- a/paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
+++ b/paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
@@ -207,13 +207,8 @@
}
/**
- * Helper which converts a [PageEvent.Drop] to a set of [ProcessPageEventCallback] events by
+ * Helper which converts a [PageEvent.Drop] to a [PagingDataEvent] by
* dropping all pages that depend on the n-lowest or n-highest originalPageOffsets.
- *
- * Note: We never run DiffUtil here because it is safe to assume that empty pages can never
- * become non-empty no matter what transformations they go through. [ProcessPageEventCallback]
- * events generated by this helper always drop contiguous sets of items because pages that
- * depend on multiple originalPageOffsets will always be the next closest page that's non-empty.
*/
private fun dropPages(drop: PageEvent.Drop<T>): PagingDataEvent<T> {
// update states
@@ -256,15 +251,4 @@
INITIAL as PageStore<T>
}
}
-
- /**
- * Callback to communicate events from [PageStore] to [PagingDataPresenter]
- */
- internal interface ProcessPageEventCallback {
- fun onChanged(position: Int, count: Int)
- fun onInserted(position: Int, count: Int)
- fun onRemoved(position: Int, count: Int)
- fun onStateUpdate(loadType: LoadType, fromMediator: Boolean, loadState: LoadState)
- fun onStateUpdate(source: LoadStates, mediator: LoadStates?)
- }
}
diff --git a/paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt b/paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
index a4c4555..68a0183 100644
--- a/paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
+++ b/paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
@@ -37,7 +37,30 @@
val inserted: List<T>,
val newPlaceholdersBefore: Int,
val oldPlaceholdersBefore: Int,
- ) : PagingDataEvent<T>()
+ ) : PagingDataEvent<T>() {
+
+ override fun equals(other: Any?): Boolean {
+ return other is Prepend<*> &&
+ inserted == other.inserted &&
+ newPlaceholdersBefore == other.newPlaceholdersBefore &&
+ oldPlaceholdersBefore == other.oldPlaceholdersBefore
+ }
+
+ override fun hashCode(): Int {
+ return inserted.hashCode() + newPlaceholdersBefore.hashCode() +
+ oldPlaceholdersBefore.hashCode()
+ }
+
+ override fun toString(): String {
+ return """PagingDataEvent.Prepend loaded ${inserted.size} items (
+ | first item: ${inserted.firstOrNull()}
+ | last item: ${inserted.lastOrNull()}
+ | newPlaceholdersBefore: $newPlaceholdersBefore
+ | oldPlaceholdersBefore: $oldPlaceholdersBefore
+ |)
+ |""".trimMargin()
+ }
+ }
/**
* An append load event
@@ -56,7 +79,31 @@
val inserted: List<T>,
val newPlaceholdersAfter: Int,
val oldPlaceholdersAfter: Int,
- ) : PagingDataEvent<T>()
+ ) : PagingDataEvent<T>() {
+ override fun equals(other: Any?): Boolean {
+ return other is Append<*> &&
+ startIndex == other.startIndex &&
+ inserted == other.inserted &&
+ newPlaceholdersAfter == other.newPlaceholdersAfter &&
+ oldPlaceholdersAfter == other.oldPlaceholdersAfter
+ }
+
+ override fun hashCode(): Int {
+ return startIndex.hashCode() + inserted.hashCode() + newPlaceholdersAfter.hashCode() +
+ oldPlaceholdersAfter.hashCode()
+ }
+
+ override fun toString(): String {
+ return """PagingDataEvent.Append loaded ${inserted.size} items (
+ | startIndex: $startIndex
+ | first item: ${inserted.firstOrNull()}
+ | last item: ${inserted.lastOrNull()}
+ | newPlaceholdersBefore: $newPlaceholdersAfter
+ | oldPlaceholdersBefore: $oldPlaceholdersAfter
+ |)
+ |""".trimMargin()
+ }
+ }
/**
* A refresh load event
@@ -69,7 +116,40 @@
public class Refresh<T : Any> @RestrictTo(LIBRARY_GROUP) constructor(
val newList: NullPaddedList<T>,
val previousList: NullPaddedList<T>,
- ) : PagingDataEvent<T>()
+ ) : PagingDataEvent<T>() {
+ override fun equals(other: Any?): Boolean {
+ return other is Refresh<*> &&
+ newList.placeholdersBefore == other.newList.placeholdersBefore &&
+ newList.placeholdersAfter == other.newList.placeholdersAfter &&
+ newList.size == other.newList.size &&
+ newList.dataCount == other.newList.dataCount &&
+ previousList.placeholdersBefore == other.previousList.placeholdersBefore &&
+ previousList.placeholdersAfter == other.previousList.placeholdersAfter &&
+ previousList.size == other.previousList.size &&
+ previousList.dataCount == other.previousList.dataCount
+ }
+
+ override fun hashCode(): Int {
+ return newList.hashCode() + previousList.hashCode()
+ }
+
+ override fun toString(): String {
+ return """PagingDataEvent.Refresh loaded newList
+ | newList (
+ | placeholdersBefore: ${newList.placeholdersBefore}
+ | placeholdersAfter: ${newList.placeholdersAfter}
+ | size: ${newList.size}
+ | dataCount: ${newList.dataCount}
+ | )
+ | previousList (
+ | placeholdersBefore: ${previousList.placeholdersBefore}
+ | placeholdersAfter: ${previousList.placeholdersAfter}
+ | size: ${previousList.size}
+ | dataCount: ${previousList.dataCount}
+ | )
+ |""".trimMargin()
+ }
+ }
/**
* A drop event from the front of the list
@@ -84,7 +164,29 @@
val dropCount: Int,
val newPlaceholdersBefore: Int,
val oldPlaceholdersBefore: Int,
- ) : PagingDataEvent<T>()
+ ) : PagingDataEvent<T>() {
+
+ override fun equals(other: Any?): Boolean {
+ return other is DropPrepend<*> &&
+ dropCount == other.dropCount &&
+ newPlaceholdersBefore == other.newPlaceholdersBefore &&
+ oldPlaceholdersBefore == other.oldPlaceholdersBefore
+ }
+
+ override fun hashCode(): Int {
+ return dropCount.hashCode() + newPlaceholdersBefore.hashCode() +
+ oldPlaceholdersBefore.hashCode()
+ }
+
+ override fun toString(): String {
+ return """PagingDataEvent.DropPrepend dropped $dropCount items (
+ | dropCount: $dropCount
+ | newPlaceholdersBefore: $newPlaceholdersBefore
+ | oldPlaceholdersBefore: $oldPlaceholdersBefore
+ |)
+ |""".trimMargin()
+ }
+ }
/**
* A drop event from the end of the list
@@ -103,5 +205,29 @@
val dropCount: Int,
val newPlaceholdersAfter: Int,
val oldPlaceholdersAfter: Int,
- ) : PagingDataEvent<T>()
+ ) : PagingDataEvent<T>() {
+
+ override fun equals(other: Any?): Boolean {
+ return other is DropAppend<*> &&
+ startIndex == other.startIndex &&
+ dropCount == other.dropCount &&
+ newPlaceholdersAfter == other.newPlaceholdersAfter &&
+ oldPlaceholdersAfter == other.oldPlaceholdersAfter
+ }
+
+ override fun hashCode(): Int {
+ return startIndex.hashCode() + dropCount.hashCode() + newPlaceholdersAfter.hashCode() +
+ oldPlaceholdersAfter.hashCode()
+ }
+
+ override fun toString(): String {
+ return """PagingDataEvent.DropAppend dropped $dropCount items (
+ | startIndex: $startIndex
+ | dropCount: $dropCount
+ | newPlaceholdersBefore: $newPlaceholdersAfter
+ | oldPlaceholdersBefore: $oldPlaceholdersAfter
+ |)
+ |""".trimMargin()
+ }
+ }
}
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 b454d8c..94d8c9d 100644
--- a/paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
+++ b/paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
@@ -24,7 +24,6 @@
import androidx.paging.PageEvent.Drop
import androidx.paging.PageEvent.Insert
import androidx.paging.PageEvent.StaticList
-import androidx.paging.PageStore.ProcessPageEventCallback
import androidx.paging.internal.CopyOnWriteArrayList
import androidx.paging.internal.appendMediatorStatesIfNotNull
import kotlin.coroutines.CoroutineContext
@@ -40,7 +39,6 @@
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public abstract class PagingDataPresenter<T : Any>(
- private val differCallback: DifferCallback,
private val mainContext: CoroutineContext = Dispatchers.Main,
cachedPagingData: PagingData<T>? = null,
) {
@@ -74,35 +72,6 @@
@Volatile
private var lastAccessedIndex: Int = 0
- private val processPageEventCallback = object : ProcessPageEventCallback {
- override fun onChanged(position: Int, count: Int) {
- differCallback.onChanged(position, count)
- }
-
- override fun onInserted(position: Int, count: Int) {
- differCallback.onInserted(position, count)
- }
-
- override fun onRemoved(position: Int, count: Int) {
- differCallback.onRemoved(position, count)
- }
-
- // for state updates from LoadStateUpdate events
- override fun onStateUpdate(source: LoadStates, mediator: LoadStates?) {
- combinedLoadStatesCollection.set(source, mediator)
- }
-
- // for state updates from Drop events
- override fun onStateUpdate(
- loadType: LoadType,
- fromMediator: Boolean,
- loadState: LoadState
- ) {
- // CombinedLoadStates is de-duplicated within set()
- combinedLoadStatesCollection.set(loadType, fromMediator, loadState)
- }
- }
-
/**
* Handler for [PagingDataEvent] emitted by a [PagingData] that was submitted to
* this [PagingDataPresenter]
@@ -225,7 +194,7 @@
}
// Process DROP and send to presenter
- pageStore.processEvent(event)
+ presentPagingDataEvent(pageStore.processEvent(event))
// dispatch load states
combinedLoadStatesCollection.set(
@@ -477,7 +446,7 @@
)
log(DEBUG) {
appendMediatorStatesIfNotNull(mediatorLoadStates) {
- """Presenting data:
+ """Presenting data (
| first item: ${pages.firstOrNull()?.data?.firstOrNull()}
| last item: ${pages.lastOrNull()?.data?.lastOrNull()}
| placeholdersBefore: $placeholdersBefore
@@ -505,21 +474,6 @@
}
/**
- * Callback for the pageStore/adapter to listen to the state of pagination data.
- *
- * Note that these won't map directly to PageEvents, since PageEvents can cause several adapter
- * events that should all be dispatched to the presentation layer at once - as part of the same
- * frame.
- *
- */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
-public interface DifferCallback {
- public fun onChanged(position: Int, count: Int)
- public fun onInserted(position: Int, count: Int)
- public fun onRemoved(position: Int, count: Int)
-}
-
-/**
* Payloads used to dispatch change events.
* Could become a public API post 3.0 in case developers want to handle it more effectively.
*
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 3c51843..76207ce 100644
--- a/paging/paging-common/src/commonTest/kotlin/androidx/paging/PageStoreTest.kt
+++ b/paging/paging-common/src/commonTest/kotlin/androidx/paging/PageStoreTest.kt
@@ -87,10 +87,10 @@
indexOfInitialPage = 0
)
- val page: List<Char> = List(newItems) { 'a' + it + initialItems }
- data.insertPage(
+ val inserted = List(newItems) { 'a' + it + initialItems }
+ val event = data.insertPage(
isPrepend = false,
- page = page,
+ page = inserted,
placeholdersRemaining = newNulls,
)
@@ -103,6 +103,17 @@
val expectedData =
List(initialItems + newItems) { 'a' + it } + List(expectedNulls) { null }
assertEquals(expectedData, data.asList())
+
+ // Then assert we got the right PagingDataEvent
+ assertEquals(
+ PagingDataEvent.Append(
+ startIndex = initialItems,
+ inserted = inserted,
+ newPlaceholdersAfter = newNulls,
+ oldPlaceholdersAfter = initialNulls
+ ),
+ event
+ )
}
private fun verifyPrepend(
@@ -119,9 +130,10 @@
)
val endItemCount = newItems + initialItems
- data.insertPage(
+ val inserted = List(newItems) { 'z' + it - endItemCount - 1 }
+ val event = data.insertPage(
isPrepend = true,
- page = List(newItems) { 'z' + it - endItemCount - 1 },
+ page = inserted,
placeholdersRemaining = newNulls,
)
@@ -134,6 +146,16 @@
val expectedData =
List(expectedNulls) { null } + List(endItemCount) { 'z' + it - endItemCount - 1 }
assertEquals(expectedData, data.asList())
+
+ // Then assert we got the right PagingDataEvent
+ assertEquals(
+ PagingDataEvent.Prepend(
+ inserted = inserted,
+ newPlaceholdersBefore = newNulls,
+ oldPlaceholdersBefore = initialNulls
+ ),
+ event
+ )
}
private fun verifyPrependAppend(
@@ -214,6 +236,7 @@
initialPages: List<List<Char>>,
initialNulls: Int = 0,
newNulls: Int,
+ dropCount: Int,
pagesToDrop: Int,
) {
if (initialPages.size < 2) {
@@ -229,14 +252,23 @@
assertEquals(initialPages.flatten() + List<Char?>(initialNulls) { null }, data.asList())
- data.dropPages(
+ val event = data.dropPages(
isPrepend = false,
minPageOffset = initialPages.lastIndex - (pagesToDrop - 1),
maxPageOffset = initialPages.lastIndex,
placeholdersRemaining = newNulls,
)
- // assert final list state
+ // assert PagingDataEvent and final list state
+ assertEquals(
+ PagingDataEvent.DropAppend(
+ startIndex = initialPages.flatten().size - dropCount,
+ dropCount = dropCount,
+ newPlaceholdersAfter = newNulls,
+ oldPlaceholdersAfter = initialNulls
+ ),
+ event
+ )
val finalData = initialPages.subList(0, initialPages.size - pagesToDrop).flatten()
assertEquals(finalData + List<Char?>(newNulls) { null }, data.asList())
}
@@ -245,6 +277,7 @@
initialPages: List<List<Char>>,
initialNulls: Int = 0,
newNulls: Int,
+ dropCount: Int,
pagesToDrop: Int,
) {
if (initialPages.size < 2) {
@@ -263,14 +296,22 @@
data.asList()
)
- data.dropPages(
+ val event = data.dropPages(
isPrepend = true,
minPageOffset = 0,
maxPageOffset = pagesToDrop - 1,
placeholdersRemaining = newNulls,
)
- // assert final list state
+ // assert PagingDataEvent and final list state
+ assertEquals(
+ PagingDataEvent.DropPrepend(
+ dropCount = dropCount,
+ oldPlaceholdersBefore = initialNulls,
+ newPlaceholdersBefore = newNulls
+ ),
+ event
+ )
val finalData = initialPages.take(initialPages.size - pagesToDrop).reversed().flatten()
assertEquals(List<Char?>(newNulls) { null } + finalData, data.asList())
}
@@ -281,8 +322,9 @@
newNulls: Int,
pagesToDrop: Int,
) {
- verifyDropStart(initialPages, initialNulls, newNulls, pagesToDrop)
- verifyDropEnd(initialPages, initialNulls, newNulls, pagesToDrop)
+ val dropCount = initialPages.reversed().take(pagesToDrop).flatten().size
+ verifyDropStart(initialPages, initialNulls, newNulls, dropCount, pagesToDrop)
+ verifyDropEnd(initialPages, initialNulls, newNulls, dropCount, pagesToDrop)
}
@Test
@@ -398,10 +440,4 @@
assertEquals(listOf(null, 'a', null, null, null), pageStore.snapshot())
}
-
- companion object {
- val IDLE_EVENTS = listOf<PresenterEvent>(
- CombinedStateEvent(LoadStates.IDLE, null)
- )
- }
}
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 dd61ec5..fdb2710 100644
--- a/paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
+++ b/paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
@@ -61,7 +61,7 @@
@Test
fun collectFrom_static() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val receiver = UiReceiverFake()
val job1 = launch {
@@ -87,7 +87,7 @@
@Test
fun collectFrom_twice() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
launch { presenter.collectFrom(infinitelySuspendingPagingData()) }
.cancel()
@@ -97,7 +97,7 @@
@Test
fun collectFrom_twiceConcurrently() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val job1 = launch {
presenter.collectFrom(infinitelySuspendingPagingData())
@@ -118,7 +118,7 @@
@Test
fun retry() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val receiver = UiReceiverFake()
val job = launch {
@@ -133,7 +133,7 @@
@Test
fun refresh() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val receiver = UiReceiverFake()
val job = launch {
@@ -149,7 +149,7 @@
@Test
fun uiReceiverSetImmediately() = testScope.runTest {
- val presenter = SimplePresenter(differCallback = dummyDifferCallback)
+ val presenter = SimplePresenter()
val receiver = UiReceiverFake()
val pagingData1 = infinitelySuspendingPagingData(uiReceiver = receiver)
@@ -170,7 +170,7 @@
@Test
fun hintReceiverSetAfterNewListPresented() = testScope.runTest {
- val presenter = SimplePresenter(differCallback = dummyDifferCallback)
+ val presenter = SimplePresenter()
// first generation, load something so next gen can access index to trigger hint
val hintReceiver1 = HintReceiverFake()
@@ -358,7 +358,7 @@
@Test
fun refreshAfterStaticList() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val pagingData1 = PagingData.from(listOf(1, 2, 3))
val job1 = launch { presenter.collectFrom(pagingData1) }
@@ -379,7 +379,7 @@
@Test
fun retryAfterStaticList() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val pagingData1 = PagingData.from(listOf(1, 2, 3))
val job1 = launch { presenter.collectFrom(pagingData1) }
@@ -400,7 +400,7 @@
@Test
fun hintCalculationBasedOnCurrentGeneration() = testScope.runTest {
- val presenter = SimplePresenter(differCallback = dummyDifferCallback)
+ val presenter = SimplePresenter()
// first generation
val hintReceiver1 = HintReceiverFake()
@@ -517,7 +517,7 @@
@Test
fun fetch_loadHintResentWhenUnfulfilled() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val pageEventCh = Channel<PageEvent<Int>>(Channel.UNLIMITED)
pageEventCh.trySend(
@@ -649,7 +649,7 @@
@Test
fun fetch_loadHintResentUnlessPageDropped() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val pageEventCh = Channel<PageEvent<Int>>(Channel.UNLIMITED)
pageEventCh.trySend(
@@ -743,7 +743,7 @@
@Test
fun peek() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val pageEventCh = Channel<PageEvent<Int>>(Channel.UNLIMITED)
pageEventCh.trySend(
localRefresh(
@@ -787,7 +787,7 @@
@Test
fun onPagingDataPresentedListener_empty() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val listenerEvents = mutableListOf<Unit>()
presenter.addOnPagesUpdatedListener {
listenerEvents.add(Unit)
@@ -816,7 +816,7 @@
@Test
fun onPagingDataPresentedListener_insertDrop() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val listenerEvents = mutableListOf<Unit>()
presenter.addOnPagesUpdatedListener {
listenerEvents.add(Unit)
@@ -852,7 +852,7 @@
@Test
fun onPagingDataPresentedFlow_empty() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val listenerEvents = mutableListOf<Unit>()
val job1 = launch {
presenter.onPagesUpdatedFlow.collect {
@@ -884,7 +884,7 @@
@Test
fun onPagingDataPresentedFlow_insertDrop() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val listenerEvents = mutableListOf<Unit>()
val job1 = launch {
presenter.onPagesUpdatedFlow.collect {
@@ -923,7 +923,7 @@
@Test
fun onPagingDataPresentedFlow_buffer() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val listenerEvents = mutableListOf<Unit>()
// Trigger update, which should get ignored due to onPagesUpdatedFlow being hot.
@@ -959,7 +959,7 @@
@Test
fun loadStateFlow_synchronouslyUpdates() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
var combinedLoadStates: CombinedLoadStates? = null
var itemCount = -1
val loadStateJob = launch {
@@ -1008,7 +1008,7 @@
@Test
fun loadStateFlow_hasNoInitialValue() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
// Should not immediately emit without a real value to a new collector.
val combinedLoadStates = mutableListOf<CombinedLoadStates>()
@@ -1055,7 +1055,7 @@
@Test
fun loadStateFlow_preservesLoadStatesOnEmptyList() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
// Should not immediately emit without a real value to a new collector.
val combinedLoadStates = mutableListOf<CombinedLoadStates>()
@@ -1132,7 +1132,7 @@
@Test
fun loadStateFlow_preservesLoadStatesOnStaticList() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
// Should not immediately emit without a real value to a new collector.
val combinedLoadStates = mutableListOf<CombinedLoadStates>()
@@ -1209,7 +1209,7 @@
@Test
fun loadStateFlow_deduplicate() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val combinedLoadStates = mutableListOf<CombinedLoadStates>()
backgroundScope.launch {
@@ -1251,7 +1251,7 @@
@Test
fun loadStateFlowListeners_deduplicate() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val combinedLoadStates = mutableListOf<CombinedLoadStates>()
presenter.addLoadStateListener {
@@ -1291,7 +1291,7 @@
@Test
fun addLoadStateListener_SynchronouslyUpdates() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
var combinedLoadStates: CombinedLoadStates? = null
var itemCount = -1
presenter.addLoadStateListener {
@@ -1337,7 +1337,7 @@
@Test
fun addLoadStateListener_hasNoInitialValue() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val combinedLoadStateCapture = CombinedLoadStatesCapture()
// Adding a new listener without a real value should not trigger it.
@@ -1373,7 +1373,7 @@
@Test
fun uncaughtException() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val pager = Pager(
PagingConfig(1),
) {
@@ -1397,7 +1397,7 @@
@Test
fun handledLoadResultInvalid() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
var generation = 0
val pager = Pager(
PagingConfig(1),
@@ -1423,6 +1423,220 @@
}
@Test
+ fun refresh_pagingDataEvent() = refresh_pagingDataEvent(false)
+
+ @Test
+ fun refresh_pagingDataEvent_collectWithCachedIn() = refresh_pagingDataEvent(true)
+
+ private fun refresh_pagingDataEvent(collectWithCachedIn: Boolean) =
+ runTest(collectWithCachedIn, initialKey = 50) { presenter, _, _, _ ->
+ // execute queued initial REFRESH
+ advanceUntilIdle()
+
+ val event = PageStore(
+ pages = listOf(
+ TransformablePage(
+ originalPageOffsets = intArrayOf(0),
+ data = listOf(50, 51, 52, 53, 54, 55, 56, 57, 58),
+ hintOriginalPageOffset = 0,
+ hintOriginalIndices = null,
+ )
+ ),
+ placeholdersBefore = 0,
+ placeholdersAfter = 0,
+ ) as NullPaddedList<Int>
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(50 until 59)
+ assertThat(presenter.newEvents()).containsExactly(
+ PagingDataEvent.Refresh(
+ previousList = PageStore.initial<Int>(null) as NullPaddedList<Int>,
+ newList = event
+ )
+ )
+
+ presenter.refresh()
+
+ // execute second REFRESH load
+ advanceUntilIdle()
+
+ // // second refresh loads from initialKey = 0 because anchorPosition/refreshKey is null
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(0 until 9)
+ assertThat(presenter.newEvents()).containsExactly(
+ PagingDataEvent.Refresh(
+ previousList = event,
+ newList = PageStore(
+ pages = listOf(
+ TransformablePage(
+ originalPageOffsets = intArrayOf(0),
+ data = listOf(0, 1, 2, 3, 4, 5, 6, 7, 8),
+ hintOriginalPageOffset = 0,
+ hintOriginalIndices = null,
+ )
+ ),
+ placeholdersBefore = 0,
+ placeholdersAfter = 0,
+ ) as NullPaddedList<Int>
+ )
+ )
+ }
+
+ @Test
+ fun append_pagingDataEvent() = append_pagingDataEvent(false)
+
+ @Test
+ fun append_pagingDataEvent_collectWithCachedIn() = append_pagingDataEvent(true)
+
+ private fun append_pagingDataEvent(collectWithCachedIn: Boolean) =
+ runTest(collectWithCachedIn) { presenter, _, _, _ ->
+
+ // initial REFRESH
+ advanceUntilIdle()
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(0 until 9)
+
+ // trigger append
+ presenter[7]
+ advanceUntilIdle()
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(0 until 12)
+ assertThat(presenter.newEvents().last()).isEqualTo(
+ PagingDataEvent.Append(
+ startIndex = 9,
+ inserted = listOf(9, 10, 11),
+ newPlaceholdersAfter = 0,
+ oldPlaceholdersAfter = 0
+ )
+ )
+ }
+
+ @Test
+ fun appendDrop_pagingDataEvent() = appendDrop_pagingDataEvent(false)
+
+ @Test
+ fun appendDrop_pagingDataEvent_collectWithCachedIn() = appendDrop_pagingDataEvent(true)
+
+ private fun appendDrop_pagingDataEvent(collectWithCachedIn: Boolean) =
+ runTest(
+ collectWithCachedIn,
+ initialKey = 96,
+ config = PagingConfig(
+ pageSize = 1,
+ maxSize = 4,
+ enablePlaceholders = false
+ )
+ ) { presenter, _, _, _ ->
+ // initial REFRESH
+ advanceUntilIdle()
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(96 until 99)
+
+ // trigger append to reach max page size
+ presenter[2]
+ advanceUntilIdle()
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(96 until 100)
+ assertThat(presenter.newEvents().last()).isEqualTo(
+ PagingDataEvent.Append(
+ startIndex = 3,
+ inserted = listOf(99),
+ newPlaceholdersAfter = 0,
+ oldPlaceholdersAfter = 0
+ )
+ )
+ // trigger prepend and drop from append direction
+ presenter[0]
+ advanceUntilIdle()
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(95 until 99)
+ // drop is processed before inserts
+ assertThat(presenter.newEvents().first()).isEqualTo(
+ PagingDataEvent.DropAppend<Int>(
+ startIndex = 3,
+ dropCount = 1,
+ newPlaceholdersAfter = 0,
+ oldPlaceholdersAfter = 0
+ )
+ )
+ }
+
+ @Test
+ fun prepend_pagingDataEvent() = prepend_pagingDataEvent(false)
+
+ @Test
+ fun prepend_pagingDataEvent_collectWithCachedIn() = prepend_pagingDataEvent(true)
+
+ private fun prepend_pagingDataEvent(collectWithCachedIn: Boolean) =
+ runTest(collectWithCachedIn, initialKey = 50) { presenter, _, _, _ ->
+
+ // initial REFRESH
+ advanceUntilIdle()
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(50 until 59)
+
+ // trigger prepend
+ presenter[0]
+ advanceUntilIdle()
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(47 until 59)
+ assertThat(presenter.newEvents().last()).isEqualTo(
+ PagingDataEvent.Prepend(
+ inserted = listOf(47, 48, 49),
+ newPlaceholdersBefore = 0,
+ oldPlaceholdersBefore = 0
+ )
+ )
+ }
+
+ @Test
+ fun prependDrop_pagingDataEvent() = prependDrop_pagingDataEvent(false)
+
+ @Test
+ fun prependDrop_pagingDataEvent_collectWithCachedIn() = prependDrop_pagingDataEvent(true)
+
+ private fun prependDrop_pagingDataEvent(collectWithCachedIn: Boolean) =
+ runTest(
+ collectWithCachedIn,
+ initialKey = 1,
+ config = PagingConfig(
+ pageSize = 1,
+ maxSize = 4,
+ enablePlaceholders = false
+ )
+ ) { presenter, _, _, _ ->
+ // initial REFRESH
+ advanceUntilIdle()
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(1 until 4)
+
+ // trigger prepend to reach max page size
+ presenter[0]
+ advanceUntilIdle()
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(0 until 4)
+ assertThat(presenter.newEvents().last()).isEqualTo(
+ PagingDataEvent.Prepend(
+ inserted = listOf(0),
+ newPlaceholdersBefore = 0,
+ oldPlaceholdersBefore = 0
+ )
+ )
+
+ // trigger append and drop from prepend direction
+ presenter[3]
+ advanceUntilIdle()
+
+ assertThat(presenter.snapshot()).containsExactlyElementsIn(1 until 5)
+ // drop is processed before insert
+ assertThat(presenter.newEvents().first()).isEqualTo(
+ PagingDataEvent.DropPrepend<Int>(
+ dropCount = 1,
+ newPlaceholdersBefore = 0,
+ oldPlaceholdersBefore = 0
+ )
+ )
+ }
+
+ @Test
fun refresh_loadStates() = refresh_loadStates(false)
@Test
@@ -1447,7 +1661,7 @@
// execute second REFRESH load
advanceUntilIdle()
- // second refresh still loads from initialKey = 50 because anchorPosition/refreshKey is null
+ // second refresh loads from initialKey = 0 because anchorPosition/refreshKey is null
assertThat(pagingSources.size).isEqualTo(2)
assertThat(presenter.snapshot()).containsExactlyElementsIn(0 until 9)
assertThat(presenter.newCombinedLoadStates()).containsExactly(
@@ -2018,7 +2232,7 @@
@Test
fun remoteRefresh_refreshStatePersists() = testScope.runTest {
- val presenter = SimplePresenter(dummyDifferCallback)
+ val presenter = SimplePresenter()
val remoteMediator = RemoteMediatorMock(loadDelay = 1500).apply {
initializeResult = RemoteMediator.InitializeAction.LAUNCH_INITIAL_REFRESH
}
@@ -2124,9 +2338,7 @@
pagingSourceFactory = { TestPagingSource() }
).flow.cachedIn(this)
- val presenter = SimplePresenter(
- differCallback = dummyDifferCallback,
- )
+ val presenter = SimplePresenter()
backgroundScope.launch { presenter.collectLoadStates() }
val job = launch {
@@ -2142,9 +2354,7 @@
)
// we start a separate presenter to recollect on cached Pager.flow
- val presenter2 = SimplePresenter(
- differCallback = dummyDifferCallback,
- )
+ val presenter2 = SimplePresenter()
backgroundScope.launch { presenter2.collectLoadStates() }
val job2 = launch {
@@ -2167,7 +2377,7 @@
fun cachedData() {
val data = List(50) { it }
val cachedPagingData = createCachedPagingData(data)
- val simplePresenter = SimplePresenter(dummyDifferCallback, cachedPagingData)
+ val simplePresenter = SimplePresenter(cachedPagingData)
assertThat(simplePresenter.snapshot()).isEqualTo(data)
assertThat(simplePresenter.size).isEqualTo(data.size)
}
@@ -2175,7 +2385,7 @@
@Test
fun emptyCachedData() {
val cachedPagingData = createCachedPagingData(emptyList())
- val simplePresenter = SimplePresenter(dummyDifferCallback, cachedPagingData)
+ val simplePresenter = SimplePresenter(cachedPagingData)
assertThat(simplePresenter.snapshot()).isEmpty()
assertThat(simplePresenter.size).isEqualTo(0)
}
@@ -2190,7 +2400,7 @@
sourceLoadStates = localStates,
mediatorLoadStates = mediatorStates
)
- val simplePresenter = SimplePresenter(dummyDifferCallback, cachedPagingData)
+ val simplePresenter = SimplePresenter(cachedPagingData)
val expected = simplePresenter.loadStateFlow.value
assertThat(expected).isNotNull()
assertThat(expected!!.source).isEqualTo(localStates)
@@ -2207,7 +2417,7 @@
mediatorLoadStates = null,
hintReceiver = hintReceiver
)
- val presenter = SimplePresenter(dummyDifferCallback, cachedPagingData)
+ val presenter = SimplePresenter(cachedPagingData)
// access item
presenter[5]
@@ -2239,7 +2449,7 @@
mediatorLoadStates = null,
uiReceiver = uiReceiver
)
- val presenter = SimplePresenter(dummyDifferCallback, cachedPagingData)
+ val presenter = SimplePresenter(cachedPagingData)
presenter.refresh()
advanceUntilIdle()
assertThat(uiReceiver.refreshEvents).hasSize(0)
@@ -2265,7 +2475,7 @@
sourceLoadStates = loadStates(refresh = Loading),
mediatorLoadStates = null,
)
- val presenter = SimplePresenter(dummyDifferCallback, cachedPagingData)
+ val presenter = SimplePresenter(cachedPagingData)
val data2 = List(10) { it }
val flow = flowOf(
localRefresh(pages = listOf(TransformablePage(data2))),
@@ -2286,7 +2496,7 @@
sourceLoadStates = loadStates(refresh = Loading),
mediatorLoadStates = null,
)
- val presenter = SimplePresenter(dummyDifferCallback, cachedPagingData)
+ val presenter = SimplePresenter(cachedPagingData)
val channel = Channel<PageEvent<Int>>(Channel.UNLIMITED)
val hintReceiver = HintReceiverFake()
@@ -2334,9 +2544,7 @@
).also { pagingSources.add(it) }
}
)
- val presenter = SimplePresenter(
- differCallback = dummyDifferCallback,
- )
+ val presenter = SimplePresenter()
val uiReceivers = mutableListOf<TrackableUiReceiverWrapper>()
val hintReceivers = mutableListOf<TrackableHintReceiverWrapper>()
@@ -2466,10 +2674,8 @@
}
private class SimplePresenter(
- differCallback: DifferCallback,
cachedPagingData: PagingData<Int>? = null,
) : PagingDataPresenter<Int>(
- differCallback = differCallback,
mainContext = EmptyCoroutineContext,
cachedPagingData = cachedPagingData
) {
@@ -2489,7 +2695,17 @@
}
}
- override suspend fun presentPagingDataEvent(event: PagingDataEvent<Int>) { }
+ private val _pagingDataEvents = mutableListOf<PagingDataEvent<Int>>()
+
+ fun newEvents(): List<PagingDataEvent<Int>> {
+ val newEvents = _pagingDataEvents.toList()
+ _pagingDataEvents.clear()
+ return newEvents
+ }
+
+ override suspend fun presentPagingDataEvent(event: PagingDataEvent<Int>) {
+ _pagingDataEvents.add(event)
+ }
}
internal val dummyUiReceiver = object : UiReceiver {
@@ -2500,11 +2716,3 @@
internal val dummyHintReceiver = object : HintReceiver {
override fun accessHint(viewportHint: ViewportHint) {}
}
-
-private val dummyDifferCallback = object : DifferCallback {
- override fun onInserted(position: Int, count: Int) {}
-
- override fun onChanged(position: Int, count: Int) {}
-
- override fun onRemoved(position: Int, count: Int) {}
-}
diff --git a/paging/paging-common/src/commonTest/kotlin/androidx/paging/ProcessPageEventCallbackCapture.kt b/paging/paging-common/src/commonTest/kotlin/androidx/paging/ProcessPageEventCallbackCapture.kt
deleted file mode 100644
index f1af1e6..0000000
--- a/paging/paging-common/src/commonTest/kotlin/androidx/paging/ProcessPageEventCallbackCapture.kt
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2019 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.paging
-
-import androidx.paging.PageStore.ProcessPageEventCallback
-
-sealed class PresenterEvent
-data class ChangeEvent(val position: Int, val count: Int) : PresenterEvent()
-data class InsertEvent(val position: Int, val count: Int) : PresenterEvent()
-data class RemoveEvent(val position: Int, val count: Int) : PresenterEvent()
-data class StateEvent(
- val loadType: LoadType,
- val fromMediator: Boolean,
- val loadState: LoadState
-) : PresenterEvent()
-data class CombinedStateEvent(
- val source: LoadStates,
- val mediator: LoadStates?,
-) : PresenterEvent()
-
-class ProcessPageEventCallbackCapture : ProcessPageEventCallback {
- private val list = mutableListOf<PresenterEvent>()
- fun getAllAndClear() = list.getAllAndClear()
-
- override fun onChanged(position: Int, count: Int) {
- if (count != 0) {
- list.add(ChangeEvent(position, count))
- }
- }
-
- override fun onInserted(position: Int, count: Int) {
- if (count != 0) {
- list.add(InsertEvent(position, count))
- }
- }
-
- override fun onRemoved(position: Int, count: Int) {
- if (count != 0) {
- list.add(RemoveEvent(position, count))
- }
- }
-
- override fun onStateUpdate(loadType: LoadType, fromMediator: Boolean, loadState: LoadState) {
- list.add(StateEvent(loadType, fromMediator, loadState))
- }
-
- override fun onStateUpdate(source: LoadStates, mediator: LoadStates?) {
- list.add(CombinedStateEvent(source, mediator))
- }
-}
diff --git a/paging/paging-compose/src/commonMain/kotlin/androidx/paging/compose/LazyPagingItems.kt b/paging/paging-compose/src/commonMain/kotlin/androidx/paging/compose/LazyPagingItems.kt
index fb79772..0cc7b10 100644
--- a/paging/paging-compose/src/commonMain/kotlin/androidx/paging/compose/LazyPagingItems.kt
+++ b/paging/paging-compose/src/commonMain/kotlin/androidx/paging/compose/LazyPagingItems.kt
@@ -25,7 +25,6 @@
import androidx.compose.runtime.setValue
import androidx.compose.ui.platform.AndroidUiDispatcher
import androidx.paging.CombinedLoadStates
-import androidx.paging.DifferCallback
import androidx.paging.ItemSnapshotList
import androidx.paging.LoadState
import androidx.paging.LoadStates
@@ -62,13 +61,6 @@
) {
private val mainDispatcher = AndroidUiDispatcher.Main
- // TODO to be removed when cleaning up PagingDataPresenter class
- private val differCallback: DifferCallback = object : DifferCallback {
- override fun onChanged(position: Int, count: Int) { }
- override fun onInserted(position: Int, count: Int) { }
- override fun onRemoved(position: Int, count: Int) { }
- }
-
/**
* If the [flow] is a SharedFlow, it is expected to be the flow returned by from
* pager.flow.cachedIn(scope) which could contain a cached PagingData. We pass the cached
@@ -76,7 +68,6 @@
* can be initialized with the data prior to collection on pager.
*/
private val pagingDataPresenter = object : PagingDataPresenter<T>(
- differCallback = differCallback,
mainContext = mainDispatcher,
cachedPagingData =
if (flow is SharedFlow<PagingData<T>>) flow.replayCache.firstOrNull() else null
diff --git a/paging/paging-runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt b/paging/paging-runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
index 378a262..c0b3e06 100644
--- a/paging/paging-runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
+++ b/paging/paging-runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
@@ -132,65 +132,26 @@
workerDispatcher = workerDispatcher
)
- @Suppress("MemberVisibilityCanBePrivate") // synthetic access
- internal val differCallback = object : DifferCallback {
- override fun onInserted(position: Int, count: Int) {
- // Ignore if count == 0 as it makes this event a no-op.
- if (count > 0) {
- updateCallback.onInserted(position, count)
- }
- }
-
- override fun onRemoved(position: Int, count: Int) {
- // Ignore if count == 0 as it makes this event a no-op.
- if (count > 0) {
- updateCallback.onRemoved(position, count)
- }
- }
-
- override fun onChanged(position: Int, count: Int) {
- // Ignore if count == 0 as it makes this event a no-op.
- if (count > 0) {
- // NOTE: pass a null payload to convey null -> item, or item -> null
- updateCallback.onChanged(position, count, null)
- }
- }
- }
-
/** True if we're currently executing [getItem] */
@Suppress("MemberVisibilityCanBePrivate") // synthetic access
internal var inGetItem: Boolean = false
- internal val presenter = object : PagingDataPresenter<T>(differCallback, mainDispatcher) {
- /**
- * Insert the event's page to the storage, and dispatch associated callbacks for
- * change (placeholder becomes real item) or insert (real item is appended).
- *
- * For each insert (or removal) there are three potential events:
- *
- * 1) change
- * this covers any placeholder/item conversions, and is done first
- *
- * 2) item insert/remove
- * this covers any remaining items that are inserted/removed, but aren't swapping with
- * placeholders
- *
- * 3) placeholder insert/remove
- * after the above, placeholder count can be wrong for a number of reasons - approximate
- * counting or filtering are the most common. In either case, we adjust placeholders at
- * the far end of the list, so that they don't trigger animations near the user.
- */
+ internal val presenter = object : PagingDataPresenter<T>(mainDispatcher) {
override suspend fun presentPagingDataEvent(event: PagingDataEvent<T>) {
when (event) {
is PagingDataEvent.Refresh -> event.apply {
when {
// fast path for no items -> some items
previousList.size == 0 -> {
- differCallback.onInserted(0, newList.size)
+ if (newList.size > 0) {
+ updateCallback.onInserted(0, newList.size)
+ }
}
// fast path for some items -> no items
newList.size == 0 -> {
- differCallback.onRemoved(0, previousList.size)
+ if (previousList.size > 0) {
+ updateCallback.onRemoved(0, previousList.size)
+ }
}
else -> {
val diffResult = withContext(workerDispatcher) {
@@ -200,6 +161,20 @@
}
}
}
+ /**
+ * For each [PagingDataEvent.Prepend] or [PagingDataEvent.Append] there are
+ * three potential events handled in the following order:
+ *
+ * 1) change
+ * this covers any placeholder/item conversions, and is done first
+ * 2) item insert/remove
+ * this covers any remaining items that are inserted/removed, but aren't swapping with
+ * placeholders
+ * 3) placeholder insert/remove
+ * after the above, placeholder count can be wrong for a number of reasons - approximate
+ * counting or filtering are the most common. In either case, we adjust placeholders at
+ * the far end of the list, so that they don't trigger animations near the user.
+ */
is PagingDataEvent.Prepend -> event.apply {
val insertSize = inserted.size
@@ -253,6 +228,23 @@
updateCallback.onRemoved(newTotalSize, -placeholderInsertedCount)
}
}
+ /**
+ * For [PagingDataEvent.DropPrepend] or [PagingDataEvent.DropAppend] events
+ * there are two potential events handled in the following order
+ *
+ * 1) placeholder insert/remove
+ * We first adjust placeholders at the far end of the list, so that they
+ * don't trigger animations near the user.
+ * 2) change
+ * this covers any placeholder/item conversions, and is done after placeholders
+ * are trimmed/inserted to match new expected size
+ *
+ * Note: For drops we never run DiffUtil because it is safe to assume
+ * that empty pages can never become non-empty no matter what transformations they
+ * go through. [ListUpdateCallback] events generated by this helper always
+ * drop contiguous sets of items because pages that depend on multiple
+ * originalPageOffsets will always be the next closest page that's non-empty.
+ */
is PagingDataEvent.DropPrepend -> event.apply {
// Trim or insert placeholders to match expected newSize.
val placeholdersToInsert = newPlaceholdersBefore - dropCount -
diff --git a/paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/PagerFlowSnapshot.kt b/paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/PagerFlowSnapshot.kt
index c8b1d3f..0a38d7d 100644
--- a/paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/PagerFlowSnapshot.kt
+++ b/paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/PagerFlowSnapshot.kt
@@ -18,7 +18,6 @@
import androidx.annotation.VisibleForTesting
import androidx.paging.CombinedLoadStates
-import androidx.paging.DifferCallback
import androidx.paging.ItemSnapshotList
import androidx.paging.LoadState
import androidx.paging.LoadStates
@@ -60,17 +59,8 @@
lateinit var loader: SnapshotLoader<Value>
- // TODO to be removed when all load types have switched to presentPagingDataEvent callback
- val callback = object : DifferCallback {
- override fun onChanged(position: Int, count: Int) { }
- override fun onInserted(position: Int, count: Int) { }
- override fun onRemoved(position: Int, count: Int) { }
- }
-
// PagingDataPresenter will collect from coroutineContext instead of main dispatcher
- val presenter = object : CompletablePagingDataPresenter<Value>(
- callback, coroutineContext
- ) {
+ val presenter = object : CompletablePagingDataPresenter<Value>(coroutineContext) {
override suspend fun presentPagingDataEvent(event: PagingDataEvent<Value>) {
if (event is PagingDataEvent.Refresh) {
/**
@@ -156,9 +146,8 @@
}
internal abstract class CompletablePagingDataPresenter<Value : Any>(
- differCallback: DifferCallback,
mainContext: CoroutineContext,
-) : PagingDataPresenter<Value>(differCallback, mainContext) {
+) : PagingDataPresenter<Value>(mainContext) {
/**
* Marker that the underlying Flow<PagingData> has completed - e.g., every possible generation
* of data has been loaded completely.
diff --git a/paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/SnapshotLoader.kt b/paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/SnapshotLoader.kt
index 3f4485b..d425c20 100644
--- a/paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/SnapshotLoader.kt
+++ b/paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/SnapshotLoader.kt
@@ -17,7 +17,6 @@
package androidx.paging.testing
import androidx.annotation.VisibleForTesting
-import androidx.paging.DifferCallback
import androidx.paging.LoadType.APPEND
import androidx.paging.LoadType.PREPEND
import androidx.paging.PagingConfig
@@ -38,7 +37,7 @@
/**
* Contains the public APIs for load operations in tests.
*
- * Tracks generational information and provides the listener to [DifferCallback] on
+ * Tracks generational information and provides the listener to [LoaderCallback] on
* [PagingDataPresenter] operations.
*/
@VisibleForTesting
@@ -401,7 +400,7 @@
* [PREPEND] operation would call presenter[1+3 = 4] to properly load next item(11).
*
* This method is essentially no-op unless the callback meets three conditions:
- * - is type [DifferCallback.onChanged]
+ * - the [LoaderCallback.loadType] is [LoadType.PREPEND]
* - position is 0 as we only care about item prepended to front of list
* - inserted count > 0
*/
@@ -455,7 +454,7 @@
val id: Int = -1,
/**
- * Temporarily stores the latest [DifferCallback] to track prepends to the beginning of list.
+ * Temporarily stores the latest [LoaderCallback] to track prepends to the beginning of list.
* Value is reset to null once read.
*/
val callbackState: AtomicRef<LoaderCallback?> = AtomicRef(null),
diff --git a/percentlayout/percentlayout/lint-baseline.xml b/percentlayout/percentlayout/lint-baseline.xml
deleted file mode 100644
index 0ce4092..0000000
--- a/percentlayout/percentlayout/lint-baseline.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/percentlayout/widget/PercentFrameLayout.java"/>
- </issue>
-
-</issues>
diff --git a/playground-common/androidx-shared.properties b/playground-common/androidx-shared.properties
index 75aef29..b97cdbe 100644
--- a/playground-common/androidx-shared.properties
+++ b/playground-common/androidx-shared.properties
@@ -56,10 +56,11 @@
# Enable adding baseline-prof.txt files to AAR artifacts
android.experimental.enableArtProfiles=true
-
+# Disables dependency constraints for libraries (b/276714425)
+android.experimental.dependency.excludeLibraryComponentsFromConstraints=true
# Disallow resolving dependencies at configuration time, which is a slight performance problem
android.dependencyResolutionAtConfigurationTime.disallow=true
-android.suppressUnsupportedOptionWarnings=android.suppressUnsupportedOptionWarnings,android.dependencyResolutionAtConfigurationTime.disallow,android.experimental.lint.missingBaselineIsEmptyBaseline,android.lint.printStackTrace,android.lint.baselineOmitLineNumbers,android.experimental.disableCompileSdkChecks,android.overrideVersionCheck,android.r8.maxWorkers,android.experimental.privacysandboxsdk.enable,android.experimental.lint.reservedMemoryPerTask
+android.suppressUnsupportedOptionWarnings=android.suppressUnsupportedOptionWarnings,android.dependencyResolutionAtConfigurationTime.disallow,android.experimental.lint.missingBaselineIsEmptyBaseline,android.lint.printStackTrace,android.lint.baselineOmitLineNumbers,android.experimental.disableCompileSdkChecks,android.overrideVersionCheck,android.r8.maxWorkers,android.experimental.privacysandboxsdk.enable,android.experimental.lint.reservedMemoryPerTask,android.experimental.dependency.excludeLibraryComponentsFromConstraints
# Workaround for b/162074215
android.includeDependencyInfoInApks=false
diff --git a/playground-common/gradle/wrapper/gradle-wrapper.properties b/playground-common/gradle/wrapper/gradle-wrapper.properties
index 9cac784..3919b6f 100644
--- a/playground-common/gradle/wrapper/gradle-wrapper.properties
+++ b/playground-common/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
-distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-1-bin.zip
+distributionSha256Sum=a2da4ba435f6728b43554c5845f6f88f79589c3e0018c29ab33eb23bd781255b
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/playground-common/playground.properties b/playground-common/playground.properties
index e118b55..1b03d13 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=11268661
-androidx.studio.type=playground
+androidx.playground.metalavaBuildId=11291326
+androidx.studio.type=playground
\ No newline at end of file
diff --git a/preference/preference/lint-baseline.xml b/preference/preference/lint-baseline.xml
index 217ddcd..7cbbdb5 100644
--- a/preference/preference/lint-baseline.xml
+++ b/preference/preference/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.1.0-beta05" type="baseline" client="gradle" dependencies="false" name="AGP (8.1.0-beta05)" variant="all" version="8.1.0-beta05">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
diff --git a/print/print/lint-baseline.xml b/print/print/lint-baseline.xml
deleted file mode 100644
index f6d68dc..0000000
--- a/print/print/lint-baseline.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" return Build.VERSION.SDK_INT >= 19;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/print/PrintHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19 && mOrientation == 0) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/print/PrintHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 19 || bitmap == null) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/print/PrintHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/print/PrintHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/print/PrintHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/print/PrintHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/print/PrintHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/print/PrintHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/print/PrintHelper.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/print/PrintHelper.java"/>
- </issue>
-
-</issues>
diff --git a/privacysandbox/activity/activity-client/build.gradle b/privacysandbox/activity/activity-client/build.gradle
index 3b2876c..70f678b 100644
--- a/privacysandbox/activity/activity-client/build.gradle
+++ b/privacysandbox/activity/activity-client/build.gradle
@@ -34,7 +34,7 @@
api("androidx.annotation:annotation:1.1.0")
implementation("androidx.core:core:1.12.0")
- implementation("androidx.lifecycle:lifecycle-common:2.2.0")
+ implementation("androidx.lifecycle:lifecycle-common:2.6.2")
implementation("androidx.privacysandbox.sdkruntime:sdkruntime-client:1.0.0-alpha08")
implementation(project(":privacysandbox:activity:activity-core"))
diff --git a/privacysandbox/ui/integration-tests/testsdkprovider/lint-baseline.xml b/privacysandbox/ui/integration-tests/testsdkprovider/lint-baseline.xml
index dbc4c7b..264a6f3 100644
--- a/privacysandbox/ui/integration-tests/testsdkprovider/lint-baseline.xml
+++ b/privacysandbox/ui/integration-tests/testsdkprovider/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-alpha14" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-alpha14)" variant="all" version="8.2.0-alpha14">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="ClassVerificationFailure"
diff --git a/privacysandbox/ui/ui-client/build.gradle b/privacysandbox/ui/ui-client/build.gradle
index 1c30032..fc455a5 100644
--- a/privacysandbox/ui/ui-client/build.gradle
+++ b/privacysandbox/ui/ui-client/build.gradle
@@ -35,7 +35,7 @@
implementation("androidx.core:core:1.12.0")
- implementation("androidx.lifecycle:lifecycle-common:2.2.0")
+ implementation("androidx.lifecycle:lifecycle-common:2.6.2")
implementation("androidx.privacysandbox.sdkruntime:sdkruntime-client:1.0.0-alpha08")
implementation("androidx.customview:customview-poolingcontainer:1.0.0-alpha01")
implementation project(path: ':privacysandbox:ui:ui-core')
diff --git a/profileinstaller/profileinstaller/lint-baseline.xml b/profileinstaller/profileinstaller/lint-baseline.xml
deleted file mode 100644
index 480387a..0000000
--- a/profileinstaller/profileinstaller/lint-baseline.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/profileinstaller/DeviceProfileWriter.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/profileinstaller/Encoding.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/profileinstaller/ProfileInstaller.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/profileinstaller/ProfileInstallerInitializer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/profileinstaller/ProfileInstallerInitializer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/profileinstaller/ProfileTranscoder.java"/>
- </issue>
-
-</issues>
diff --git a/recyclerview/recyclerview/lint-baseline.xml b/recyclerview/recyclerview/lint-baseline.xml
index f004d3d..c0f60da 100644
--- a/recyclerview/recyclerview/lint-baseline.xml
+++ b/recyclerview/recyclerview/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
diff --git a/room/integration-tests/multiplatformtestapp/build.gradle b/room/integration-tests/multiplatformtestapp/build.gradle
new file mode 100644
index 0000000..4848221
--- /dev/null
+++ b/room/integration-tests/multiplatformtestapp/build.gradle
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 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.
+ */
+import androidx.build.KmpPlatformsKt
+import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
+
+plugins {
+ id("AndroidXPlugin")
+ id("com.google.devtools.ksp")
+}
+
+def nativeEnabled = KmpPlatformsKt.enableNative(project)
+
+androidXMultiplatform {
+ mac()
+ linux()
+ ios()
+ sourceSets {
+ commonTest {
+ dependencies {
+ implementation(libs.kotlinStdlib)
+ implementation(project(":room:room-runtime"))
+ implementation(project(":kruth:kruth"))
+ implementation(libs.kotlinTest)
+ }
+ }
+ if (nativeEnabled) {
+ nativeTest {
+ dependsOn(commonTest)
+ }
+ }
+ targets.all { target ->
+ if (target.platformType == KotlinPlatformType.native) {
+ target.compilations["test"].defaultSourceSet {
+ dependsOn(nativeTest)
+ }
+ }
+ }
+ }
+}
+
+ksp {
+ arg("room.generateKotlin", "true")
+}
diff --git a/room/integration-tests/multiplatformtestapp/src/commonTest/kotlin/androidx/room/integration/multiplatformtestapp/test/SampleDatabase.kt b/room/integration-tests/multiplatformtestapp/src/commonTest/kotlin/androidx/room/integration/multiplatformtestapp/test/SampleDatabase.kt
new file mode 100644
index 0000000..cb400c0e5
--- /dev/null
+++ b/room/integration-tests/multiplatformtestapp/src/commonTest/kotlin/androidx/room/integration/multiplatformtestapp/test/SampleDatabase.kt
@@ -0,0 +1,45 @@
+/*
+ * 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.integration.multiplatformtestapp.test
+
+import androidx.room.Dao
+import androidx.room.Database
+import androidx.room.Entity
+import androidx.room.Insert
+import androidx.room.PrimaryKey
+import androidx.room.RoomDatabase
+
+@Entity
+data class SampleEntity(
+ @PrimaryKey
+ val pk: Long
+)
+
+@Dao
+interface SampleDao {
+ @Insert
+ fun insert(item: SampleEntity)
+}
+
+@Database(
+ entities = [SampleEntity::class],
+ version = 1,
+ exportSchema = false
+)
+abstract class SampleDatabase : RoomDatabase() {
+ abstract fun dao(): SampleDao
+}
diff --git a/room/integration-tests/testapp/lint-baseline.xml b/room/integration-tests/testapp/lint-baseline.xml
index 92e25cf..eaa9ec8 100644
--- a/room/integration-tests/testapp/lint-baseline.xml
+++ b/room/integration-tests/testapp/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
index a737a73..5942d89 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
@@ -111,11 +111,6 @@
): MethodProcessorDelegate {
val asMember = executableElement.asMemberOf(containing)
return if (asMember.isSuspendFunction()) {
- val hasCoroutineArtifact = context.processingEnv
- .findTypeElement(COROUTINES_ROOM.canonicalName) != null
- if (!hasCoroutineArtifact) {
- context.logger.e(ProcessorErrors.MISSING_ROOM_COROUTINE_ARTIFACT)
- }
SuspendMethodProcessorDelegate(
context,
containing,
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
index 1bea64a..d4cbabc 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
@@ -653,9 +653,6 @@
"add `room-paging-rxjava3` artifact from Room as a dependency. " +
"androidx.room:room-paging-rxjava3:<version>"
- val MISSING_ROOM_COROUTINE_ARTIFACT = "To use Coroutine features, you must add `ktx`" +
- " artifact from Room as a dependency. androidx.room:room-ktx:<version>"
-
fun ambiguousConstructor(
pojo: String,
paramName: String,
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/CoroutineFlowResultBinderProvider.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/CoroutineFlowResultBinderProvider.kt
index ddd7285..932998d 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/CoroutineFlowResultBinderProvider.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/CoroutineFlowResultBinderProvider.kt
@@ -18,7 +18,6 @@
import androidx.room.compiler.processing.XType
import androidx.room.ext.KotlinTypeNames
-import androidx.room.ext.RoomCoroutinesTypeNames.COROUTINES_ROOM
import androidx.room.parser.ParsedQuery
import androidx.room.processor.Context
import androidx.room.processor.ProcessorErrors
@@ -27,17 +26,7 @@
import androidx.room.solver.query.result.CoroutineFlowResultBinder
import androidx.room.solver.query.result.QueryResultBinder
-@Suppress("FunctionName")
-fun CoroutineFlowResultBinderProvider(context: Context): QueryResultBinderProvider =
- CoroutineFlowResultBinderProviderImpl(
- context
- ).requireArtifact(
- context = context,
- requiredType = COROUTINES_ROOM,
- missingArtifactErrorMsg = ProcessorErrors.MISSING_ROOM_COROUTINE_ARTIFACT
- )
-
-private class CoroutineFlowResultBinderProviderImpl(
+class CoroutineFlowResultBinderProvider(
val context: Context
) : QueryResultBinderProvider {
companion object {
diff --git a/room/room-ktx/api/current.ignore b/room/room-ktx/api/current.ignore
new file mode 100644
index 0000000..558a9f0
--- /dev/null
+++ b/room/room-ktx/api/current.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+RemovedPackage: androidx.room:
+ Removed package androidx.room
+RemovedPackage: androidx.room.migration:
+ Removed package androidx.room.migration
diff --git a/room/room-ktx/api/current.txt b/room/room-ktx/api/current.txt
index ceaca54..e6f50d0 100644
--- a/room/room-ktx/api/current.txt
+++ b/room/room-ktx/api/current.txt
@@ -1,18 +1 @@
// Signature format: 4.0
-package androidx.room {
-
- public final class RoomDatabaseKt {
- method public static kotlinx.coroutines.flow.Flow<java.util.Set<java.lang.String>> invalidationTrackerFlow(androidx.room.RoomDatabase, String[] tables, optional boolean emitInitialState);
- method public static suspend <R> Object? withTransaction(androidx.room.RoomDatabase, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
- }
-
-}
-
-package androidx.room.migration {
-
- public final class MigrationKt {
- method public static androidx.room.migration.Migration Migration(int startVersion, int endVersion, kotlin.jvm.functions.Function1<? super androidx.sqlite.db.SupportSQLiteDatabase,kotlin.Unit> migrate);
- }
-
-}
-
diff --git a/room/room-ktx/api/restricted_current.ignore b/room/room-ktx/api/restricted_current.ignore
new file mode 100644
index 0000000..558a9f0
--- /dev/null
+++ b/room/room-ktx/api/restricted_current.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+RemovedPackage: androidx.room:
+ Removed package androidx.room
+RemovedPackage: androidx.room.migration:
+ Removed package androidx.room.migration
diff --git a/room/room-ktx/api/restricted_current.txt b/room/room-ktx/api/restricted_current.txt
index fc6c3c0..e6f50d0 100644
--- a/room/room-ktx/api/restricted_current.txt
+++ b/room/room-ktx/api/restricted_current.txt
@@ -1,31 +1 @@
// Signature format: 4.0
-package androidx.room {
-
- @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public final class CoroutinesRoom {
- method public static <R> kotlinx.coroutines.flow.Flow<R> createFlow(androidx.room.RoomDatabase db, boolean inTransaction, String[] tableNames, java.util.concurrent.Callable<R> callable);
- method public static suspend <R> Object? execute(androidx.room.RoomDatabase db, boolean inTransaction, android.os.CancellationSignal? cancellationSignal, java.util.concurrent.Callable<R> callable, kotlin.coroutines.Continuation<? super R>);
- method public static suspend <R> Object? execute(androidx.room.RoomDatabase db, boolean inTransaction, java.util.concurrent.Callable<R> callable, kotlin.coroutines.Continuation<? super R>);
- field public static final androidx.room.CoroutinesRoom.Companion Companion;
- }
-
- public static final class CoroutinesRoom.Companion {
- method public <R> kotlinx.coroutines.flow.Flow<R> createFlow(androidx.room.RoomDatabase db, boolean inTransaction, String[] tableNames, java.util.concurrent.Callable<R> callable);
- method public suspend <R> Object? execute(androidx.room.RoomDatabase db, boolean inTransaction, android.os.CancellationSignal? cancellationSignal, java.util.concurrent.Callable<R> callable, kotlin.coroutines.Continuation<? super R>);
- method public suspend <R> Object? execute(androidx.room.RoomDatabase db, boolean inTransaction, java.util.concurrent.Callable<R> callable, kotlin.coroutines.Continuation<? super R>);
- }
-
- public final class RoomDatabaseKt {
- method public static kotlinx.coroutines.flow.Flow<java.util.Set<java.lang.String>> invalidationTrackerFlow(androidx.room.RoomDatabase, String[] tables, optional boolean emitInitialState);
- method public static suspend <R> Object? withTransaction(androidx.room.RoomDatabase, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
- }
-
-}
-
-package androidx.room.migration {
-
- public final class MigrationKt {
- method public static androidx.room.migration.Migration Migration(int startVersion, int endVersion, kotlin.jvm.functions.Function1<? super androidx.sqlite.db.SupportSQLiteDatabase,kotlin.Unit> migrate);
- }
-
-}
-
diff --git a/room/room-ktx/lint-baseline.xml b/room/room-ktx/lint-baseline.xml
deleted file mode 100644
index 4970594..0000000
--- a/room/room-ktx/lint-baseline.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="RestrictedApiAndroidX"
- message="Api16Impl.cancel can only be called from within the same library group (referenced groupId=`androidx.sqlite` from groupId=`androidx.room`)"
- errorLine1=" SupportSQLiteCompat.Api16Impl.cancel(cancellationSignal)"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/room/CoroutinesRoom.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Api16Impl.cancel can only be called from within the same library group (referenced groupId=`androidx.sqlite` from groupId=`androidx.room`)"
- errorLine1=" SupportSQLiteCompat.Api16Impl.cancel(cancellationSignal)"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/room/CoroutinesRoom.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Api16Impl.cancel can only be called from within the same library group (referenced groupId=`androidx.sqlite` from groupId=`androidx.room`)"
- errorLine1=" SupportSQLiteCompat.Api16Impl.cancel(cancellationSignal)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/CoroutinesRoom.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Api16Impl.cancel can only be called from within the same library group (referenced groupId=`androidx.sqlite` from groupId=`androidx.room`)"
- errorLine1=" SupportSQLiteCompat.Api16Impl.cancel(cancellationSignal)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/CoroutinesRoom.kt"/>
- </issue>
-
-</issues>
diff --git a/room/room-ktx/src/main/java/androidx/room/RoomDatabaseExt.kt b/room/room-ktx/src/main/java/androidx/room/RoomDatabaseExt.kt
deleted file mode 100644
index 13b2b53..0000000
--- a/room/room-ktx/src/main/java/androidx/room/RoomDatabaseExt.kt
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-@file:JvmName("RoomDatabaseKt")
-
-package androidx.room
-
-import androidx.annotation.RestrictTo
-import java.util.concurrent.RejectedExecutionException
-import java.util.concurrent.atomic.AtomicBoolean
-import java.util.concurrent.atomic.AtomicInteger
-import kotlin.coroutines.ContinuationInterceptor
-import kotlin.coroutines.CoroutineContext
-import kotlin.coroutines.coroutineContext
-import kotlin.coroutines.resume
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.asContextElement
-import kotlinx.coroutines.awaitCancellation
-import kotlinx.coroutines.channels.awaitClose
-import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.callbackFlow
-import kotlinx.coroutines.launch
-import kotlinx.coroutines.runBlocking
-import kotlinx.coroutines.suspendCancellableCoroutine
-import kotlinx.coroutines.withContext
-
-/**
- * Calls the specified suspending [block] in a database transaction. The transaction will be
- * marked as successful unless an exception is thrown in the suspending [block] or the coroutine
- * is cancelled.
- *
- * Room will only perform at most one transaction at a time, additional transactions are queued
- * and executed on a first come, first serve order.
- *
- * Performing blocking database operations is not permitted in a coroutine scope other than the
- * one received by the suspending block. It is recommended that all [Dao] function invoked within
- * the [block] be suspending functions.
- *
- * The internal dispatcher used to execute the given [block] will block an utilize a thread from
- * Room's transaction executor until the [block] is complete.
- */
-public suspend fun <R> RoomDatabase.withTransaction(block: suspend () -> R): R {
- val transactionBlock: suspend CoroutineScope.() -> R = transaction@{
- val transactionElement = coroutineContext[TransactionElement]!!
- transactionElement.acquire()
- try {
- @Suppress("DEPRECATION")
- beginTransaction()
- try {
- val result = block.invoke()
- @Suppress("DEPRECATION")
- setTransactionSuccessful()
- return@transaction result
- } finally {
- @Suppress("DEPRECATION")
- endTransaction()
- }
- } finally {
- transactionElement.release()
- }
- }
- // Use inherited transaction context if available, this allows nested suspending transactions.
- val transactionDispatcher = coroutineContext[TransactionElement]?.transactionDispatcher
- return if (transactionDispatcher != null) {
- withContext(transactionDispatcher, transactionBlock)
- } else {
- startTransactionCoroutine(coroutineContext, transactionBlock)
- }
-}
-
-/**
- * Suspend caller coroutine and start the transaction coroutine in a thread from the
- * [RoomDatabase.transactionExecutor], resuming the caller coroutine with the result once done.
- * The [context] will be a parent of the started coroutine to propagating cancellation and release
- * the thread when cancelled.
- */
-private suspend fun <R> RoomDatabase.startTransactionCoroutine(
- context: CoroutineContext,
- transactionBlock: suspend CoroutineScope.() -> R
-): R = suspendCancellableCoroutine { continuation ->
- try {
- transactionExecutor.execute {
- try {
- // Thread acquired, start the transaction coroutine using the parent context.
- // The started coroutine will have an event loop dispatcher that we'll use for the
- // transaction context.
- runBlocking(context.minusKey(ContinuationInterceptor)) {
- val dispatcher = coroutineContext[ContinuationInterceptor]!!
- val transactionContext = createTransactionContext(dispatcher)
- continuation.resume(
- withContext(transactionContext, transactionBlock)
- )
- }
- } catch (ex: Throwable) {
- // If anything goes wrong, propagate exception to the calling coroutine.
- continuation.cancel(ex)
- }
- }
- } catch (ex: RejectedExecutionException) {
- // Couldn't acquire a thread, cancel coroutine.
- continuation.cancel(
- IllegalStateException(
- "Unable to acquire a thread to perform the database transaction.", ex
- )
- )
- }
-}
-
-/**
- * Creates a [CoroutineContext] for performing database operations within a coroutine transaction.
- *
- * The context is a combination of a dispatcher, a [TransactionElement] and a thread local element.
- *
- * * The dispatcher will dispatch coroutines to a single thread that is taken over from the Room
- * transaction executor. If the coroutine context is switched, suspending DAO functions will be able
- * to dispatch to the transaction thread. In reality the dispatcher is the event loop of a
- * [runBlocking] started on the dedicated thread.
- *
- * * The [TransactionElement] serves as an indicator for inherited context, meaning, if there is a
- * switch of context, suspending DAO methods will be able to use the indicator to dispatch the
- * database operation to the transaction thread.
- *
- * * The thread local element serves as a second indicator and marks threads that are used to
- * execute coroutines within the coroutine transaction, more specifically it allows us to identify
- * if a blocking DAO method is invoked within the transaction coroutine. Never assign meaning to
- * this value, for now all we care is if its present or not.
- */
-private fun RoomDatabase.createTransactionContext(
- dispatcher: ContinuationInterceptor
-): CoroutineContext {
- val transactionElement = TransactionElement(dispatcher)
- val threadLocalElement =
- suspendingTransactionId.asContextElement(System.identityHashCode(transactionElement))
- return dispatcher + transactionElement + threadLocalElement
-}
-
-/**
- * A [CoroutineContext.Element] that indicates there is an on-going database transaction.
- *
- */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
-internal class TransactionElement(
- internal val transactionDispatcher: ContinuationInterceptor
-) : CoroutineContext.Element {
-
- companion object Key : CoroutineContext.Key<TransactionElement>
-
- override val key: CoroutineContext.Key<TransactionElement>
- get() = TransactionElement
-
- /**
- * Number of transactions (including nested ones) started with this element.
- * Call [acquire] to increase the count and [release] to decrease it.
- */
- private val referenceCount = AtomicInteger(0)
-
- fun acquire() {
- referenceCount.incrementAndGet()
- }
-
- fun release() {
- val count = referenceCount.decrementAndGet()
- if (count < 0) {
- throw IllegalStateException("Transaction was never started or was already released.")
- }
- }
-}
-
-/**
- * Creates a [Flow] that listens for changes in the database via the [InvalidationTracker] and emits
- * sets of the tables that were invalidated.
- *
- * The Flow will emit at least one value, a set of all the tables registered for observation to
- * kick-start the stream unless [emitInitialState] is set to `false`.
- *
- * If one of the tables to observe does not exist in the database, this Flow throws an
- * [IllegalArgumentException] during collection.
- *
- * The returned Flow can be used to create a stream that reacts to changes in the database:
- * ```
- * fun getArtistTours(from: Date, to: Date): Flow<Map<Artist, TourState>> {
- * return db.invalidationTrackerFlow("Artist").map { _ ->
- * val artists = artistsDao.getAllArtists()
- * val tours = tourService.fetchStates(artists.map { it.id })
- * associateTours(artists, tours, from, to)
- * }
- * }
- * ```
- *
- * @param tables The name of the tables or views to observe.
- * @param emitInitialState Set to `false` if no initial emission is desired. Default value is
- * `true`.
- */
-public fun RoomDatabase.invalidationTrackerFlow(
- vararg tables: String,
- emitInitialState: Boolean = true
-): Flow<Set<String>> = callbackFlow {
- // Flag to ignore invalidation until the initial state is sent.
- val ignoreInvalidation = AtomicBoolean(emitInitialState)
- val observer = object : InvalidationTracker.Observer(tables) {
- override fun onInvalidated(tables: Set<String>) {
- if (ignoreInvalidation.get()) {
- return
- }
- trySend(tables)
- }
- }
- val queryContext =
- coroutineContext[TransactionElement]?.transactionDispatcher ?: getQueryDispatcher()
- val job = launch(queryContext) {
- invalidationTracker.addObserver(observer)
- try {
- if (emitInitialState) {
- // Initial invalidation of all tables, to kick-start the flow
- trySend(tables.toSet())
- }
- ignoreInvalidation.set(false)
- awaitCancellation()
- } finally {
- invalidationTracker.removeObserver(observer)
- }
- }
- awaitClose {
- job.cancel()
- }
-}
diff --git a/room/room-ktx/src/main/java/androidx/room/migration/MigrationExt.kt b/room/room-ktx/src/main/java/androidx/room/migration/MigrationExt.kt
deleted file mode 100644
index a697681..0000000
--- a/room/room-ktx/src/main/java/androidx/room/migration/MigrationExt.kt
+++ /dev/null
@@ -1,53 +0,0 @@
-
-/*
- * Copyright 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-@file:JvmName("MigrationKt")
-
-package androidx.room.migration
-
-import androidx.sqlite.db.SupportSQLiteDatabase
-
-/**
- * Creates [Migration] from [startVersion] to [endVersion] that runs [migrate] to perform
- * the necessary migrations.
- *
- * A migration can handle more than 1 version (e.g. if you have a faster path to choose when
- * going version 3 to 5 without going to version 4). If Room opens a database at version
- * 3 and latest version is < 5, Room will use the migration object that can migrate from
- * 3 to 5 instead of 3 to 4 and 4 to 5.
- *
- * If there are not enough migrations provided to move from the current version to the latest
- * version, Room will clear the database and recreate so even if you have no changes between 2
- * versions, you should still provide a Migration object to the builder.
- *
- * [migrate] cannot access any generated Dao in this method.
- *
- * [migrate] is already called inside a transaction and that transaction
- * might actually be a composite transaction of all necessary `Migration`s.
- */
-public fun Migration(
- startVersion: Int,
- endVersion: Int,
- migrate: (SupportSQLiteDatabase) -> Unit
-): Migration = MigrationImpl(startVersion, endVersion, migrate)
-
-private class MigrationImpl(
- startVersion: Int,
- endVersion: Int,
- val migrateCallback: (SupportSQLiteDatabase) -> Unit
-) : Migration(startVersion, endVersion) {
- override fun migrate(db: SupportSQLiteDatabase) = migrateCallback(db)
-}
diff --git a/room/room-runtime/api/current.txt b/room/room-runtime/api/current.txt
index ef76640..e380daf 100644
--- a/room/room-runtime/api/current.txt
+++ b/room/room-runtime/api/current.txt
@@ -163,6 +163,11 @@
method public void onQuery(String sqlQuery, java.util.List<?> bindArgs);
}
+ public final class RoomDatabaseKt {
+ method public static kotlinx.coroutines.flow.Flow<java.util.Set<java.lang.String>> invalidationTrackerFlow(androidx.room.RoomDatabase, String[] tables, optional boolean emitInitialState);
+ method public static suspend <R> Object? withTransaction(androidx.room.RoomDatabase, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
+ }
+
public interface RoomOpenDelegateMarker {
}
@@ -183,5 +188,9 @@
field public final int startVersion;
}
+ public final class MigrationKt {
+ method public static androidx.room.migration.Migration Migration(int startVersion, int endVersion, kotlin.jvm.functions.Function1<? super androidx.sqlite.db.SupportSQLiteDatabase,kotlin.Unit> migrate);
+ }
+
}
diff --git a/room/room-runtime/api/restricted_current.txt b/room/room-runtime/api/restricted_current.txt
index 39ae331..eddc562 100644
--- a/room/room-runtime/api/restricted_current.txt
+++ b/room/room-runtime/api/restricted_current.txt
@@ -1,6 +1,19 @@
// Signature format: 4.0
package androidx.room {
+ @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public final class CoroutinesRoom {
+ method public static <R> kotlinx.coroutines.flow.Flow<R> createFlow(androidx.room.RoomDatabase db, boolean inTransaction, String[] tableNames, java.util.concurrent.Callable<R> callable);
+ method public static suspend <R> Object? execute(androidx.room.RoomDatabase db, boolean inTransaction, android.os.CancellationSignal? cancellationSignal, java.util.concurrent.Callable<R> callable, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend <R> Object? execute(androidx.room.RoomDatabase db, boolean inTransaction, java.util.concurrent.Callable<R> callable, kotlin.coroutines.Continuation<? super R>);
+ field public static final androidx.room.CoroutinesRoom.Companion Companion;
+ }
+
+ public static final class CoroutinesRoom.Companion {
+ method public <R> kotlinx.coroutines.flow.Flow<R> createFlow(androidx.room.RoomDatabase db, boolean inTransaction, String[] tableNames, java.util.concurrent.Callable<R> callable);
+ method public suspend <R> Object? execute(androidx.room.RoomDatabase db, boolean inTransaction, android.os.CancellationSignal? cancellationSignal, java.util.concurrent.Callable<R> callable, kotlin.coroutines.Continuation<? super R>);
+ method public suspend <R> Object? execute(androidx.room.RoomDatabase db, boolean inTransaction, java.util.concurrent.Callable<R> callable, kotlin.coroutines.Continuation<? super R>);
+ }
+
public class DatabaseConfiguration {
ctor @Deprecated @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public DatabaseConfiguration(android.content.Context context, String? name, androidx.sqlite.db.SupportSQLiteOpenHelper.Factory sqliteOpenHelperFactory, androidx.room.RoomDatabase.MigrationContainer migrationContainer, java.util.List<? extends androidx.room.RoomDatabase.Callback>? callbacks, boolean allowMainThreadQueries, androidx.room.RoomDatabase.JournalMode journalMode, java.util.concurrent.Executor queryExecutor, boolean requireMigration, java.util.Set<java.lang.Integer>? migrationNotRequiredFrom);
ctor @Deprecated @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public DatabaseConfiguration(android.content.Context context, String? name, androidx.sqlite.db.SupportSQLiteOpenHelper.Factory sqliteOpenHelperFactory, androidx.room.RoomDatabase.MigrationContainer migrationContainer, java.util.List<? extends androidx.room.RoomDatabase.Callback>? callbacks, boolean allowMainThreadQueries, androidx.room.RoomDatabase.JournalMode journalMode, java.util.concurrent.Executor queryExecutor, java.util.concurrent.Executor transactionExecutor, android.content.Intent? multiInstanceInvalidationServiceIntent, boolean requireMigration, boolean allowDestructiveMigrationOnDowngrade, java.util.Set<java.lang.Integer>? migrationNotRequiredFrom, String? copyFromAssetPath, java.io.File? copyFromFile, java.util.concurrent.Callable<java.io.InputStream>? copyFromInputStream, androidx.room.RoomDatabase.PrepackagedDatabaseCallback? prepackagedDatabaseCallback, java.util.List<?> typeConverters, java.util.List<? extends androidx.room.migration.AutoMigrationSpec> autoMigrationSpecs);
@@ -224,6 +237,11 @@
method public void onQuery(String sqlQuery, java.util.List<?> bindArgs);
}
+ public final class RoomDatabaseKt {
+ method public static kotlinx.coroutines.flow.Flow<java.util.Set<java.lang.String>> invalidationTrackerFlow(androidx.room.RoomDatabase, String[] tables, optional boolean emitInitialState);
+ method public static suspend <R> Object? withTransaction(androidx.room.RoomDatabase, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
+ }
+
public interface RoomOpenDelegateMarker {
}
@@ -317,6 +335,10 @@
field public final int startVersion;
}
+ public final class MigrationKt {
+ method public static androidx.room.migration.Migration Migration(int startVersion, int endVersion, kotlin.jvm.functions.Function1<? super androidx.sqlite.db.SupportSQLiteDatabase,kotlin.Unit> migrate);
+ }
+
}
package androidx.room.paging {
diff --git a/room/room-runtime/build.gradle b/room/room-runtime/build.gradle
index 33991a3..08c78c0 100644
--- a/room/room-runtime/build.gradle
+++ b/room/room-runtime/build.gradle
@@ -90,11 +90,13 @@
api(project(":room:room-common"))
api(project(":sqlite:sqlite"))
api(projectOrArtifact(":annotation:annotation"))
+ api(libs.kotlinCoroutinesCore)
}
}
commonTest {
dependencies {
implementation(libs.kotlinTest)
+ implementation(libs.kotlinCoroutinesTest)
implementation(project(":kruth:kruth"))
}
}
@@ -102,6 +104,7 @@
dependsOn(commonMain)
dependencies {
api(project(":sqlite:sqlite-framework"))
+ api(libs.kotlinCoroutinesAndroid)
implementation("androidx.arch.core:core-runtime:2.2.0")
compileOnly("androidx.collection:collection:1.2.0")
compileOnly("androidx.lifecycle:lifecycle-livedata-core:2.0.0")
diff --git a/room/room-runtime/lint-baseline.xml b/room/room-runtime/lint-baseline.xml
index 1f6fbf3..bcfeb52 100644
--- a/room/room-runtime/lint-baseline.xml
+++ b/room/room-runtime/lint-baseline.xml
@@ -1,257 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="NewApi"
- message="Call requires API level 21 (current min is 19): `java.util.Locale#forLanguageTag`"
- errorLine1=" Locale.setDefault(Locale.forLanguageTag("tr-TR"))"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/test/java/androidx/room/InvalidationTrackerTest.kt"/>
- </issue>
-
- <issue
- id="WrongConstant"
- message="Must be one of: RoomSQLiteQuery.NULL, RoomSQLiteQuery.LONG, RoomSQLiteQuery.DOUBLE, RoomSQLiteQuery.STRING, RoomSQLiteQuery.BLOB"
- errorLine1=" bindingTypes = IntArray(limit)"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomSQLiteQuery.kt"/>
- </issue>
-
- <issue
- id="WrongConstant"
- message="Must be one of: RoomSQLiteQuery.NULL, RoomSQLiteQuery.LONG, RoomSQLiteQuery.DOUBLE, RoomSQLiteQuery.STRING, RoomSQLiteQuery.BLOB"
- errorLine1=" when (bindingTypes[index]) {"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomSQLiteQuery.kt"/>
- </issue>
-
- <issue
- id="WrongConstant"
- message="Must be one of: RoomSQLiteQuery.NULL, RoomSQLiteQuery.LONG, RoomSQLiteQuery.DOUBLE, RoomSQLiteQuery.STRING, RoomSQLiteQuery.BLOB"
- errorLine1=" bindingTypes[index] = NULL"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomSQLiteQuery.kt"/>
- </issue>
-
- <issue
- id="WrongConstant"
- message="Must be one of: RoomSQLiteQuery.NULL, RoomSQLiteQuery.LONG, RoomSQLiteQuery.DOUBLE, RoomSQLiteQuery.STRING, RoomSQLiteQuery.BLOB"
- errorLine1=" bindingTypes[index] = LONG"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomSQLiteQuery.kt"/>
- </issue>
-
- <issue
- id="WrongConstant"
- message="Must be one of: RoomSQLiteQuery.NULL, RoomSQLiteQuery.LONG, RoomSQLiteQuery.DOUBLE, RoomSQLiteQuery.STRING, RoomSQLiteQuery.BLOB"
- errorLine1=" bindingTypes[index] = DOUBLE"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomSQLiteQuery.kt"/>
- </issue>
-
- <issue
- id="WrongConstant"
- message="Must be one of: RoomSQLiteQuery.NULL, RoomSQLiteQuery.LONG, RoomSQLiteQuery.DOUBLE, RoomSQLiteQuery.STRING, RoomSQLiteQuery.BLOB"
- errorLine1=" bindingTypes[index] = STRING"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomSQLiteQuery.kt"/>
- </issue>
-
- <issue
- id="WrongConstant"
- message="Must be one of: RoomSQLiteQuery.NULL, RoomSQLiteQuery.LONG, RoomSQLiteQuery.DOUBLE, RoomSQLiteQuery.STRING, RoomSQLiteQuery.BLOB"
- errorLine1=" bindingTypes[index] = BLOB"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomSQLiteQuery.kt"/>
- </issue>
-
- <issue
- id="WrongConstant"
- message="Must be one of: RoomSQLiteQuery.NULL, RoomSQLiteQuery.LONG, RoomSQLiteQuery.DOUBLE, RoomSQLiteQuery.STRING, RoomSQLiteQuery.BLOB"
- errorLine1=" System.arraycopy(other.bindingTypes, 0, bindingTypes, 0, argCount)"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomSQLiteQuery.kt"/>
- </issue>
-
- <issue
- id="WrongConstant"
- message="Must be one of: RoomSQLiteQuery.NULL, RoomSQLiteQuery.LONG, RoomSQLiteQuery.DOUBLE, RoomSQLiteQuery.STRING, RoomSQLiteQuery.BLOB"
- errorLine1=" System.arraycopy(other.bindingTypes, 0, bindingTypes, 0, argCount)"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomSQLiteQuery.kt"/>
- </issue>
-
- <issue
- id="WrongConstant"
- message="Must be one of: RoomSQLiteQuery.NULL, RoomSQLiteQuery.LONG, RoomSQLiteQuery.DOUBLE, RoomSQLiteQuery.STRING, RoomSQLiteQuery.BLOB"
- errorLine1=" Arrays.fill(bindingTypes, NULL)"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomSQLiteQuery.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(5)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/room/AutoCloserTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(5)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/room/AutoCloserTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(10)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/room/AutoCloserTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(10)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/room/AutoCloserTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(5)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/room/AutoCloserTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(5)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/room/AutoCloserTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(100)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/room/AutoClosingRoomOpenHelperFactoryTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(100)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/room/AutoClosingRoomOpenHelperFactoryTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(100)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/room/AutoClosingRoomOpenHelperFactoryTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(100)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/room/AutoClosingRoomOpenHelperFactoryTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(100) // Let the db auto close..."
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/room/AutoClosingRoomOpenHelperTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(20) // Database should auto-close here"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/room/AutoClosingRoomOpenHelperTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(20)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/room/AutoClosingRoomOpenHelperTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(20)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/room/AutoClosingRoomOpenHelperTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(10)"
- errorLine2=" ~~~~~">
- <location
- file="src/test/java/androidx/room/InvalidationTrackerTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(10) // simulate slow reading, as if this was a big file"
- errorLine2=" ~~~~~">
- <location
- file="src/test/java/androidx/room/SQLiteCopyOpenHelperTest.kt"/>
- </issue>
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(100)"
- errorLine2=" ~~~~~">
- <location
- file="src/test/java/androidx/room/TransactionExecutorTest.kt"/>
- </issue>
+<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
<issue
id="RestrictedApiAndroidX"
@@ -291,24 +39,6 @@
<issue
id="RestrictedApiAndroidX"
- message="Api19Impl.getNotificationUri can only be called from within the same library group (referenced groupId=`androidx.sqlite` from groupId=`androidx.room`)"
- errorLine1=" return SupportSQLiteCompat.Api19Impl.getNotificationUri(delegate)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/room/AutoClosingRoomOpenHelper.android.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Api19Impl.getNotificationUri can only be called from within the same library group (referenced groupId=`androidx.sqlite` from groupId=`androidx.room`)"
- errorLine1=" return SupportSQLiteCompat.Api19Impl.getNotificationUri(delegate)"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/room/AutoClosingRoomOpenHelper.android.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
message="Api29Impl.getNotificationUris can only be called from within the same library group (referenced groupId=`androidx.sqlite` from groupId=`androidx.room`)"
errorLine1=" return SupportSQLiteCompat.Api29Impl.getNotificationUris(delegate)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
@@ -354,33 +84,6 @@
<issue
id="RestrictedApiAndroidX"
- message="Api16Impl.createCancellationSignal can only be called from within the same library group (referenced groupId=`androidx.sqlite` from groupId=`androidx.room`)"
- errorLine1=" SupportSQLiteCompat.Api16Impl.createCancellationSignal()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/util/DBUtil.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Api19Impl.isLowRamDevice can only be called from within the same library group (referenced groupId=`androidx.sqlite` from groupId=`androidx.room`)"
- errorLine1=" SupportSQLiteCompat.Api19Impl.isLowRamDevice(activityManager)"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomDatabase.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Api19Impl.isLowRamDevice can only be called from within the same library group (referenced groupId=`androidx.sqlite` from groupId=`androidx.room`)"
- errorLine1=" SupportSQLiteCompat.Api19Impl.isLowRamDevice(activityManager)"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomDatabase.kt"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
message="ProcessLock can only be called from within the same library group (referenced groupId=`androidx.sqlite` from groupId=`androidx.room`)"
errorLine1=" val copyLock = ProcessLock("
errorLine2=" ~~~~~~~~~~~">
@@ -424,67 +127,4 @@
file="src/androidMain/kotlin/androidx/room/SQLiteCopyOpenHelper.android.kt"/>
</issue>
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/room/AutoClosingRoomOpenHelper.android.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/room/AutoClosingRoomOpenHelper.android.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @get:RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/room/AutoClosingRoomOpenHelper.android.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/room/AutoClosingRoomOpenHelper.android.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/room/util/CursorUtil.android.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN &&"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/room/InvalidationTracker.android.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/room/SQLiteCopyOpenHelper.android.kt"/>
- </issue>
-
</issues>
diff --git a/room/room-ktx/src/androidTest/java/androidx/room/CoroutineRoomCancellationTest.kt b/room/room-runtime/src/androidInstrumentedTest/kotlin/androidx/room/CoroutineRoomCancellationTest.kt
similarity index 100%
rename from room/room-ktx/src/androidTest/java/androidx/room/CoroutineRoomCancellationTest.kt
rename to room/room-runtime/src/androidInstrumentedTest/kotlin/androidx/room/CoroutineRoomCancellationTest.kt
diff --git a/room/room-ktx/src/main/java/androidx/room/CoroutinesRoom.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/CoroutinesRoom.android.kt
similarity index 100%
rename from room/room-ktx/src/main/java/androidx/room/CoroutinesRoom.kt
rename to room/room-runtime/src/androidMain/kotlin/androidx/room/CoroutinesRoom.android.kt
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 353c4cb..7bb4ede 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
@@ -13,6 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+@file:JvmName("RoomDatabaseKt")
+
package androidx.room
import android.annotation.SuppressLint
@@ -48,10 +50,27 @@
import java.util.TreeMap
import java.util.concurrent.Callable
import java.util.concurrent.Executor
+import java.util.concurrent.RejectedExecutionException
import java.util.concurrent.TimeUnit
+import java.util.concurrent.atomic.AtomicBoolean
+import java.util.concurrent.atomic.AtomicInteger
import java.util.concurrent.locks.Lock
import java.util.concurrent.locks.ReentrantReadWriteLock
+import kotlin.coroutines.ContinuationInterceptor
+import kotlin.coroutines.CoroutineContext
+import kotlin.coroutines.coroutineContext
+import kotlin.coroutines.resume
import kotlin.reflect.KClass
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.asContextElement
+import kotlinx.coroutines.awaitCancellation
+import kotlinx.coroutines.channels.awaitClose
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.callbackFlow
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.runBlocking
+import kotlinx.coroutines.suspendCancellableCoroutine
+import kotlinx.coroutines.withContext
/**
* Base class for all Room databases. All classes that are annotated with [Database] must
@@ -1730,3 +1749,204 @@
const val MAX_BIND_PARAMETER_CNT = 999
}
}
+
+/**
+ * Calls the specified suspending [block] in a database transaction. The transaction will be
+ * marked as successful unless an exception is thrown in the suspending [block] or the coroutine
+ * is cancelled.
+ *
+ * Room will only perform at most one transaction at a time, additional transactions are queued
+ * and executed on a first come, first serve order.
+ *
+ * Performing blocking database operations is not permitted in a coroutine scope other than the
+ * one received by the suspending block. It is recommended that all [Dao] function invoked within
+ * the [block] be suspending functions.
+ *
+ * The internal dispatcher used to execute the given [block] will block an utilize a thread from
+ * Room's transaction executor until the [block] is complete.
+ */
+public suspend fun <R> RoomDatabase.withTransaction(block: suspend () -> R): R {
+ val transactionBlock: suspend CoroutineScope.() -> R = transaction@{
+ val transactionElement = coroutineContext[TransactionElement]!!
+ transactionElement.acquire()
+ try {
+ @Suppress("DEPRECATION")
+ beginTransaction()
+ try {
+ val result = block.invoke()
+ @Suppress("DEPRECATION")
+ setTransactionSuccessful()
+ return@transaction result
+ } finally {
+ @Suppress("DEPRECATION")
+ endTransaction()
+ }
+ } finally {
+ transactionElement.release()
+ }
+ }
+ // Use inherited transaction context if available, this allows nested suspending transactions.
+ val transactionDispatcher = coroutineContext[TransactionElement]?.transactionDispatcher
+ return if (transactionDispatcher != null) {
+ withContext(transactionDispatcher, transactionBlock)
+ } else {
+ startTransactionCoroutine(coroutineContext, transactionBlock)
+ }
+}
+
+/**
+ * Suspend caller coroutine and start the transaction coroutine in a thread from the
+ * [RoomDatabase.transactionExecutor], resuming the caller coroutine with the result once done.
+ * The [context] will be a parent of the started coroutine to propagating cancellation and release
+ * the thread when cancelled.
+ */
+private suspend fun <R> RoomDatabase.startTransactionCoroutine(
+ context: CoroutineContext,
+ transactionBlock: suspend CoroutineScope.() -> R
+): R = suspendCancellableCoroutine { continuation ->
+ try {
+ transactionExecutor.execute {
+ try {
+ // Thread acquired, start the transaction coroutine using the parent context.
+ // The started coroutine will have an event loop dispatcher that we'll use for the
+ // transaction context.
+ runBlocking(context.minusKey(ContinuationInterceptor)) {
+ val dispatcher = coroutineContext[ContinuationInterceptor]!!
+ val transactionContext = createTransactionContext(dispatcher)
+ continuation.resume(
+ withContext(transactionContext, transactionBlock)
+ )
+ }
+ } catch (ex: Throwable) {
+ // If anything goes wrong, propagate exception to the calling coroutine.
+ continuation.cancel(ex)
+ }
+ }
+ } catch (ex: RejectedExecutionException) {
+ // Couldn't acquire a thread, cancel coroutine.
+ continuation.cancel(
+ IllegalStateException(
+ "Unable to acquire a thread to perform the database transaction.", ex
+ )
+ )
+ }
+}
+
+/**
+ * Creates a [CoroutineContext] for performing database operations within a coroutine transaction.
+ *
+ * The context is a combination of a dispatcher, a [TransactionElement] and a thread local element.
+ *
+ * * The dispatcher will dispatch coroutines to a single thread that is taken over from the Room
+ * transaction executor. If the coroutine context is switched, suspending DAO functions will be able
+ * to dispatch to the transaction thread. In reality the dispatcher is the event loop of a
+ * [runBlocking] started on the dedicated thread.
+ *
+ * * The [TransactionElement] serves as an indicator for inherited context, meaning, if there is a
+ * switch of context, suspending DAO methods will be able to use the indicator to dispatch the
+ * database operation to the transaction thread.
+ *
+ * * The thread local element serves as a second indicator and marks threads that are used to
+ * execute coroutines within the coroutine transaction, more specifically it allows us to identify
+ * if a blocking DAO method is invoked within the transaction coroutine. Never assign meaning to
+ * this value, for now all we care is if its present or not.
+ */
+private fun RoomDatabase.createTransactionContext(
+ dispatcher: ContinuationInterceptor
+): CoroutineContext {
+ val transactionElement = TransactionElement(dispatcher)
+ val threadLocalElement =
+ suspendingTransactionId.asContextElement(System.identityHashCode(transactionElement))
+ return dispatcher + transactionElement + threadLocalElement
+}
+
+/**
+ * A [CoroutineContext.Element] that indicates there is an on-going database transaction.
+ *
+ */
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+internal class TransactionElement(
+ internal val transactionDispatcher: ContinuationInterceptor
+) : CoroutineContext.Element {
+
+ companion object Key : CoroutineContext.Key<TransactionElement>
+
+ override val key: CoroutineContext.Key<TransactionElement>
+ get() = TransactionElement
+
+ /**
+ * Number of transactions (including nested ones) started with this element.
+ * Call [acquire] to increase the count and [release] to decrease it.
+ */
+ private val referenceCount = AtomicInteger(0)
+
+ fun acquire() {
+ referenceCount.incrementAndGet()
+ }
+
+ fun release() {
+ val count = referenceCount.decrementAndGet()
+ if (count < 0) {
+ throw IllegalStateException("Transaction was never started or was already released.")
+ }
+ }
+}
+
+/**
+ * Creates a [Flow] that listens for changes in the database via the [InvalidationTracker] and emits
+ * sets of the tables that were invalidated.
+ *
+ * The Flow will emit at least one value, a set of all the tables registered for observation to
+ * kick-start the stream unless [emitInitialState] is set to `false`.
+ *
+ * If one of the tables to observe does not exist in the database, this Flow throws an
+ * [IllegalArgumentException] during collection.
+ *
+ * The returned Flow can be used to create a stream that reacts to changes in the database:
+ * ```
+ * fun getArtistTours(from: Date, to: Date): Flow<Map<Artist, TourState>> {
+ * return db.invalidationTrackerFlow("Artist").map { _ ->
+ * val artists = artistsDao.getAllArtists()
+ * val tours = tourService.fetchStates(artists.map { it.id })
+ * associateTours(artists, tours, from, to)
+ * }
+ * }
+ * ```
+ *
+ * @param tables The name of the tables or views to observe.
+ * @param emitInitialState Set to `false` if no initial emission is desired. Default value is
+ * `true`.
+ */
+public fun RoomDatabase.invalidationTrackerFlow(
+ vararg tables: String,
+ emitInitialState: Boolean = true
+): Flow<Set<String>> = callbackFlow {
+ // Flag to ignore invalidation until the initial state is sent.
+ val ignoreInvalidation = AtomicBoolean(emitInitialState)
+ val observer = object : InvalidationTracker.Observer(tables) {
+ override fun onInvalidated(tables: Set<String>) {
+ if (ignoreInvalidation.get()) {
+ return
+ }
+ trySend(tables)
+ }
+ }
+ val queryContext =
+ coroutineContext[TransactionElement]?.transactionDispatcher ?: getQueryDispatcher()
+ val job = launch(queryContext) {
+ invalidationTracker.addObserver(observer)
+ try {
+ if (emitInitialState) {
+ // Initial invalidation of all tables, to kick-start the flow
+ trySend(tables.toSet())
+ }
+ ignoreInvalidation.set(false)
+ awaitCancellation()
+ } finally {
+ invalidationTracker.removeObserver(observer)
+ }
+ }
+ awaitClose {
+ job.cancel()
+ }
+}
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/migration/Migration.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/migration/Migration.android.kt
index 07838889..dbad445 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/migration/Migration.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/migration/Migration.android.kt
@@ -13,6 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+@file:JvmName("MigrationKt")
+
package androidx.room.migration
import androidx.room.driver.SupportSQLiteConnection
@@ -70,3 +72,35 @@
}
}
}
+
+/**
+ * Creates [Migration] from [startVersion] to [endVersion] that runs [migrate] to perform
+ * the necessary migrations.
+ *
+ * A migration can handle more than 1 version (e.g. if you have a faster path to choose when
+ * going version 3 to 5 without going to version 4). If Room opens a database at version
+ * 3 and latest version is < 5, Room will use the migration object that can migrate from
+ * 3 to 5 instead of 3 to 4 and 4 to 5.
+ *
+ * If there are not enough migrations provided to move from the current version to the latest
+ * version, Room will clear the database and recreate so even if you have no changes between 2
+ * versions, you should still provide a Migration object to the builder.
+ *
+ * [migrate] cannot access any generated Dao in this method.
+ *
+ * [migrate] is already called inside a transaction and that transaction
+ * might actually be a composite transaction of all necessary `Migration`s.
+ */
+public fun Migration(
+ startVersion: Int,
+ endVersion: Int,
+ migrate: (SupportSQLiteDatabase) -> Unit
+): Migration = MigrationImpl(startVersion, endVersion, migrate)
+
+private class MigrationImpl(
+ startVersion: Int,
+ endVersion: Int,
+ val migrateCallback: (SupportSQLiteDatabase) -> Unit
+) : Migration(startVersion, endVersion) {
+ override fun migrate(db: SupportSQLiteDatabase) = migrateCallback(db)
+}
diff --git a/room/room-ktx/src/test/java/androidx/room/CoroutinesRoomTest.kt b/room/room-runtime/src/androidUnitTest/kotlin/androidx/room/CoroutinesRoomTest.kt
similarity index 100%
rename from room/room-ktx/src/test/java/androidx/room/CoroutinesRoomTest.kt
rename to room/room-runtime/src/androidUnitTest/kotlin/androidx/room/CoroutinesRoomTest.kt
diff --git a/room/room-ktx/src/test/java/androidx/room/MigrationTest.kt b/room/room-runtime/src/androidUnitTest/kotlin/androidx/room/MigrationTest.kt
similarity index 100%
rename from room/room-ktx/src/test/java/androidx/room/MigrationTest.kt
rename to room/room-runtime/src/androidUnitTest/kotlin/androidx/room/MigrationTest.kt
diff --git a/samples/AndroidXDemos/lint-baseline.xml b/samples/AndroidXDemos/lint-baseline.xml
index aae5073..21633f4 100644
--- a/samples/AndroidXDemos/lint-baseline.xml
+++ b/samples/AndroidXDemos/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="OnClick"
@@ -213,15 +213,6 @@
<issue
id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/view/SystemUIModes.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
message="This folder configuration (`v11`) is unnecessary; `minSdkVersion` is 19. Merge all the resources in this folder into `layout`.">
<location
file="src/main/res/layout-v11"/>
diff --git a/samples/MediaRoutingDemo/lint-baseline.xml b/samples/MediaRoutingDemo/lint-baseline.xml
index 7030d15..020dd5f 100644
--- a/samples/MediaRoutingDemo/lint-baseline.xml
+++ b/samples/MediaRoutingDemo/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="RestrictedApiAndroidX"
@@ -129,168 +129,6 @@
<issue
id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR2)"
- errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/activities/systemrouting/source/BluetoothManagerSystemRoutesSource.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/player/LocalPlayer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/player/LocalPlayer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/player/LocalPlayer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/player/LocalPlayer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/player/LocalPlayer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/player/LocalPlayer.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/activities/MainActivity.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1="@RequiresApi(Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/activities/systemrouting/source/MediaRouterSystemRoutesSource.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/activities/systemrouting/source/MediaRouterSystemRoutesSource.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR2)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/activities/systemrouting/source/MediaRouterSystemRoutesSource.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/OverlayDisplayWindow.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/OverlayDisplayWindow.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/player/Player.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (route != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/player/Player.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/activities/systemrouting/SystemRouteUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/activities/systemrouting/SystemRoutingActivity.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/mediarouting/activities/systemrouting/SystemRoutingActivity.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
message="This folder configuration (`v18`) is unnecessary; `minSdkVersion` is 19. Merge all the resources in this folder into `values`.">
<location
file="src/main/res/values-v18"/>
diff --git a/samples/Support4Demos/lint-baseline.xml b/samples/Support4Demos/lint-baseline.xml
index 76a73d5..8e8e334 100644
--- a/samples/Support4Demos/lint-baseline.xml
+++ b/samples/Support4Demos/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="MissingPermission"
@@ -201,15 +201,6 @@
<issue
id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/android/supportv4/widget/SlidingPaneLayoutActivity.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
message="This folder configuration (`v11`) is unnecessary; `minSdkVersion` is 19. Merge all the resources in this folder into `values`.">
<location
file="src/main/res/values-v11"/>
diff --git a/samples/SupportEmojiDemos/lint-baseline.xml b/samples/SupportEmojiDemos/lint-baseline.xml
index 67b1517..4292157 100644
--- a/samples/SupportEmojiDemos/lint-baseline.xml
+++ b/samples/SupportEmojiDemos/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-alpha15" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-alpha15)" variant="all" version="8.2.0-alpha15">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanSynchronizedMethods"
diff --git a/samples/SupportLeanbackDemos/lint-baseline.xml b/samples/SupportLeanbackDemos/lint-baseline.xml
index ea8e981..4921a8f 100644
--- a/samples/SupportLeanbackDemos/lint-baseline.xml
+++ b/samples/SupportLeanbackDemos/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha02" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="MissingSuperCall"
diff --git a/samples/SupportSliceDemos/lint-baseline.xml b/samples/SupportSliceDemos/lint-baseline.xml
index e95360a..a4dce8a 100644
--- a/samples/SupportSliceDemos/lint-baseline.xml
+++ b/samples/SupportSliceDemos/lint-baseline.xml
@@ -1,5 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha02" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ListContent can only be accessed from within the same library (androidx.slice:slice-view)"
+ errorLine1=" ListContent content = new ListContent(loadedSlice);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/com/example/androidx/slice/demos/SliceSelectionDialog.java"/>
+ </issue>
<issue
id="RestrictedApiAndroidX"
diff --git a/samples/SupportTransitionDemos/lint-baseline.xml b/samples/SupportTransitionDemos/lint-baseline.xml
index 49f9969..bf1eefe1 100644
--- a/samples/SupportTransitionDemos/lint-baseline.xml
+++ b/samples/SupportTransitionDemos/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 7.4.0-alpha08" type="baseline" client="cli" dependencies="false" name="AGP (7.4.0-alpha08)" variant="all" version="7.4.0-alpha08">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="UnknownNullness"
diff --git a/samples/SupportWearDemos/lint-baseline.xml b/samples/SupportWearDemos/lint-baseline.xml
index 2098c9c..0c58ab8 100644
--- a/samples/SupportWearDemos/lint-baseline.xml
+++ b/samples/SupportWearDemos/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-alpha14" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-alpha14)" variant="all" version="8.2.0-alpha14">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="WearStandaloneAppFlag"
diff --git a/settings.gradle b/settings.gradle
index 28789eb..48e7a6b 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -870,6 +870,7 @@
includeProject(":room:integration-tests:room-testapp", "room/integration-tests/testapp", [BuildType.MAIN])
includeProject(":room:integration-tests:room-testapp-autovalue", "room/integration-tests/autovaluetestapp", [BuildType.MAIN])
includeProject(":room:integration-tests:room-testapp-kotlin", "room/integration-tests/kotlintestapp", [BuildType.MAIN, BuildType.KMP])
+includeProject(":room:integration-tests:room-testapp-multiplatform", "room/integration-tests/multiplatformtestapp", [BuildType.MAIN, BuildType.KMP, BuildType.INFRAROGUE])
includeProject(":room:integration-tests:room-testapp-noappcompat", "room/integration-tests/noappcompattestapp", [BuildType.MAIN])
includeProject(":room:room-benchmark", "room/benchmark", [BuildType.MAIN])
includeProject(":room:room-common", [BuildType.MAIN, BuildType.COMPOSE, BuildType.KMP, BuildType.INFRAROGUE])
diff --git a/sharetarget/sharetarget/lint-baseline.xml b/sharetarget/sharetarget/lint-baseline.xml
index af0b6b0..89ef90a 100644
--- a/sharetarget/sharetarget/lint-baseline.xml
+++ b/sharetarget/sharetarget/lint-baseline.xml
@@ -1,14 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sharetarget/ShortcutInfoCompatSaverImpl.java"/>
- </issue>
+<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
<issue
id="UnknownNullness"
diff --git a/slice/slice-builders/lint-baseline.xml b/slice/slice-builders/lint-baseline.xml
index b323b06..53333a6 100644
--- a/slice/slice-builders/lint-baseline.xml
+++ b/slice/slice-builders/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
<issue
id="WrongConstant"
@@ -28,166 +28,4 @@
file="src/main/java/androidx/slice/builders/impl/ListBuilderImpl.java"/>
</issue>
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/GridRowBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/impl/GridRowBuilderListV1Impl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/impl/ListBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/ListBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/impl/ListBuilderBasicImpl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/impl/ListBuilderImpl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/impl/MessagingBasicImpl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/impl/MessagingBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/impl/MessagingListV1Impl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/MessagingSliceBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/impl/MessagingV1Impl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/SelectionBuilder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/impl/SelectionBuilderBasicImpl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/impl/SelectionBuilderImpl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/impl/SelectionBuilderListV2Impl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/SliceAction.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/impl/TemplateBuilderImpl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/builders/TemplateSliceBuilder.java"/>
- </issue>
-
</issues>
diff --git a/slice/slice-core/lint-baseline.xml b/slice/slice-core/lint-baseline.xml
index 5c15d65..01e7b79 100644
--- a/slice/slice-core/lint-baseline.xml
+++ b/slice/slice-core/lint-baseline.xml
@@ -1,391 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" return (int) h.getClass().getDeclaredMethod("getIdentifier").invoke(h);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/SliceManagerWrapper.java"/>
</issue>
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/ArrayUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/Clock.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/compat/CompatPermissionManager.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/compat/CompatPinnedList.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/Slice.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/core/SliceAction.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/core/SliceActionImpl.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/core/SliceHints.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceItem.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceItemHolder.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceManager.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/compat/SlicePermissionActivity.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 19) return false;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 19) return null;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is never < 19"
- errorLine1=" if (Build.VERSION.SDK_INT < 19 || Build.VERSION.SDK_INT >= 28) return null;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/compat/SliceProviderCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/core/SliceQuery.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceSpec.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceSpecs.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SystemClock.java"/>
- </issue>
-
</issues>
diff --git a/slice/slice-test/lint-baseline.xml b/slice/slice-test/lint-baseline.xml
index 78e8941..55bf586 100644
--- a/slice/slice-test/lint-baseline.xml
+++ b/slice/slice-test/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="UnspecifiedImmutableFlag"
@@ -11,24 +11,6 @@
</issue>
<issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/test/SampleSliceProvider.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/test/SliceBroadcastReceiver.java"/>
- </issue>
-
- <issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public static Uri getUri(String path, Context context) {"
diff --git a/slice/slice-view/lint-baseline.xml b/slice/slice-view/lint-baseline.xml
index bf96be3..d198219 100644
--- a/slice/slice-view/lint-baseline.xml
+++ b/slice/slice-view/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanSynchronizedMethods"
@@ -64,256 +64,4 @@
file="src/main/java/androidx/slice/widget/TemplateView.java"/>
</issue>
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/ActionRow.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/EventInfo.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/GridContent.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/GridRowView.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/ListContent.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/MessageView.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/RowContent.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/RowStyle.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/RowView.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/ShortcutView.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/SliceActionView.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/SliceAdapter.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/SliceChildView.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/SliceContent.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/SliceLiveData.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceMetadata.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/SliceMetrics.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceStructure.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/SliceStyle.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/SliceView.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceViewManager.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceViewManagerBase.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceViewManagerCompat.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/SliceViewPolicy.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/SliceViewUtil.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/SliceXml.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/TemplateView.java"/>
- </issue>
-
</issues>
diff --git a/stableaidl/stableaidl-gradle-plugin/src/test/java/com/android/build/gradle/internal/fixtures/FakeGradleProperty.kt b/stableaidl/stableaidl-gradle-plugin/src/test/java/com/android/build/gradle/internal/fixtures/FakeGradleProperty.kt
index 8ca3a1e..9d027d5 100644
--- a/stableaidl/stableaidl-gradle-plugin/src/test/java/com/android/build/gradle/internal/fixtures/FakeGradleProperty.kt
+++ b/stableaidl/stableaidl-gradle-plugin/src/test/java/com/android/build/gradle/internal/fixtures/FakeGradleProperty.kt
@@ -108,6 +108,10 @@
throw NotImplementedError()
}
+ override fun update(transform: Transformer<out Provider<out T>?, in Provider<T>>) {
+ throw NotImplementedError()
+ }
+
override fun <U : Any?, R : Any?> zip(
p0: Provider<U>,
p1: BiFunction<in T, in U, out R>
diff --git a/test/uiautomator/uiautomator/lint-baseline.xml b/test/uiautomator/uiautomator/lint-baseline.xml
index 6476f95..2a29920 100644
--- a/test/uiautomator/uiautomator/lint-baseline.xml
+++ b/test/uiautomator/uiautomator/lint-baseline.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.1.0-beta05" type="baseline" client="gradle" dependencies="false" name="AGP (8.1.0-beta05)" variant="all" version="8.1.0-beta05">
+<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" sMotionEvent_setDisplayId.invoke(ev, displayId);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
diff --git a/testutils/testutils-paging/src/commonMain/kotlin/androidx/paging/TestPagingDataPresenter.kt b/testutils/testutils-paging/src/commonMain/kotlin/androidx/paging/TestPagingDataPresenter.kt
index 2a732bc..0d16469 100644
--- a/testutils/testutils-paging/src/commonMain/kotlin/androidx/paging/TestPagingDataPresenter.kt
+++ b/testutils/testutils-paging/src/commonMain/kotlin/androidx/paging/TestPagingDataPresenter.kt
@@ -20,17 +20,9 @@
import kotlinx.coroutines.Dispatchers
class TestPagingDataPresenter<T : Any>(mainContext: CoroutineContext = Dispatchers.Main) :
- PagingDataPresenter<T>(noopDifferCallback, mainContext) {
+ PagingDataPresenter<T>(mainContext) {
val currentList: List<T> get() = List(size) { i -> get(i)!! }
- companion object {
- private val noopDifferCallback = object : DifferCallback {
- override fun onChanged(position: Int, count: Int) {}
- override fun onInserted(position: Int, count: Int) {}
- override fun onRemoved(position: Int, count: Int) {}
- }
- }
-
override suspend fun presentPagingDataEvent(event: PagingDataEvent<T>) { }
}
diff --git a/testutils/testutils-runtime/lint-baseline.xml b/testutils/testutils-runtime/lint-baseline.xml
index a1a835e..1420667 100644
--- a/testutils/testutils-runtime/lint-baseline.xml
+++ b/testutils/testutils-runtime/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
@@ -12,16 +12,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
- errorLine1=" durationSetter.invoke(null, 1.0f)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/testutils/AnimationActivityTestRule.kt"/>
- </issue>
-
- <issue
- id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" private val originalDurationScale = durationGetter.invoke(null) as Float"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -30,7 +21,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" durationSetter.invoke(null, animationDurationScale)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -39,7 +30,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" durationSetter.invoke(null, originalDurationScale)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -56,42 +47,6 @@
</issue>
<issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16 &&"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/testutils/AnimationActivityTestRule.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" return if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/testutils/AnimationDurationScaleRule.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 ->"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/testutils/LocaleTestUtils.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/fragment/app/StrictFragment.kt"/>
- </issue>
-
- <issue
id="LambdaLast"
message="Functional interface parameters (such as parameter 1, "owner", in androidx.testutils.LifecycleOwnerUtils.waitUntilState) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions"
errorLine1=" final @NonNull Lifecycle.State state) throws Throwable {"
diff --git a/transition/transition/lint-baseline.xml b/transition/transition/lint-baseline.xml
index be7cc6f4..0b4e446 100644
--- a/transition/transition/lint-baseline.xml
+++ b/transition/transition/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="ResourceType"
@@ -217,166 +217,4 @@
file="src/main/java/androidx/transition/Styleable.java"/>
</issue>
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/AnimatorUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/AnimatorUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/AnimatorUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/AnimatorUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/TransitionUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/TransitionUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/TransitionUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/TransitionUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/ViewGroupOverlayApi18.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/ViewGroupUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/ViewGroupUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1=" @RequiresApi(18)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/ViewGroupUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/ViewOverlayApi18.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/ViewUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/ViewUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 18) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/ViewUtils.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1="@RequiresApi(19)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/ViewUtilsApi19.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 18"
- errorLine1="@RequiresApi(18)"
- errorLine2="~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/transition/WindowIdApi18.java"/>
- </issue>
-
</issues>
diff --git a/tv/tv-foundation/lint-baseline.xml b/tv/tv-foundation/lint-baseline.xml
index e31c961..4ce24bc 100644
--- a/tv/tv-foundation/lint-baseline.xml
+++ b/tv/tv-foundation/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha02" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
diff --git a/tvprovider/tvprovider/lint-baseline.xml b/tvprovider/tvprovider/lint-baseline.xml
index 9471fad..6bd4e3c 100644
--- a/tvprovider/tvprovider/lint-baseline.xml
+++ b/tvprovider/tvprovider/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.0.0-beta03" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.0-beta03)" variant="all" version="8.0.0-beta03">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
diff --git a/vectordrawable/integration-tests/testapp/lint-baseline.xml b/vectordrawable/integration-tests/testapp/lint-baseline.xml
index 7b5d464..b35bd65 100644
--- a/vectordrawable/integration-tests/testapp/lint-baseline.xml
+++ b/vectordrawable/integration-tests/testapp/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="NewApi"
diff --git a/vectordrawable/vectordrawable/lint-baseline.xml b/vectordrawable/vectordrawable/lint-baseline.xml
index bcb268b..80791c6 100644
--- a/vectordrawable/vectordrawable/lint-baseline.xml
+++ b/vectordrawable/vectordrawable/lint-baseline.xml
@@ -1,14 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/vectordrawable/graphics/drawable/VectorDrawableCompat.java"/>
- </issue>
+<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
<issue
id="UnknownNullness"
diff --git a/versionedparcelable/versionedparcelable/lint-baseline.xml b/versionedparcelable/versionedparcelable/lint-baseline.xml
index d96bee4..559f41d 100644
--- a/versionedparcelable/versionedparcelable/lint-baseline.xml
+++ b/versionedparcelable/versionedparcelable/lint-baseline.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 7.4.0-alpha08" type="baseline" client="gradle" dependencies="false" name="AGP (7.4.0-alpha08)" variant="all" version="7.4.0-alpha08">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" return (T) m.invoke(null, versionedParcel);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -12,7 +12,7 @@
<issue
id="BanUncheckedReflection"
- message="Calling `Method.invoke` without an SDK check"
+ message="Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API."
errorLine1=" m.invoke(null, val, versionedParcel);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
diff --git a/viewpager2/integration-tests/testapp/lint-baseline.xml b/viewpager2/integration-tests/testapp/lint-baseline.xml
deleted file mode 100644
index 0ae775c..0000000
--- a/viewpager2/integration-tests/testapp/lint-baseline.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/viewpager2/integration/testapp/MutableCollectionBaseActivity.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 17) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/viewpager2/integration/testapp/MutableCollectionBaseActivity.kt"/>
- </issue>
-
-</issues>
diff --git a/viewpager2/viewpager2/lint-baseline.xml b/viewpager2/viewpager2/lint-baseline.xml
index cbf2f21c..8687be6 100644
--- a/viewpager2/viewpager2/lint-baseline.xml
+++ b/viewpager2/viewpager2/lint-baseline.xml
@@ -1,14 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(1000)"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/viewpager2/widget/BaseTest.kt"/>
- </issue>
+<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
<issue
id="BanThreadSleep"
@@ -19,31 +10,4 @@
file="src/androidTest/java/androidx/viewpager2/widget/swipe/ManualSwipeInjector.java"/>
</issue>
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 17"
- errorLine1=" @RequiresApi(17)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/viewpager2/widget/ViewPager2.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/viewpager2/widget/ViewPager2.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/viewpager2/widget/ViewPager2.java"/>
- </issue>
-
</issues>
diff --git a/wear/benchmark/integration-tests/macrobenchmark-target/src/main/java/androidx/wear/benchmark/integration/macrobenchmark/target/SwipeActivity.kt b/wear/benchmark/integration-tests/macrobenchmark-target/src/main/java/androidx/wear/benchmark/integration/macrobenchmark/target/SwipeActivity.kt
index d7cdecf..3c6d343 100644
--- a/wear/benchmark/integration-tests/macrobenchmark-target/src/main/java/androidx/wear/benchmark/integration/macrobenchmark/target/SwipeActivity.kt
+++ b/wear/benchmark/integration-tests/macrobenchmark-target/src/main/java/androidx/wear/benchmark/integration/macrobenchmark/target/SwipeActivity.kt
@@ -18,10 +18,16 @@
import android.app.Activity
import android.os.Bundle
+import androidx.wear.widget.SwipeDismissFrameLayout
class SwipeActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_swipe)
+ // SwipeDismissFrameLayout is not swipeable by default. It instead relies on system
+ // property `windowSwipeToDismiss` to determine that which is not enabled on mobile devices.
+ // Setting the property explicitly to true to enable the swipe dismiss behaviour.
+ val s2d: SwipeDismissFrameLayout = findViewById(R.id.swipe_dismiss)
+ s2d.isSwipeable = true
}
}
diff --git a/wear/compose/compose-foundation/build.gradle b/wear/compose/compose-foundation/build.gradle
index 9625da5..755e3a2 100644
--- a/wear/compose/compose-foundation/build.gradle
+++ b/wear/compose/compose-foundation/build.gradle
@@ -41,7 +41,7 @@
implementation(project(":compose:foundation:foundation-layout"))
implementation(project(":compose:ui:ui-util"))
implementation(project(":lifecycle:lifecycle-runtime-compose"))
- implementation("androidx.core:core:1.11.0")
+ implementation("androidx.core:core:1.12.0")
implementation("androidx.profileinstaller:profileinstaller:1.3.0")
testImplementation(libs.testRules)
diff --git a/wear/compose/compose-foundation/lint-baseline.xml b/wear/compose/compose-foundation/lint-baseline.xml
index d503055..864c40b 100644
--- a/wear/compose/compose-foundation/lint-baseline.xml
+++ b/wear/compose/compose-foundation/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="PrimitiveInCollection"
diff --git a/wear/compose/compose-material/api/current.txt b/wear/compose/compose-material/api/current.txt
index 2a95d95..460b7f6 100644
--- a/wear/compose/compose-material/api/current.txt
+++ b/wear/compose/compose-material/api/current.txt
@@ -136,7 +136,7 @@
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 {
+ @androidx.compose.runtime.Immutable @androidx.compose.runtime.Stable public final class Colors {
ctor public Colors(optional long primary, optional long primaryVariant, optional long secondary, optional long secondaryVariant, optional long background, optional long surface, optional long error, optional long onPrimary, optional long onSecondary, optional long onBackground, optional long onSurface, optional long onSurfaceVariant, optional long onError);
method public androidx.wear.compose.material.Colors copy(optional long primary, optional long primaryVariant, optional long secondary, optional long secondaryVariant, optional long background, optional long surface, optional long error, optional long onPrimary, optional long onSecondary, optional long onBackground, optional long onSurface, optional long onSurfaceVariant, optional long onError);
method public long getBackground();
diff --git a/wear/compose/compose-material/api/restricted_current.txt b/wear/compose/compose-material/api/restricted_current.txt
index 2a95d95..460b7f6 100644
--- a/wear/compose/compose-material/api/restricted_current.txt
+++ b/wear/compose/compose-material/api/restricted_current.txt
@@ -136,7 +136,7 @@
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 {
+ @androidx.compose.runtime.Immutable @androidx.compose.runtime.Stable public final class Colors {
ctor public Colors(optional long primary, optional long primaryVariant, optional long secondary, optional long secondaryVariant, optional long background, optional long surface, optional long error, optional long onPrimary, optional long onSecondary, optional long onBackground, optional long onSurface, optional long onSurfaceVariant, optional long onError);
method public androidx.wear.compose.material.Colors copy(optional long primary, optional long primaryVariant, optional long secondary, optional long secondaryVariant, optional long background, optional long surface, optional long error, optional long onPrimary, optional long onSecondary, optional long onBackground, optional long onSurface, optional long onSurfaceVariant, optional long onError);
method public long getBackground();
diff --git a/wear/compose/compose-material/benchmark/src/androidTest/java/androidx/wear/compose/material/benchmark/ColorsBenchmark.kt b/wear/compose/compose-material/benchmark/src/androidTest/java/androidx/wear/compose/material/benchmark/ColorsBenchmark.kt
new file mode 100644
index 0000000..63e8507
--- /dev/null
+++ b/wear/compose/compose-material/benchmark/src/androidTest/java/androidx/wear/compose/material/benchmark/ColorsBenchmark.kt
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.wear.compose.material.benchmark
+
+import androidx.compose.foundation.background
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.size
+import androidx.compose.runtime.Composable
+import androidx.compose.testutils.LayeredComposeTestCase
+import androidx.compose.testutils.benchmark.ComposeBenchmarkRule
+import androidx.compose.testutils.benchmark.benchmarkToFirstPixel
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.unit.dp
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.MediumTest
+import androidx.wear.compose.material.MaterialTheme
+import androidx.wear.compose.material.contentColorFor
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@MediumTest
+@RunWith(AndroidJUnit4::class)
+class ColorsBenchmark {
+
+ @get:Rule
+ val benchmarkRule = ComposeBenchmarkRule()
+
+ private val colorsTestCaseFactory = { ColorsTestCase() }
+
+ @Test
+ fun firstPixel() {
+ benchmarkRule.benchmarkToFirstPixel(colorsTestCaseFactory)
+ }
+}
+
+private class ColorsTestCase : LayeredComposeTestCase() {
+
+ @Composable
+ override fun MeasuredContent() {
+ MaterialTheme {
+ Column {
+ // Primary
+ Box(modifier = Modifier.size(1.dp).background(MaterialTheme.colors.primary))
+ Box(
+ modifier = Modifier.size(1.dp)
+ .background(
+ MaterialTheme.colors.contentColorFor(MaterialTheme.colors.primary)
+ )
+ )
+
+ // Secondary
+ Box(modifier = Modifier.size(1.dp).background(MaterialTheme.colors.secondary))
+ Box(
+ modifier = Modifier.size(1.dp)
+ .background(
+ MaterialTheme.colors.contentColorFor(MaterialTheme.colors.secondary)
+ )
+ )
+
+ // Background
+ Box(modifier = Modifier.size(1.dp).background(MaterialTheme.colors.background))
+ Box(
+ modifier = Modifier.size(1.dp)
+ .background(
+ MaterialTheme.colors.contentColorFor(MaterialTheme.colors.background)
+ )
+ )
+
+ // Surface
+ Box(modifier = Modifier.size(1.dp).background(MaterialTheme.colors.surface))
+ Box(
+ modifier = Modifier.size(1.dp)
+ .background(
+ MaterialTheme.colors.contentColorFor(MaterialTheme.colors.surface)
+ )
+ )
+
+ // Error
+ Box(modifier = Modifier.size(1.dp).background(MaterialTheme.colors.error))
+ Box(
+ modifier = Modifier.size(1.dp)
+ .background(
+ MaterialTheme.colors.contentColorFor(MaterialTheme.colors.error)
+ )
+ )
+ }
+ }
+ }
+
+ @Composable
+ override fun ContentWrappers(content: @Composable () -> Unit) {
+ content()
+ }
+}
diff --git a/wear/compose/compose-material/lint-baseline.xml b/wear/compose/compose-material/lint-baseline.xml
index 51e5cce..39f39fb 100644
--- a/wear/compose/compose-material/lint-baseline.xml
+++ b/wear/compose/compose-material/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="PrimitiveInCollection"
diff --git a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/Colors.kt b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/Colors.kt
index 5e0441a..7db6c7c 100644
--- a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/Colors.kt
+++ b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/Colors.kt
@@ -16,64 +16,30 @@
package androidx.wear.compose.material
import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Immutable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.Stable
-import androidx.compose.runtime.getValue
-import androidx.compose.runtime.mutableStateOf
-import androidx.compose.runtime.setValue
import androidx.compose.runtime.staticCompositionLocalOf
-import androidx.compose.runtime.structuralEqualityPolicy
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.takeOrElse
+@Immutable
@Stable
public class Colors(
- primary: Color = Color(0xFFAECBFA),
- primaryVariant: Color = Color(0xFF8AB4F8),
- secondary: Color = Color(0xFFFDE293),
- secondaryVariant: Color = Color(0xFF594F33),
- background: Color = Color.Black,
- surface: Color = Color(0xFF303133),
- error: Color = Color(0xFFEE675C),
- onPrimary: Color = Color(0xFF303133),
- onSecondary: Color = Color(0xFF303133),
- onBackground: Color = Color.White,
- onSurface: Color = Color.White,
- onSurfaceVariant: Color = Color(0xFFDADCE0),
- onError: Color = Color(0xFF000000)
+ val primary: Color = Color(0xFFAECBFA),
+ val primaryVariant: Color = Color(0xFF8AB4F8),
+ val secondary: Color = Color(0xFFFDE293),
+ val secondaryVariant: Color = Color(0xFF594F33),
+ val background: Color = Color.Black,
+ val surface: Color = Color(0xFF303133),
+ val error: Color = Color(0xFFEE675C),
+ val onPrimary: Color = Color(0xFF303133),
+ val onSecondary: Color = Color(0xFF303133),
+ val onBackground: Color = Color.White,
+ val onSurface: Color = Color.White,
+ val onSurfaceVariant: Color = Color(0xFFDADCE0),
+ val onError: Color = Color(0xFF000000)
) {
- public var primary: Color by mutableStateOf(primary, structuralEqualityPolicy())
- internal set
- public var primaryVariant: Color by mutableStateOf(primaryVariant, structuralEqualityPolicy())
- internal set
- public var secondary: Color by mutableStateOf(secondary, structuralEqualityPolicy())
- internal set
- public var secondaryVariant: Color by mutableStateOf(
- secondaryVariant,
- structuralEqualityPolicy()
- )
- internal set
- public var background: Color by mutableStateOf(background, structuralEqualityPolicy())
- internal set
- public var surface: Color by mutableStateOf(surface, structuralEqualityPolicy())
- internal set
- public var error: Color by mutableStateOf(error, structuralEqualityPolicy())
- internal set
- public var onPrimary: Color by mutableStateOf(onPrimary, structuralEqualityPolicy())
- internal set
- public var onSecondary: Color by mutableStateOf(onSecondary, structuralEqualityPolicy())
- internal set
- public var onBackground: Color by mutableStateOf(onBackground, structuralEqualityPolicy())
- internal set
- public var onSurface: Color by mutableStateOf(onSurface, structuralEqualityPolicy())
- internal set
- public var onSurfaceVariant: Color by mutableStateOf(
- onSurfaceVariant,
- structuralEqualityPolicy()
- )
- internal set
- public var onError: Color by mutableStateOf(onError, structuralEqualityPolicy())
- internal set
/**
* Returns a copy of this Colors, optionally overriding some of the values.
@@ -180,35 +146,6 @@
MaterialTheme.colors.contentColorFor(backgroundColor).takeOrElse { LocalContentColor.current }
/**
- * Updates the internal values of the given [Colors] with values from the [other] [Colors]. This
- * allows efficiently updating a subset of [Colors], without recomposing every composable that
- * consumes values from [LocalColors].
- *
- * Because [Colors] is very wide-reaching, and used by many expensive composables in the
- * hierarchy, providing a new value to [LocalColors] causes every composable consuming
- * [LocalColors] to recompose, which is prohibitively expensive in cases such as animating one
- * color in the theme. Instead, [Colors] is internally backed by [mutableStateOf], and this
- * function mutates the internal state of [this] to match values in [other]. This means that any
- * changes will mutate the internal state of [this], and only cause composables that are reading
- * the specific changed value to recompose.
- */
-internal fun Colors.updateColorsFrom(other: Colors) {
- primary = other.primary
- primaryVariant = other.primaryVariant
- secondary = other.secondary
- secondaryVariant = other.secondaryVariant
- background = other.background
- surface = other.surface
- error = other.error
- onPrimary = other.onPrimary
- onSecondary = other.onSecondary
- onBackground = other.onBackground
- onSurface = other.onSurface
- onSurfaceVariant = other.onSurfaceVariant
- onError = other.onError
-}
-
-/**
* Convert given color to disabled color.
* @param disabledContentAlpha Alpha used to represent disabled content colors.
*/
diff --git a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/MaterialTheme.kt b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/MaterialTheme.kt
index 5017f99..ed866b9 100644
--- a/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/MaterialTheme.kt
+++ b/wear/compose/compose-material/src/main/java/androidx/wear/compose/material/MaterialTheme.kt
@@ -20,7 +20,6 @@
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.ReadOnlyComposable
-import androidx.compose.runtime.remember
import androidx.wear.compose.foundation.LocalSwipeToDismissBackgroundScrimColor
import androidx.wear.compose.foundation.LocalSwipeToDismissContentScrimColor
@@ -62,16 +61,11 @@
shapes: Shapes = MaterialTheme.shapes,
content: @Composable () -> Unit
) {
- val rememberedColors = remember {
- // Explicitly creating a new object here so we don't mutate the initial [colors]
- // provided, and overwrite the values set in it.
- colors.copy()
- }.apply { updateColorsFrom(colors) }
val rippleIndication = rippleOrFallbackImplementation()
- val selectionColors = rememberTextSelectionColors(rememberedColors)
+ val selectionColors = rememberTextSelectionColors(colors)
@Suppress("DEPRECATION_ERROR")
CompositionLocalProvider(
- LocalColors provides rememberedColors,
+ LocalColors provides colors,
LocalShapes provides shapes,
LocalTypography provides typography,
LocalContentAlpha provides ContentAlpha.high,
@@ -79,8 +73,8 @@
// TODO: b/304985887 - remove after one stable release
androidx.compose.material.ripple.LocalRippleTheme provides CompatRippleTheme,
LocalTextSelectionColors provides selectionColors,
- LocalSwipeToDismissBackgroundScrimColor provides rememberedColors.background,
- LocalSwipeToDismissContentScrimColor provides rememberedColors.background
+ LocalSwipeToDismissBackgroundScrimColor provides colors.background,
+ LocalSwipeToDismissContentScrimColor provides colors.background
) {
ProvideTextStyle(value = typography.body1, content = content)
}
diff --git a/wear/compose/compose-material3/api/current.txt b/wear/compose/compose-material3/api/current.txt
index 40030513..496d3e6 100644
--- a/wear/compose/compose-material3/api/current.txt
+++ b/wear/compose/compose-material3/api/current.txt
@@ -206,7 +206,7 @@
public final class HorizontalPageIndicatorKt {
method @androidx.compose.runtime.Composable public static void HorizontalPageIndicator(androidx.wear.compose.material3.PageIndicatorState pageIndicatorState, optional androidx.compose.ui.Modifier modifier, optional long selectedColor, optional long unselectedColor, optional float indicatorSize, optional float spacing);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material3.ExperimentalWearMaterial3Api public static androidx.wear.compose.material3.PageIndicatorState rememberPageIndicatorState(int maxPages, kotlin.jvm.functions.Function0<java.lang.Float> selectedPageWithOffset);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material3.ExperimentalWearMaterial3Api public static androidx.wear.compose.material3.PageIndicatorState rememberPageIndicatorState(int pageCount, kotlin.jvm.functions.Function0<java.lang.Float> selectedPageWithOffsetFraction);
}
@androidx.compose.runtime.Immutable public final class IconButtonColors {
@@ -331,9 +331,8 @@
public interface PageIndicatorState {
method @IntRange(from=0L) public int getPageCount();
- method @FloatRange(from=0.0) public kotlin.jvm.functions.Function0<java.lang.Float> getSelectedPageWithOffset();
+ method @FloatRange(from=0.0) public float selectedPageWithOffsetFraction();
property @IntRange(from=0L) public abstract int pageCount;
- property @FloatRange(from=0.0) public abstract kotlin.jvm.functions.Function0<java.lang.Float> selectedPageWithOffset;
}
@androidx.compose.runtime.Immutable public final class RadioButtonColors {
@@ -681,8 +680,8 @@
public final class ToggleButtonDefaults {
method public androidx.compose.foundation.layout.PaddingValues getContentPadding();
- method @androidx.compose.runtime.Composable public androidx.wear.compose.material3.SplitToggleButtonColors splitToggleButtonColors(optional long checkedContainerColor, optional long checkedContentColor, optional long checkedSecondaryContentColor, optional long checkedSplitContainerColor, optional long uncheckedContainerColor, optional long uncheckedContentColor, optional long uncheckedSecondaryContentColor, optional long uncheckedSplitContainerColor);
- method @androidx.compose.runtime.Composable public androidx.wear.compose.material3.ToggleButtonColors toggleButtonColors(optional long checkedContainerColor, optional long checkedContentColor, optional long checkedSecondaryContentColor, optional long checkedIconColor, optional long uncheckedContainerColor, optional long uncheckedContentColor, optional long uncheckedSecondaryContentColor, optional long uncheckedIconColor);
+ method @androidx.compose.runtime.Composable public androidx.wear.compose.material3.SplitToggleButtonColors splitToggleButtonColors(optional long checkedContainerColor, optional long checkedContentColor, optional long checkedSecondaryContentColor, optional long checkedSplitContainerColor, optional long uncheckedContainerColor, optional long uncheckedContentColor, optional long uncheckedSecondaryContentColor, optional long uncheckedSplitContainerColor, optional long disabledCheckedContainerColor, optional long disabledCheckedContentColor, optional long disabledCheckedSecondaryContentColor, optional long disabledCheckedSplitContainerColor, optional long disabledUncheckedContainerColor, optional long disabledUncheckedContentColor, optional long disabledUncheckedSecondaryContentColor, optional long disabledUncheckedSplitContainerColor);
+ method @androidx.compose.runtime.Composable public androidx.wear.compose.material3.ToggleButtonColors toggleButtonColors(optional long checkedContainerColor, optional long checkedContentColor, optional long checkedSecondaryContentColor, optional long checkedIconColor, optional long uncheckedContainerColor, optional long uncheckedContentColor, optional long uncheckedSecondaryContentColor, optional long uncheckedIconColor, optional long disabledCheckedContainerColor, optional long disabledCheckedContentColor, optional long disabledCheckedSecondaryContentColor, optional long disabledCheckedIconColor, optional long disabledUncheckedContainerColor, optional long disabledUncheckedContentColor, optional long disabledUncheckedSecondaryContentColor, optional long disabledUncheckedIconColor);
property public final androidx.compose.foundation.layout.PaddingValues ContentPadding;
field public static final androidx.wear.compose.material3.ToggleButtonDefaults INSTANCE;
}
diff --git a/wear/compose/compose-material3/api/restricted_current.txt b/wear/compose/compose-material3/api/restricted_current.txt
index 40030513..496d3e6 100644
--- a/wear/compose/compose-material3/api/restricted_current.txt
+++ b/wear/compose/compose-material3/api/restricted_current.txt
@@ -206,7 +206,7 @@
public final class HorizontalPageIndicatorKt {
method @androidx.compose.runtime.Composable public static void HorizontalPageIndicator(androidx.wear.compose.material3.PageIndicatorState pageIndicatorState, optional androidx.compose.ui.Modifier modifier, optional long selectedColor, optional long unselectedColor, optional float indicatorSize, optional float spacing);
- method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material3.ExperimentalWearMaterial3Api public static androidx.wear.compose.material3.PageIndicatorState rememberPageIndicatorState(int maxPages, kotlin.jvm.functions.Function0<java.lang.Float> selectedPageWithOffset);
+ method @SuppressCompatibility @androidx.compose.runtime.Composable @androidx.wear.compose.material3.ExperimentalWearMaterial3Api public static androidx.wear.compose.material3.PageIndicatorState rememberPageIndicatorState(int pageCount, kotlin.jvm.functions.Function0<java.lang.Float> selectedPageWithOffsetFraction);
}
@androidx.compose.runtime.Immutable public final class IconButtonColors {
@@ -331,9 +331,8 @@
public interface PageIndicatorState {
method @IntRange(from=0L) public int getPageCount();
- method @FloatRange(from=0.0) public kotlin.jvm.functions.Function0<java.lang.Float> getSelectedPageWithOffset();
+ method @FloatRange(from=0.0) public float selectedPageWithOffsetFraction();
property @IntRange(from=0L) public abstract int pageCount;
- property @FloatRange(from=0.0) public abstract kotlin.jvm.functions.Function0<java.lang.Float> selectedPageWithOffset;
}
@androidx.compose.runtime.Immutable public final class RadioButtonColors {
@@ -681,8 +680,8 @@
public final class ToggleButtonDefaults {
method public androidx.compose.foundation.layout.PaddingValues getContentPadding();
- method @androidx.compose.runtime.Composable public androidx.wear.compose.material3.SplitToggleButtonColors splitToggleButtonColors(optional long checkedContainerColor, optional long checkedContentColor, optional long checkedSecondaryContentColor, optional long checkedSplitContainerColor, optional long uncheckedContainerColor, optional long uncheckedContentColor, optional long uncheckedSecondaryContentColor, optional long uncheckedSplitContainerColor);
- method @androidx.compose.runtime.Composable public androidx.wear.compose.material3.ToggleButtonColors toggleButtonColors(optional long checkedContainerColor, optional long checkedContentColor, optional long checkedSecondaryContentColor, optional long checkedIconColor, optional long uncheckedContainerColor, optional long uncheckedContentColor, optional long uncheckedSecondaryContentColor, optional long uncheckedIconColor);
+ method @androidx.compose.runtime.Composable public androidx.wear.compose.material3.SplitToggleButtonColors splitToggleButtonColors(optional long checkedContainerColor, optional long checkedContentColor, optional long checkedSecondaryContentColor, optional long checkedSplitContainerColor, optional long uncheckedContainerColor, optional long uncheckedContentColor, optional long uncheckedSecondaryContentColor, optional long uncheckedSplitContainerColor, optional long disabledCheckedContainerColor, optional long disabledCheckedContentColor, optional long disabledCheckedSecondaryContentColor, optional long disabledCheckedSplitContainerColor, optional long disabledUncheckedContainerColor, optional long disabledUncheckedContentColor, optional long disabledUncheckedSecondaryContentColor, optional long disabledUncheckedSplitContainerColor);
+ method @androidx.compose.runtime.Composable public androidx.wear.compose.material3.ToggleButtonColors toggleButtonColors(optional long checkedContainerColor, optional long checkedContentColor, optional long checkedSecondaryContentColor, optional long checkedIconColor, optional long uncheckedContainerColor, optional long uncheckedContentColor, optional long uncheckedSecondaryContentColor, optional long uncheckedIconColor, optional long disabledCheckedContainerColor, optional long disabledCheckedContentColor, optional long disabledCheckedSecondaryContentColor, optional long disabledCheckedIconColor, optional long disabledUncheckedContainerColor, optional long disabledUncheckedContentColor, optional long disabledUncheckedSecondaryContentColor, optional long disabledUncheckedIconColor);
property public final androidx.compose.foundation.layout.PaddingValues ContentPadding;
field public static final androidx.wear.compose.material3.ToggleButtonDefaults INSTANCE;
}
diff --git a/wear/compose/compose-material3/samples/src/main/java/androidx/wear/compose/material3/samples/HorizontalPageIndicatorSample.kt b/wear/compose/compose-material3/samples/src/main/java/androidx/wear/compose/material3/samples/HorizontalPageIndicatorSample.kt
index 5f1e287..60d5b45 100644
--- a/wear/compose/compose-material3/samples/src/main/java/androidx/wear/compose/material3/samples/HorizontalPageIndicatorSample.kt
+++ b/wear/compose/compose-material3/samples/src/main/java/androidx/wear/compose/material3/samples/HorizontalPageIndicatorSample.kt
@@ -41,7 +41,7 @@
@Sampled
@Composable
fun HorizontalPageIndicatorSample() {
- val maxPages = 9
+ val pageCount = 9
var selectedPage by remember { mutableStateOf(0) }
var finalValue by remember { mutableStateOf(0) }
@@ -52,7 +52,7 @@
}
val pageIndicatorState: PageIndicatorState =
- rememberPageIndicatorState(maxPages) { animatedSelectedPage }
+ rememberPageIndicatorState(pageCount) { animatedSelectedPage }
Box(
modifier = Modifier
@@ -64,7 +64,7 @@
value = selectedPage,
increaseIcon = { Icon(InlineSliderDefaults.Increase, "Increase") },
decreaseIcon = { Icon(InlineSliderDefaults.Decrease, "Decrease") },
- valueProgression = 0 until maxPages,
+ valueProgression = 0 until pageCount,
onValueChange = { selectedPage = it }
)
HorizontalPageIndicator(
diff --git a/wear/compose/compose-material3/src/androidTest/kotlin/androidx/wear/compose/material3/HorizontalPageIndicatorTest.kt b/wear/compose/compose-material3/src/androidTest/kotlin/androidx/wear/compose/material3/HorizontalPageIndicatorTest.kt
index 39f9d2e..5418f73 100644
--- a/wear/compose/compose-material3/src/androidTest/kotlin/androidx/wear/compose/material3/HorizontalPageIndicatorTest.kt
+++ b/wear/compose/compose-material3/src/androidTest/kotlin/androidx/wear/compose/material3/HorizontalPageIndicatorTest.kt
@@ -144,8 +144,8 @@
selectedPage: Int = 1,
pageCount: Int = 4
) = object : PageIndicatorState {
- override val selectedPageWithOffset: () -> Float
- get() = { selectedPage + pageOffset }
+ override fun selectedPageWithOffsetFraction(): Float =
+ selectedPage + pageOffset
override val pageCount: Int
get() = pageCount
}
diff --git a/wear/compose/compose-material3/src/androidTest/kotlin/androidx/wear/compose/material3/ToggleButtonTest.kt b/wear/compose/compose-material3/src/androidTest/kotlin/androidx/wear/compose/material3/ToggleButtonTest.kt
index 748403a..95f5df1 100644
--- a/wear/compose/compose-material3/src/androidTest/kotlin/androidx/wear/compose/material3/ToggleButtonTest.kt
+++ b/wear/compose/compose-material3/src/androidTest/kotlin/androidx/wear/compose/material3/ToggleButtonTest.kt
@@ -18,14 +18,18 @@
import android.os.Build
import androidx.annotation.RequiresApi
+import androidx.compose.foundation.background
+import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxScope
import androidx.compose.foundation.layout.RowScope
+import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.testutils.assertContainsColor
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.compositeOver
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.semantics.SemanticsProperties
@@ -41,6 +45,7 @@
import androidx.compose.ui.test.assertIsOn
import androidx.compose.ui.test.captureToImage
import androidx.compose.ui.test.isToggleable
+import androidx.compose.ui.test.junit4.ComposeContentTestRule
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onChildAt
import androidx.compose.ui.test.onNodeWithTag
@@ -52,6 +57,7 @@
import androidx.wear.compose.material3.samples.SplitToggleButtonWithSwitch
import androidx.wear.compose.material3.samples.ToggleButtonWithCheckbox
import androidx.wear.compose.material3.samples.ToggleButtonWithSwitch
+import org.junit.Assert
import org.junit.Rule
import org.junit.Test
@@ -559,6 +565,54 @@
)
@RequiresApi(Build.VERSION_CODES.O)
+ @Test
+ fun verify_toggle_button_colors_enabled_and_checked() {
+ rule.verifyToggleButtonColors(checked = true, enabled = true)
+ }
+
+ @RequiresApi(Build.VERSION_CODES.O)
+ @Test
+ fun verify_toggle_button_colors_enabled_and_unchecked() {
+ rule.verifyToggleButtonColors(checked = false, enabled = true)
+ }
+
+ @RequiresApi(Build.VERSION_CODES.O)
+ @Test
+ fun verify_toggle_button_colors_disabled_and_checked() {
+ rule.verifyToggleButtonColors(checked = true, enabled = false)
+ }
+
+ @RequiresApi(Build.VERSION_CODES.O)
+ @Test
+ fun verify_toggle_button_colors_disabled_and_unchecked() {
+ rule.verifyToggleButtonColors(checked = false, enabled = false)
+ }
+
+ @RequiresApi(Build.VERSION_CODES.O)
+ @Test
+ fun verify_split_toggle_button_colors_enabled_and_checked() {
+ rule.verifySplitToggleButtonColors(checked = true, enabled = true)
+ }
+
+ @RequiresApi(Build.VERSION_CODES.O)
+ @Test
+ fun verify_split_toggle_button_colors_enabled_and_unchecked() {
+ rule.verifySplitToggleButtonColors(checked = false, enabled = true)
+ }
+
+ @RequiresApi(Build.VERSION_CODES.O)
+ @Test
+ fun verify_split_toggle_button_colors_disabled_and_checked() {
+ rule.verifySplitToggleButtonColors(checked = true, enabled = false)
+ }
+
+ @RequiresApi(Build.VERSION_CODES.O)
+ @Test
+ fun verify_split_toggle_button_colors_disabled_and_unchecked() {
+ rule.verifySplitToggleButtonColors(checked = false, enabled = false)
+ }
+
+ @RequiresApi(Build.VERSION_CODES.O)
private fun verifyToggleButtonBackgroundColor(
checked: Boolean,
enabled: Boolean,
@@ -658,5 +712,143 @@
toggleControl = toggleControl,
)
+@RequiresApi(Build.VERSION_CODES.O)
+private fun ComposeContentTestRule.verifyToggleButtonColors(
+ enabled: Boolean,
+ checked: Boolean
+) {
+ val testBackgroundColor = Color.White
+ var expectedContainerColor = Color.Transparent
+ var expectedLabelColor = Color.Transparent
+ var expectedIconColor = Color.Transparent
+ var expectedSecondaryLabelColor = Color.Transparent
+ var actualLabelColor = Color.Transparent
+ var actualIconColor = Color.Transparent
+ var actualSecondaryLabelColor = Color.Transparent
+ setContentWithTheme {
+ expectedContainerColor = toggle_button_container_color(checked)
+ .withDisabledAlphaApplied(enabled = enabled)
+ .compositeOver(testBackgroundColor)
+ expectedLabelColor = toggle_button_content_color(checked)
+ .withDisabledAlphaApplied(enabled = enabled)
+ expectedSecondaryLabelColor = toggle_button_secondary_label_color(checked)
+ .withDisabledAlphaApplied(enabled = enabled)
+ expectedIconColor = toggle_button_icon_color(checked)
+ .withDisabledAlphaApplied(enabled = enabled)
+ Box(
+ Modifier
+ .fillMaxSize()
+ .background(testBackgroundColor)
+ ) {
+ ToggleButton(
+ modifier = Modifier.testTag(TEST_TAG),
+ checked = checked,
+ onCheckedChange = {},
+ enabled = enabled,
+ toggleControl = { Checkbox() },
+ label = { actualLabelColor = LocalContentColor.current },
+ secondaryLabel = { actualSecondaryLabelColor = LocalContentColor.current },
+ icon = { actualIconColor = LocalContentColor.current }
+ )
+ }
+ }
+ Assert.assertEquals(expectedLabelColor, actualLabelColor)
+ Assert.assertEquals(expectedSecondaryLabelColor, actualSecondaryLabelColor)
+ Assert.assertEquals(expectedIconColor, actualIconColor)
+
+ onNodeWithTag(TEST_TAG)
+ .captureToImage()
+ .assertContainsColor(
+ if (expectedContainerColor != Color.Transparent) expectedContainerColor
+ else testBackgroundColor,
+ )
+}
+
+@RequiresApi(Build.VERSION_CODES.O)
+private fun ComposeContentTestRule.verifySplitToggleButtonColors(
+ enabled: Boolean,
+ checked: Boolean
+) {
+ val testBackgroundColor = Color.White
+ var expectedContainerColor = Color.Transparent
+ var expectedLabelColor = Color.Transparent
+ var expectedSecondaryLabelColor = Color.Transparent
+ var actualLabelColor = Color.Transparent
+ var actualSecondaryLabelColor = Color.Transparent
+ setContentWithTheme {
+ expectedContainerColor = toggle_button_container_color(checked)
+ .withDisabledAlphaApplied(enabled = enabled)
+ .compositeOver(testBackgroundColor)
+ expectedLabelColor = toggle_button_content_color(checked)
+ .withDisabledAlphaApplied(enabled = enabled)
+ expectedSecondaryLabelColor = toggle_button_secondary_label_color(checked)
+ .withDisabledAlphaApplied(enabled = enabled)
+ Box(
+ Modifier
+ .fillMaxSize()
+ .background(testBackgroundColor)
+ ) {
+ SplitToggleButton(
+ modifier = Modifier.testTag(TEST_TAG),
+ checked = checked,
+ onCheckedChange = {},
+ onClick = {},
+ enabled = enabled,
+ toggleControl = { Checkbox() },
+ label = { actualLabelColor = LocalContentColor.current },
+ secondaryLabel = { actualSecondaryLabelColor = LocalContentColor.current },
+ )
+ }
+ }
+ Assert.assertEquals(expectedLabelColor, actualLabelColor)
+ Assert.assertEquals(expectedSecondaryLabelColor, actualSecondaryLabelColor)
+
+ onNodeWithTag(TEST_TAG)
+ .captureToImage()
+ .assertContainsColor(
+ if (expectedContainerColor != Color.Transparent) expectedContainerColor
+ else testBackgroundColor,
+ )
+}
+
+@Composable
+private fun toggle_button_container_color(
+ checked: Boolean
+): Color {
+ return if (checked) MaterialTheme.colorScheme.primaryContainer
+ else MaterialTheme.colorScheme.surface
+}
+
+@Composable
+private fun toggle_button_content_color(
+ checked: Boolean
+): Color {
+ return if (checked) MaterialTheme.colorScheme.onPrimaryContainer
+ else MaterialTheme.colorScheme.onSurface
+}
+
+@Composable
+private fun toggle_button_secondary_label_color(
+ checked: Boolean
+): Color {
+ return if (checked) MaterialTheme.colorScheme.onPrimaryContainer.copy(alpha = 0.8f)
+ else MaterialTheme.colorScheme.onSurfaceVariant
+}
+
+@Composable
+private fun toggle_button_icon_color(
+ checked: Boolean
+): Color {
+ return if (checked) MaterialTheme.colorScheme.onPrimaryContainer
+ else MaterialTheme.colorScheme.primary
+}
+
+@Composable
+private fun Color.withDisabledAlphaApplied(
+ enabled: Boolean
+): Color {
+ return if (!enabled) toDisabledColor(disabledAlpha = 0.38f) else this
+}
+
private val CHECKED_COLOR = Color(0xFFA020F0)
private val UNCHECKED_COLOR = Color(0xFFFFA500)
diff --git a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/Animation.kt b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/Animation.kt
deleted file mode 100644
index d200cc9..0000000
--- a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/Animation.kt
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.wear.compose.material3
-
-import androidx.compose.animation.core.CubicBezierEasing
-
-// See Wear Motion durations: https://carbon.googleplex.com/wear-os-3/pages/speed
-internal const val SHORT_1 = 50
-internal const val SHORT_2 = 100
-internal const val SHORT_3 = 150
-internal const val SHORT_4 = 200
-
-internal const val MEDIUM_1 = 250
-internal const val MEDIUM_2 = 300
-internal const val MEDIUM_3 = 350
-internal const val MEDIUM_4 = 400
-
-internal const val LONG_1 = 450
-internal const val LONG_2 = 500
-internal const val LONG_3 = 550
-internal const val LONG_4 = 600
-
-internal const val EXTRA_LONG_1 = 700
-internal const val EXTRA_LONG_2 = 800
-internal const val EXTRA_LONG_3 = 900
-internal const val EXTRA_LONG_4 = 1000
-
-// See Wear Motion easings: https://carbon.googleplex.com/wear-os-3/pages/easings
-internal val STANDARD = CubicBezierEasing(0.2f, 0.0f, 0.0f, 1.0f)
-internal val STANDARD_ACCELERATE = CubicBezierEasing(0.3f, 0.0f, 1.0f, 1.0f)
-internal val STANDARD_DECELERATE = CubicBezierEasing(0.0f, 0.0f, 0.0f, 1.0f)
diff --git a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/HorizontalPageIndicator.kt b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/HorizontalPageIndicator.kt
index 60f98b7..8e5f4ff 100644
--- a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/HorizontalPageIndicator.kt
+++ b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/HorizontalPageIndicator.kt
@@ -94,8 +94,8 @@
spacing: Dp = 4.dp
) {
val isScreenRound = isRoundDevice()
- val selectedPage: Int = pageIndicatorState.selectedPageWithOffset().toInt()
- val offset = pageIndicatorState.selectedPageWithOffset() - selectedPage
+ val selectedPage: Int = pageIndicatorState.selectedPageWithOffsetFraction().toInt()
+ val offset = pageIndicatorState.selectedPageWithOffsetFraction() - selectedPage
val pagesOnScreen = Integer.min(MaxNumberOfIndicators, pageIndicatorState.pageCount)
val pagesState = remember(pageIndicatorState.pageCount) {
@@ -174,23 +174,28 @@
// once HorizontalPager is stable
/**
- * Creates and remembers [PageIndicatorState] based on [maxPages] and [selectedPageWithOffset]
- * parameters.
+ * Creates and remembers [PageIndicatorState] based on [pageCount] and
+ * [selectedPageWithOffsetFraction] parameters.
+ * @param pageCount Total number of pages.
+ * @param selectedPageWithOffsetFraction The currently selected page index with offset fraction.
+ * Integer part represents the selected page index and the fractional part represents
+ * the offset as a fraction of the transition from the selected page
+ * to the next page in the range 0f..1f
*/
@ExperimentalWearMaterial3Api
@Composable
public fun rememberPageIndicatorState(
- maxPages: Int,
- selectedPageWithOffset: () -> Float
+ pageCount: Int,
+ selectedPageWithOffsetFraction: () -> Float
): PageIndicatorState =
- remember(maxPages, selectedPageWithOffset) {
+ remember(pageCount, selectedPageWithOffsetFraction) {
object : PageIndicatorState {
- override val selectedPageWithOffset: () -> Float
- get() = selectedPageWithOffset
+ override fun selectedPageWithOffsetFraction(): Float =
+ selectedPageWithOffsetFraction()
override val pageCount: Int
- get() = maxPages
+ get() = pageCount
}
}
@@ -199,17 +204,17 @@
*/
public interface PageIndicatorState {
/**
- * The currently selected page index with offset.
+ * The currently selected page index with offset fraction.
* Integer part represents the selected page index and the fractional part represents
* the offset as a fraction of the transition from the selected page
* to the next page in the range 0f..1f
*
* For example 5.5f equals to selectedPage = 5, offset 0.5f
*
- * Changes when a scroll (drag, swipe or fling) between pages happens in Pager.
+ * It changes when a scroll (drag, swipe or fling) happens between pages in Pager.
*/
- @get:FloatRange(from = 0.0)
- public val selectedPageWithOffset: () -> Float
+ @FloatRange(from = 0.0)
+ public fun selectedPageWithOffsetFraction(): Float
/**
* Total number of pages
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 b0f3b79..00f7cec 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
@@ -57,6 +57,7 @@
import androidx.compose.ui.semantics.role
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.unit.dp
+import androidx.wear.compose.material3.tokens.MotionTokens
import androidx.wear.compose.materialcore.animateSelectionColor
/**
@@ -861,7 +862,7 @@
)
private val COLOR_ANIMATION_SPEC: AnimationSpec<Color> =
- tween(MEDIUM_1, 0, STANDARD_DECELERATE)
+ tween(MotionTokens.DurationMedium1, 0, MotionTokens.EasingStandardDecelerate)
private val SELECTION_CONTROL_WIDTH = 32.dp
private val SELECTION_CONTROL_HEIGHT = 24.dp
private val SELECTION_CONTROL_SPACING = 4.dp
diff --git a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/SelectionControls.kt b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/SelectionControls.kt
index 76f86bd..d4415ec 100644
--- a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/SelectionControls.kt
+++ b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/SelectionControls.kt
@@ -24,6 +24,7 @@
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
+import androidx.wear.compose.material3.tokens.MotionTokens
import androidx.wear.compose.materialcore.animateSelectionColor
/**
@@ -59,10 +60,12 @@
},
onClick = null,
interactionSource = null,
- dotRadiusProgressDuration = { isSelected -> if (isSelected) MEDIUM_1 else SHORT_3 },
- dotAlphaProgressDuration = SHORT_3,
- dotAlphaProgressDelay = SHORT_2,
- easing = STANDARD_DECELERATE,
+ dotRadiusProgressDuration = {
+ isSelected -> if (isSelected) MotionTokens.DurationMedium1 else MotionTokens.DurationShort3
+ },
+ dotAlphaProgressDuration = MotionTokens.DurationShort3,
+ dotAlphaProgressDelay = MotionTokens.DurationShort2,
+ easing = MotionTokens.EasingStandardDecelerate,
width = WIDTH,
height = HEIGHT,
ripple = rippleOrFallbackImplementation()
@@ -139,7 +142,8 @@
}
}
-private val COLOR_ANIMATION_SPEC: AnimationSpec<Color> = tween(MEDIUM_1, 0, STANDARD_DECELERATE)
+private val COLOR_ANIMATION_SPEC: AnimationSpec<Color> =
+ tween(MotionTokens.DurationMedium1, 0, MotionTokens.EasingStandardDecelerate)
private val WIDTH = 32.dp
private val HEIGHT = 24.dp
diff --git a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/Slider.kt b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/Slider.kt
index f12386b..a02f410 100644
--- a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/Slider.kt
+++ b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/Slider.kt
@@ -50,6 +50,7 @@
import androidx.compose.ui.platform.LocalLayoutDirection
import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.dp
+import androidx.wear.compose.material3.tokens.MotionTokens
import androidx.wear.compose.materialcore.InlineSliderButton
import androidx.wear.compose.materialcore.RangeDefaults.calculateCurrentStepValue
import androidx.wear.compose.materialcore.RangeDefaults.snapValueToStep
@@ -167,7 +168,11 @@
val valueRatio by animateFloatAsState(
targetValue = currentStep.toFloat() / (steps + 1).toFloat(),
- animationSpec = tween(SHORT_3, 0, STANDARD_DECELERATE)
+ animationSpec = tween(
+ durationMillis = MotionTokens.DurationShort3,
+ delayMillis = 0,
+ easing = MotionTokens.EasingStandardDecelerate
+ )
)
Box(
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 d65e813..04506ec 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
@@ -35,6 +35,9 @@
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.unit.dp
+import androidx.wear.compose.material3.tokens.MotionTokens
+import androidx.wear.compose.material3.tokens.SplitToggleButtonTokens
+import androidx.wear.compose.material3.tokens.ToggleButtonTokens
import androidx.wear.compose.materialcore.animateSelectionColor
/**
@@ -80,8 +83,7 @@
* 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
- * icon must set its alpha value to [LocalContentAlpha].
+ * 24.dp.
* @param secondaryLabel A slot for providing the button's secondary label. The contents are
* expected to be text which is "start" aligned.
* @param label A slot for providing the button's main label. The contents are expected to be text
@@ -94,7 +96,7 @@
toggleControl: @Composable ToggleControlScope.() -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
- shape: Shape = MaterialTheme.shapes.large,
+ shape: Shape = ToggleButtonTokens.ContainerShape.value,
colors: ToggleButtonColors = ToggleButtonDefaults.toggleButtonColors(),
contentPadding: PaddingValues = ToggleButtonDefaults.ContentPadding,
interactionSource: MutableInteractionSource? = null,
@@ -107,7 +109,7 @@
onCheckedChange = onCheckedChange,
label = provideScopeContent(
contentColor = colors.contentColor(enabled = enabled, checked),
- textStyle = MaterialTheme.typography.labelMedium,
+ textStyle = ToggleButtonTokens.LabelFont.value,
content = label
),
toggleControl = {
@@ -123,7 +125,7 @@
),
secondaryLabel = provideNullableScopeContent(
contentColor = colors.secondaryContentColor(enabled = enabled, checked),
- textStyle = MaterialTheme.typography.labelSmall,
+ textStyle = ToggleButtonTokens.SecondaryLabelFont.value,
content = secondaryLabel
),
background = { isEnabled, isChecked ->
@@ -209,7 +211,7 @@
toggleControl: @Composable ToggleControlScope.() -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
- shape: Shape = MaterialTheme.shapes.large,
+ shape: Shape = SplitToggleButtonTokens.ContainerShape.value,
colors: SplitToggleButtonColors = ToggleButtonDefaults.splitToggleButtonColors(),
checkedInteractionSource: MutableInteractionSource? = null,
clickInteractionSource: MutableInteractionSource? = null,
@@ -221,7 +223,7 @@
onCheckedChange = onCheckedChange,
label = provideScopeContent(
contentColor = colors.contentColor(enabled = enabled, checked = checked),
- textStyle = MaterialTheme.typography.labelMedium,
+ textStyle = SplitToggleButtonTokens.LabelFont.value,
content = label
),
onClick = onClick,
@@ -234,7 +236,7 @@
.height(IntrinsicSize.Min),
secondaryLabel = provideNullableScopeContent(
contentColor = colors.secondaryContentColor(enabled = enabled, checked = checked),
- textStyle = MaterialTheme.typography.labelSmall,
+ textStyle = SplitToggleButtonTokens.SecondaryLabelFont.value,
content = secondaryLabel
),
backgroundColor = { isEnabled, isChecked ->
@@ -281,19 +283,60 @@
* when enabled and unchecked, used for secondaryLabel content
* @param uncheckedIconColor The icon color of the [ToggleButton]
* when enabled and unchecked.
+ * @param disabledCheckedContainerColor The container color of the [ToggleButton]
+ * when disabled and checked.
+ * @param disabledCheckedContentColor The content color of the [ToggleButton]
+ * when disabled and checked.
+ * @param disabledCheckedSecondaryContentColor The secondary content color of the
+ * [ToggleButton] when disabled and checked, used for secondaryLabel content.
+ * @param disabledCheckedIconColor The icon color of the [ToggleButton]
+ * when disabled and checked.
+ * @param disabledUncheckedContainerColor The container color of the [ToggleButton]
+ * when disabled and unchecked.
+ * @param disabledUncheckedContentColor The content color of a [ToggleButton]
+ * when disabled and unchecked.
+ * @param disabledUncheckedSecondaryContentColor The secondary content color of this
+ * [ToggleButton] when disabled and unchecked, used for secondaryLabel content
+ * @param disabledUncheckedIconColor The icon color of the [ToggleButton]
+ * when disabled and unchecked.
*/
@Composable
fun toggleButtonColors(
- checkedContainerColor: Color = MaterialTheme.colorScheme.primaryContainer,
- checkedContentColor: Color = MaterialTheme.colorScheme.onPrimaryContainer,
- checkedSecondaryContentColor: Color = MaterialTheme.colorScheme.onPrimaryContainer.copy(
- alpha = 0.8f
- ),
- checkedIconColor: Color = MaterialTheme.colorScheme.onPrimaryContainer,
- uncheckedContainerColor: Color = MaterialTheme.colorScheme.surface,
- uncheckedContentColor: Color = MaterialTheme.colorScheme.onSurface,
- uncheckedSecondaryContentColor: Color = MaterialTheme.colorScheme.onSurfaceVariant,
- uncheckedIconColor: Color = MaterialTheme.colorScheme.primary,
+ checkedContainerColor: Color = ToggleButtonTokens.CheckedContainerColor.value,
+ checkedContentColor: Color = ToggleButtonTokens.CheckedContentColor.value,
+ checkedSecondaryContentColor: Color = ToggleButtonTokens.CheckedSecondaryLabelColor.value
+ .copy(alpha = ToggleButtonTokens.CheckedSecondaryLabelOpacity),
+ checkedIconColor: Color = ToggleButtonTokens.CheckedIconColor.value,
+ uncheckedContainerColor: Color = ToggleButtonTokens.UncheckedContainerColor.value,
+ uncheckedContentColor: Color = ToggleButtonTokens.UncheckedContentColor.value,
+ uncheckedSecondaryContentColor: Color =
+ ToggleButtonTokens.UncheckedSecondaryLabelColor.value,
+ uncheckedIconColor: Color = ToggleButtonTokens.UncheckedIconColor.value,
+ disabledCheckedContainerColor: Color =
+ ToggleButtonTokens.DisabledCheckedContainerColor.value.toDisabledColor(
+ disabledAlpha = ToggleButtonTokens.DisabledOpacity
+ ),
+ disabledCheckedContentColor: Color = ToggleButtonTokens.DisabledCheckedContentColor.value
+ .toDisabledColor(disabledAlpha = ToggleButtonTokens.DisabledOpacity),
+ disabledCheckedSecondaryContentColor: Color =
+ ToggleButtonTokens.DisabledCheckedSecondaryLabelColor.value
+ .copy(alpha = ToggleButtonTokens.DisabledCheckedSecondaryLabelOpacity)
+ .toDisabledColor(disabledAlpha = ToggleButtonTokens.DisabledOpacity),
+ disabledCheckedIconColor: Color = ToggleButtonTokens.DisabledCheckedIconColor.value
+ .toDisabledColor(
+ disabledAlpha = ToggleButtonTokens.DisabledOpacity
+ ),
+ disabledUncheckedContainerColor: Color =
+ ToggleButtonTokens.DisabledUncheckedContainerColor.value
+ .toDisabledColor(disabledAlpha = ToggleButtonTokens.DisabledOpacity),
+ disabledUncheckedContentColor: Color =
+ ToggleButtonTokens.DisabledUncheckedContentColor.value
+ .toDisabledColor(disabledAlpha = ToggleButtonTokens.DisabledOpacity),
+ disabledUncheckedSecondaryContentColor: Color =
+ ToggleButtonTokens.DisabledUncheckedSecondaryLabelColor.value
+ .toDisabledColor(disabledAlpha = ToggleButtonTokens.DisabledOpacity),
+ disabledUncheckedIconColor: Color = ToggleButtonTokens.DisabledUncheckedIconColor.value
+ .toDisabledColor(disabledAlpha = ToggleButtonTokens.DisabledOpacity),
) =
ToggleButtonColors(
checkedContainerColor = checkedContainerColor,
@@ -304,15 +347,14 @@
uncheckedContentColor = uncheckedContentColor,
uncheckedSecondaryContentColor = uncheckedSecondaryContentColor,
uncheckedIconColor = uncheckedIconColor,
- disabledCheckedContainerColor = checkedContainerColor.toDisabledColor(),
- disabledCheckedContentColor = checkedContentColor.toDisabledColor(),
- disabledCheckedSecondaryContentColor = checkedSecondaryContentColor.toDisabledColor(),
- disabledCheckedIconColor = checkedIconColor.toDisabledColor(),
- disabledUncheckedContainerColor = uncheckedContainerColor.toDisabledColor(),
- disabledUncheckedContentColor = uncheckedContentColor.toDisabledColor(),
- disabledUncheckedSecondaryContentColor =
- uncheckedSecondaryContentColor.toDisabledColor(),
- disabledUncheckedIconColor = uncheckedIconColor.toDisabledColor(),
+ disabledCheckedContainerColor = disabledCheckedContainerColor,
+ disabledCheckedContentColor = disabledCheckedContentColor,
+ disabledCheckedSecondaryContentColor = disabledCheckedSecondaryContentColor,
+ disabledCheckedIconColor = disabledCheckedIconColor,
+ disabledUncheckedContainerColor = disabledUncheckedContainerColor,
+ disabledUncheckedContentColor = disabledUncheckedContentColor,
+ disabledUncheckedSecondaryContentColor = disabledUncheckedSecondaryContentColor,
+ disabledUncheckedIconColor = disabledUncheckedIconColor,
)
/**
@@ -334,19 +376,65 @@
* when enabled and unchecked, used for secondaryLabel content.
* @param uncheckedSplitContainerColor The split container color of the [SplitToggleButton] when
* enabled and unchecked.
+ * @param disabledCheckedContainerColor The container color of the [SplitToggleButton] when
+ * disabled and checked.
+ * @param disabledCheckedContentColor The content color of the [SplitToggleButton] when
+ * disabled and checked.
+ * @param disabledCheckedSecondaryContentColor The secondary content color of the
+ * [SplitToggleButton] when disabled and checked, used for secondaryLabel content.
+ * @param disabledCheckedSplitContainerColor The split container color of the [
+ * SplitToggleButton] when disabled and checked.
+ * @param disabledUncheckedContainerColor The container color of the [SplitToggleButton] when
+ * disabled and unchecked.
+ * @param disabledUncheckedContentColor The content color of the [SplitToggleButton] when
+ * disabled and unchecked.
+ * @param disabledUncheckedSecondaryContentColor The secondary content color of the
+ * [SplitToggleButton] when disabled and unchecked, used for secondaryLabel content.
+ * @param disabledUncheckedSplitContainerColor The split container color of the
+ * [SplitToggleButton] when disabled and unchecked.
*/
@Composable
fun splitToggleButtonColors(
- checkedContainerColor: Color = MaterialTheme.colorScheme.primaryContainer,
- checkedContentColor: Color = MaterialTheme.colorScheme.onPrimaryContainer,
- checkedSecondaryContentColor: Color = MaterialTheme.colorScheme.onPrimaryContainer.copy(
- alpha = 0.8f
- ),
- checkedSplitContainerColor: Color = MaterialTheme.colorScheme.primary.copy(.15f),
- uncheckedContainerColor: Color = MaterialTheme.colorScheme.surface,
- uncheckedContentColor: Color = MaterialTheme.colorScheme.onSurface,
- uncheckedSecondaryContentColor: Color = MaterialTheme.colorScheme.onSurfaceVariant,
- uncheckedSplitContainerColor: Color = MaterialTheme.colorScheme.surfaceBright
+ checkedContainerColor: Color = SplitToggleButtonTokens.CheckedContainerColor.value,
+ checkedContentColor: Color = SplitToggleButtonTokens.CheckedContentColor.value,
+ checkedSecondaryContentColor: Color = SplitToggleButtonTokens.CheckedSecondaryLabelColor
+ .value
+ .copy(alpha = SplitToggleButtonTokens.CheckedSecondaryLabelOpacity),
+ checkedSplitContainerColor: Color = SplitToggleButtonTokens.CheckedSplitContainerColor
+ .value
+ .copy(alpha = SplitToggleButtonTokens.CheckedSplitContainerOpacity),
+ uncheckedContainerColor: Color = SplitToggleButtonTokens.UncheckedContainerColor.value,
+ uncheckedContentColor: Color = SplitToggleButtonTokens.UncheckedContentColor.value,
+ uncheckedSecondaryContentColor: Color =
+ SplitToggleButtonTokens.UncheckedSecondaryLabelColor.value,
+ uncheckedSplitContainerColor: Color =
+ SplitToggleButtonTokens.UncheckedSplitContainerColor.value,
+ disabledCheckedContainerColor: Color =
+ SplitToggleButtonTokens.DisabledCheckedContainerColor.value
+ .toDisabledColor(disabledAlpha = SplitToggleButtonTokens.DisabledOpacity),
+ disabledCheckedContentColor: Color =
+ SplitToggleButtonTokens.DisabledCheckedContentColor.value
+ .toDisabledColor(disabledAlpha = SplitToggleButtonTokens.DisabledOpacity),
+ disabledCheckedSecondaryContentColor: Color =
+ SplitToggleButtonTokens.DisabledCheckedSecondaryLabelColor.value
+ .copy(alpha = SplitToggleButtonTokens.DisabledCheckedSecondaryLabelOpacity)
+ .toDisabledColor(disabledAlpha = SplitToggleButtonTokens.DisabledOpacity),
+ disabledCheckedSplitContainerColor: Color =
+ SplitToggleButtonTokens.DisabledCheckedSplitContainerColor.value
+ .copy(alpha = SplitToggleButtonTokens.DisabledCheckedSplitContainerOpacity)
+ .toDisabledColor(disabledAlpha = SplitToggleButtonTokens.DisabledOpacity),
+ disabledUncheckedContainerColor: Color =
+ SplitToggleButtonTokens.DisabledUncheckedContainerColor.value
+ .toDisabledColor(disabledAlpha = SplitToggleButtonTokens.DisabledOpacity),
+ disabledUncheckedContentColor: Color =
+ SplitToggleButtonTokens.DisabledUncheckedContentColor.value
+ .toDisabledColor(disabledAlpha = SplitToggleButtonTokens.DisabledOpacity),
+ disabledUncheckedSecondaryContentColor: Color =
+ SplitToggleButtonTokens.DisabledUncheckedSecondaryLabelColor.value
+ .toDisabledColor(disabledAlpha = SplitToggleButtonTokens.DisabledOpacity),
+ disabledUncheckedSplitContainerColor: Color =
+ SplitToggleButtonTokens.DisabledUncheckedSplitContainerColor.value
+ .toDisabledColor(disabledAlpha = SplitToggleButtonTokens.DisabledOpacity)
) =
SplitToggleButtonColors(
checkedContainerColor = checkedContainerColor,
@@ -357,15 +445,14 @@
uncheckedContentColor = uncheckedContentColor,
uncheckedSecondaryContentColor = uncheckedSecondaryContentColor,
uncheckedSplitContainerColor = uncheckedSplitContainerColor,
- disabledCheckedContainerColor = checkedContainerColor.toDisabledColor(),
- disabledCheckedContentColor = checkedContentColor.toDisabledColor(),
- disabledCheckedSecondaryContentColor = checkedSecondaryContentColor.toDisabledColor(),
- disabledCheckedSplitContainerColor = checkedSplitContainerColor.toDisabledColor(),
- disabledUncheckedContainerColor = uncheckedContainerColor.toDisabledColor(),
- disabledUncheckedContentColor = uncheckedContentColor.toDisabledColor(),
- disabledUncheckedSecondaryContentColor =
- uncheckedSecondaryContentColor.toDisabledColor(),
- disabledUncheckedSplitContainerColor = uncheckedSplitContainerColor.toDisabledColor()
+ disabledCheckedContainerColor = disabledCheckedContainerColor,
+ disabledCheckedContentColor = disabledCheckedContentColor,
+ disabledCheckedSecondaryContentColor = disabledCheckedSecondaryContentColor,
+ disabledCheckedSplitContainerColor = disabledCheckedSplitContainerColor,
+ disabledUncheckedContainerColor = disabledUncheckedContainerColor,
+ disabledUncheckedContentColor = disabledUncheckedContentColor,
+ disabledUncheckedSecondaryContentColor = disabledUncheckedSecondaryContentColor,
+ disabledUncheckedSplitContainerColor = disabledUncheckedSplitContainerColor
)
private val ChipHorizontalPadding = 14.dp
@@ -807,4 +894,4 @@
private val MIN_HEIGHT = 52.dp
private val COLOR_ANIMATION_SPEC: AnimationSpec<Color> =
- tween(MEDIUM_1, 0, STANDARD_DECELERATE)
+ tween(MotionTokens.DurationMedium1, 0, MotionTokens.EasingStandardDecelerate)
diff --git a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/ToggleControls.kt b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/ToggleControls.kt
index 6532b81..7074803 100644
--- a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/ToggleControls.kt
+++ b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/ToggleControls.kt
@@ -34,6 +34,7 @@
import androidx.compose.ui.graphics.drawscope.Stroke
import androidx.compose.ui.unit.dp
import androidx.compose.ui.util.lerp
+import androidx.wear.compose.material3.tokens.MotionTokens
import androidx.wear.compose.materialcore.animateSelectionColor
import androidx.wear.compose.materialcore.directionVector
import androidx.wear.compose.materialcore.toRadians
@@ -608,10 +609,12 @@
private val TICK_STICK_LENGTH = 7.dp
private const val TICK_ROTATION = 15f
-private val COLOR_ANIMATION_SPEC: AnimationSpec<Color> = tween(MEDIUM_1, 0, STANDARD_DECELERATE)
-private val PROGRESS_ANIMATION_SPEC: TweenSpec<Float> = tween(MEDIUM_1, 0, STANDARD_DECELERATE)
+private val COLOR_ANIMATION_SPEC: AnimationSpec<Color> =
+ tween(MotionTokens.DurationMedium1, 0, MotionTokens.EasingStandardDecelerate)
+private val PROGRESS_ANIMATION_SPEC: TweenSpec<Float> =
+ tween(MotionTokens.DurationMedium1, 0, MotionTokens.EasingStandardDecelerate)
private val SWITCH_PROGRESS_ANIMATION_SPEC: TweenSpec<Float> =
- tween(MEDIUM_2, 0, STANDARD_DECELERATE)
+ tween(MotionTokens.DurationMedium2, 0, MotionTokens.EasingStandardDecelerate)
private val WIDTH = 32.dp
private val HEIGHT = 24.dp
diff --git a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/tokens/MotionTokens.kt b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/tokens/MotionTokens.kt
new file mode 100644
index 0000000..062e72c
--- /dev/null
+++ b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/tokens/MotionTokens.kt
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+// VERSION: v0_40
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+package androidx.wear.compose.material3.tokens
+
+import androidx.compose.animation.core.CubicBezierEasing
+import androidx.compose.animation.core.PathEasing
+import androidx.compose.ui.graphics.vector.PathParser
+
+// See Wear Motion durations: https://carbon.googleplex.com/wear-os-3/pages/speed
+// See Wear Motion easings: https://carbon.googleplex.com/wear-os-3/pages/easings
+
+internal object MotionTokens {
+ const val DurationExtraLong1 = 700
+ const val DurationExtraLong2 = 800
+ const val DurationExtraLong3 = 900
+ const val DurationExtraLong4 = 1000
+ const val DurationLong1 = 450
+ const val DurationLong2 = 500
+ const val DurationLong3 = 550
+ const val DurationLong4 = 600
+ const val DurationMedium1 = 250
+ const val DurationMedium2 = 300
+ const val DurationMedium3 = 350
+ const val DurationMedium4 = 400
+ const val DurationShort1 = 50
+ const val DurationShort2 = 100
+ const val DurationShort3 = 150
+ const val DurationShort4 = 200
+ val EasingEmphasizedAccelerate = CubicBezierEasing(0.3f, 0.0f, 0.8f, 0.15f)
+ val EasingEmphasizedDecelerate = CubicBezierEasing(0.05f, 0.7f, 0.1f, 1.0f)
+ val EasingEmphasizedStandard =
+ PathEasing(
+ PathParser()
+ .parsePathString(
+ "M 0,0 C 0.05, 0, 0.133333, 0.06, 0.166666, 0.4 C 0.208333, 0.82, 0.25, 1, 1, 1"
+ )
+ .toPath()
+ )
+ val EasingLegacyAccelerate = CubicBezierEasing(0.4f, 0.0f, 1.0f, 1.0f)
+ val EasingLegacyDecelerate = CubicBezierEasing(0.0f, 0.0f, 0.2f, 1.0f)
+ val EasingLegacyStandard = CubicBezierEasing(0.4f, 0.0f, 0.2f, 1.0f)
+ val EasingStandard = CubicBezierEasing(0.2f, 0.0f, 0.0f, 1.0f)
+ val EasingStandardAccelerate = CubicBezierEasing(0.3f, 0.0f, 1.0f, 1.0f)
+ val EasingStandardDecelerate = CubicBezierEasing(0.0f, 0.0f, 0.0f, 1.0f)
+}
diff --git a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/tokens/SplitToggleButtonTokens.kt b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/tokens/SplitToggleButtonTokens.kt
new file mode 100644
index 0000000..6241bb6
--- /dev/null
+++ b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/tokens/SplitToggleButtonTokens.kt
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+// VERSION: v0_40
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+package androidx.wear.compose.material3.tokens
+
+internal object SplitToggleButtonTokens {
+ val CheckedContainerColor = ColorSchemeKeyTokens.PrimaryContainer
+ val CheckedContentColor = ColorSchemeKeyTokens.OnPrimaryContainer
+ val CheckedSecondaryLabelColor = ColorSchemeKeyTokens.OnPrimaryContainer
+ val CheckedSecondaryLabelOpacity = 0.8f
+ val CheckedSplitContainerColor = ColorSchemeKeyTokens.Primary
+ val CheckedSplitContainerOpacity = 0.15f
+ val ContainerShape = ShapeKeyTokens.CornerLarge
+ val DisabledCheckedContainerColor = ColorSchemeKeyTokens.PrimaryContainer
+ val DisabledCheckedContentColor = ColorSchemeKeyTokens.OnPrimaryContainer
+ val DisabledCheckedSecondaryLabelColor = ColorSchemeKeyTokens.OnPrimaryContainer
+ val DisabledCheckedSecondaryLabelOpacity = 0.8f
+ val DisabledCheckedSplitContainerColor = ColorSchemeKeyTokens.Primary
+ val DisabledCheckedSplitContainerOpacity = 0.15f
+ val DisabledOpacity = 0.38f
+ val DisabledUncheckedContainerColor = ColorSchemeKeyTokens.Surface
+ val DisabledUncheckedContentColor = ColorSchemeKeyTokens.OnSurface
+ val DisabledUncheckedSecondaryLabelColor = ColorSchemeKeyTokens.OnSurfaceVariant
+ val DisabledUncheckedSplitContainerColor = ColorSchemeKeyTokens.SurfaceBright
+ val LabelFont = TypographyKeyTokens.LabelMedium
+ val SecondaryLabelFont = TypographyKeyTokens.LabelSmall
+ val UncheckedContainerColor = ColorSchemeKeyTokens.Surface
+ val UncheckedContentColor = ColorSchemeKeyTokens.OnSurface
+ val UncheckedSecondaryLabelColor = ColorSchemeKeyTokens.OnSurfaceVariant
+ val UncheckedSplitContainerColor = ColorSchemeKeyTokens.SurfaceBright
+}
diff --git a/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/tokens/ToggleButtonTokens.kt b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/tokens/ToggleButtonTokens.kt
new file mode 100644
index 0000000..c211e57
--- /dev/null
+++ b/wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/tokens/ToggleButtonTokens.kt
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ */
+
+// VERSION: v0_40
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+package androidx.wear.compose.material3.tokens
+
+internal object ToggleButtonTokens {
+ val CheckedContainerColor = ColorSchemeKeyTokens.PrimaryContainer
+ val CheckedContentColor = ColorSchemeKeyTokens.OnPrimaryContainer
+ val CheckedIconColor = ColorSchemeKeyTokens.OnPrimaryContainer
+ val CheckedSecondaryLabelColor = ColorSchemeKeyTokens.OnPrimaryContainer
+ val CheckedSecondaryLabelOpacity = 0.8f
+ val ContainerShape = ShapeKeyTokens.CornerLarge
+ val DisabledCheckedContainerColor = ColorSchemeKeyTokens.PrimaryContainer
+ val DisabledCheckedContentColor = ColorSchemeKeyTokens.OnPrimaryContainer
+ val DisabledCheckedIconColor = ColorSchemeKeyTokens.OnPrimaryContainer
+ val DisabledCheckedSecondaryLabelColor = ColorSchemeKeyTokens.OnPrimaryContainer
+ val DisabledCheckedSecondaryLabelOpacity = 0.8f
+ val DisabledOpacity = 0.38f
+ val DisabledUncheckedContainerColor = ColorSchemeKeyTokens.Surface
+ val DisabledUncheckedContentColor = ColorSchemeKeyTokens.OnSurface
+ val DisabledUncheckedIconColor = ColorSchemeKeyTokens.Primary
+ val DisabledUncheckedSecondaryLabelColor = ColorSchemeKeyTokens.OnSurfaceVariant
+ val LabelFont = TypographyKeyTokens.LabelMedium
+ val SecondaryLabelFont = TypographyKeyTokens.LabelSmall
+ val UncheckedContainerColor = ColorSchemeKeyTokens.Surface
+ val UncheckedContentColor = ColorSchemeKeyTokens.OnSurface
+ val UncheckedIconColor = ColorSchemeKeyTokens.Primary
+ val UncheckedSecondaryLabelColor = ColorSchemeKeyTokens.OnSurfaceVariant
+}
diff --git a/wear/compose/integration-tests/demos/lint-baseline.xml b/wear/compose/integration-tests/demos/lint-baseline.xml
index 9998cad..467b911 100644
--- a/wear/compose/integration-tests/demos/lint-baseline.xml
+++ b/wear/compose/integration-tests/demos/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha02" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="WearStandaloneAppFlag"
diff --git a/wear/protolayout/protolayout-material-core/build.gradle b/wear/protolayout/protolayout-material-core/build.gradle
index dcf081a..fdab6c1 100644
--- a/wear/protolayout/protolayout-material-core/build.gradle
+++ b/wear/protolayout/protolayout-material-core/build.gradle
@@ -44,7 +44,7 @@
annotationProcessor(libs.nullaway)
api("androidx.annotation:annotation:1.2.0")
api(project(":wear:protolayout:protolayout"))
- implementation(project(":wear:protolayout:protolayout-proto"))
+ implementation(project(path: ":wear:protolayout:protolayout-proto", configuration: "shadow"))
testImplementation(libs.junit)
testImplementation(libs.mockitoCore4)
diff --git a/wear/protolayout/protolayout-material/build.gradle b/wear/protolayout/protolayout-material/build.gradle
index a09bf05..11934f2 100644
--- a/wear/protolayout/protolayout-material/build.gradle
+++ b/wear/protolayout/protolayout-material/build.gradle
@@ -34,7 +34,7 @@
api("androidx.annotation:annotation:1.2.0")
api(project(":wear:protolayout:protolayout"))
implementation(project(":wear:protolayout:protolayout-material-core"))
- implementation(project(":wear:protolayout:protolayout-proto"))
+ implementation(project(path: ":wear:protolayout:protolayout-proto", configuration: "shadow"))
implementation(project(":annotation:annotation-experimental"))
androidTestImplementation(libs.junit)
androidTestImplementation(libs.testCore)
diff --git a/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/MaterialGoldenTest.java b/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/MaterialGoldenTest.java
index 1106161f..9562e2d 100644
--- a/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/MaterialGoldenTest.java
+++ b/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/MaterialGoldenTest.java
@@ -99,6 +99,9 @@
@Test
public void test() {
- runSingleScreenshotTest(mScreenshotRule, mLayoutElement, mExpected);
+ runSingleScreenshotTest(
+ mScreenshotRule, mLayoutElement, mExpected, /* isRtlDirection= */ false);
+ runSingleScreenshotTest(
+ mScreenshotRule, mLayoutElement, mExpected + "_rtl", /* isRtlDirection= */ true);
}
}
diff --git a/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/MaterialGoldenXLTest.java b/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/MaterialGoldenXLTest.java
index 8b4c198..ba7cd97 100644
--- a/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/MaterialGoldenXLTest.java
+++ b/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/MaterialGoldenXLTest.java
@@ -140,6 +140,9 @@
@Test
public void test() {
- runSingleScreenshotTest(mScreenshotRule, mLayoutElement, mExpected);
+ runSingleScreenshotTest(
+ mScreenshotRule, mLayoutElement, mExpected, /* isRtlDirection= */ false);
+ runSingleScreenshotTest(
+ mScreenshotRule, mLayoutElement, mExpected + "_rtl", /* isRtlDirection= */ true);
}
}
diff --git a/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/RunnerUtils.java b/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/RunnerUtils.java
index 060e5f1..c750efc 100644
--- a/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/RunnerUtils.java
+++ b/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/RunnerUtils.java
@@ -20,6 +20,7 @@
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
+import android.util.DisplayMetrics;
import android.util.Log;
import androidx.annotation.NonNull;
@@ -41,7 +42,8 @@
public static void runSingleScreenshotTest(
@NonNull AndroidXScreenshotTestRule rule,
@NonNull LayoutElementBuilders.LayoutElement layoutElement,
- @NonNull String expected) {
+ @NonNull String expected,
+ boolean isRtlDirection) {
LayoutElementBuilders.Layout layout =
LayoutElementBuilders.Layout.fromLayoutElement(layoutElement);
byte[] layoutPayload = layout.toByteArray();
@@ -51,6 +53,7 @@
InstrumentationRegistry.getInstrumentation().getTargetContext(),
GoldenTestActivity.class);
startIntent.putExtra("layout", layoutPayload);
+ startIntent.putExtra(GoldenTestActivity.USE_RTL_DIRECTION, isRtlDirection);
ActivityScenario<GoldenTestActivity> scenario = ActivityScenario.launch(startIntent);
InstrumentationRegistry.getInstrumentation().waitForIdleSync();
@@ -66,12 +69,19 @@
Log.e("MaterialGoldenTest", "Error sleeping", ex);
}
+ DisplayMetrics displayMetrics =
+ InstrumentationRegistry.getInstrumentation().getTargetContext()
+ .getResources().getDisplayMetrics();
+
+ // RTL will put the View on the right side.
+ int screenWidthStart = isRtlDirection ? displayMetrics.widthPixels - SCREEN_WIDTH : 0;
+
Bitmap bitmap =
Bitmap.createBitmap(
InstrumentationRegistry.getInstrumentation()
.getUiAutomation()
.takeScreenshot(),
- 0,
+ screenWidthStart,
0,
SCREEN_WIDTH,
SCREEN_HEIGHT);
diff --git a/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/layouts/LayoutsGoldenTest.java b/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/layouts/LayoutsGoldenTest.java
index 9297128..3e1899d 100644
--- a/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/layouts/LayoutsGoldenTest.java
+++ b/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/layouts/LayoutsGoldenTest.java
@@ -99,6 +99,9 @@
@Test
public void test() {
- runSingleScreenshotTest(mScreenshotRule, mLayoutElement, mExpected);
+ runSingleScreenshotTest(
+ mScreenshotRule, mLayoutElement, mExpected, /* isRtlDirection= */ false);
+ runSingleScreenshotTest(
+ mScreenshotRule, mLayoutElement, mExpected + "_rtl", /* isRtlDirection= */ true);
}
}
diff --git a/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/layouts/LayoutsGoldenXLTest.java b/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/layouts/LayoutsGoldenXLTest.java
index 3994f03..e4d4875 100644
--- a/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/layouts/LayoutsGoldenXLTest.java
+++ b/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/layouts/LayoutsGoldenXLTest.java
@@ -149,6 +149,9 @@
@Test
public void test() {
- runSingleScreenshotTest(mScreenshotRule, mLayoutElement, mExpected);
+ runSingleScreenshotTest(
+ mScreenshotRule, mLayoutElement, mExpected, /* isRtlDirection= */ false);
+ runSingleScreenshotTest(
+ mScreenshotRule, mLayoutElement, mExpected + "_rtl", /* isRtlDirection= */ true);
}
}
diff --git a/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/test/GoldenTestActivity.java b/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/test/GoldenTestActivity.java
index d732c8c..10c457c 100644
--- a/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/test/GoldenTestActivity.java
+++ b/wear/protolayout/protolayout-material/src/androidTest/java/androidx/wear/protolayout/material/test/GoldenTestActivity.java
@@ -22,6 +22,7 @@
import android.app.Activity;
import android.content.Context;
+import android.content.res.Configuration;
import android.graphics.Color;
import android.os.Bundle;
import android.view.Gravity;
@@ -32,6 +33,7 @@
import android.widget.FrameLayout;
import android.widget.FrameLayout.LayoutParams;
+import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.wear.protolayout.LayoutElementBuilders.Layout;
import androidx.wear.protolayout.ResourceBuilders.AndroidImageResourceByResId;
@@ -42,21 +44,29 @@
import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
+import java.util.Locale;
+
@SuppressWarnings("deprecation")
public class GoldenTestActivity extends Activity {
+
+ /** Extra to be put in the intent if test should use RTL direction on parent View. */
+ public static final String USE_RTL_DIRECTION = "using_rtl";
private static final String ICON_ID = "icon";
private static final String ICON_ID_SMALL = "icon_small";
private static final String AVATAR = "avatar_image";
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
- byte[] layoutPayload = getIntent().getExtras().getByteArray("layout");
+ Bundle extras = getIntent().getExtras();
+ byte[] layoutPayload = extras.getByteArray("layout");
Layout layout = Layout.fromByteArray(layoutPayload);
Context appContext = getApplicationContext();
FrameLayout root = new FrameLayout(appContext);
root.setBackgroundColor(Color.BLACK);
root.setLayoutParams(new LayoutParams(SCREEN_WIDTH, SCREEN_HEIGHT));
+ boolean isRtlEnabled = extras.getBoolean(USE_RTL_DIRECTION);
+ updateLanguage(this, isRtlEnabled);
ListeningExecutorService mainExecutor = MoreExecutors.newDirectExecutorService();
Resources resources = generateResources();
@@ -118,4 +128,15 @@
.build())
.build();
}
+
+ /** Sets language for device to be LTR or RTL. */
+ private static void updateLanguage(@NonNull Context context, boolean isRtlDirection) {
+ String languageToLoad = isRtlDirection ? "fa" : "en"; // fa = Persian, en = English
+ Locale locale = new Locale(languageToLoad);
+ Locale.setDefault(locale);
+ Configuration config = new Configuration();
+ config.setLocale(locale);
+ context.getResources().updateConfiguration(
+ config, context.getResources().getDisplayMetrics());
+ }
}
diff --git a/wear/protolayout/protolayout-material/src/main/java/androidx/wear/protolayout/material/CircularProgressIndicator.java b/wear/protolayout/protolayout-material/src/main/java/androidx/wear/protolayout/material/CircularProgressIndicator.java
index 2f9a165..aa7c77d4 100644
--- a/wear/protolayout/protolayout-material/src/main/java/androidx/wear/protolayout/material/CircularProgressIndicator.java
+++ b/wear/protolayout/protolayout-material/src/main/java/androidx/wear/protolayout/material/CircularProgressIndicator.java
@@ -255,17 +255,21 @@
ArcLine.Builder progressArcLineBuilder =
new ArcLine.Builder()
+ .setArcDirection(LayoutElementBuilders.ARC_DIRECTION_CLOCKWISE)
.setColor(mCircularProgressIndicatorColors.getIndicatorColor())
.setThickness(mStrokeWidth);
applyCorrectValue(progressArcLineBuilder);
Arc.Builder element =
new Arc.Builder()
+ .setArcDirection(LayoutElementBuilders.ARC_DIRECTION_CLOCKWISE)
.setAnchorType(LayoutElementBuilders.ARC_ANCHOR_START)
.setAnchorAngle(mStartAngle)
.setModifiers(modifiers.build())
.addContent(
new ArcLine.Builder()
+ .setArcDirection(
+ LayoutElementBuilders.ARC_DIRECTION_CLOCKWISE)
.setColor(
mCircularProgressIndicatorColors
.getTrackColor())
diff --git a/wear/protolayout/protolayout-material/src/main/java/androidx/wear/protolayout/material/layouts/MultiButtonLayout.java b/wear/protolayout/protolayout-material/src/main/java/androidx/wear/protolayout/material/layouts/MultiButtonLayout.java
index d7ed740..3f9f9ff 100644
--- a/wear/protolayout/protolayout-material/src/main/java/androidx/wear/protolayout/material/layouts/MultiButtonLayout.java
+++ b/wear/protolayout/protolayout-material/src/main/java/androidx/wear/protolayout/material/layouts/MultiButtonLayout.java
@@ -136,7 +136,12 @@
return this;
}
- /** Constructs and returns {@link MultiButtonLayout} with the provided content and look. */
+ /**
+ * Constructs and returns {@link MultiButtonLayout} with the provided content and look.
+ *
+ * @throws IllegalArgumentException if no buttons are added or the number of buttons added
+ * is larger than {@link LayoutDefaults.MultiButtonLayoutDefaults#MAX_BUTTONS}.
+ */
@NonNull
@Override
public MultiButtonLayout build() {
@@ -145,6 +150,9 @@
throw new IllegalArgumentException(
"Too many buttons are added. Maximum number is " + MAX_BUTTONS + ".");
}
+ if (buttonNum == 0) {
+ throw new IllegalArgumentException("No buttons are added. Minimum number is 1.");
+ }
LayoutElement buttons = buildButtons(buttonNum);
Box.Builder elementBuilder =
@@ -247,8 +255,9 @@
BUTTON_SIZE_FOR_3_PLUS_BUTTONS))
.build();
default:
- throw new IllegalArgumentException(
- "Too many buttons are added. Maximum number is " + MAX_BUTTONS + ".");
+ // This shouldn't happen as we have min/max checks above.
+ throw new IllegalStateException(
+ "Incorrect number of buttons when building MultiButtonLayout.");
}
}
diff --git a/wear/protolayout/protolayout-proto/src/main/proto/layout.proto b/wear/protolayout/protolayout-proto/src/main/proto/layout.proto
index f233a02..4a650a4 100644
--- a/wear/protolayout/protolayout-proto/src/main/proto/layout.proto
+++ b/wear/protolayout/protolayout-proto/src/main/proto/layout.proto
@@ -150,8 +150,11 @@
TEXT_OVERFLOW_TRUNCATE = 1;
// Truncate the text to fit in the Text element's bounds, but add an ellipsis
- // (i.e. ...) to the end of the text if it has been truncated.
- // @deprecated Use TEXT_OVERFLOW_ELLIPSIZE instead.
+ // (i.e. ...) to the end of the text if it has been truncated. Note that this will not add an
+ // ellipsis if the number of lines that fits into the available space is less than the
+ // {@code setMaxLines} in Text.
+ //
+ // DEPRECATED: Use {@link #TEXT_OVERFLOW_ELLIPSIZE} instead.
TEXT_OVERFLOW_ELLIPSIZE_END = 2;
// Enable marquee animation for texts that don't fit inside the Text element.
@@ -163,13 +166,9 @@
// Truncate the text to fit in the Text element's parent bounds, but add an
// ellipsis (i.e. ...) to the end of the text if it has been truncated.
- // This will truncate the text even before {@code setMaxLines} in Text is
- // reached if there's not enough space in the parent container.
- // Note that, when this is used, the parent of the Text element this
- // corresponds to shouldn't have its width and height set to wrapped, as it
- // can lead to unexpected results.
- // <p>Note that, on SpanText, this will behave exactly the same way as
- // TEXT_OVERFLOW_ELLIPSIZE_END.
+ //
+ // <p>Note that, when this is used, the parent of the Text element this corresponds to shouldn't
+ // have its width and height set to wrapped, as it can lead to unexpected results.
TEXT_OVERFLOW_ELLIPSIZE = 4;
}
diff --git a/wear/protolayout/protolayout-renderer/src/main/java/androidx/wear/protolayout/renderer/inflater/ProtoLayoutInflater.java b/wear/protolayout/protolayout-renderer/src/main/java/androidx/wear/protolayout/renderer/inflater/ProtoLayoutInflater.java
index d6bb657..7263518 100644
--- a/wear/protolayout/protolayout-renderer/src/main/java/androidx/wear/protolayout/renderer/inflater/ProtoLayoutInflater.java
+++ b/wear/protolayout/protolayout-renderer/src/main/java/androidx/wear/protolayout/renderer/inflater/ProtoLayoutInflater.java
@@ -18,9 +18,12 @@
import static android.util.TypedValue.COMPLEX_UNIT_SP;
import static android.view.View.INVISIBLE;
+import static android.view.View.LAYOUT_DIRECTION_LTR;
+import static android.view.View.LAYOUT_DIRECTION_RTL;
import static android.view.View.VISIBLE;
import static androidx.core.util.Preconditions.checkNotNull;
+import static androidx.wear.protolayout.proto.LayoutElementProto.ArcDirection.ARC_DIRECTION_CLOCKWISE_VALUE;
import static androidx.wear.protolayout.renderer.common.ProtoLayoutDiffer.FIRST_CHILD_INDEX;
import static androidx.wear.protolayout.renderer.common.ProtoLayoutDiffer.ROOT_NODE_ID;
import static androidx.wear.protolayout.renderer.common.ProtoLayoutDiffer.getParentNodePosId;
@@ -52,6 +55,7 @@
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.TextPaint;
+import android.text.TextUtils;
import android.text.TextUtils.TruncateAt;
import android.text.method.LinkMovementMethod;
import android.text.style.AbsoluteSizeSpan;
@@ -113,6 +117,7 @@
import androidx.wear.protolayout.proto.DimensionProto.DpProp;
import androidx.wear.protolayout.proto.DimensionProto.ExpandedAngularDimensionProp;
import androidx.wear.protolayout.proto.DimensionProto.ExpandedDimensionProp;
+import androidx.wear.protolayout.proto.DimensionProto.ExtensionDimension;
import androidx.wear.protolayout.proto.DimensionProto.ImageDimension;
import androidx.wear.protolayout.proto.DimensionProto.ProportionalDimensionProp;
import androidx.wear.protolayout.proto.DimensionProto.SpProp;
@@ -189,6 +194,7 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.CancellationException;
@@ -1651,8 +1657,6 @@
case SlideDirection.SLIDE_DIRECTION_BOTTOM_TO_TOP_VALUE:
fromYDelta = getInitialOffsetOrDefaultY(slideIn, view);
break;
- default:
- break;
}
TranslateAnimation translateAnimation =
@@ -1705,8 +1709,6 @@
case SlideDirection.SLIDE_DIRECTION_BOTTOM_TO_TOP_VALUE:
toYDelta = getTargetOffsetOrDefaultY(slideOut, view);
break;
- default:
- break;
}
TranslateAnimation translateAnimation =
@@ -2770,6 +2772,21 @@
// immediately overridden.
textView.setTextColor(extractTextColorArgb(text.getFontStyle()));
+ if (text.hasArcDirection()) {
+ switch (text.getArcDirection().getValue()) {
+ case ARC_DIRECTION_NORMAL:
+ textView.setClockwise(!isRtlLayoutDirectionFromLocale());
+ break;
+ case ARC_DIRECTION_COUNTER_CLOCKWISE:
+ textView.setClockwise(false);
+ break;
+ case ARC_DIRECTION_CLOCKWISE:
+ case UNRECOGNIZED:
+ textView.setClockwise(true);
+ break;
+ }
+ }
+
View wrappedView =
applyModifiersToArcLayoutView(textView, text.getModifiers(), posId, pipelineMaker);
parentViewWrapper.maybeAddView(wrappedView, layoutParams);
@@ -3097,7 +3114,7 @@
lineView.setThickness(thicknessPx);
- DegreesProp length;
+ DegreesProp length = DegreesProp.getDefaultInstance();
if (line.hasAngularLength()) {
final ArcLineLength angularLength = line.getAngularLength();
switch (angularLength.getInnerCase()) {
@@ -3118,8 +3135,7 @@
break;
}
- default:
- length = DegreesProp.getDefaultInstance();
+ case INNER_NOT_SET:
break;
}
} else {
@@ -3133,7 +3149,11 @@
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
@Nullable Float sizeForLayout = resolveSizeForLayoutIfNeeded(length);
if (sizeForLayout != null) {
- sizeWrapper = new SizedArcContainer(mUiContext);
+ int arcDirection =
+ line.hasArcDirection()
+ ? line.getArcDirection().getValueValue()
+ : ARC_DIRECTION_CLOCKWISE_VALUE;
+ sizeWrapper = new SizedArcContainer(mUiContext, arcDirection);
if (sizeForLayout <= 0f) {
Log.w(
TAG,
@@ -3180,22 +3200,46 @@
LayoutInfo.Builder layoutInfoBuilder,
Optional<ProtoLayoutDynamicDataPipeline.PipelineMaker> pipelineMaker) {
ArcLayout arcLayout = new ArcLayout(mUiContext);
+ int anchorAngleSign = 1;
+
+ if (arc.hasArcDirection()) {
+ switch (arc.getArcDirection().getValue()) {
+ case ARC_DIRECTION_CLOCKWISE:
+ arcLayout.setLayoutDirection(LAYOUT_DIRECTION_LTR);
+ break;
+ case ARC_DIRECTION_COUNTER_CLOCKWISE:
+ arcLayout.setLayoutDirection(LAYOUT_DIRECTION_RTL);
+ anchorAngleSign = -1;
+ break;
+ case ARC_DIRECTION_NORMAL:
+ boolean isRtl = isRtlLayoutDirectionFromLocale();
+ arcLayout.setLayoutDirection(
+ isRtl ? LAYOUT_DIRECTION_RTL : LAYOUT_DIRECTION_LTR);
+ if (isRtl) {
+ anchorAngleSign = -1;
+ }
+ break;
+ case UNRECOGNIZED:
+ break;
+ }
+ }
LayoutParams layoutParams = generateDefaultLayoutParams();
layoutParams.width = LayoutParams.MATCH_PARENT;
layoutParams.height = LayoutParams.MATCH_PARENT;
+ int finalAnchorAngleSign = anchorAngleSign;
handleProp(
arc.getAnchorAngle(),
angle -> {
- arcLayout.setAnchorAngleDegrees(angle);
+ arcLayout.setAnchorAngleDegrees(finalAnchorAngleSign * angle);
// Invalidating arcLayout isn't enough. AnchorAngleDegrees change should trigger
// child requestLayout.
arcLayout.requestLayout();
},
arcPosId,
pipelineMaker);
- arcLayout.setAnchorAngleDegrees(arc.getAnchorAngle().getValue());
+ arcLayout.setAnchorAngleDegrees(finalAnchorAngleSign * arc.getAnchorAngle().getValue());
arcLayout.setAnchorType(anchorTypeToAnchorPos(arc.getAnchorType().getValue()));
if (arc.hasMaxAngle()) {
@@ -3249,6 +3293,10 @@
numMissingChildren);
}
+ static boolean isRtlLayoutDirectionFromLocale() {
+ return TextUtils.getLayoutDirectionFromLocale(Locale.getDefault()) == LAYOUT_DIRECTION_RTL;
+ }
+
private void applyStylesToSpan(
SpannableStringBuilder builder, int start, int end, FontStyle fontStyle) {
if (fontStyleHasSize(fontStyle)) {
@@ -3479,7 +3527,7 @@
excludeFontPadding = true;
}
break;
- default:
+ case INNER_NOT_SET:
Log.w(TAG, "Unknown Span child type.");
break;
}
@@ -3997,11 +4045,12 @@
case TEXT:
case SPANNABLE:
return true;
+ case EXTENSION:
+ return isMeasurable(element.getExtension().getWidth());
case INNER_NOT_SET:
return false;
- default: // TODO(b/276703002): Remove default case
- return false;
}
+ return false;
}
private boolean isHeightMeasurable(LayoutElement element, ContainerDimension containerWidth) {
@@ -4032,11 +4081,12 @@
case TEXT:
case SPANNABLE:
return true;
+ case EXTENSION:
+ return isMeasurable(element.getExtension().getHeight());
case INNER_NOT_SET:
return false;
- default: // TODO(b/276703002): Remove default case
- return false;
}
+ return false;
}
private boolean isMeasurable(ContainerDimension dimension) {
@@ -4067,6 +4117,16 @@
return false;
}
+ private static boolean isMeasurable(ExtensionDimension dimension) {
+ switch (dimension.getInnerCase()) {
+ case LINEAR_DIMENSION:
+ return true;
+ case INNER_NOT_SET:
+ return false;
+ }
+ return false;
+ }
+
private void inflateChildElements(
@NonNull ViewGroup parent,
@NonNull LayoutParams parentLayoutParams,
@@ -4412,9 +4472,11 @@
return "android.widget.Switch";
case SEMANTICS_ROLE_RADIOBUTTON:
return "android.widget.RadioButton";
- default:
+ case SEMANTICS_ROLE_NONE:
+ case UNRECOGNIZED:
return "";
}
+ return "";
}
// getObsoleteContentDescription is used for backward compatibility
diff --git a/wear/protolayout/protolayout-renderer/src/main/java/androidx/wear/protolayout/renderer/inflater/SizedArcContainer.java b/wear/protolayout/protolayout-renderer/src/main/java/androidx/wear/protolayout/renderer/inflater/SizedArcContainer.java
index fdd7bd4..a3de8c6 100644
--- a/wear/protolayout/protolayout-renderer/src/main/java/androidx/wear/protolayout/renderer/inflater/SizedArcContainer.java
+++ b/wear/protolayout/protolayout-renderer/src/main/java/androidx/wear/protolayout/renderer/inflater/SizedArcContainer.java
@@ -33,6 +33,10 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import static androidx.wear.protolayout.proto.LayoutElementProto.ArcDirection.ARC_DIRECTION_CLOCKWISE_VALUE;
+import static androidx.wear.protolayout.proto.LayoutElementProto.ArcDirection.ARC_DIRECTION_COUNTER_CLOCKWISE_VALUE;
+import static androidx.wear.protolayout.proto.LayoutElementProto.ArcDirection.ARC_DIRECTION_NORMAL_VALUE;
+import static androidx.wear.protolayout.renderer.inflater.ProtoLayoutInflater.isRtlLayoutDirectionFromLocale;
/**
* A container, which can be added to a ArcLayout, which occupies a fixed size.
@@ -42,6 +46,7 @@
*/
class SizedArcContainer extends ViewGroup implements ArcLayout.Widget {
private static final float DEFAULT_SWEEP_ANGLE_DEGREES = 0;
+ private int mArcDirection = ARC_DIRECTION_CLOCKWISE_VALUE;
private float mSweepAngleDegrees;
@@ -89,6 +94,11 @@
this(context, null);
}
+ SizedArcContainer(@NonNull Context context, int arcDirection) {
+ this(context, null);
+ mArcDirection = arcDirection;
+ }
+
SizedArcContainer(@NonNull Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
@@ -232,15 +242,29 @@
float childSweep = ((ArcLayout.Widget) child).getSweepAngleDegrees();
float offsetDegrees = (mSweepAngleDegrees - childSweep) / 2;
+ int sign = getSignForClockwise();
+
switch (alignment) {
case LayoutParams.ANGULAR_ALIGNMENT_START:
- canvas.rotate(-offsetDegrees, centerX, centerY);
+ canvas.rotate(-1 * sign * offsetDegrees, centerX, centerY);
return super.drawChild(canvas, child, drawingTime);
case LayoutParams.ANGULAR_ALIGNMENT_END:
- canvas.rotate(offsetDegrees, centerX, centerY);
+ canvas.rotate(sign * offsetDegrees, centerX, centerY);
return super.drawChild(canvas, child, drawingTime);
default:
return super.drawChild(canvas, child, drawingTime);
}
}
+
+ private int getSignForClockwise() {
+ switch (mArcDirection) {
+ case ARC_DIRECTION_CLOCKWISE_VALUE:
+ return 1;
+ case ARC_DIRECTION_COUNTER_CLOCKWISE_VALUE:
+ return -1;
+ case ARC_DIRECTION_NORMAL_VALUE:
+ default:
+ return isRtlLayoutDirectionFromLocale() ? -1 : 1;
+ }
+ }
}
diff --git a/wear/protolayout/protolayout-renderer/src/test/java/androidx/wear/protolayout/renderer/inflater/ProtoLayoutInflaterTest.java b/wear/protolayout/protolayout-renderer/src/test/java/androidx/wear/protolayout/renderer/inflater/ProtoLayoutInflaterTest.java
index 950e73f..c02a19a 100644
--- a/wear/protolayout/protolayout-renderer/src/test/java/androidx/wear/protolayout/renderer/inflater/ProtoLayoutInflaterTest.java
+++ b/wear/protolayout/protolayout-renderer/src/test/java/androidx/wear/protolayout/renderer/inflater/ProtoLayoutInflaterTest.java
@@ -47,6 +47,7 @@
import static org.robolectric.Shadows.shadowOf;
import static java.lang.Integer.MAX_VALUE;
+import static java.nio.charset.StandardCharsets.UTF_8;
import android.app.Activity;
import android.app.Application;
@@ -224,7 +225,6 @@
import org.robolectric.shadows.ShadowSystemClock;
import java.io.IOException;
-import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
@@ -536,6 +536,54 @@
}
@Test
+ public void inflate_box_withExtensionElement() {
+ int width = 10;
+ int height = 12;
+ byte[] payload = "Hello World".getBytes(UTF_8);
+ LayoutElement root =
+ LayoutElement.newBuilder()
+ .setBox(
+ Box.newBuilder()
+ // Outer box's width and height left at default value of "wrap"
+ .addContents(
+ LayoutElement.newBuilder()
+ .setExtension(
+ ExtensionLayoutElement.newBuilder()
+ .setExtensionId("foo")
+ .setPayload(ByteString.copyFrom(payload))
+ .setWidth(
+ ExtensionDimension.newBuilder()
+ .setLinearDimension(dp(width))
+ .build())
+ .setHeight(
+ ExtensionDimension.newBuilder()
+ .setLinearDimension(dp(height))
+ .build()))))
+ .build();
+
+ FrameLayout rootLayout =
+ renderer(
+ newRendererConfigBuilder(fingerprintedLayout(root))
+ .setExtensionViewProvider(
+ (extensionPayload, id) -> {
+ TextView returnedView = new TextView(getApplicationContext());
+ returnedView.setText("testing");
+
+ return returnedView;
+ }))
+ .inflate();
+
+ // Check that the outer box is displayed and it has a child.
+ assertThat(rootLayout.getChildCount()).isEqualTo(1);
+
+ ViewGroup boxView = (ViewGroup) rootLayout.getChildAt(0);
+ assertThat(boxView.getChildCount()).isEqualTo(1);
+
+ assertThat(boxView.getMeasuredWidth()).isEqualTo(width);
+ assertThat(boxView.getMeasuredHeight()).isEqualTo(height);
+ }
+
+ @Test
public void inflate_box_withSemanticsModifier() {
String textDescription = "this is a button";
Semantics semantics =
@@ -3601,7 +3649,7 @@
@Test
public void inflate_extension_onlySpaceIfNoExtension() {
- byte[] payload = "Hello World".getBytes(StandardCharsets.UTF_8);
+ byte[] payload = "Hello World".getBytes(UTF_8);
int size = 5;
ExtensionDimension dim =
@@ -3630,7 +3678,7 @@
public void inflate_rendererExtension_withExtension_callsExtension() {
List<Pair<byte[], String>> invokedExtensions = new ArrayList<>();
- final byte[] payload = "Hello World".getBytes(StandardCharsets.UTF_8);
+ final byte[] payload = "Hello World".getBytes(UTF_8);
final int size = 5;
final String extensionId = "foo";
diff --git a/wear/protolayout/protolayout/lint-baseline.xml b/wear/protolayout/protolayout/lint-baseline.xml
new file mode 100644
index 0000000..d56616a
--- /dev/null
+++ b/wear/protolayout/protolayout/lint-baseline.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.wear.protolayout.expression.ExperimentalProtoLayoutExtensionApi` or `@OptIn(markerClass = androidx.wear.protolayout.expression.ExperimentalProtoLayoutExtensionApi.class)`"
+ errorLine1=" public static ExtensionDimension extensionDimensionFromProto("
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/protolayout/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.wear.protolayout.expression.ExperimentalProtoLayoutExtensionApi` or `@OptIn(markerClass = androidx.wear.protolayout.expression.ExperimentalProtoLayoutExtensionApi.class)`"
+ errorLine1=" static ExtensionDimension extensionDimensionFromProto("
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/protolayout/DimensionBuilders.java"/>
+ </issue>
+
+</issues>
diff --git a/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/LayoutElementBuilders.java b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/LayoutElementBuilders.java
index 5922761..3c142e4 100644
--- a/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/LayoutElementBuilders.java
+++ b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/LayoutElementBuilders.java
@@ -201,7 +201,8 @@
/**
* Truncate the text at the last line defined by {@code setMaxLines} in {@link Text} to fit in
* the {@link Text} element's bounds, but add an ellipsis (i.e. ...) to the end of the text if
- * it has been truncated.
+ * it has been truncated. Note that this will not add an ellipsis if the number of lines that
+ * fits into the available space is less than the {@code setMaxLines} in {@link Text}.
*
* @deprecated Use {@link #TEXT_OVERFLOW_ELLIPSIZE} instead.
*/
@@ -220,14 +221,10 @@
/**
* Truncate the text to fit in the {@link Text} element's parent bounds, but add an ellipsis
- * (i.e. ...) to the end of the text if it has been truncated. This will truncate the text even
- * before {@code setMaxLines} in {@link Text} is reached if there's not enough space in the
- * parent container. Note that, when this is used, the parent of the {@link Text} element this
- * corresponds to shouldn't have its width and height set to wrapped, as it can lead to
- * unexpected results.
+ * (i.e. ...) to the end of the text if it has been truncated.
*
- * <p>Note that, on {@link SpanText}, this will behave exactly the same way as
- * TEXT_OVERFLOW_ELLIPSIZE_END.
+ * <p>Note that, when this is used, the parent of the {@link Text} element this corresponds to
+ * shouldn't have its width and height set to wrapped, as it can lead to unexpected results.
*/
@RequiresSchemaVersion(major = 1, minor = 300)
public static final int TEXT_OVERFLOW_ELLIPSIZE = 4;
diff --git a/wear/tiles/tiles-material/lint-baseline.xml b/wear/tiles/tiles-material/lint-baseline.xml
index 62608db..55b4b6d 100644
--- a/wear/tiles/tiles-material/lint-baseline.xml
+++ b/wear/tiles/tiles-material/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha02" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
@@ -21,6 +21,150 @@
<issue
id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/Button.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/Button.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/Chip.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/Chip.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/CircularProgressIndicator.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/CircularProgressIndicator.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/CompactChip.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/CompactChip.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/layouts/EdgeContentLayout.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/layouts/EdgeContentLayout.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/layouts/MultiButtonLayout.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/layouts/MultiButtonLayout.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/layouts/MultiSlotLayout.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/layouts/MultiSlotLayout.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/layouts/PrimaryLayout.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/layouts/PrimaryLayout.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Modifiers.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ModifiersProto.Modifiers.newBuilder(modifiers.toProto())"
errorLine2=" ~~~~~~~~~~">
@@ -38,6 +182,42 @@
</issue>
<issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/Text.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/Text.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/TitleChip.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/material/TitleChip.java"/>
+ </issue>
+
+ <issue
id="UnsafeOptInUsageError"
message="Failed to read `level` from `@androidx.wear.tiles.TilesExperimental` -- assuming `ERROR`. This declaration is opt-in and its usage should be marked with `@androidx.wear.tiles.TilesExperimental` or `@OptIn(markerClass = androidx.wear.tiles.TilesExperimental.class)`"
errorLine1=" .setVariant(variant)"
diff --git a/wear/tiles/tiles-renderer/lint-baseline.xml b/wear/tiles/tiles-renderer/lint-baseline.xml
index 02bf265..95125a4 100644
--- a/wear/tiles/tiles-renderer/lint-baseline.xml
+++ b/wear/tiles/tiles-renderer/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.2.0-alpha15" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-alpha15)" variant="all" version="8.2.0-alpha15">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="UnspecifiedRegisterReceiverFlag"
@@ -21,6 +21,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="ResourceProto.Resources can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" val resources = ResourceProto.Resources.parseFrom(resourcesData.contents)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/connection/DefaultTileClient.kt"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Resources.parseFrom can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" val resources = ResourceProto.Resources.parseFrom(resourcesData.contents)"
errorLine2=" ~~~~~~~~~">
@@ -48,6 +57,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Layout can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final LayoutElementProto.Layout mLayout;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/renderer/TileRenderer.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Resources can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final ResourceProto.Resources mResources;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/renderer/TileRenderer.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Layout can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable LayoutElementProto.Layout layout,"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/renderer/TileRenderer.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Resources can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable ResourceProto.Resources resources) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/renderer/TileRenderer.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="State.fromProto can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" StateBuilders.State.fromProto(nextState)));"
errorLine2=" ~~~~~~~~~">
@@ -111,6 +156,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="Layout can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Layout layout,"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/renderer/TileRenderer.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Resources can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull ResourceProto.Resources resources,"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/renderer/TileRenderer.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Timeline.toProto can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" mCache = new TilesTimelineCacheInternal(timeline.toProto());"
errorLine2=" ~~~~~~~">
@@ -120,6 +183,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="TimelineEntry can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" TimelineEntry entry = mCache.findTimelineEntryForTime(timeMillis);"
+ errorLine2=" ~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/TilesTimelineCache.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TimelineEntry can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" TimelineEntry entry = mCache.findTimelineEntryForTime(timeMillis);"
+ errorLine2=" ~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/TilesTimelineCache.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="TimelineEntry.fromProto can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return TimelineBuilders.TimelineEntry.fromProto(entry);"
errorLine2=" ~~~~~~~~~">
@@ -129,6 +210,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="TimelineEntry can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" TimelineEntry entry = mCache.findClosestTimelineEntry(timeMillis);"
+ errorLine2=" ~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/TilesTimelineCache.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TimelineEntry can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" TimelineEntry entry = mCache.findClosestTimelineEntry(timeMillis);"
+ errorLine2=" ~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/TilesTimelineCache.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="TimelineEntry.fromProto can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return TimelineBuilders.TimelineEntry.fromProto(entry);"
errorLine2=" ~~~~~~~~~">
@@ -147,6 +246,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Timeline can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Timeline mTimeline;"
+ errorLine2=" ~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/internal/TilesTimelineCacheInternal.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Timeline can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public TilesTimelineCacheInternal(@NonNull Timeline timeline) {"
+ errorLine2=" ~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/internal/TilesTimelineCacheInternal.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TimelineEntry can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public TimelineEntry findTimelineEntryForTime(long timeMillis) {"
+ errorLine2=" ~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/internal/TilesTimelineCacheInternal.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TimelineEntry can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" TimelineEntry currentEntry = null;"
+ errorLine2=" ~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/internal/TilesTimelineCacheInternal.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Timeline.getTimelineEntriesList can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" for (TimelineEntry entry : mTimeline.getTimelineEntriesList()) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
@@ -165,6 +300,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="TimeInterval can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" TimeInterval validity = entry.getValidity();"
+ errorLine2=" ~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/internal/TilesTimelineCacheInternal.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="TimelineEntry.getValidity can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" TimeInterval validity = entry.getValidity();"
errorLine2=" ~~~~~~~~~~~">
@@ -210,6 +354,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="TimelineEntry can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public TimelineEntry findClosestTimelineEntry(long timeMillis) {"
+ errorLine2=" ~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/internal/TilesTimelineCacheInternal.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TimelineEntry can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" TimelineEntry currentEntry = null;"
+ errorLine2=" ~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/internal/TilesTimelineCacheInternal.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Timeline.getTimelineEntriesList can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" for (TimelineEntry entry : mTimeline.getTimelineEntriesList()) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
@@ -228,6 +390,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="TimeInterval can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" TimeInterval validity = entry.getValidity();"
+ errorLine2=" ~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/internal/TilesTimelineCacheInternal.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="TimelineEntry.getValidity can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" TimeInterval validity = entry.getValidity();"
errorLine2=" ~~~~~~~~~~~">
@@ -282,6 +453,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="TimelineEntry can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public long findCurrentTimelineEntryExpiry(@NonNull TimelineEntry entry, long fromTimeMillis) {"
+ errorLine2=" ~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/internal/TilesTimelineCacheInternal.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="TimeInterval.getEndMillis can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (entry.hasValidity() && entry.getValidity().getEndMillis() > fromTimeMillis) {"
errorLine2=" ~~~~~~~~~~~~">
@@ -381,6 +561,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="TimeInterval can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" TimeInterval nextEntryValidity = nextEntry.getValidity();"
+ errorLine2=" ~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/internal/TilesTimelineCacheInternal.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="TimelineEntry.getValidity can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" TimeInterval nextEntryValidity = nextEntry.getValidity();"
errorLine2=" ~~~~~~~~~~~">
@@ -498,6 +687,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="TimeInterval can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private static boolean isTimeIntervalValid(TimeInterval timeInterval) {"
+ errorLine2=" ~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/internal/TilesTimelineCacheInternal.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="TimeInterval.getEndMillis can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return timeInterval.getEndMillis() > timeInterval.getStartMillis();"
errorLine2=" ~~~~~~~~~~~~">
@@ -550,4 +748,40 @@
file="src/main/java/androidx/wear/tiles/timeline/TilesTimelineManager.java"/>
</issue>
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TimelineEntry can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" void onLayoutUpdate(int token, @NonNull TimelineEntry entry);"
+ errorLine2=" ~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/internal/TilesTimelineManagerInternal.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Timeline can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull Timeline timeline,"
+ errorLine2=" ~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/internal/TilesTimelineManagerInternal.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TimelineEntry can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" TimelineEntry entry = mCache.findTimelineEntryForTime(now);"
+ errorLine2=" ~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/internal/TilesTimelineManagerInternal.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TimelineEntry can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" final TimelineEntry entryToDispatch = entry;"
+ errorLine2=" ~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/timeline/internal/TilesTimelineManagerInternal.java"/>
+ </issue>
+
</issues>
diff --git a/wear/tiles/tiles-tooling-preview/build.gradle b/wear/tiles/tiles-tooling-preview/build.gradle
index 463b22e..3eda344 100644
--- a/wear/tiles/tiles-tooling-preview/build.gradle
+++ b/wear/tiles/tiles-tooling-preview/build.gradle
@@ -32,7 +32,7 @@
dependencies {
implementation(libs.kotlinStdlib)
- implementation(project(":wear:protolayout:protolayout-proto"))
+ implementation(project(path: ":wear:protolayout:protolayout-proto", configuration: "shadow"))
implementation(project(":wear:tiles:tiles"))
api("androidx.wear:wear-tooling-preview:1.0.0")
diff --git a/wear/tiles/tiles-tooling/build.gradle b/wear/tiles/tiles-tooling/build.gradle
index 3ad6fab..73a238c 100644
--- a/wear/tiles/tiles-tooling/build.gradle
+++ b/wear/tiles/tiles-tooling/build.gradle
@@ -15,7 +15,7 @@
}
dependencies {
- implementation(project(":wear:protolayout:protolayout-proto"))
+ implementation(project(path: ":wear:protolayout:protolayout-proto", configuration: "shadow"))
implementation(project(":wear:tiles:tiles"))
implementation(project(":wear:tiles:tiles-renderer"))
implementation(project(":wear:tiles:tiles-tooling-preview"))
diff --git a/wear/tiles/tiles/lint-baseline.xml b/wear/tiles/tiles/lint-baseline.xml
index faa4a6b..5b033bf 100644
--- a/wear/tiles/tiles/lint-baseline.xml
+++ b/wear/tiles/tiles/lint-baseline.xml
@@ -1,5 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidStringExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ActionProto.AndroidStringExtra mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidStringExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AndroidStringExtra(ActionProto.AndroidStringExtra impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AndroidStringExtra(ActionProto.AndroidStringExtra impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
<issue
id="RestrictedApiAndroidX"
@@ -12,6 +48,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidStringExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static AndroidStringExtra fromProto(@NonNull ActionProto.AndroidStringExtra proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidStringExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ActionProto.AndroidStringExtra toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public ActionProto.AndroidExtra toAndroidExtraProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidExtra.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return ActionProto.AndroidExtra.newBuilder().setStringVal(mImpl).build();"
errorLine2=" ~~~~~~~~~~">
@@ -30,6 +102,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ActionProto.AndroidStringExtra.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidStringExtra.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ActionProto.AndroidStringExtra.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -39,6 +120,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1281351679);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1281351679);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -66,6 +156,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="AndroidIntExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ActionProto.AndroidIntExtra mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidIntExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AndroidIntExtra(ActionProto.AndroidIntExtra impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AndroidIntExtra(ActionProto.AndroidIntExtra impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidIntExtra.getValue can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue();"
errorLine2=" ~~~~~~~~">
@@ -75,6 +201,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidIntExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static AndroidIntExtra fromProto(@NonNull ActionProto.AndroidIntExtra proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidIntExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ActionProto.AndroidIntExtra toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public ActionProto.AndroidExtra toAndroidExtraProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidExtra.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return ActionProto.AndroidExtra.newBuilder().setIntVal(mImpl).build();"
errorLine2=" ~~~~~~~~~~">
@@ -93,6 +255,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ActionProto.AndroidIntExtra.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidIntExtra.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ActionProto.AndroidIntExtra.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -102,6 +273,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1929293734);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1929293734);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -129,6 +309,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="AndroidLongExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ActionProto.AndroidLongExtra mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidLongExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AndroidLongExtra(ActionProto.AndroidLongExtra impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AndroidLongExtra(ActionProto.AndroidLongExtra impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidLongExtra.getValue can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue();"
errorLine2=" ~~~~~~~~">
@@ -138,6 +354,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidLongExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static AndroidLongExtra fromProto(@NonNull ActionProto.AndroidLongExtra proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidLongExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ActionProto.AndroidLongExtra toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public ActionProto.AndroidExtra toAndroidExtraProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidExtra.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return ActionProto.AndroidExtra.newBuilder().setLongVal(mImpl).build();"
errorLine2=" ~~~~~~~~~~">
@@ -156,6 +408,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ActionProto.AndroidLongExtra.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidLongExtra.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ActionProto.AndroidLongExtra.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -165,6 +426,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-874743180);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-874743180);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -192,6 +462,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="AndroidDoubleExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ActionProto.AndroidDoubleExtra mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidDoubleExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AndroidDoubleExtra(ActionProto.AndroidDoubleExtra impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AndroidDoubleExtra(ActionProto.AndroidDoubleExtra impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidDoubleExtra.getValue can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue();"
errorLine2=" ~~~~~~~~">
@@ -201,6 +507,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidDoubleExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static AndroidDoubleExtra fromProto(@NonNull ActionProto.AndroidDoubleExtra proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidDoubleExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ActionProto.AndroidDoubleExtra toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public ActionProto.AndroidExtra toAndroidExtraProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidExtra.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return ActionProto.AndroidExtra.newBuilder().setDoubleVal(mImpl).build();"
errorLine2=" ~~~~~~~~~~">
@@ -219,6 +561,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ActionProto.AndroidDoubleExtra.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidDoubleExtra.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ActionProto.AndroidDoubleExtra.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -228,6 +579,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-278689892);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-278689892);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -255,6 +615,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="AndroidBooleanExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ActionProto.AndroidBooleanExtra mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidBooleanExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ActionProto.AndroidBooleanExtra impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ActionProto.AndroidBooleanExtra impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidBooleanExtra.getValue can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue();"
errorLine2=" ~~~~~~~~">
@@ -264,6 +660,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidBooleanExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static AndroidBooleanExtra fromProto(@NonNull ActionProto.AndroidBooleanExtra proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidBooleanExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ActionProto.AndroidBooleanExtra toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public ActionProto.AndroidExtra toAndroidExtraProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidExtra.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return ActionProto.AndroidExtra.newBuilder().setBooleanVal(mImpl).build();"
errorLine2=" ~~~~~~~~~~">
@@ -282,6 +714,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ActionProto.AndroidBooleanExtra.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidBooleanExtra.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ActionProto.AndroidBooleanExtra.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -291,6 +732,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1238672683);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1238672683);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -318,6 +768,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="AndroidExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ActionProto.AndroidExtra toAndroidExtraProto();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Fingerprint getFingerprint();"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidExtra can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static AndroidExtra androidExtraFromProto(@NonNull ActionProto.AndroidExtra proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidExtra.hasStringVal can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (proto.hasStringVal()) {"
errorLine2=" ~~~~~~~~~~~~">
@@ -408,6 +885,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="AndroidActivity can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ActionProto.AndroidActivity mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidActivity can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AndroidActivity(ActionProto.AndroidActivity impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AndroidActivity(ActionProto.AndroidActivity impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidActivity.getPackageName can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getPackageName();"
errorLine2=" ~~~~~~~~~~~~~~">
@@ -435,6 +948,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidActivity can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static AndroidActivity fromProto(@NonNull ActionProto.AndroidActivity proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidActivity can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ActionProto.AndroidActivity toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ActionProto.AndroidActivity.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidActivity.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ActionProto.AndroidActivity.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -444,6 +993,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1939606345);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1939606345);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -534,6 +1092,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="LaunchAction can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ActionProto.LaunchAction mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LaunchAction(ActionProto.LaunchAction impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LaunchAction can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LaunchAction(ActionProto.LaunchAction impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="LaunchAction.hasAndroidActivity can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasAndroidActivity()) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
@@ -552,6 +1146,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LaunchAction can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static LaunchAction fromProto(@NonNull ActionProto.LaunchAction proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LaunchAction can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ActionProto.LaunchAction toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Action can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public ActionProto.Action toActionProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Action.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return ActionProto.Action.newBuilder().setLaunchAction(mImpl).build();"
errorLine2=" ~~~~~~~~~~">
@@ -570,6 +1200,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ActionProto.LaunchAction.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="LaunchAction.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ActionProto.LaunchAction.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -579,6 +1218,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(175064445);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(175064445);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -633,6 +1281,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="LoadAction can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ActionProto.LoadAction mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LoadAction(ActionProto.LoadAction impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LoadAction can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LoadAction(ActionProto.LoadAction impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="LoadAction.hasRequestState can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasRequestState()) {"
errorLine2=" ~~~~~~~~~~~~~~~">
@@ -651,6 +1335,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LoadAction can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static LoadAction fromProto(@NonNull ActionProto.LoadAction proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LoadAction can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ActionProto.LoadAction toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Action can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public ActionProto.Action toActionProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Action.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return ActionProto.Action.newBuilder().setLoadAction(mImpl).build();"
errorLine2=" ~~~~~~~~~~">
@@ -669,6 +1389,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ActionProto.LoadAction.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="LoadAction.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ActionProto.LoadAction.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -678,6 +1407,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1728161517);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1728161517);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -732,6 +1470,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="Action can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ActionProto.Action toActionProto();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Fingerprint getFingerprint();"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Action can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static Action actionFromProto(@NonNull ActionProto.Action proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ActionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Action.hasLaunchAction can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (proto.hasLaunchAction()) {"
errorLine2=" ~~~~~~~~~~~~~~~">
@@ -768,6 +1533,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="ColorProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ColorProto.ColorProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ColorBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ColorBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ColorProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ColorProp(ColorProto.ColorProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ColorBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ColorProp(ColorProto.ColorProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ColorBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ColorProp.getArgb can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getArgb();"
errorLine2=" ~~~~~~~">
@@ -777,6 +1578,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ColorBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ColorProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static ColorProp fromProto(@NonNull ColorProto.ColorProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ColorBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ColorProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ColorProto.ColorProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ColorBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ColorProto.ColorProp.Builder mImpl = ColorProto.ColorProp.newBuilder();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ColorBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ColorProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final ColorProto.ColorProp.Builder mImpl = ColorProto.ColorProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -786,6 +1623,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1332287496);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ColorBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1332287496);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -813,6 +1659,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="DeviceParameters can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final DeviceParametersProto.DeviceParameters mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DeviceParametersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="DeviceParameters can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private DeviceParameters(DeviceParametersProto.DeviceParameters impl) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DeviceParametersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="DeviceParameters.getScreenWidthDp can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getScreenWidthDp();"
errorLine2=" ~~~~~~~~~~~~~~~~">
@@ -876,6 +1740,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="DeviceParameters can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static DeviceParameters fromProto(@NonNull DeviceParametersProto.DeviceParameters proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DeviceParametersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="DeviceParameters can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DeviceParametersProto.DeviceParameters toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DeviceParametersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final DeviceParametersProto.DeviceParameters.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DeviceParametersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="DeviceParameters.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" DeviceParametersProto.DeviceParameters.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -948,6 +1839,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="DpProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final DimensionProto.DpProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="DpProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DpProp(DimensionProto.DpProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DpProp(DimensionProto.DpProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="DpProp.getValue can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue();"
errorLine2=" ~~~~~~~~">
@@ -957,6 +1884,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="DpProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static DpProp fromProto(@NonNull DimensionProto.DpProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="DpProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DimensionProto.DpProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ContainerDimension can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public DimensionProto.ContainerDimension toContainerDimensionProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setLinearDimension can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return DimensionProto.ContainerDimension.newBuilder().setLinearDimension(mImpl).build();"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
@@ -975,6 +1938,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="ImageDimension can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public DimensionProto.ImageDimension toImageDimensionProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setLinearDimension can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return DimensionProto.ImageDimension.newBuilder().setLinearDimension(mImpl).build();"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
@@ -993,6 +1965,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="SpacerDimension can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public DimensionProto.SpacerDimension toSpacerDimensionProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setLinearDimension can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return DimensionProto.SpacerDimension.newBuilder().setLinearDimension(mImpl).build();"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
@@ -1011,6 +1992,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final DimensionProto.DpProp.Builder mImpl = DimensionProto.DpProp.newBuilder();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="DpProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final DimensionProto.DpProp.Builder mImpl = DimensionProto.DpProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -1020,6 +2010,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(752970309);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(752970309);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -1047,6 +2046,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="SpProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final DimensionProto.SpProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" SpProp(DimensionProto.SpProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="SpProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" SpProp(DimensionProto.SpProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="SpProp.getValue can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue();"
errorLine2=" ~~~~~~~~">
@@ -1056,6 +2091,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="SpProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static SpProp fromProto(@NonNull DimensionProto.SpProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="SpProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DimensionProto.SpProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final DimensionProto.SpProp.Builder mImpl = DimensionProto.SpProp.newBuilder();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="SpProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final DimensionProto.SpProp.Builder mImpl = DimensionProto.SpProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -1065,6 +2136,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-2144685857);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-2144685857);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -1092,6 +2172,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="EmProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final DimensionProto.EmProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="EmProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" EmProp(DimensionProto.EmProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" EmProp(DimensionProto.EmProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="EmProp.getValue can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue();"
errorLine2=" ~~~~~~~~">
@@ -1101,6 +2217,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="EmProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static EmProp fromProto(@NonNull DimensionProto.EmProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="EmProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DimensionProto.EmProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final DimensionProto.EmProp.Builder mImpl = DimensionProto.EmProp.newBuilder();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="EmProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final DimensionProto.EmProp.Builder mImpl = DimensionProto.EmProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -1110,6 +2262,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1628313311);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1628313311);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -1137,6 +2298,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="DegreesProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final DimensionProto.DegreesProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="DegreesProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DegreesProp(DimensionProto.DegreesProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DegreesProp(DimensionProto.DegreesProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="DegreesProp.getValue can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue();"
errorLine2=" ~~~~~~~~">
@@ -1146,6 +2343,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="DegreesProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static DegreesProp fromProto(@NonNull DimensionProto.DegreesProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="DegreesProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DimensionProto.DegreesProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final DimensionProto.DegreesProp.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="DegreesProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" DimensionProto.DegreesProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -1155,6 +2388,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(405060347);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(405060347);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -1182,6 +2424,78 @@
<issue
id="RestrictedApiAndroidX"
+ message="ExpandedDimensionProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final DimensionProto.ExpandedDimensionProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ExpandedDimensionProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DimensionProto.ExpandedDimensionProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DimensionProto.ExpandedDimensionProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ExpandedDimensionProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull DimensionProto.ExpandedDimensionProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ExpandedDimensionProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DimensionProto.ExpandedDimensionProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ContainerDimension can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public DimensionProto.ContainerDimension toContainerDimensionProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ContainerDimension.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return DimensionProto.ContainerDimension.newBuilder()"
errorLine2=" ~~~~~~~~~~">
@@ -1200,6 +2514,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="ImageDimension can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public DimensionProto.ImageDimension toImageDimensionProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setExpandedDimension can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return DimensionProto.ImageDimension.newBuilder().setExpandedDimension(mImpl).build();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
@@ -1218,6 +2541,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final DimensionProto.ExpandedDimensionProp.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ExpandedDimensionProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" DimensionProto.ExpandedDimensionProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -1227,6 +2559,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1053378170);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1053378170);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -1236,6 +2577,78 @@
<issue
id="RestrictedApiAndroidX"
+ message="WrappedDimensionProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final DimensionProto.WrappedDimensionProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DimensionProto.WrappedDimensionProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="WrappedDimensionProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DimensionProto.WrappedDimensionProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="WrappedDimensionProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static WrappedDimensionProp fromProto(@NonNull DimensionProto.WrappedDimensionProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="WrappedDimensionProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DimensionProto.WrappedDimensionProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ContainerDimension can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public DimensionProto.ContainerDimension toContainerDimensionProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ContainerDimension.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return DimensionProto.ContainerDimension.newBuilder()"
errorLine2=" ~~~~~~~~~~">
@@ -1254,6 +2667,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final DimensionProto.WrappedDimensionProp.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="WrappedDimensionProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" DimensionProto.WrappedDimensionProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -1263,6 +2685,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-113456542);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-113456542);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -1272,6 +2703,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="ProportionalDimensionProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final DimensionProto.ProportionalDimensionProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DimensionProto.ProportionalDimensionProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ProportionalDimensionProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DimensionProto.ProportionalDimensionProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ProportionalDimensionProp.getAspectRatioWidth can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getAspectRatioWidth();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
@@ -1290,6 +2757,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ProportionalDimensionProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull DimensionProto.ProportionalDimensionProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ProportionalDimensionProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DimensionProto.ProportionalDimensionProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ImageDimension can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public DimensionProto.ImageDimension toImageDimensionProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ImageDimension.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return DimensionProto.ImageDimension.newBuilder()"
errorLine2=" ~~~~~~~~~~">
@@ -1308,6 +2811,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final DimensionProto.ProportionalDimensionProp.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ProportionalDimensionProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" DimensionProto.ProportionalDimensionProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -1317,6 +2829,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-2079046835);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-2079046835);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -1362,6 +2883,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="ContainerDimension can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DimensionProto.ContainerDimension toContainerDimensionProto();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Fingerprint getFingerprint();"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ContainerDimension can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull DimensionProto.ContainerDimension proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ContainerDimension.hasLinearDimension can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (proto.hasLinearDimension()) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
@@ -1416,6 +2964,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="ImageDimension can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DimensionProto.ImageDimension toImageDimensionProto();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Fingerprint getFingerprint();"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ImageDimension can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static ImageDimension imageDimensionFromProto(@NonNull DimensionProto.ImageDimension proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ImageDimension.hasLinearDimension can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (proto.hasLinearDimension()) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
@@ -1470,6 +3045,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="SpacerDimension can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DimensionProto.SpacerDimension toSpacerDimensionProto();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Fingerprint getFingerprint();"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="SpacerDimension can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static SpacerDimension spacerDimensionFromProto(@NonNull DimensionProto.SpacerDimension proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/DimensionBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="SpacerDimension.hasLinearDimension can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (proto.hasLinearDimension()) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
@@ -1488,6 +3090,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="HorizontalAlignmentProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final AlignmentProto.HorizontalAlignmentProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AlignmentProto.HorizontalAlignmentProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="HorizontalAlignmentProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AlignmentProto.HorizontalAlignmentProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="HorizontalAlignment.getNumber can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue().getNumber();"
errorLine2=" ~~~~~~~~~">
@@ -1506,6 +3144,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="HorizontalAlignmentProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull AlignmentProto.HorizontalAlignmentProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="HorizontalAlignmentProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AlignmentProto.HorizontalAlignmentProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final AlignmentProto.HorizontalAlignmentProp.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="HorizontalAlignmentProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" AlignmentProto.HorizontalAlignmentProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -1515,6 +3189,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-384830516);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-384830516);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -1551,6 +3234,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="VerticalAlignmentProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final AlignmentProto.VerticalAlignmentProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AlignmentProto.VerticalAlignmentProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="VerticalAlignmentProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AlignmentProto.VerticalAlignmentProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="VerticalAlignment.getNumber can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue().getNumber();"
errorLine2=" ~~~~~~~~~">
@@ -1569,6 +3288,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="VerticalAlignmentProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull AlignmentProto.VerticalAlignmentProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="VerticalAlignmentProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AlignmentProto.VerticalAlignmentProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final AlignmentProto.VerticalAlignmentProp.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="VerticalAlignmentProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" AlignmentProto.VerticalAlignmentProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -1578,6 +3333,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1443510393);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1443510393);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -1614,6 +3378,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="FontWeightProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.FontWeightProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" FontWeightProp(LayoutElementProto.FontWeightProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="FontWeightProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" FontWeightProp(LayoutElementProto.FontWeightProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="FontWeight.getNumber can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue().getNumber();"
errorLine2=" ~~~~~~~~~">
@@ -1632,6 +3432,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="FontWeightProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static FontWeightProp fromProto(@NonNull LayoutElementProto.FontWeightProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="FontWeightProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.FontWeightProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.FontWeightProp.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="FontWeightProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.FontWeightProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -1641,6 +3477,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1793388920);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1793388920);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -1677,6 +3522,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="FontVariantProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.FontVariantProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.FontVariantProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="FontVariantProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.FontVariantProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="FontVariant.getNumber can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue().getNumber();"
errorLine2=" ~~~~~~~~~">
@@ -1695,6 +3576,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="FontVariantProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static FontVariantProp fromProto(@NonNull LayoutElementProto.FontVariantProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="FontVariantProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.FontVariantProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.FontVariantProp.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="FontVariantProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.FontVariantProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -1704,6 +3621,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-293831500);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-293831500);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -1740,6 +3666,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="SpanVerticalAlignmentProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.SpanVerticalAlignmentProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="SpanVerticalAlignmentProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.SpanVerticalAlignmentProp impl,"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="SpanVerticalAlignment.getNumber can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue().getNumber();"
errorLine2=" ~~~~~~~~~">
@@ -1758,6 +3720,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="SpanVerticalAlignmentProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.SpanVerticalAlignmentProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="SpanVerticalAlignmentProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.SpanVerticalAlignmentProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.SpanVerticalAlignmentProp.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="SpanVerticalAlignmentProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.SpanVerticalAlignmentProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -1767,6 +3765,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1008812329);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1008812329);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -1803,6 +3810,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="FontStyle can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.FontStyle mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" FontStyle(LayoutElementProto.FontStyle impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="FontStyle can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" FontStyle(LayoutElementProto.FontStyle impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="FontStyle.getSizeList can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" List<DimensionProto.SpProp> sizes = mImpl.getSizeList();"
errorLine2=" ~~~~~~~~~~~">
@@ -1812,6 +3855,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="SpProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" List<DimensionProto.SpProp> sizes = mImpl.getSizeList();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="FontStyle.hasItalic can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasItalic()) {"
errorLine2=" ~~~~~~~~~">
@@ -1920,6 +3972,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="FontStyle can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static FontStyle fromProto(@NonNull LayoutElementProto.FontStyle proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="FontStyle can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.FontStyle toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.FontStyle.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="FontStyle.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.FontStyle.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -1929,6 +4017,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(181264306);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(181264306);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -2424,6 +4521,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="TextAlignmentProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final AlignmentProto.TextAlignmentProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AlignmentProto.TextAlignmentProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TextAlignmentProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AlignmentProto.TextAlignmentProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="TextAlignment.getNumber can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue().getNumber();"
errorLine2=" ~~~~~~~~~">
@@ -2442,6 +4575,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TextAlignmentProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static TextAlignmentProp fromProto(@NonNull AlignmentProto.TextAlignmentProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TextAlignmentProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AlignmentProto.TextAlignmentProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final AlignmentProto.TextAlignmentProp.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="TextAlignmentProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" AlignmentProto.TextAlignmentProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -2451,6 +4620,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(797507251);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(797507251);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -2487,6 +4665,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="TextOverflowProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.TextOverflowProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.TextOverflowProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TextOverflowProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.TextOverflowProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="TextOverflow.getNumber can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue().getNumber();"
errorLine2=" ~~~~~~~~~">
@@ -2505,6 +4719,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TextOverflowProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static TextOverflowProp fromProto(@NonNull LayoutElementProto.TextOverflowProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TextOverflowProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.TextOverflowProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.TextOverflowProp.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="TextOverflowProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.TextOverflowProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -2514,6 +4764,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1183432233);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1183432233);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -2550,6 +4809,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="ArcAnchorTypeProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final AlignmentProto.ArcAnchorTypeProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcAnchorTypeProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AlignmentProto.ArcAnchorTypeProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AlignmentProto.ArcAnchorTypeProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcAnchorType.getNumber can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue().getNumber();"
errorLine2=" ~~~~~~~~~">
@@ -2568,6 +4863,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcAnchorTypeProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static ArcAnchorTypeProp fromProto(@NonNull AlignmentProto.ArcAnchorTypeProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcAnchorTypeProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" AlignmentProto.ArcAnchorTypeProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final AlignmentProto.ArcAnchorTypeProp.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcAnchorTypeProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" AlignmentProto.ArcAnchorTypeProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -2577,6 +4908,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1193249074);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1193249074);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -2613,6 +4953,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Text can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Text mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Text(LayoutElementProto.Text impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Text can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Text(LayoutElementProto.Text impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Text.hasText can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasText()) {"
errorLine2=" ~~~~~~~">
@@ -2739,6 +5115,51 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Text proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Text can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Text proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Text can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.Text toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setText can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return LayoutElementProto.LayoutElement.newBuilder().setText(mImpl).build();"
errorLine2=" ~~~~~~~">
@@ -2757,6 +5178,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Text.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Text.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.Text.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -2766,6 +5196,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1976530157);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1976530157);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -3252,6 +5691,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="ContentScaleModeProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.ContentScaleModeProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ContentScaleModeProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.ContentScaleModeProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.ContentScaleModeProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ContentScaleMode.getNumber can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue().getNumber();"
errorLine2=" ~~~~~~~~~">
@@ -3270,6 +5745,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ContentScaleModeProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.ContentScaleModeProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ContentScaleModeProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.ContentScaleModeProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.ContentScaleModeProp.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ContentScaleModeProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.ContentScaleModeProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -3279,6 +5790,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-893830536);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-893830536);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -3315,6 +5835,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="ColorFilter can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.ColorFilter mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ColorFilter can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ColorFilter(LayoutElementProto.ColorFilter impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ColorFilter(LayoutElementProto.ColorFilter impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ColorFilter.hasTint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasTint()) {"
errorLine2=" ~~~~~~~">
@@ -3333,6 +5889,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ColorFilter can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static ColorFilter fromProto(@NonNull LayoutElementProto.ColorFilter proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ColorFilter can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.ColorFilter toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.ColorFilter.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ColorFilter.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.ColorFilter.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -3342,6 +5934,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(181311326);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(181311326);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -3396,6 +5997,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Image can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Image mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Image(LayoutElementProto.Image impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Image can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Image(LayoutElementProto.Image impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Image.hasResourceId can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasResourceId()) {"
errorLine2=" ~~~~~~~~~~~~~">
@@ -3504,6 +6141,51 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Image proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Image can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Image proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Image can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.Image toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setImage can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return LayoutElementProto.LayoutElement.newBuilder().setImage(mImpl).build();"
errorLine2=" ~~~~~~~~">
@@ -3522,6 +6204,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Image.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Image.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.Image.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -3531,6 +6222,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-543078544);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-543078544);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -3891,6 +6591,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Spacer can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Spacer mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Spacer(LayoutElementProto.Spacer impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Spacer can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Spacer(LayoutElementProto.Spacer impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Spacer.hasWidth can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasWidth()) {"
errorLine2=" ~~~~~~~~">
@@ -3945,6 +6681,51 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Spacer proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Spacer can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Spacer proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Spacer can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.Spacer toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setSpacer can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return LayoutElementProto.LayoutElement.newBuilder().setSpacer(mImpl).build();"
errorLine2=" ~~~~~~~~~">
@@ -3963,6 +6744,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Spacer.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Spacer.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.Spacer.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -3972,6 +6762,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1748084575);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1748084575);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -4116,6 +6915,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Box can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Box mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Box can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Box(LayoutElementProto.Box impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Box(LayoutElementProto.Box impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Box.getContentsList can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" mImpl.getContentsList().stream()"
errorLine2=" ~~~~~~~~~~~~~~~">
@@ -4215,6 +7050,51 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Box can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Box proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Box proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Box can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.Box toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setBox can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return LayoutElementProto.LayoutElement.newBuilder().setBox(mImpl).build();"
errorLine2=" ~~~~~~">
@@ -4233,6 +7113,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Box.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Box.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.Box.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -4242,6 +7131,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1881256071);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1881256071);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -4611,6 +7509,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="SpanText can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.SpanText mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" SpanText(LayoutElementProto.SpanText impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="SpanText can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" SpanText(LayoutElementProto.SpanText impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="SpanText.hasText can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasText()) {"
errorLine2=" ~~~~~~~">
@@ -4665,6 +7599,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="SpanText can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static SpanText fromProto(@NonNull LayoutElementProto.SpanText proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="SpanText can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.SpanText toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Span can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.Span toSpanProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setText can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return LayoutElementProto.Span.newBuilder().setText(mImpl).build();"
errorLine2=" ~~~~~~~">
@@ -4683,6 +7653,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.SpanText.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="SpanText.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.SpanText.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -4692,6 +7671,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-221774557);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-221774557);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -4872,6 +7860,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="SpanImage can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.SpanImage mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" SpanImage(LayoutElementProto.SpanImage impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="SpanImage can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" SpanImage(LayoutElementProto.SpanImage impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="SpanImage.hasResourceId can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasResourceId()) {"
errorLine2=" ~~~~~~~~~~~~~">
@@ -4962,6 +7986,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="SpanImage can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static SpanImage fromProto(@NonNull LayoutElementProto.SpanImage proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="SpanImage can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.SpanImage toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Span can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.Span toSpanProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setImage can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return LayoutElementProto.Span.newBuilder().setImage(mImpl).build();"
errorLine2=" ~~~~~~~~">
@@ -4980,6 +8040,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.SpanImage.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="SpanImage.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.SpanImage.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -4989,6 +8058,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(502289772);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(502289772);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -5304,6 +8382,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="Span can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.Span toSpanProto();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Fingerprint getFingerprint();"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Span can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static Span spanFromProto(@NonNull LayoutElementProto.Span proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Span.hasText can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (proto.hasText()) {"
errorLine2=" ~~~~~~~">
@@ -5340,6 +8445,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Spannable can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Spannable mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Spannable(LayoutElementProto.Spannable impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Spannable can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Spannable(LayoutElementProto.Spannable impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Spannable.getSpansList can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" mImpl.getSpansList().stream()"
errorLine2=" ~~~~~~~~~~~~">
@@ -5439,6 +8580,51 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Spannable proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Spannable can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Spannable proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Spannable can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.Spannable toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setSpannable can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return LayoutElementProto.LayoutElement.newBuilder().setSpannable(mImpl).build();"
errorLine2=" ~~~~~~~~~~~~">
@@ -5457,6 +8643,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Spannable.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Spannable.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.Spannable.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -5466,6 +8661,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1690284372);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1690284372);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -5871,6 +9075,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Column can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Column mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Column can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Column(LayoutElementProto.Column impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Column(LayoutElementProto.Column impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Column.getContentsList can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" mImpl.getContentsList().stream()"
errorLine2=" ~~~~~~~~~~~~~~~">
@@ -5952,6 +9192,51 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Column can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Column proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Column proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Column can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.Column toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setColumn can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return LayoutElementProto.LayoutElement.newBuilder().setColumn(mImpl).build();"
errorLine2=" ~~~~~~~~~">
@@ -5970,6 +9255,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Column.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Column.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.Column.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -5979,6 +9273,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1411218529);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1411218529);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -6258,6 +9561,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Row can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Row mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Row(LayoutElementProto.Row impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Row can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Row(LayoutElementProto.Row impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Row.getContentsList can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" mImpl.getContentsList().stream()"
errorLine2=" ~~~~~~~~~~~~~~~">
@@ -6339,6 +9678,51 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Row proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Row can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Row proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Row can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.Row toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setRow can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return LayoutElementProto.LayoutElement.newBuilder().setRow(mImpl).build();"
errorLine2=" ~~~~~~">
@@ -6357,6 +9741,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Row.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Row.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.Row.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -6366,6 +9759,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1537205448);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1537205448);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -6645,6 +10047,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Arc can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Arc mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Arc can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Arc(LayoutElementProto.Arc impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Arc(LayoutElementProto.Arc impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Arc.getContentsList can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" mImpl.getContentsList().stream()"
errorLine2=" ~~~~~~~~~~~~~~~">
@@ -6726,6 +10164,51 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Arc can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Arc proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.Arc proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Arc can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.Arc toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.LayoutElement toLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setArc can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return LayoutElementProto.LayoutElement.newBuilder().setArc(mImpl).build();"
errorLine2=" ~~~~~~">
@@ -6744,6 +10227,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Arc.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Arc.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.Arc.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -6753,6 +10245,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(299028337);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(299028337);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -7077,6 +10578,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="ArcText can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.ArcText mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcText can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ArcText(LayoutElementProto.ArcText impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ArcText(LayoutElementProto.ArcText impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcText.hasText can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasText()) {"
errorLine2=" ~~~~~~~">
@@ -7131,6 +10668,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcText can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static ArcText fromProto(@NonNull LayoutElementProto.ArcText proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcText can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.ArcText toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcLayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.ArcLayoutElement toArcLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcLayoutElement.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return LayoutElementProto.ArcLayoutElement.newBuilder().setText(mImpl).build();"
errorLine2=" ~~~~~~~~~~">
@@ -7149,6 +10722,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.ArcText.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcText.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.ArcText.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -7158,6 +10740,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(434391973);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(434391973);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -7338,6 +10929,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="ArcLine can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.ArcLine mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcLine can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ArcLine(LayoutElementProto.ArcLine impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ArcLine(LayoutElementProto.ArcLine impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcLine.hasLength can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasLength()) {"
errorLine2=" ~~~~~~~~~">
@@ -7410,6 +11037,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcLine can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static ArcLine fromProto(@NonNull LayoutElementProto.ArcLine proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcLine can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.ArcLine toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcLayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.ArcLayoutElement toArcLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcLayoutElement.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return LayoutElementProto.ArcLayoutElement.newBuilder().setLine(mImpl).build();"
errorLine2=" ~~~~~~~~~~">
@@ -7428,6 +11091,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.ArcLine.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcLine.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.ArcLine.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -7437,6 +11109,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1371793535);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1371793535);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -7626,6 +11307,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="ArcSpacer can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.ArcSpacer mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcSpacer can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ArcSpacer(LayoutElementProto.ArcSpacer impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ArcSpacer(LayoutElementProto.ArcSpacer impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcSpacer.hasLength can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasLength()) {"
errorLine2=" ~~~~~~~~~">
@@ -7680,6 +11397,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcSpacer can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static ArcSpacer fromProto(@NonNull LayoutElementProto.ArcSpacer proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcSpacer can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.ArcSpacer toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcLayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.ArcLayoutElement toArcLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcLayoutElement.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return LayoutElementProto.ArcLayoutElement.newBuilder().setSpacer(mImpl).build();"
errorLine2=" ~~~~~~~~~~">
@@ -7698,6 +11451,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.ArcSpacer.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcSpacer.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.ArcSpacer.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -7707,6 +11469,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-179760535);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-179760535);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -7851,6 +11622,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="ArcAdapter can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.ArcAdapter mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcAdapter can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ArcAdapter(LayoutElementProto.ArcAdapter impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ArcAdapter(LayoutElementProto.ArcAdapter impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcAdapter.hasContent can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasContent()) {"
errorLine2=" ~~~~~~~~~~">
@@ -7887,6 +11694,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcAdapter can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static ArcAdapter fromProto(@NonNull LayoutElementProto.ArcAdapter proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcAdapter can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.ArcAdapter toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcLayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.ArcLayoutElement toArcLayoutElementProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcLayoutElement.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return LayoutElementProto.ArcLayoutElement.newBuilder().setAdapter(mImpl).build();"
errorLine2=" ~~~~~~~~~~">
@@ -7905,6 +11748,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.ArcAdapter.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcAdapter.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.ArcAdapter.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -7914,6 +11766,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1696473935);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(1696473935);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -8049,6 +11910,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.LayoutElement toLayoutElementProto();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Fingerprint getFingerprint();"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.LayoutElement proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.LayoutElement proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="LayoutElement.hasColumn can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (proto.hasColumn()) {"
errorLine2=" ~~~~~~~~~">
@@ -8193,6 +12090,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="LayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static LayoutElement layoutElementFromProto(@NonNull LayoutElementProto.LayoutElement proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcLayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" LayoutElementProto.ArcLayoutElement toArcLayoutElementProto();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Fingerprint getFingerprint();"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcLayoutElement can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull LayoutElementProto.ArcLayoutElement proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcLayoutElement.hasText can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (proto.hasText()) {"
errorLine2=" ~~~~~~~">
@@ -8265,6 +12198,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="Layout can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Layout mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Layout can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private Layout(LayoutElementProto.Layout impl) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Layout.hasRoot can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasRoot()) {"
errorLine2=" ~~~~~~~">
@@ -8283,6 +12234,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="Layout can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public static Layout fromProto(@NonNull LayoutElementProto.Layout proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Layout can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public LayoutElementProto.Layout toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Layout.parseFrom can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return fromProto(LayoutElementProto.Layout.parseFrom(byteArray));"
errorLine2=" ~~~~~~~~~">
@@ -8292,6 +12261,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final LayoutElementProto.Layout.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Layout.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" LayoutElementProto.Layout.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -8310,6 +12288,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable Fingerprint fingerprint = root.getFingerprint();"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setFingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" mImpl.setFingerprint("
errorLine2=" ~~~~~~~~~~~~~~">
@@ -8337,6 +12324,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="NodeFingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private static FingerprintProto.NodeFingerprint fingerprintToProto("
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" FingerprintProto.NodeFingerprint.Builder builder ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="NodeFingerprint.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" FingerprintProto.NodeFingerprint.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -8445,6 +12459,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Clickable can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.Clickable mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Clickable can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Clickable(ModifiersProto.Clickable impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Clickable(ModifiersProto.Clickable impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Clickable.getId can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getId();"
errorLine2=" ~~~~~">
@@ -8472,6 +12522,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Clickable can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static Clickable fromProto(@NonNull ModifiersProto.Clickable proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Clickable can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public ModifiersProto.Clickable toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.Clickable.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Clickable.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ModifiersProto.Clickable.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -8481,6 +12567,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(595587995);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(595587995);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -8553,6 +12648,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Semantics can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.Semantics mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Semantics(ModifiersProto.Semantics impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Semantics can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Semantics(ModifiersProto.Semantics impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Semantics.getObsoleteContentDescription can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getObsoleteContentDescription();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -8562,6 +12693,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Semantics can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static Semantics fromProto(@NonNull ModifiersProto.Semantics proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Semantics can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ModifiersProto.Semantics toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.Semantics.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Semantics.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ModifiersProto.Semantics.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -8571,6 +12738,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1479823155);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1479823155);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -8598,6 +12774,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Padding can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.Padding mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Padding(ModifiersProto.Padding impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Padding can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Padding(ModifiersProto.Padding impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Padding.hasEnd can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasEnd()) {"
errorLine2=" ~~~~~~">
@@ -8688,6 +12900,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Padding can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static Padding fromProto(@NonNull ModifiersProto.Padding proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Padding can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ModifiersProto.Padding toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.Padding.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Padding.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ModifiersProto.Padding.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -8697,6 +12945,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1120275440);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1120275440);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -8967,6 +13224,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Border can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.Border mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Border can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Border(ModifiersProto.Border impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Border(ModifiersProto.Border impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Border.hasWidth can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasWidth()) {"
errorLine2=" ~~~~~~~~">
@@ -9003,6 +13296,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Border can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static Border fromProto(@NonNull ModifiersProto.Border proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Border can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ModifiersProto.Border toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Border.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final ModifiersProto.Border.Builder mImpl = ModifiersProto.Border.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -9012,6 +13332,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.Border.Builder mImpl = ModifiersProto.Border.newBuilder();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(2085330827);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(2085330827);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -9111,6 +13449,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Corner can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.Corner mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Corner can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Corner(ModifiersProto.Corner impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Corner(ModifiersProto.Corner impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Corner.hasRadius can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasRadius()) {"
errorLine2=" ~~~~~~~~~">
@@ -9129,6 +13503,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Corner can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static Corner fromProto(@NonNull ModifiersProto.Corner proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Corner can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ModifiersProto.Corner toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.Corner.Builder mImpl = ModifiersProto.Corner.newBuilder();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Corner.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final ModifiersProto.Corner.Builder mImpl = ModifiersProto.Corner.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -9138,6 +13548,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-623478338);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-623478338);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -9192,6 +13611,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Background can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.Background mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Background can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Background(ModifiersProto.Background impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Background(ModifiersProto.Background impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Background.hasColor can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasColor()) {"
errorLine2=" ~~~~~~~~">
@@ -9228,6 +13683,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Background can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static Background fromProto(@NonNull ModifiersProto.Background proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Background can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ModifiersProto.Background toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.Background.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Background.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ModifiersProto.Background.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -9237,6 +13728,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(374507572);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(374507572);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -9336,6 +13836,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="ElementMetadata can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.ElementMetadata mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ElementMetadata can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ElementMetadata(ModifiersProto.ElementMetadata impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ElementMetadata(ModifiersProto.ElementMetadata impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ElementMetadata.getTagData can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getTagData().toByteArray();"
errorLine2=" ~~~~~~~~~~">
@@ -9345,6 +13881,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ElementMetadata can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static ElementMetadata fromProto(@NonNull ModifiersProto.ElementMetadata proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ElementMetadata can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public ModifiersProto.ElementMetadata toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.ElementMetadata.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ElementMetadata.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ModifiersProto.ElementMetadata.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -9354,6 +13926,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-589294723);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-589294723);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -9381,6 +13962,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Modifiers can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.Modifiers mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Modifiers(ModifiersProto.Modifiers impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Modifiers can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Modifiers(ModifiersProto.Modifiers impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Modifiers.hasClickable can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasClickable()) {"
errorLine2=" ~~~~~~~~~~~~">
@@ -9489,6 +14106,60 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull ModifiersProto.Modifiers proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Modifiers can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull ModifiersProto.Modifiers proto, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Modifiers can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public static Modifiers fromProto(@NonNull ModifiersProto.Modifiers proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Modifiers can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public ModifiersProto.Modifiers toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.Modifiers.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Modifiers.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ModifiersProto.Modifiers.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -9498,6 +14169,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-170942531);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-170942531);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -9777,6 +14457,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="ArcModifiers can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.ArcModifiers mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcModifiers can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ArcModifiers(ModifiersProto.ArcModifiers impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ArcModifiers(ModifiersProto.ArcModifiers impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcModifiers.hasClickable can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasClickable()) {"
errorLine2=" ~~~~~~~~~~~~">
@@ -9813,6 +14529,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcModifiers can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static ArcModifiers fromProto(@NonNull ModifiersProto.ArcModifiers proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ArcModifiers can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public ModifiersProto.ArcModifiers toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.ArcModifiers.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ArcModifiers.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ModifiersProto.ArcModifiers.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -9822,6 +14574,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1648736168);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1648736168);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -9921,6 +14682,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="SpanModifiers can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.SpanModifiers mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" SpanModifiers(ModifiersProto.SpanModifiers impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="SpanModifiers can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" SpanModifiers(ModifiersProto.SpanModifiers impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="SpanModifiers.hasClickable can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasClickable()) {"
errorLine2=" ~~~~~~~~~~~~">
@@ -9939,6 +14736,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="SpanModifiers can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static SpanModifiers fromProto(@NonNull ModifiersProto.SpanModifiers proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="SpanModifiers can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public ModifiersProto.SpanModifiers toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ModifiersProto.SpanModifiers.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="SpanModifiers.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ModifiersProto.SpanModifiers.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -9948,6 +14781,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1318656482);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ModifiersBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1318656482);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -10110,6 +14952,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="AndroidImageResourceByResId can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ResourceProto.AndroidImageResourceByResId mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidImageResourceByResId can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private AndroidImageResourceByResId(ResourceProto.AndroidImageResourceByResId impl) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidImageResourceByResId.getResourceId can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getResourceId();"
errorLine2=" ~~~~~~~~~~~~~">
@@ -10119,6 +14979,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="AndroidImageResourceByResId can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @NonNull ResourceProto.AndroidImageResourceByResId proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="AndroidImageResourceByResId can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ResourceProto.AndroidImageResourceByResId toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ResourceProto.AndroidImageResourceByResId.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="AndroidImageResourceByResId.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ResourceProto.AndroidImageResourceByResId.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -10137,6 +15024,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="InlineImageResource can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ResourceProto.InlineImageResource mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="InlineImageResource can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private InlineImageResource(ResourceProto.InlineImageResource impl) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="InlineImageResource.getData can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getData().toByteArray();"
errorLine2=" ~~~~~~~">
@@ -10182,6 +15087,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="InlineImageResource can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static InlineImageResource fromProto(@NonNull ResourceProto.InlineImageResource proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="InlineImageResource can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ResourceProto.InlineImageResource toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ResourceProto.InlineImageResource.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="InlineImageResource.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ResourceProto.InlineImageResource.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -10236,6 +15168,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="ImageResource can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ResourceProto.ImageResource mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ImageResource can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private ImageResource(ResourceProto.ImageResource impl) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ImageResource.hasAndroidResourceByResId can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasAndroidResourceByResId()) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -10272,6 +15222,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="ImageResource can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static ImageResource fromProto(@NonNull ResourceProto.ImageResource proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="ImageResource can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" ResourceProto.ImageResource toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ResourceProto.ImageResource.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="ImageResource.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ResourceProto.ImageResource.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -10299,6 +15276,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="Resources can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ResourceProto.Resources mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Resources can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private Resources(ResourceProto.Resources impl) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Resources.getVersion can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getVersion();"
errorLine2=" ~~~~~~~~~~">
@@ -10326,6 +15321,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="Resources can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public static Resources fromProto(@NonNull ResourceProto.Resources proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Resources can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public ResourceProto.Resources toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final ResourceProto.Resources.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/ResourceBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Resources.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" ResourceProto.Resources.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -10353,6 +15375,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="State can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final StateProto.State mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/StateBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/StateBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" State(StateProto.State impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/StateBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="State can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" State(StateProto.State impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/StateBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="State.getLastClickableId can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getLastClickableId();"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
@@ -10362,6 +15420,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/StateBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="State can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public static State fromProto(@NonNull StateProto.State proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/StateBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="State can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public StateProto.State toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/StateBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final StateProto.State.Builder mImpl = StateProto.State.newBuilder();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/StateBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="State.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final StateProto.State.Builder mImpl = StateProto.State.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -10371,6 +15465,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(616326811);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/StateBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(616326811);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -10434,6 +15537,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="DeviceParameters can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DeviceParameters deviceParams ="
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TileService.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setRendererSchemaVersion can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" .setRendererSchemaVersion(DEFAULT_VERSION)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -10452,6 +15564,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="DeviceParameters can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" DeviceParameters deviceParams ="
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TileService.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Builder.setRendererSchemaVersion can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" .setRendererSchemaVersion(DEFAULT_VERSION)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -10479,6 +15600,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="TimeInterval can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final TimelineProto.TimeInterval mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TimelineBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TimeInterval can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private TimeInterval(TimelineProto.TimeInterval impl) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TimelineBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="TimeInterval.getStartMillis can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getStartMillis();"
errorLine2=" ~~~~~~~~~~~~~~">
@@ -10497,6 +15636,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="TimeInterval can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static TimeInterval fromProto(@NonNull TimelineProto.TimeInterval proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TimelineBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TimeInterval can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" TimelineProto.TimeInterval toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TimelineBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final TimelineProto.TimeInterval.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TimelineBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="TimeInterval.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" TimelineProto.TimeInterval.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -10524,6 +15690,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="TimelineEntry can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final TimelineProto.TimelineEntry mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TimelineBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TimelineEntry can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private TimelineEntry(TimelineProto.TimelineEntry impl) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TimelineBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="TimelineEntry.hasValidity can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" if (mImpl.hasValidity()) {"
errorLine2=" ~~~~~~~~~~~">
@@ -10560,6 +15744,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="TimelineEntry can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public static TimelineEntry fromProto(@NonNull TimelineProto.TimelineEntry proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TimelineBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="TimelineEntry can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public TimelineProto.TimelineEntry toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TimelineBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final TimelineProto.TimelineEntry.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TimelineBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="TimelineEntry.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" TimelineProto.TimelineEntry.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -10587,6 +15798,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="Timeline can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final TimelineProto.Timeline mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TimelineBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Timeline can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private Timeline(TimelineProto.Timeline impl) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TimelineBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Timeline.getTimelineEntriesList can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" for (TimelineProto.TimelineEntry item : mImpl.getTimelineEntriesList()) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
@@ -10596,6 +15825,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="Timeline can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public static Timeline fromProto(@NonNull TimelineProto.Timeline proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TimelineBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Timeline can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public TimelineProto.Timeline toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TimelineBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final TimelineProto.Timeline.Builder mImpl ="
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TimelineBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Timeline.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" TimelineProto.Timeline.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -10614,6 +15870,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Int32Prop can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final TypesProto.Int32Prop mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Int32Prop(TypesProto.Int32Prop impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Int32Prop can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" Int32Prop(TypesProto.Int32Prop impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Int32Prop.getValue can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue();"
errorLine2=" ~~~~~~~~">
@@ -10623,6 +15915,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Int32Prop can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static Int32Prop fromProto(@NonNull TypesProto.Int32Prop proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Int32Prop can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" TypesProto.Int32Prop toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final TypesProto.Int32Prop.Builder mImpl = TypesProto.Int32Prop.newBuilder();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Int32Prop.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final TypesProto.Int32Prop.Builder mImpl = TypesProto.Int32Prop.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -10632,6 +15960,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1809132005);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-1809132005);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -10659,6 +15996,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="StringProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final TypesProto.StringProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" StringProp(TypesProto.StringProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="StringProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" StringProp(TypesProto.StringProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="StringProp.getValue can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue();"
errorLine2=" ~~~~~~~~">
@@ -10668,6 +16041,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="StringProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static StringProp fromProto(@NonNull TypesProto.StringProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="StringProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" TypesProto.StringProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final TypesProto.StringProp.Builder mImpl = TypesProto.StringProp.newBuilder();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="StringProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final TypesProto.StringProp.Builder mImpl = TypesProto.StringProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -10677,6 +16086,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-319420356);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-319420356);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -10704,6 +16122,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="FloatProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final TypesProto.FloatProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" FloatProp(TypesProto.FloatProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="FloatProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" FloatProp(TypesProto.FloatProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="FloatProp.getValue can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue();"
errorLine2=" ~~~~~~~~">
@@ -10713,6 +16167,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="FloatProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static FloatProp fromProto(@NonNull TypesProto.FloatProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="FloatProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" TypesProto.FloatProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final TypesProto.FloatProp.Builder mImpl = TypesProto.FloatProp.newBuilder();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="FloatProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final TypesProto.FloatProp.Builder mImpl = TypesProto.FloatProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -10722,6 +16212,15 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(399943127);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(399943127);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -10749,6 +16248,42 @@
<issue
id="RestrictedApiAndroidX"
+ message="BoolProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final TypesProto.BoolProp mImpl;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" @Nullable private final Fingerprint mFingerprint;"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="BoolProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" BoolProp(TypesProto.BoolProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" BoolProp(TypesProto.BoolProp impl, @Nullable Fingerprint fingerprint) {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="BoolProp.getValue can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" return mImpl.getValue();"
errorLine2=" ~~~~~~~~">
@@ -10758,6 +16293,33 @@
<issue
id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" public Fingerprint getFingerprint() {"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="BoolProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" static BoolProp fromProto(@NonNull TypesProto.BoolProp proto) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="BoolProp can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" TypesProto.BoolProp toProto() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="BoolProp.newBuilder can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final TypesProto.BoolProp.Builder mImpl = TypesProto.BoolProp.newBuilder();"
errorLine2=" ~~~~~~~~~~">
@@ -10767,6 +16329,24 @@
<issue
id="RestrictedApiAndroidX"
+ message="Builder can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final TypesProto.BoolProp.Builder mImpl = TypesProto.BoolProp.newBuilder();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Fingerprint can only be accessed from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-278424864);"
+ errorLine2=" ~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/TypeBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
message="Fingerprint can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
errorLine1=" private final Fingerprint mFingerprint = new Fingerprint(-278424864);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
diff --git a/wear/watchface/watchface-client/src/androidTest/java/androidx/wear/watchface/client/test/TestWatchFaceServices.kt b/wear/watchface/watchface-client/src/androidTest/java/androidx/wear/watchface/client/test/TestWatchFaceServices.kt
index 5179e06c5..704f5fd 100644
--- a/wear/watchface/watchface-client/src/androidTest/java/androidx/wear/watchface/client/test/TestWatchFaceServices.kt
+++ b/wear/watchface/watchface-client/src/androidTest/java/androidx/wear/watchface/client/test/TestWatchFaceServices.kt
@@ -33,6 +33,7 @@
import androidx.wear.watchface.ComplicationTapFilter
import androidx.wear.watchface.RenderParameters
import androidx.wear.watchface.Renderer
+import androidx.wear.watchface.StatefulWatchFaceRuntimeService
import androidx.wear.watchface.WatchFace
import androidx.wear.watchface.WatchFaceRuntimeService
import androidx.wear.watchface.WatchFaceService
@@ -333,6 +334,95 @@
}
}
+class MyExtra(val data: Int)
+
+@Suppress("Deprecation")
+internal class TestStatefulWatchFaceRuntimeService(
+ testContext: Context,
+ private var surfaceHolderOverride: SurfaceHolder
+) : StatefulWatchFaceRuntimeService<MyExtra>() {
+
+ lateinit var lastResourceOnlyWatchFacePackageName: String
+ val lastResourceOnlyWatchFacePackageNameLatch = CountDownLatch(1)
+
+ init {
+ attachBaseContext(testContext)
+ }
+
+ override fun getWallpaperSurfaceHolderOverride() = surfaceHolderOverride
+
+ override fun createExtra() = MyExtra(123)
+
+ override fun createUserStyleSchema(
+ resourceOnlyWatchFacePackageName: String,
+ extra: MyExtra
+ ): UserStyleSchema {
+ require(extra.data == 123)
+ return UserStyleSchema(emptyList())
+ }
+
+ override fun createComplicationSlotsManager(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ resourceOnlyWatchFacePackageName: String,
+ extra: MyExtra
+ ): ComplicationSlotsManager {
+ require(extra.data == 123)
+ return ComplicationSlotsManager(emptyList(), currentUserStyleRepository)
+ }
+
+ override fun createUserStyleFlavors(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ complicationSlotsManager: ComplicationSlotsManager,
+ resourceOnlyWatchFacePackageName: String,
+ extra: MyExtra
+ ): UserStyleFlavors {
+ require(extra.data == 123)
+ return UserStyleFlavors()
+ }
+
+ override suspend fun createWatchFace(
+ surfaceHolder: SurfaceHolder,
+ watchState: WatchState,
+ complicationSlotsManager: ComplicationSlotsManager,
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ resourceOnlyWatchFacePackageName: String,
+ extra: MyExtra
+ ): WatchFace {
+ require(extra.data == 123)
+ lastResourceOnlyWatchFacePackageName = resourceOnlyWatchFacePackageName
+ lastResourceOnlyWatchFacePackageNameLatch.countDown()
+
+ return WatchFace(
+ WatchFaceType.DIGITAL,
+ @Suppress("deprecation")
+ object :
+ Renderer.CanvasRenderer(
+ surfaceHolder,
+ currentUserStyleRepository,
+ watchState,
+ CanvasType.HARDWARE,
+ 16
+ ) {
+ override fun render(
+ canvas: Canvas,
+ bounds: Rect,
+ zonedDateTime: ZonedDateTime
+ ) {
+ // Actually rendering something isn't required.
+ }
+
+ override fun renderHighlightLayer(
+ canvas: Canvas,
+ bounds: Rect,
+ zonedDateTime: ZonedDateTime
+ ) {
+ // Actually rendering something isn't required.
+ }
+ }
+ )
+ }
+}
+
internal class TestAsyncCanvasRenderInitWatchFaceService(
testContext: Context,
private var surfaceHolderOverride: SurfaceHolder,
diff --git a/wear/watchface/watchface-client/src/androidTest/java/androidx/wear/watchface/client/test/WatchFaceControlClientTest.kt b/wear/watchface/watchface-client/src/androidTest/java/androidx/wear/watchface/client/test/WatchFaceControlClientTest.kt
index 609f38f..2afa5d96 100644
--- a/wear/watchface/watchface-client/src/androidTest/java/androidx/wear/watchface/client/test/WatchFaceControlClientTest.kt
+++ b/wear/watchface/watchface-client/src/androidTest/java/androidx/wear/watchface/client/test/WatchFaceControlClientTest.kt
@@ -552,6 +552,50 @@
}
@Test
+ @Suppress("deprecation") // getOrCreateInteractiveWatchFaceClient
+ fun resourceOnlyWatchFacePackageNameWithExtra() {
+ val watchFaceService = TestStatefulWatchFaceRuntimeService(context, surfaceHolder)
+ val service = runBlocking {
+ WatchFaceControlClient.createWatchFaceControlClientImpl(
+ context,
+ Intent(context, WatchFaceControlTestService::class.java).apply {
+ action = WatchFaceControlService.ACTION_WATCHFACE_CONTROL_SERVICE
+ },
+ resourceOnlyWatchFacePackageName = "com.example.watchface"
+ )
+ }
+
+ val deferredInteractiveInstance = handlerCoroutineScope.async {
+ service.getOrCreateInteractiveWatchFaceClient(
+ "testId",
+ deviceConfig,
+ systemState,
+ userStyle = null,
+ complications
+ )
+ }
+
+ // Create the engine which triggers construction of the interactive instance.
+ handler.post {
+ engine = watchFaceService.onCreateEngine() as WatchFaceService.EngineWrapper
+ }
+
+ // Wait for the instance to be created.
+ val interactiveInstance = awaitWithTimeout(deferredInteractiveInstance)
+
+ // Make sure watch face init has completed.
+ assertTrue(
+ watchFaceService.lastResourceOnlyWatchFacePackageNameLatch
+ .await(UPDATE_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS)
+ )
+
+ assertThat(watchFaceService.lastResourceOnlyWatchFacePackageName)
+ .isEqualTo("com.example.watchface")
+
+ interactiveInstance.close()
+ }
+
+ @Test
@Suppress("Deprecation")
fun getInteractiveWatchFaceInstance() {
val testId = "testId"
diff --git a/wear/watchface/watchface-client/src/main/java/androidx/wear/watchface/client/InteractiveWatchFaceClient.kt b/wear/watchface/watchface-client/src/main/java/androidx/wear/watchface/client/InteractiveWatchFaceClient.kt
index 8d1a099..6112bfe 100644
--- a/wear/watchface/watchface-client/src/main/java/androidx/wear/watchface/client/InteractiveWatchFaceClient.kt
+++ b/wear/watchface/watchface-client/src/main/java/androidx/wear/watchface/client/InteractiveWatchFaceClient.kt
@@ -658,7 +658,7 @@
disconnectListeners.put(listener, executor)
disconnectReason
}
- disconnectReasonCopy?.let { listener.onClientDisconnected(it) }
+ disconnectReasonCopy?.let { executor.execute { listener.onClientDisconnected(it) } }
}
override fun removeClientDisconnectListener(
@@ -760,7 +760,7 @@
lastWatchFaceColors
}
- listener.accept(colors)
+ executor.execute { listener.accept(colors) }
}
@WatchFaceClientExperimental
diff --git a/wear/watchface/watchface-data/lint-baseline.xml b/wear/watchface/watchface-data/lint-baseline.xml
new file mode 100644
index 0000000..b99cd1f
--- /dev/null
+++ b/wear/watchface/watchface-data/lint-baseline.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.wear.watchface.complications.data.ComplicationExperimental` or `@OptIn(markerClass = androidx.wear.watchface.complications.data.ComplicationExperimental.class)`"
+ errorLine1=" BoundingArcWireFormat mBoundingArc;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/watchface/data/ComplicationSlotMetadataWireFormat.java"/>
+ </issue>
+
+ <issue
+ id="UnsafeOptInUsageError"
+ message="This declaration is opt-in and its usage should be marked with `@androidx.wear.watchface.complications.data.ComplicationExperimental` or `@OptIn(markerClass = androidx.wear.watchface.complications.data.ComplicationExperimental.class)`"
+ errorLine1=" BoundingArcWireFormat mBoundingArc;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/watchface/data/ComplicationStateWireFormat.java"/>
+ </issue>
+
+</issues>
diff --git a/wear/watchface/watchface-guava/api/current.txt b/wear/watchface/watchface-guava/api/current.txt
index 115e276..a5f853c 100644
--- a/wear/watchface/watchface-guava/api/current.txt
+++ b/wear/watchface/watchface-guava/api/current.txt
@@ -43,6 +43,18 @@
method @UiThread public final void runUiThreadGlCommands(Runnable runnable);
}
+ public abstract class ListenableStatefulWatchFaceRuntimeService<Extra> extends androidx.wear.watchface.StatefulWatchFaceRuntimeService<Extra> {
+ ctor public ListenableStatefulWatchFaceRuntimeService();
+ method protected final suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, String resourceOnlyWatchFacePackageName, Extra extra, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
+ method protected abstract com.google.common.util.concurrent.ListenableFuture<androidx.wear.watchface.WatchFace> createWatchFaceFutureAsync(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, String resourceOnlyWatchFacePackageName, Extra extra);
+ }
+
+ public abstract class ListenableStatefulWatchFaceService<Extra> extends androidx.wear.watchface.StatefulWatchFaceService<Extra> {
+ ctor public ListenableStatefulWatchFaceService();
+ method protected suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, Extra extra, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
+ method protected abstract com.google.common.util.concurrent.ListenableFuture<androidx.wear.watchface.WatchFace> createWatchFaceFuture(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, Extra extra);
+ }
+
public abstract class ListenableWatchFaceRuntimeService extends androidx.wear.watchface.WatchFaceRuntimeService {
ctor public ListenableWatchFaceRuntimeService();
method protected final suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, String resourceOnlyWatchFacePackageName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
diff --git a/wear/watchface/watchface-guava/api/restricted_current.txt b/wear/watchface/watchface-guava/api/restricted_current.txt
index 115e276..a5f853c 100644
--- a/wear/watchface/watchface-guava/api/restricted_current.txt
+++ b/wear/watchface/watchface-guava/api/restricted_current.txt
@@ -43,6 +43,18 @@
method @UiThread public final void runUiThreadGlCommands(Runnable runnable);
}
+ public abstract class ListenableStatefulWatchFaceRuntimeService<Extra> extends androidx.wear.watchface.StatefulWatchFaceRuntimeService<Extra> {
+ ctor public ListenableStatefulWatchFaceRuntimeService();
+ method protected final suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, String resourceOnlyWatchFacePackageName, Extra extra, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
+ method protected abstract com.google.common.util.concurrent.ListenableFuture<androidx.wear.watchface.WatchFace> createWatchFaceFutureAsync(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, String resourceOnlyWatchFacePackageName, Extra extra);
+ }
+
+ public abstract class ListenableStatefulWatchFaceService<Extra> extends androidx.wear.watchface.StatefulWatchFaceService<Extra> {
+ ctor public ListenableStatefulWatchFaceService();
+ method protected suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, Extra extra, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
+ method protected abstract com.google.common.util.concurrent.ListenableFuture<androidx.wear.watchface.WatchFace> createWatchFaceFuture(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, Extra extra);
+ }
+
public abstract class ListenableWatchFaceRuntimeService extends androidx.wear.watchface.WatchFaceRuntimeService {
ctor public ListenableWatchFaceRuntimeService();
method protected final suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, String resourceOnlyWatchFacePackageName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
diff --git a/wear/watchface/watchface-guava/src/androidTest/java/androidx/wear/watchface/AsyncListenableWatchFaceServiceTest.kt b/wear/watchface/watchface-guava/src/androidTest/java/androidx/wear/watchface/AsyncListenableWatchFaceServiceTest.kt
index 77b9215..6ce078a 100644
--- a/wear/watchface/watchface-guava/src/androidTest/java/androidx/wear/watchface/AsyncListenableWatchFaceServiceTest.kt
+++ b/wear/watchface/watchface-guava/src/androidTest/java/androidx/wear/watchface/AsyncListenableWatchFaceServiceTest.kt
@@ -149,6 +149,77 @@
) = UserStyleFlavors()
}
+class MyExtra(val data: Int)
+
+private class TestAsyncListenableStatefulWatchFaceRuntimeService(
+ testContext: Context,
+ private var surfaceHolderOverride: SurfaceHolder,
+) : ListenableStatefulWatchFaceRuntimeService<MyExtra>() {
+ lateinit var lastResourceOnlyWatchFacePackageName: String
+ val lastResourceOnlyWatchFacePackageNameLatch = CountDownLatch(1)
+
+ init {
+ attachBaseContext(testContext)
+ }
+
+ override fun getWallpaperSurfaceHolderOverride() = surfaceHolderOverride
+
+ override fun createExtra() = MyExtra(123)
+
+ override fun createWatchFaceFutureAsync(
+ surfaceHolder: SurfaceHolder,
+ watchState: WatchState,
+ complicationSlotsManager: ComplicationSlotsManager,
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ resourceOnlyWatchFacePackageName: String,
+ extra: MyExtra
+ ): ListenableFuture<WatchFace> {
+ require(extra.data == 123)
+ lastResourceOnlyWatchFacePackageName = resourceOnlyWatchFacePackageName
+ lastResourceOnlyWatchFacePackageNameLatch.countDown()
+
+ val future = SettableFuture.create<WatchFace>()
+ // Post a task to resolve the future.
+ getUiThreadHandler().post {
+ future.set(
+ WatchFace(
+ WatchFaceType.DIGITAL,
+ FakeRenderer(surfaceHolder, watchState, currentUserStyleRepository)
+ )
+ .apply { setOverridePreviewReferenceInstant(REFERENCE_PREVIEW_TIME) }
+ )
+ }
+ return future
+ }
+
+ override fun createUserStyleSchema(
+ resourceOnlyWatchFacePackageName: String,
+ extra: MyExtra
+ ): UserStyleSchema {
+ require(extra.data == 123)
+ return UserStyleSchema(emptyList())
+ }
+
+ override fun createComplicationSlotsManager(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ resourceOnlyWatchFacePackageName: String,
+ extra: MyExtra
+ ): ComplicationSlotsManager {
+ require(extra.data == 123)
+ return ComplicationSlotsManager(emptyList(), currentUserStyleRepository)
+ }
+
+ override fun createUserStyleFlavors(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ complicationSlotsManager: ComplicationSlotsManager,
+ resourceOnlyWatchFacePackageName: String,
+ extra: MyExtra
+ ): UserStyleFlavors {
+ require(extra.data == 123)
+ return UserStyleFlavors()
+ }
+}
+
/**
* Illustrates that createWatchFaceFuture can be resolved in a different task posted to the main
* looper.
diff --git a/wear/watchface/watchface-guava/src/main/java/androidx/wear/watchface/ListenableWatchFaceService.kt b/wear/watchface/watchface-guava/src/main/java/androidx/wear/watchface/ListenableWatchFaceService.kt
index 07cde9d..c4a8b4d 100644
--- a/wear/watchface/watchface-guava/src/main/java/androidx/wear/watchface/ListenableWatchFaceService.kt
+++ b/wear/watchface/watchface-guava/src/main/java/androidx/wear/watchface/ListenableWatchFaceService.kt
@@ -27,6 +27,9 @@
/**
* [ListenableFuture]-based compatibility wrapper around [WatchFaceService]'s suspending
* [WatchFaceService.createWatchFace].
+ *
+ * ListenableWatchFaceServices are required to be stateless as multiple can be created in parallel.
+ * If per instance state is required please use [ListenableStatefulWatchFaceService].
*/
public abstract class ListenableWatchFaceService : WatchFaceService() {
/**
@@ -75,8 +78,73 @@
}
/**
+ * [ListenableFuture]-based compatibility wrapper around [StatefulWatchFaceService]'s suspending
+ * [WatchFaceService.createWatchFace].
+ *
+ * [ListenableWatchFaceService] is required to be stateless as multiple can be created in
+ * parallel. ListenableStatefulWatchFaceService allows for metadata to be associated with
+ * watch faces on a per instance basis. This state is created by [createExtra] and is passed into
+ * other methods.
+ */
+public abstract class
+ListenableStatefulWatchFaceService<Extra> : StatefulWatchFaceService<Extra>() {
+ /**
+ * Override this factory method to create your WatchFaceImpl. This method will be called by the
+ * library on a background thread, if possible any expensive initialization should be done
+ * asynchronously. The [WatchFace] and its [Renderer] should be accessed exclusively from the
+ * UiThread afterwards. There is a memory barrier between construction and rendering so no
+ * special threading primitives are required.
+ *
+ * Warning the system will likely time out waiting for watch face initialization if it takes
+ * longer than [MAX_CREATE_WATCHFACE_TIME_MILLIS] milliseconds.
+ *
+ * Note cancellation of the returned future is not supported.
+ *
+ * @param surfaceHolder The [SurfaceHolder] to pass to the [Renderer]'s constructor.
+ * @param watchState The [WatchState] for the watch face.
+ * @param complicationSlotsManager The [ComplicationSlotsManager] returned by
+ * [createComplicationSlotsManager].
+ * @param currentUserStyleRepository The [CurrentUserStyleRepository] constructed using the
+ * [UserStyleSchema] returned by [createUserStyleSchema].
+ * @param extra The object returned by [createExtra].
+ * @return A [ListenableFuture] for a [WatchFace] whose [Renderer] uses the provided
+ * [surfaceHolder].
+ */
+ @Suppress("AsyncSuffixFuture") // This is java compat on top of the Kotlin version.
+ protected abstract fun createWatchFaceFuture(
+ surfaceHolder: SurfaceHolder,
+ watchState: WatchState,
+ complicationSlotsManager: ComplicationSlotsManager,
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ extra: Extra
+ ): ListenableFuture<WatchFace>
+
+ override suspend fun createWatchFace(
+ surfaceHolder: SurfaceHolder,
+ watchState: WatchState,
+ complicationSlotsManager: ComplicationSlotsManager,
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ extra: Extra
+ ): WatchFace = suspendCancellableCoroutine {
+ val future =
+ createWatchFaceFuture(
+ surfaceHolder,
+ watchState,
+ complicationSlotsManager,
+ currentUserStyleRepository,
+ extra
+ )
+ future.addListener({ it.resume(future.get()) }, { runnable -> runnable.run() })
+ }
+}
+
+/**
* [ListenableFuture]-based compatibility wrapper around [WatchFaceRuntimeService]'s suspending
* [WatchFaceService.createWatchFace].
+ *
+ * ListenableWatchFaceRuntimeService are required to be stateless as multiple can be created in
+ * parallel. If per instance state is required please use
+ * [ListenableStatefulWatchFaceRuntimeService].
*/
public abstract class ListenableWatchFaceRuntimeService : WatchFaceRuntimeService() {
/**
@@ -102,6 +170,7 @@
* @return A [ListenableFuture] for a [WatchFace] whose [Renderer] uses the provided
* [surfaceHolder].
*/
+ @Suppress("AsyncSuffixFuture") // This is java compat on top of the Kotlin version.
protected abstract fun createWatchFaceFutureAsync(
surfaceHolder: SurfaceHolder,
watchState: WatchState,
@@ -128,3 +197,68 @@
future.addListener({ it.resume(future.get()) }, { runnable -> runnable.run() })
}
}
+
+/**
+ * [ListenableFuture]-based compatibility wrapper around [WatchFaceRuntimeService]'s suspending
+ * [WatchFaceService.createWatchFace].
+ *
+ * [ListenableWatchFaceRuntimeService] is required to be stateless as multiple can be created in
+ * parallel. ListenableStatefulWatchFaceRuntimeService allows for metadata to be associated with
+ * watch faces on a per instance basis. This state is created by [createExtra] and is passed into
+ * other methods.
+ */
+public abstract class
+ListenableStatefulWatchFaceRuntimeService<Extra> : StatefulWatchFaceRuntimeService<Extra>() {
+ /**
+ * Override this factory method to create your WatchFaceImpl. This method will be called by the
+ * library on a background thread, if possible any expensive initialization should be done
+ * asynchronously. The [WatchFace] and its [Renderer] should be accessed exclusively from the
+ * UiThread afterwards. There is a memory barrier between construction and rendering so no
+ * special threading primitives are required.
+ *
+ * Warning the system will likely time out waiting for watch face initialization if it takes
+ * longer than [MAX_CREATE_WATCHFACE_TIME_MILLIS] milliseconds.
+ *
+ * Note cancellation of the returned future is not supported.
+ *
+ * @param surfaceHolder The [SurfaceHolder] to pass to the [Renderer]'s constructor.
+ * @param watchState The [WatchState] for the watch face.
+ * @param complicationSlotsManager The [ComplicationSlotsManager] returned by
+ * [createComplicationSlotsManager].
+ * @param currentUserStyleRepository The [CurrentUserStyleRepository] constructed using the
+ * [UserStyleSchema] returned by [createUserStyleSchema].
+ * @param resourceOnlyWatchFacePackageName The android package from which the watch face
+ * definition should be loaded.
+ * @param extra The object returned by [createExtra].
+ * @return A [ListenableFuture] for a [WatchFace] whose [Renderer] uses the provided
+ * [surfaceHolder].
+ */
+ protected abstract fun createWatchFaceFutureAsync(
+ surfaceHolder: SurfaceHolder,
+ watchState: WatchState,
+ complicationSlotsManager: ComplicationSlotsManager,
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ resourceOnlyWatchFacePackageName: String,
+ extra: Extra
+ ): ListenableFuture<WatchFace>
+
+ final override suspend fun createWatchFace(
+ surfaceHolder: SurfaceHolder,
+ watchState: WatchState,
+ complicationSlotsManager: ComplicationSlotsManager,
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ resourceOnlyWatchFacePackageName: String,
+ extra: Extra
+ ): WatchFace = suspendCancellableCoroutine {
+ val future =
+ createWatchFaceFutureAsync(
+ surfaceHolder,
+ watchState,
+ complicationSlotsManager,
+ currentUserStyleRepository,
+ resourceOnlyWatchFacePackageName,
+ extra
+ )
+ future.addListener({ it.resume(future.get()) }, { runnable -> runnable.run() })
+ }
+}
diff --git a/wear/watchface/watchface/api/current.txt b/wear/watchface/watchface/api/current.txt
index 57a1352..1145283 100644
--- a/wear/watchface/watchface/api/current.txt
+++ b/wear/watchface/watchface/api/current.txt
@@ -314,6 +314,32 @@
ctor public RoundRectComplicationTapFilter();
}
+ public abstract class StatefulWatchFaceRuntimeService<Extra> extends androidx.wear.watchface.WatchFaceService {
+ ctor public StatefulWatchFaceRuntimeService();
+ method protected final androidx.wear.watchface.ComplicationSlotsManager createComplicationSlotsManager(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository);
+ method @WorkerThread protected abstract androidx.wear.watchface.ComplicationSlotsManager createComplicationSlotsManager(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, String resourceOnlyWatchFacePackageName, Extra extra);
+ method protected abstract Extra createExtra();
+ method protected final androidx.wear.watchface.style.UserStyleFlavors createUserStyleFlavors(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager);
+ method @WorkerThread protected abstract androidx.wear.watchface.style.UserStyleFlavors createUserStyleFlavors(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, String resourceOnlyWatchFacePackageName, Extra extra);
+ method protected final androidx.wear.watchface.style.UserStyleSchema createUserStyleSchema();
+ method @WorkerThread protected abstract androidx.wear.watchface.style.UserStyleSchema createUserStyleSchema(String resourceOnlyWatchFacePackageName, Extra extra);
+ method @WorkerThread protected abstract suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, String resourceOnlyWatchFacePackageName, Extra extra, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
+ method protected final suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
+ }
+
+ public abstract class StatefulWatchFaceService<Extra> extends androidx.wear.watchface.WatchFaceService {
+ ctor public StatefulWatchFaceService();
+ method protected final androidx.wear.watchface.ComplicationSlotsManager createComplicationSlotsManager(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository);
+ method @WorkerThread protected androidx.wear.watchface.ComplicationSlotsManager createComplicationSlotsManager(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, Extra extra);
+ method protected abstract Extra createExtra();
+ method protected final androidx.wear.watchface.style.UserStyleFlavors createUserStyleFlavors(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager);
+ method @WorkerThread protected androidx.wear.watchface.style.UserStyleFlavors createUserStyleFlavors(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, Extra extra);
+ method protected final androidx.wear.watchface.style.UserStyleSchema createUserStyleSchema();
+ method @WorkerThread protected androidx.wear.watchface.style.UserStyleSchema createUserStyleSchema(Extra extra);
+ method @WorkerThread protected abstract suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, Extra extra, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
+ method protected final suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
+ }
+
public final class TapEvent {
ctor public TapEvent(@Px int xPos, @Px int yPos, java.time.Instant tapTime);
method public java.time.Instant getTapTime();
diff --git a/wear/watchface/watchface/api/restricted_current.txt b/wear/watchface/watchface/api/restricted_current.txt
index 57a1352..1145283 100644
--- a/wear/watchface/watchface/api/restricted_current.txt
+++ b/wear/watchface/watchface/api/restricted_current.txt
@@ -314,6 +314,32 @@
ctor public RoundRectComplicationTapFilter();
}
+ public abstract class StatefulWatchFaceRuntimeService<Extra> extends androidx.wear.watchface.WatchFaceService {
+ ctor public StatefulWatchFaceRuntimeService();
+ method protected final androidx.wear.watchface.ComplicationSlotsManager createComplicationSlotsManager(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository);
+ method @WorkerThread protected abstract androidx.wear.watchface.ComplicationSlotsManager createComplicationSlotsManager(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, String resourceOnlyWatchFacePackageName, Extra extra);
+ method protected abstract Extra createExtra();
+ method protected final androidx.wear.watchface.style.UserStyleFlavors createUserStyleFlavors(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager);
+ method @WorkerThread protected abstract androidx.wear.watchface.style.UserStyleFlavors createUserStyleFlavors(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, String resourceOnlyWatchFacePackageName, Extra extra);
+ method protected final androidx.wear.watchface.style.UserStyleSchema createUserStyleSchema();
+ method @WorkerThread protected abstract androidx.wear.watchface.style.UserStyleSchema createUserStyleSchema(String resourceOnlyWatchFacePackageName, Extra extra);
+ method @WorkerThread protected abstract suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, String resourceOnlyWatchFacePackageName, Extra extra, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
+ method protected final suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
+ }
+
+ public abstract class StatefulWatchFaceService<Extra> extends androidx.wear.watchface.WatchFaceService {
+ ctor public StatefulWatchFaceService();
+ method protected final androidx.wear.watchface.ComplicationSlotsManager createComplicationSlotsManager(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository);
+ method @WorkerThread protected androidx.wear.watchface.ComplicationSlotsManager createComplicationSlotsManager(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, Extra extra);
+ method protected abstract Extra createExtra();
+ method protected final androidx.wear.watchface.style.UserStyleFlavors createUserStyleFlavors(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager);
+ method @WorkerThread protected androidx.wear.watchface.style.UserStyleFlavors createUserStyleFlavors(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, Extra extra);
+ method protected final androidx.wear.watchface.style.UserStyleSchema createUserStyleSchema();
+ method @WorkerThread protected androidx.wear.watchface.style.UserStyleSchema createUserStyleSchema(Extra extra);
+ method @WorkerThread protected abstract suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, Extra extra, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
+ method protected final suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
+ }
+
public final class TapEvent {
ctor public TapEvent(@Px int xPos, @Px int yPos, java.time.Instant tapTime);
method public java.time.Instant getTapTime();
diff --git a/wear/watchface/watchface/lint-baseline.xml b/wear/watchface/watchface/lint-baseline.xml
index cfb1385..c29c2c7 100644
--- a/wear/watchface/watchface/lint-baseline.xml
+++ b/wear/watchface/watchface/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha02" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<issues format="6" by="lint 8.3.0-alpha10" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha10)" variant="all" version="8.3.0-alpha10">
<issue
id="VisibleForTests"
@@ -22,8 +22,8 @@
<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
- errorLine1=" complicationSlotsManager.watchState = watchState"
- errorLine2=" ~~~~~~~~~~">
+ errorLine1=" complicationSlotsManager.watchState = watchState"
+ errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/wear/watchface/WatchFaceService.kt"/>
</issue>
diff --git a/wear/watchface/watchface/src/androidTest/java/androidx/wear/watchface/test/WatchFaceControlServiceTest.kt b/wear/watchface/watchface/src/androidTest/java/androidx/wear/watchface/test/WatchFaceControlServiceTest.kt
index 7bb5522..8ffc3ef 100644
--- a/wear/watchface/watchface/src/androidTest/java/androidx/wear/watchface/test/WatchFaceControlServiceTest.kt
+++ b/wear/watchface/watchface/src/androidTest/java/androidx/wear/watchface/test/WatchFaceControlServiceTest.kt
@@ -37,6 +37,7 @@
import androidx.wear.watchface.DrawMode
import androidx.wear.watchface.RenderParameters
import androidx.wear.watchface.Renderer
+import androidx.wear.watchface.StatefulWatchFaceService
import androidx.wear.watchface.WatchFace
import androidx.wear.watchface.WatchFaceService
import androidx.wear.watchface.WatchFaceType
@@ -63,6 +64,7 @@
import androidx.wear.watchface.samples.ExampleOpenGLWatchFaceService
import androidx.wear.watchface.samples.ExampleOpenGLWatchFaceService.Companion.EXAMPLE_OPENGL_COMPLICATION_ID
import androidx.wear.watchface.style.CurrentUserStyleRepository
+import androidx.wear.watchface.style.UserStyleSchema
import androidx.wear.watchface.style.WatchFaceLayer
import com.google.common.truth.Truth.assertThat
import java.time.ZonedDateTime
@@ -114,6 +116,62 @@
}
}
+class MyExtra(val data: Int)
+
+internal class StatefulWatchFaceServiceWatchFaceService : StatefulWatchFaceService<MyExtra>() {
+
+ override fun createExtra() = MyExtra(123)
+
+ override fun createUserStyleSchema(extra: MyExtra): UserStyleSchema {
+ require(extra.data == 123)
+ return UserStyleSchema(emptyList())
+ }
+
+ override fun createComplicationSlotsManager(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ extra: MyExtra
+ ): ComplicationSlotsManager {
+ require(extra.data == 123)
+ return ComplicationSlotsManager(emptyList(), currentUserStyleRepository)
+ }
+
+ override suspend fun createWatchFace(
+ surfaceHolder: SurfaceHolder,
+ watchState: WatchState,
+ complicationSlotsManager: ComplicationSlotsManager,
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ extra: MyExtra
+ ): WatchFace {
+ require(extra.data == 123)
+ return WatchFace(
+ WatchFaceType.DIGITAL,
+ @Suppress("deprecation")
+ object :
+ Renderer.CanvasRenderer(
+ surfaceHolder,
+ currentUserStyleRepository,
+ watchState,
+ CanvasType.SOFTWARE,
+ 16
+ ) {
+ override fun render(
+ canvas: Canvas,
+ bounds: Rect,
+ zonedDateTime: ZonedDateTime
+ ) {
+ }
+
+ override fun renderHighlightLayer(
+ canvas: Canvas,
+ bounds: Rect,
+ zonedDateTime: ZonedDateTime
+ ) {
+ }
+ }
+ )
+ }
+}
+
const val TIME_MILLIS: Long = 123456789
val DEVICE_CONFIG =
DeviceConfig(
@@ -554,4 +612,31 @@
)
.isNull()
}
+
+ @Test
+ public fun userStyleSchemaWithExtra() {
+ val instanceService =
+ IWatchFaceControlService.Stub.asInterface(
+ WatchFaceControlService()
+ .apply { setContext(ApplicationProvider.getApplicationContext<Context>()) }
+ .onBind(Intent(WatchFaceControlService.ACTION_WATCHFACE_CONTROL_SERVICE))
+ )
+
+ // This shouldn't crash.
+ instance =
+ instanceService.createHeadlessWatchFaceInstance(
+ HeadlessWatchFaceInstanceParams(
+ ComponentName(
+ ApplicationProvider.getApplicationContext<Context>(),
+ StatefulWatchFaceServiceWatchFaceService::class.java
+ ),
+ DEVICE_CONFIG,
+ /* width = */ 100,
+ /* height = */ 100,
+ /* instanceId = */ null
+ )
+ )
+
+ assertThat(instance.userStyleSchema.mSchema).isEmpty()
+ }
}
diff --git a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/WatchFaceService.kt b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/WatchFaceService.kt
index f685456..a56802d 100644
--- a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/WatchFaceService.kt
+++ b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/WatchFaceService.kt
@@ -133,6 +133,9 @@
* enumerated up upfront and passed as a collection into [ComplicationSlotsManager]'s constructor
* which is returned by [createComplicationSlotsManager].
*
+ * WatchFaceServices are required to be stateless as multiple can be created in parallel. If per
+ * instance state is required please use [StatefulWatchFaceService].
+ *
* Watch face styling (color and visual look of watch face elements such as numeric fonts, watch
* hands and ticks, etc...) and companion editing is directly supported via [UserStyleSchema] and
* [UserStyleSetting]. To enable support for styling override [createUserStyleSchema].
@@ -472,8 +475,10 @@
}
}
+ internal open fun createExtraInternal(): Any? = null
+
/**
- * If the WatchFaceService's manifest doesn't define a
+ * If the WatchFaceService's manifest doesn't define an
* androidx.wear.watchface.XmlSchemaAndComplicationSlotsDefinition meta data tag then override
* this factory method to create a non-empty [UserStyleSchema]. A [CurrentUserStyleRepository]
* constructed with this schema will be passed to [createComplicationSlotsManager],
@@ -490,7 +495,8 @@
)
internal open fun createUserStyleSchemaInternal(
- resourceOnlyWatchFacePackageName: String?
+ resourceOnlyWatchFacePackageName: String?,
+ extra: Any?
): UserStyleSchema = createUserStyleSchema()
/**
@@ -519,7 +525,8 @@
internal open fun createComplicationSlotsManagerInternal(
currentUserStyleRepository: CurrentUserStyleRepository,
- resourceOnlyWatchFacePackageName: String?
+ resourceOnlyWatchFacePackageName: String?,
+ extra: Any?
): ComplicationSlotsManager = createComplicationSlotsManager(currentUserStyleRepository)
/**
@@ -590,7 +597,8 @@
internal open fun createUserStyleFlavorsInternal(
currentUserStyleRepository: CurrentUserStyleRepository,
complicationSlotsManager: ComplicationSlotsManager,
- resourceOnlyWatchFacePackageName: String?
+ resourceOnlyWatchFacePackageName: String?,
+ extra: Any?
): UserStyleFlavors =
createUserStyleFlavors(currentUserStyleRepository, complicationSlotsManager)
@@ -625,7 +633,8 @@
watchState: WatchState,
complicationSlotsManager: ComplicationSlotsManager,
currentUserStyleRepository: CurrentUserStyleRepository,
- resourceOnlyWatchFacePackageName: String?
+ resourceOnlyWatchFacePackageName: String?,
+ extra: Any?
): WatchFace =
createWatchFace(
surfaceHolder,
@@ -943,6 +952,8 @@
}
}
+ internal open fun isRuntimeService() = false
+
/** This is the old pre Android R flow that's needed for backwards compatibility. */
internal class WslFlow(private val engineWrapper: EngineWrapper) {
class PendingComplicationData(val complicationSlotId: Int, val data: ComplicationData)
@@ -1319,7 +1330,7 @@
internal var immutableChinHeightDone = false
internal var systemHasSentWatchUiState = false
internal var resourceOnlyWatchFacePackageName: String? =
- if (this@WatchFaceService is WatchFaceRuntimeService) {
+ if (isRuntimeService()) {
headlessComponentName?.packageName
} else {
null
@@ -1949,11 +1960,13 @@
/** This will be called from a binder thread. */
@WorkerThread
internal fun getDefaultProviderPolicies(): Array<IdTypeAndDefaultProviderPolicyWireFormat> {
+ val extra = createExtraInternal()
return createComplicationSlotsManagerInternal(
CurrentUserStyleRepository(
- createUserStyleSchemaInternal(resourceOnlyWatchFacePackageName)
+ createUserStyleSchemaInternal(resourceOnlyWatchFacePackageName, extra)
),
- resourceOnlyWatchFacePackageName
+ resourceOnlyWatchFacePackageName,
+ extra
)
.getDefaultProviderPolicies()
}
@@ -1961,22 +1974,26 @@
/** This will be called from a binder thread. */
@WorkerThread
internal fun getUserStyleSchemaWireFormat() =
- createUserStyleSchemaInternal(resourceOnlyWatchFacePackageName).toWireFormat()
+ createUserStyleSchemaInternal(resourceOnlyWatchFacePackageName, createExtraInternal())
+ .toWireFormat()
/** This will be called from a binder thread. */
@WorkerThread
internal fun getUserStyleFlavorsWireFormat(): UserStyleFlavorsWireFormat {
+ val extra = createExtraInternal()
val currentUserStyleRepository =
CurrentUserStyleRepository(
- createUserStyleSchemaInternal(resourceOnlyWatchFacePackageName)
+ createUserStyleSchemaInternal(resourceOnlyWatchFacePackageName, extra)
)
return createUserStyleFlavorsInternal(
currentUserStyleRepository,
createComplicationSlotsManagerInternal(
currentUserStyleRepository,
- resourceOnlyWatchFacePackageName
+ resourceOnlyWatchFacePackageName,
+ extra
),
- resourceOnlyWatchFacePackageName
+ resourceOnlyWatchFacePackageName,
+ extra
)
.toWireFormat()
}
@@ -1984,13 +2001,16 @@
/** This will be called from a binder thread. */
@OptIn(ComplicationExperimental::class)
@WorkerThread
- internal fun getComplicationSlotMetadataWireFormats() =
- createComplicationSlotsManagerInternal(
- CurrentUserStyleRepository(
- createUserStyleSchemaInternal(resourceOnlyWatchFacePackageName)
- ),
- resourceOnlyWatchFacePackageName
- )
+ internal fun
+ getComplicationSlotMetadataWireFormats(): Array<ComplicationSlotMetadataWireFormat> {
+ val extra = createExtraInternal()
+ return createComplicationSlotsManagerInternal(
+ CurrentUserStyleRepository(
+ createUserStyleSchemaInternal(resourceOnlyWatchFacePackageName, extra)
+ ),
+ resourceOnlyWatchFacePackageName,
+ extra
+ )
.complicationSlots
.map {
val systemDataSourceFallbackDefaultType =
@@ -2022,6 +2042,7 @@
)
}
.toTypedArray()
+ }
@RequiresApi(27)
internal fun createHeadlessInstance(
@@ -2125,7 +2146,7 @@
initialUserStyle = params.userStyle
// For a resource only watch face, the auxiliaryComponentPackageName will be null.
- if (this@WatchFaceService is WatchFaceRuntimeService) {
+ if (isRuntimeService()) {
resourceOnlyWatchFacePackageName = params.auxiliaryComponentPackageName
}
@@ -2192,15 +2213,22 @@
backgroundThreadCoroutineScope.launch {
val timeBefore = System.currentTimeMillis()
+ val extra: Any?
val currentUserStyleRepository: CurrentUserStyleRepository
val complicationSlotsManager: ComplicationSlotsManager
val userStyleFlavors: UserStyleFlavors
try {
+ extra = TraceEvent("WatchFaceService.createExtra").use {
+ createExtraInternal()
+ }
currentUserStyleRepository =
TraceEvent("WatchFaceService.createUserStyleSchema").use {
CurrentUserStyleRepository(
- createUserStyleSchemaInternal(resourceOnlyWatchFacePackageName)
+ createUserStyleSchemaInternal(
+ resourceOnlyWatchFacePackageName,
+ extra
+ )
)
}
initStyle(currentUserStyleRepository)
@@ -2209,7 +2237,8 @@
TraceEvent("WatchFaceService.createComplicationsManager").use {
createComplicationSlotsManagerInternal(
currentUserStyleRepository,
- resourceOnlyWatchFacePackageName
+ resourceOnlyWatchFacePackageName,
+ extra
)
}
complicationSlotsManager.watchFaceHostApi = this@EngineWrapper
@@ -2229,7 +2258,8 @@
createUserStyleFlavorsInternal(
currentUserStyleRepository,
complicationSlotsManager,
- resourceOnlyWatchFacePackageName
+ resourceOnlyWatchFacePackageName,
+ extra
)
}
} catch (e: Exception) {
@@ -2276,7 +2306,8 @@
watchState,
complicationSlotsManager,
currentUserStyleRepository,
- resourceOnlyWatchFacePackageName
+ resourceOnlyWatchFacePackageName,
+ extra
)
}
[email protected](watchFace)
@@ -2934,11 +2965,185 @@
}
/**
+ * [WatchFaceService] is required to be stateless as multiple can be created in parallel.
+ * StatefulWatchFaceService allows for metadata to be associated with watch faces on a per instance
+ * basis. This state is created by [createExtra] and is passed into other methods.
+ */
+@Suppress("UNCHECKED_CAST")
+abstract class StatefulWatchFaceService<Extra> : WatchFaceService() {
+ /**
+ * Constructs the user defined Extra object which is passed as a parameter to the other methods.
+ */
+ protected abstract fun createExtra(): Extra
+
+ override fun createExtraInternal(): Any? = createExtra()
+
+ /**
+ * If the WatchFaceService's manifest doesn't define an
+ * androidx.wear.watchface.XmlSchemaAndComplicationSlotsDefinition meta data tag then override
+ * this factory method to create a non-empty [UserStyleSchema]. A [CurrentUserStyleRepository]
+ * constructed with this schema will be passed to [createComplicationSlotsManager],
+ * [createUserStyleFlavors] and [createWatchFace]. This is called on a background thread.
+ *
+ * @param extra The object returned by [createExtra].
+ * @return The [UserStyleSchema] to create a [CurrentUserStyleRepository] with, which is passed
+ * to [createComplicationSlotsManager] and [createWatchFace].
+ */
+ @WorkerThread
+ protected open fun createUserStyleSchema(
+ extra: Extra
+ ): UserStyleSchema = super.createUserStyleSchema()
+
+ override fun createUserStyleSchemaInternal(
+ resourceOnlyWatchFacePackageName: String?,
+ extra: Any?
+ ): UserStyleSchema = createUserStyleSchema(extra!! as Extra)
+
+ @Suppress("DocumentExceptions") // NB this method isn't expected to be called from user code.
+ final override fun createUserStyleSchema(): UserStyleSchema {
+ throw UnsupportedOperationException("extra must be specified")
+ }
+
+ /**
+ * If the WatchFaceService's manifest doesn't define a
+ * androidx.wear.watchface.XmlSchemaAndComplicationSlotsDefinition meta data tag then override
+ * this factory method to create a non-empty [ComplicationSlotsManager]. This manager will be
+ * passed to [createUserStyleFlavors] and [createWatchFace]. This will be called from a
+ * background thread but the ComplicationSlotsManager should be accessed exclusively from the
+ * UiThread afterwards.
+ *
+ * @param currentUserStyleRepository The [CurrentUserStyleRepository] constructed using the
+ * [UserStyleSchema] returned by [createUserStyleSchema].
+ * @param extra The object returned by [createExtra].
+ * @return The [ComplicationSlotsManager] to pass into [createWatchFace].
+ */
+ @WorkerThread
+ protected open fun createComplicationSlotsManager(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ extra: Extra
+ ): ComplicationSlotsManager = super.createComplicationSlotsManager(currentUserStyleRepository)
+
+ internal override fun createComplicationSlotsManagerInternal(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ resourceOnlyWatchFacePackageName: String?,
+ extra: Any?
+ ): ComplicationSlotsManager =
+ createComplicationSlotsManager(currentUserStyleRepository, extra!! as Extra)
+
+ @Suppress("DocumentExceptions") // NB this method isn't expected to be called from user code.
+ final override fun createComplicationSlotsManager(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ ): ComplicationSlotsManager {
+ throw UnsupportedOperationException("extra must be specified")
+ }
+
+ /**
+ * If the WatchFaceService's manifest doesn't define an
+ * androidx.wear.watchface.XmlSchemaAndComplicationSlotsDefinition meta data tag then override
+ * this factory method to create non-empty [UserStyleFlavors]. This is called on a background
+ * thread. The system reads the flavors once and changes may be ignored until the APK is
+ * updated. Metadata tag "androidx.wear.watchface.FLAVORS_SUPPORTED" should be added to let the
+ * system know the service supports flavors.
+ *
+ * @param currentUserStyleRepository The [CurrentUserStyleRepository] constructed using the
+ * [UserStyleSchema] returned by [createUserStyleSchema].
+ * @param complicationSlotsManager The [ComplicationSlotsManager] returned by
+ * [createComplicationSlotsManager]
+ * @param extra The object returned by [createExtra].
+ * @return The [UserStyleFlavors], which is exposed to the system.
+ */
+ @WorkerThread
+ protected open fun createUserStyleFlavors(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ complicationSlotsManager: ComplicationSlotsManager,
+ extra: Extra
+ ): UserStyleFlavors =
+ super.createUserStyleFlavors(currentUserStyleRepository, complicationSlotsManager)
+
+ internal override fun createUserStyleFlavorsInternal(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ complicationSlotsManager: ComplicationSlotsManager,
+ resourceOnlyWatchFacePackageName: String?,
+ extra: Any?
+ ): UserStyleFlavors =
+ createUserStyleFlavors(
+ currentUserStyleRepository,
+ complicationSlotsManager,
+ extra!! as Extra
+ )
+
+ @Suppress("DocumentExceptions") // NB this method isn't expected to be called from user code.
+ final override fun createUserStyleFlavors(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ complicationSlotsManager: ComplicationSlotsManager,
+ ): UserStyleFlavors {
+ throw UnsupportedOperationException("extra must be specified")
+ }
+
+ /**
+ * Override this factory method to create your WatchFaceImpl. This method will be called by the
+ * library on a background thread, if possible any expensive initialization should be done
+ * asynchronously. The [WatchFace] and its [Renderer] should be accessed exclusively from the
+ * UiThread afterwards. There is a memory barrier between construction and rendering so no
+ * special threading primitives are required.
+ *
+ * Warning the system will likely time out waiting for watch face initialization if it takes
+ * longer than [WatchFaceService.MAX_CREATE_WATCHFACE_TIME_MILLIS] milliseconds.
+ *
+ * @param surfaceHolder The [SurfaceHolder] to pass to the [Renderer]'s constructor.
+ * @param watchState The [WatchState] for the watch face.
+ * @param complicationSlotsManager The [ComplicationSlotsManager] returned by
+ * [createComplicationSlotsManager].
+ * @param currentUserStyleRepository The [CurrentUserStyleRepository] constructed using the
+ * [UserStyleSchema] returned by [createUserStyleSchema].
+ * @param extra The object returned by [createExtra].
+ * @return A [WatchFace] whose [Renderer] uses the provided [surfaceHolder].
+ */
+ @WorkerThread
+ protected abstract suspend fun createWatchFace(
+ surfaceHolder: SurfaceHolder,
+ watchState: WatchState,
+ complicationSlotsManager: ComplicationSlotsManager,
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ extra: Extra
+ ): WatchFace
+
+ internal override suspend fun createWatchFaceInternal(
+ surfaceHolder: SurfaceHolder,
+ watchState: WatchState,
+ complicationSlotsManager: ComplicationSlotsManager,
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ resourceOnlyWatchFacePackageName: String?,
+ extra: Any?
+ ): WatchFace =
+ createWatchFace(
+ surfaceHolder,
+ watchState,
+ complicationSlotsManager,
+ currentUserStyleRepository,
+ extra!! as Extra
+ )
+
+ @Suppress("DocumentExceptions") // NB this method isn't expected to be called from user code.
+ final override suspend fun createWatchFace(
+ surfaceHolder: SurfaceHolder,
+ watchState: WatchState,
+ complicationSlotsManager: ComplicationSlotsManager,
+ currentUserStyleRepository: CurrentUserStyleRepository
+ ): WatchFace {
+ throw UnsupportedOperationException("extra must be specified")
+ }
+}
+
+/**
* WatchFaceRuntimeService is a special kind of [WatchFaceService], which loads the watch face
* definition from another resource only watch face package (see the
* `resourceOnlyWatchFacePackageName` parameter passed to [createUserStyleSchema],
* [createComplicationSlotsManager], [createUserStyleFlavors] and [createWatchFace]).
*
+ * WatchFaceRuntimeServices are required to be stateless as multiple can be created in parallel. If
+ * per instance state is required please use [StatefulWatchFaceRuntimeService].
+ *
* Note because a WatchFaceRuntimeService loads it's resources from another package, it will need
* the following permission:
* ```
@@ -2970,7 +3175,8 @@
): UserStyleSchema
override fun createUserStyleSchemaInternal(
- resourceOnlyWatchFacePackageName: String?
+ resourceOnlyWatchFacePackageName: String?,
+ extra: Any?
): UserStyleSchema = createUserStyleSchema(resourceOnlyWatchFacePackageName!!)
@Suppress("DocumentExceptions") // NB this method isn't expected to be called from user code.
@@ -2979,7 +3185,7 @@
}
/**
- * If the WatchFaceService's manifest doesn't define a
+ * If the WatchFaceService's manifest doesn't define an
* androidx.wear.watchface.XmlSchemaAndComplicationSlotsDefinition meta data tag then override
* this factory method to create a non-empty [ComplicationSlotsManager]. This manager will be
* passed to [createUserStyleFlavors] and [createWatchFace]. This will be called from a
@@ -3000,7 +3206,8 @@
internal override fun createComplicationSlotsManagerInternal(
currentUserStyleRepository: CurrentUserStyleRepository,
- resourceOnlyWatchFacePackageName: String?
+ resourceOnlyWatchFacePackageName: String?,
+ extra: Any?
): ComplicationSlotsManager =
createComplicationSlotsManager(
currentUserStyleRepository,
@@ -3015,7 +3222,7 @@
}
/**
- * If the WatchFaceService's manifest doesn't define a
+ * If the WatchFaceService's manifest doesn't define an
* androidx.wear.watchface.XmlSchemaAndComplicationSlotsDefinition meta data tag then override
* this factory method to create non-empty [UserStyleFlavors]. This is called on a background
* thread. The system reads the flavors once and changes may be ignored until the APK is
@@ -3040,7 +3247,8 @@
internal override fun createUserStyleFlavorsInternal(
currentUserStyleRepository: CurrentUserStyleRepository,
complicationSlotsManager: ComplicationSlotsManager,
- resourceOnlyWatchFacePackageName: String?
+ resourceOnlyWatchFacePackageName: String?,
+ extra: Any?
): UserStyleFlavors =
createUserStyleFlavors(
currentUserStyleRepository,
@@ -3090,7 +3298,8 @@
watchState: WatchState,
complicationSlotsManager: ComplicationSlotsManager,
currentUserStyleRepository: CurrentUserStyleRepository,
- resourceOnlyWatchFacePackageName: String?
+ resourceOnlyWatchFacePackageName: String?,
+ extra: Any?
): WatchFace =
createWatchFace(
surfaceHolder,
@@ -3109,6 +3318,219 @@
): WatchFace {
throw UnsupportedOperationException("resourceOnlyWatchFacePackageName must be specified")
}
+
+ override fun isRuntimeService() = true
+}
+
+/**
+ * [WatchFaceRuntimeService] is required to be stateless as multiple can be created in parallel.
+ * StatefulWatchFaceRuntimeService allows for metadata to be associated with watch faces on a per
+ * instance basis. This state is created by [createExtra] and is passed into other methods.
+ *
+ * Note because a WatchFaceRuntimeService loads it's resources from another package, it will need
+ * the following permission:
+ * ```
+ * <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"
+ * tools:ignore="QueryAllPackagesPermission" />
+ * ```
+ *
+ * Currently Wear OS only supports the runtime for the Android Watch Face Format (see
+ * https://developer.android.com/training/wearables/wff for more details).
+ *
+ * Note only one watch face definition per resource only watch face package is supported.
+ */
+@Suppress("UNCHECKED_CAST")
+abstract class StatefulWatchFaceRuntimeService<Extra> : WatchFaceService() {
+ /**
+ * Constructs the user defined Extra object which is passed as a parameter to the other methods.
+ */
+ protected abstract fun createExtra(): Extra
+
+ override fun createExtraInternal(): Any? = createExtra()
+
+ /**
+ * If the WatchFaceService's manifest doesn't define an
+ * androidx.wear.watchface.XmlSchemaAndComplicationSlotsDefinition meta data tag then override
+ * this factory method to create a non-empty [UserStyleSchema]. A [CurrentUserStyleRepository]
+ * constructed with this schema will be passed to [createComplicationSlotsManager],
+ * [createUserStyleFlavors] and [createWatchFace]. This is called on a background thread.
+ *
+ * @param resourceOnlyWatchFacePackageName The android package from which the watch face
+ * definition should be loaded.
+ * @param extra The object returned by [createExtra].
+ * @return The [UserStyleSchema] to create a [CurrentUserStyleRepository] with, which is passed
+ * to [createComplicationSlotsManager] and [createWatchFace].
+ */
+ @WorkerThread
+ protected abstract fun createUserStyleSchema(
+ resourceOnlyWatchFacePackageName: String,
+ extra: Extra
+ ): UserStyleSchema
+
+ override fun createUserStyleSchemaInternal(
+ resourceOnlyWatchFacePackageName: String?,
+ extra: Any?
+ ): UserStyleSchema =
+ createUserStyleSchema(resourceOnlyWatchFacePackageName!!, extra!! as Extra)
+
+ @Suppress("DocumentExceptions") // NB this method isn't expected to be called from user code.
+ final override fun createUserStyleSchema(): UserStyleSchema {
+ throw UnsupportedOperationException(
+ "resourceOnlyWatchFacePackageName and extra must be specified"
+ )
+ }
+
+ /**
+ * If the WatchFaceService's manifest doesn't define a
+ * androidx.wear.watchface.XmlSchemaAndComplicationSlotsDefinition meta data tag then override
+ * this factory method to create a non-empty [ComplicationSlotsManager]. This manager will be
+ * passed to [createUserStyleFlavors] and [createWatchFace]. This will be called from a
+ * background thread but the ComplicationSlotsManager should be accessed exclusively from the
+ * UiThread afterwards.
+ *
+ * @param currentUserStyleRepository The [CurrentUserStyleRepository] constructed using the
+ * [UserStyleSchema] returned by [createUserStyleSchema].
+ * @param resourceOnlyWatchFacePackageName The android package from which the watch face
+ * definition should be loaded.
+ * @param extra The object returned by [createExtra].
+ * @return The [ComplicationSlotsManager] to pass into [createWatchFace].
+ */
+ @WorkerThread
+ protected abstract fun createComplicationSlotsManager(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ resourceOnlyWatchFacePackageName: String,
+ extra: Extra
+ ): ComplicationSlotsManager
+
+ internal override fun createComplicationSlotsManagerInternal(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ resourceOnlyWatchFacePackageName: String?,
+ extra: Any?
+ ): ComplicationSlotsManager =
+ createComplicationSlotsManager(
+ currentUserStyleRepository,
+ resourceOnlyWatchFacePackageName!!,
+ extra!! as Extra
+ )
+
+ @Suppress("DocumentExceptions") // NB this method isn't expected to be called from user code.
+ final override fun createComplicationSlotsManager(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ ): ComplicationSlotsManager {
+ throw UnsupportedOperationException(
+ "resourceOnlyWatchFacePackageName and extra must be specified"
+ )
+ }
+
+ /**
+ * If the WatchFaceService's manifest doesn't define an
+ * androidx.wear.watchface.XmlSchemaAndComplicationSlotsDefinition meta data tag then override
+ * this factory method to create non-empty [UserStyleFlavors]. This is called on a background
+ * thread. The system reads the flavors once and changes may be ignored until the APK is
+ * updated. Metadata tag "androidx.wear.watchface.FLAVORS_SUPPORTED" should be added to let the
+ * system know the service supports flavors.
+ *
+ * @param currentUserStyleRepository The [CurrentUserStyleRepository] constructed using the
+ * [UserStyleSchema] returned by [createUserStyleSchema].
+ * @param complicationSlotsManager The [ComplicationSlotsManager] returned by
+ * [createComplicationSlotsManager]
+ * @param resourceOnlyWatchFacePackageName The android package from which the watch face
+ * definition should be loaded.
+ * @param extra The object returned by [createExtra].
+ * @return The [UserStyleFlavors], which is exposed to the system.
+ */
+ @WorkerThread
+ protected abstract fun createUserStyleFlavors(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ complicationSlotsManager: ComplicationSlotsManager,
+ resourceOnlyWatchFacePackageName: String,
+ extra: Extra
+ ): UserStyleFlavors
+
+ internal override fun createUserStyleFlavorsInternal(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ complicationSlotsManager: ComplicationSlotsManager,
+ resourceOnlyWatchFacePackageName: String?,
+ extra: Any?
+ ): UserStyleFlavors =
+ createUserStyleFlavors(
+ currentUserStyleRepository,
+ complicationSlotsManager,
+ resourceOnlyWatchFacePackageName!!,
+ extra!! as Extra
+ )
+
+ @Suppress("DocumentExceptions") // NB this method isn't expected to be called from user code.
+ final override fun createUserStyleFlavors(
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ complicationSlotsManager: ComplicationSlotsManager,
+ ): UserStyleFlavors {
+ throw UnsupportedOperationException(
+ "resourceOnlyWatchFacePackageName and extra must be specified"
+ )
+ }
+
+ /**
+ * Override this factory method to create your WatchFaceImpl. This method will be called by the
+ * library on a background thread, if possible any expensive initialization should be done
+ * asynchronously. The [WatchFace] and its [Renderer] should be accessed exclusively from the
+ * UiThread afterwards. There is a memory barrier between construction and rendering so no
+ * special threading primitives are required.
+ *
+ * Warning the system will likely time out waiting for watch face initialization if it takes
+ * longer than [WatchFaceService.MAX_CREATE_WATCHFACE_TIME_MILLIS] milliseconds.
+ *
+ * @param surfaceHolder The [SurfaceHolder] to pass to the [Renderer]'s constructor.
+ * @param watchState The [WatchState] for the watch face.
+ * @param complicationSlotsManager The [ComplicationSlotsManager] returned by
+ * [createComplicationSlotsManager].
+ * @param currentUserStyleRepository The [CurrentUserStyleRepository] constructed using the
+ * [UserStyleSchema] returned by [createUserStyleSchema].
+ * @param resourceOnlyWatchFacePackageName The android package from which the watch face
+ * definition should be loaded.
+ * @param extra The object returned by [createExtra].
+ * @return A [WatchFace] whose [Renderer] uses the provided [surfaceHolder].
+ */
+ @WorkerThread
+ protected abstract suspend fun createWatchFace(
+ surfaceHolder: SurfaceHolder,
+ watchState: WatchState,
+ complicationSlotsManager: ComplicationSlotsManager,
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ resourceOnlyWatchFacePackageName: String,
+ extra: Extra
+ ): WatchFace
+
+ internal override suspend fun createWatchFaceInternal(
+ surfaceHolder: SurfaceHolder,
+ watchState: WatchState,
+ complicationSlotsManager: ComplicationSlotsManager,
+ currentUserStyleRepository: CurrentUserStyleRepository,
+ resourceOnlyWatchFacePackageName: String?,
+ extra: Any?
+ ): WatchFace =
+ createWatchFace(
+ surfaceHolder,
+ watchState,
+ complicationSlotsManager,
+ currentUserStyleRepository,
+ resourceOnlyWatchFacePackageName!!,
+ extra!! as Extra
+ )
+
+ @Suppress("DocumentExceptions") // NB this method isn't expected to be called from user code.
+ final override suspend fun createWatchFace(
+ surfaceHolder: SurfaceHolder,
+ watchState: WatchState,
+ complicationSlotsManager: ComplicationSlotsManager,
+ currentUserStyleRepository: CurrentUserStyleRepository
+ ): WatchFace {
+ throw UnsupportedOperationException(
+ "resourceOnlyWatchFacePackageName and extra must be specified"
+ )
+ }
+
+ override fun isRuntimeService() = true
}
/**
diff --git a/wear/wear/lint-baseline.xml b/wear/wear/lint-baseline.xml
index ba5b485..27097a7 100644
--- a/wear/wear/lint-baseline.xml
+++ b/wear/wear/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.1.0-beta02" type="baseline" client="gradle" dependencies="false" name="AGP (8.1.0-beta02)" variant="all" version="8.1.0-beta02">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
diff --git a/window/window-demos/demo-second-app/lint-baseline.xml b/window/window-demos/demo-second-app/lint-baseline.xml
deleted file mode 100644
index 34bc125..0000000
--- a/window/window-demos/demo-second-app/lint-baseline.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="NotificationPermission"
- message="When targeting Android 13 or higher, posting a permission requires holding the `POST_NOTIFICATIONS` permission (usage from leakcanary.NotificationEventListener)">
- <location
- file="src/main/AndroidManifest.xml"/>
- </issue>
-
-</issues>
diff --git a/window/window-java/build.gradle b/window/window-java/build.gradle
index 9a4a33c..cff62ff 100644
--- a/window/window-java/build.gradle
+++ b/window/window-java/build.gradle
@@ -34,7 +34,8 @@
api(libs.kotlinStdlib)
api(libs.kotlinCoroutinesCore)
api(project(":window:window"))
- implementation("androidx.core:core:1.3.2")
+ implementation("androidx.core:core:1.8.0")
+ implementation("androidx.annotation:annotation:1.7.0")
testImplementation(libs.testCore)
testImplementation(libs.testRunner)
diff --git a/window/window-testing/build.gradle b/window/window-testing/build.gradle
index b491afc..60e9a1d 100644
--- a/window/window-testing/build.gradle
+++ b/window/window-testing/build.gradle
@@ -41,7 +41,8 @@
api(libs.kotlinStdlib)
api(project(":window:window"))
api(libs.junit)
- implementation("androidx.core:core:1.3.2")
+ implementation("androidx.core:core:1.8.0")
+ implementation("androidx.annotation:annotation:1.7.0")
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testExtJunit)
diff --git a/work/integration-tests/testapp/build.gradle b/work/integration-tests/testapp/build.gradle
index 1925b84..7bac479 100644
--- a/work/integration-tests/testapp/build.gradle
+++ b/work/integration-tests/testapp/build.gradle
@@ -45,6 +45,7 @@
dependencies {
annotationProcessor(projectOrArtifact(":room:room-compiler"))
implementation(projectOrArtifact(":room:room-runtime"))
+ implementation(projectOrArtifact(":room:room-ktx"))
implementation(libs.constraintLayout)
implementation("androidx.core:core:1.12.0")
diff --git a/work/integration-tests/testapp/lint-baseline.xml b/work/integration-tests/testapp/lint-baseline.xml
index 41f4bcb..90a35b4 100644
--- a/work/integration-tests/testapp/lint-baseline.xml
+++ b/work/integration-tests/testapp/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanThreadSleep"
diff --git a/work/work-benchmark/build.gradle b/work/work-benchmark/build.gradle
index 4e4f926..edf429d 100644
--- a/work/work-benchmark/build.gradle
+++ b/work/work-benchmark/build.gradle
@@ -35,6 +35,7 @@
androidTestImplementation(project(":work:work-multiprocess"))
androidTestImplementation(projectOrArtifact(":benchmark:benchmark-junit4"))
androidTestImplementation(projectOrArtifact(":room:room-runtime"))
+ androidTestImplementation(projectOrArtifact(":room:room-ktx"))
androidTestImplementation(libs.junit)
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
diff --git a/work/work-runtime/lint-baseline.xml b/work/work-runtime/lint-baseline.xml
index cc58cb1..e57c7ec 100644
--- a/work/work-runtime/lint-baseline.xml
+++ b/work/work-runtime/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
+<issues format="6" by="lint 8.3.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-beta01)" variant="all" version="8.3.0-beta01">
<issue
id="BanSynchronizedMethods"